refactor
This commit is contained in:
parent
918d7172ec
commit
6f45848db4
@ -4,6 +4,7 @@ String formatMountName(String type, String name) {
|
||||
if (type == 'remote') {
|
||||
return name.replaceAll('_', ':');
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
@ -11,6 +12,7 @@ String getBaseUri() {
|
||||
if (kDebugMode || !kIsWeb) {
|
||||
return 'http://127.0.0.1:30000';
|
||||
}
|
||||
|
||||
return Uri.base.origin;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ class _MyAppState extends State<MyApp> {
|
||||
(context) => const AddMountScreen(title: constants.addMountTitle),
|
||||
},
|
||||
onGenerateRoute: (settings) {
|
||||
if (settings.name != '/settings') {
|
||||
if (settings.name != '/edit') {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class _MountWidgetState extends State<MountWidget> {
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.settings, color: textColor),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, '/settings', arguments: mount);
|
||||
Navigator.pushNamed(context, '/edit', arguments: mount);
|
||||
},
|
||||
),
|
||||
subtitle: Column(
|
||||
|
Loading…
x
Reference in New Issue
Block a user