0

I'm creating an Android Launcher in Flutter. Whenever the user opens the App I need to show the Launcher selection screen. I have found the answer here, but it is for native Android development. How do I integrate this with Flutter ?

How to set default app launcher programmatically?

I have tried creating the new activity but I'm not sure where to call the function.

Aswin Mohan
  • 952
  • 1
  • 11
  • 26

1 Answers1

0

To set a page at the initial route of the flutter. You can use initialRoute in your MaterialApp of your main.dart file. Then specify your page in your routes. Read about Defining the routes

MaterialApp(
  // Start the app with the "/" named route. In this case, the app starts
  // on the FirstScreen widget.
  initialRoute: '/',
  routes: {
    // When navigating to the "/" route, build the FirstScreen widget.
    '/': (context) => FakeLauncher()
  },
);
Alok
  • 8,452
  • 13
  • 55
  • 93