This commit is contained in:
@ -25,7 +25,10 @@ class MyApp extends StatelessWidget {
|
||||
initialRoute: '/',
|
||||
routes: {'/': (context) => const MyHomePage(title: constants.appTitle)},
|
||||
onGenerateRoute: (settings) {
|
||||
if (settings.name == '/settings') {
|
||||
if (settings.name != '/settings') {
|
||||
return null;
|
||||
}
|
||||
|
||||
final mountConfig = settings.arguments as MountConfig;
|
||||
return MaterialPageRoute(
|
||||
builder: (context) {
|
||||
@ -36,17 +39,14 @@ class MyApp extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({super.key, required this.title});
|
||||
|
||||
final String title;
|
||||
const MyHomePage({super.key, required this.title});
|
||||
|
||||
@override
|
||||
State<MyHomePage> createState() => _MyHomePageState();
|
||||
|
Reference in New Issue
Block a user