0 purchases
windows single 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 #
Add WidgetsFlutterBinding.ensureInitialized(); to the start of your apps main function.
Use WindowsSingleLaunch.singleRunApp() instead of runApp() to run your application.
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",
);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.