Dialogs and Toasts
MaterialApp is a class that represents an application that uses material design.
It is a concrete class and derives from the StatefulWidget and resides in the
class MaterialApp extends StatefulWidget
MaterialApp makes our job easier by wrapping several widgets that are commonly required for material design applications. It builds upon a
WidgetsApp by adding material-design specific functionality, such as
It then configures the top-level
Navigator to search for routes in the following order:
- For the
/route, the home property, if non-null, is used.
- Otherwise, the routes table is used, if it has an entry for the route.
onGenerateRouteis called, if provided. It should return a non-null value for any valid route not handled by home and routes.
- Finally if all else fails
If a Navigator is created, at least one of these options must handle the
/ route, since it is used when an invalid
initialRoute is specified on startup (e.g. by another application launching this one with an intent on Android).
`MaterialApp also configures the observer of the top-level Navigator (if any) to perform
Examples coming soon.