refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...

This commit is contained in:
2025-03-01 18:36:56 -06:00
parent e3d9487c74
commit f7fc726452

View File

@ -25,28 +25,28 @@ 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') {
final mountConfig = settings.arguments as MountConfig; return null;
return MaterialPageRoute(
builder: (context) {
return MountSettingsWidget(
title:
'${initialCaps(mountConfig.type)} [${formatMountName(mountConfig.type, mountConfig.name)}] Settings',
config: mountConfig,
);
},
);
} }
return null;
final mountConfig = settings.arguments as MountConfig;
return MaterialPageRoute(
builder: (context) {
return MountSettingsWidget(
title:
'${initialCaps(mountConfig.type)} [${formatMountName(mountConfig.type, mountConfig.name)}] Settings',
config: mountConfig,
);
},
);
}, },
); );
} }
} }
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();