Home > Software engineering >  How do I use multiple main activities in flutter?
How do I use multiple main activities in flutter?

Time:08-04

I am building a flutter app which has these two plugins 1) local_auth 2) flutter_bar_code and they both use different main activities , for local auth the MainActivity.kt is like

import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() {
      
  }

and for flutter bar code scanner the MainActivity.tk is like

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}

CodePudding user response:

Flutter has a single MainActivity file. if you want to add more screen then please read doc and blogs here is one for you: Add Multiple screen

CodePudding user response:

What do you want to know? Please make sure to ask that you need...

  • Related