Flutter MaterialApp: theme, home and navigation
MaterialApp supplies app-level Material behavior, including theme and navigation. Scaffold is normally a screen inside it and provides layout areas such as an app bar and body.
Start with one screen
Set MaterialApp.home to a widget that returns a Scaffold. Put the screen’s content in Scaffold.body and set colors and typography on MaterialApp.theme when the choices should apply across screens.
Know where route lookup starts
When the default route is requested, home handles it if present. For other named routes, MaterialApp checks its routes map, then onGenerateRoute, then onUnknownRoute. A home widget and a routes entry for '/' should not both define that route.
When the route model grows
For deep links or declarative routing, consider MaterialApp.router and the routing approach used by the project. A quick diagnostic is to compare the incoming route string with the route configuration before changing screen widgets.
