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