The filename.ext widget extends the StatelessWidget class. Within the build method, the widget creates separate routes for the '/a' and '/b' paths. The routes define the path of the widget and the widget builder to use when rendering it.
Library: Flutter
/// Flutter
class filename.ext extends StatelessWidget {
// This widget is the root of your application.
const filename.ext({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
//...
routes: <String, WidgetBuilder>{
'/a': (BuildContext context) => Home(),
'/b': (BuildContext context) => Settings(),
},
//...
);
}
}