windows_single_launch 0.0.4 copy "windows_single_launch: ^0.0.4" to clipboard
windows_single_launch: ^0.0.4 copied to clipboard

PlatformWindows

Launch Windows applications from a single instance. Brings the current instance to the front on each launch.

Windows Single Launch #

Launch Windows applications from a single instance. Brings the current instance to the front on each launch.

If you do not want a new instance to run every time you run your application, you can use this plugin. With its simple use, it forces your application to run in a single instance in a good way. If the application is already open, when you run it again, it brings the current application to the front, and if it is hidden, it makes it visible.

Usage #

  1. Add WidgetsFlutterBinding.ensureInitialized(); to the start of your apps main function.
  2. Use WindowsSingleLaunch.singleRunApp() instead of runApp() to run your application.
  3. singleRunApp(
    app: (Your application),
    originalName: (OriginalName of your application written in windows/runner/Runner.rc),
    windowTitleName: (title of your application written in windows/runner/main.cpp)
    ):

Example #

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  WindowsSingleLaunch().singleRunApp(
    app: const MyApp(),
    originalName: "windows_single_launch_example.exe",
    windowTitleName: "Windows Single Launch",
  );
}
3
likes
150
points
127
downloads

Publisher

verified publisherclomc.xyz

Weekly Downloads

Launch Windows applications from a single instance. Brings the current instance to the front on each launch.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on windows_single_launch