In Android, Intent there are two main uses: for activity jumping between, and for communication between components. Flutter As there is no activity, fragmentthe component corresponding to the direct, but rather Navigator, Route to switch between the screens with which activity . Route is the abstraction of the application screen and page, but Navigator is a management Route control . It can be Route seen roughly activity, but they have different meanings. Switch the screen Navigator by push and pop(can be seen as pushing and popping) Route, and the Navigator working principle can be seen as a stack, which push means switching forward and pop returning. In Android, you need Android Manifest.xmlto declare activity, and in Flutter , you have the following page switching options: Specify a () containing all Route names Map MaterialApp void main() { Navigator.of(context).pushNamed('/b');
But in flutter there is no Intent such concept, although you can still start via local integration native integrations(using plugins ) Intent.
Switch directly to Route(WidgetApp)
The following example is the Mapw ay:
runApp(MaterialApp(
home: MyAppHome(), // becomes the route named '/'
routes: <String, Widget Builder> {
'/a': (BuildContext context) => MyPage(title: 'page A'),
'/b': (BuildContext context) => MyPage(title: 'page B'),
'/c': (BuildContext context) => MyPage(title: 'page C'),
},
));
}
The following is the way to go Routedirectly pushto Navigatorthe name :
Another use Intentcase is to call external components, such as cameras, file selectors. In this case, you need to create a native platform integration (native platform integration), or use an
Flutter - Vertical Divider - How to add Vertical Divider?
How to handle the code after showDialog is dismissed in Flutter?
What is Flutter?
How does Flutter load images?
How do i make circular icon Inside Button ?
How to make a widget Center vertically inside a SingleChildScrollView
How to create Gradient background for AppBar in Flutter
How to convert a String value to double in flutter?
How to create Toast in Flutter?
How to deactivate back button in flutter?
How to change package name in flutter?
How to remove Yellow lines under Text Widgets in Flutter?
What corresponds to Intent in Flutter?
How to set the TextFormField/TextField border color
How do I supply/set an initial value to a text field in Flutter ?
How to display snackbar infinite duration in a flutter application
OS Error: A required privilege is not held by the client errno = 1314
Cannot run with sound null safety because dependencies don't support null safety, I have receive
How to copy text from Text Widget flutter?
How do i change the OutlineInputBorder color?
Vertical Divider is Not Showing in my Flutter Application
How to handle Scaffold.of() called with a context that does not contain a Scaffold exception?
How to fix Flutter Bottom OverFlowed error A RenderFlex overflowed by XX pixels on the bott
Flutter Questions and Answers
How to Close Flutter application Programmatically?
How to place a listview inside a SingleChildScrollView but prevent them from scrolling separately?
How can i get document id in Flutter Firestore?
How to remove debug banner in flutter?
How do we save the data in browser's cookies using the Flutter web?
How to change the application launcher icon on Flutter?
Error : MediaQuery.of() called with a context that does not contain a MediaQuery No MediaQuery ances
How do i make CachedNetwork image as rounded circle in flutter?
Navigator operation requested with a context that does not include a Navigator.
How to find the Screen orientation in flutter
How to make shadow for Container widget Flutter?
Can we use Container color and decoration properties at once?
How do i make TextButton full width in flutter?
How to navigate to new screen without back screen
How do I open a web browser (URL) from my Flutter code?
How to check the given value is a number or not in dart?