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