|
|
@ -9,15 +9,160 @@ part of 'router.dart'; |
|
|
|
List<RouteBase> get $appRoutes => [ |
|
|
|
List<RouteBase> get $appRoutes => [ |
|
|
|
$homeRoute, |
|
|
|
$homeRoute, |
|
|
|
$loginRoute, |
|
|
|
$loginRoute, |
|
|
|
|
|
|
|
$settingsRoute, |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
RouteBase get $homeRoute => GoRouteData.$route( |
|
|
|
RouteBase get $homeRoute => GoRouteData.$route( |
|
|
|
path: '/', |
|
|
|
path: '/', |
|
|
|
name: 'home', |
|
|
|
name: 'home', |
|
|
|
factory: $HomeRouteExtension._fromState, |
|
|
|
factory: $HomeRouteExtension._fromState, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $HomeRouteExtension on HomeRoute { |
|
|
|
|
|
|
|
static HomeRoute _fromState(GoRouterState state) => const HomeRoute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/', |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RouteBase get $loginRoute => GoRouteData.$route( |
|
|
|
|
|
|
|
path: '/login', |
|
|
|
|
|
|
|
name: 'login', |
|
|
|
|
|
|
|
factory: $LoginRouteExtension._fromState, |
|
|
|
routes: [ |
|
|
|
routes: [ |
|
|
|
GoRouteData.$route( |
|
|
|
GoRouteData.$route( |
|
|
|
path: 'settings', |
|
|
|
path: 'flow', |
|
|
|
|
|
|
|
factory: $LoginFlowRouteExtension._fromState, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
GoRouteData.$route( |
|
|
|
|
|
|
|
path: 'qrcode', |
|
|
|
|
|
|
|
factory: $LoginQrcodeRouteExtension._fromState, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
GoRouteData.$route( |
|
|
|
|
|
|
|
path: 'check/server', |
|
|
|
|
|
|
|
factory: $LoginCheckServerStatusRouteExtension._fromState, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
GoRouteData.$route( |
|
|
|
|
|
|
|
path: 'check/account', |
|
|
|
|
|
|
|
factory: $LoginCheckAccountRouteExtension._fromState, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginRouteExtension on LoginRoute { |
|
|
|
|
|
|
|
static LoginRoute _fromState(GoRouterState state) => const LoginRoute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login', |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginFlowRouteExtension on LoginFlowRoute { |
|
|
|
|
|
|
|
static LoginFlowRoute _fromState(GoRouterState state) => LoginFlowRoute( |
|
|
|
|
|
|
|
serverUrl: state.uri.queryParameters['server-url']!, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login/flow', |
|
|
|
|
|
|
|
queryParams: { |
|
|
|
|
|
|
|
'server-url': serverUrl, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginQrcodeRouteExtension on LoginQrcodeRoute { |
|
|
|
|
|
|
|
static LoginQrcodeRoute _fromState(GoRouterState state) => const LoginQrcodeRoute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login/qrcode', |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginCheckServerStatusRouteExtension on LoginCheckServerStatusRoute { |
|
|
|
|
|
|
|
static LoginCheckServerStatusRoute _fromState(GoRouterState state) => LoginCheckServerStatusRoute( |
|
|
|
|
|
|
|
serverUrl: state.uri.queryParameters['server-url']!, |
|
|
|
|
|
|
|
loginName: state.uri.queryParameters['login-name'], |
|
|
|
|
|
|
|
password: state.uri.queryParameters['password'], |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login/check/server', |
|
|
|
|
|
|
|
queryParams: { |
|
|
|
|
|
|
|
'server-url': serverUrl, |
|
|
|
|
|
|
|
if (loginName != null) 'login-name': loginName, |
|
|
|
|
|
|
|
if (password != null) 'password': password, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginCheckAccountRouteExtension on LoginCheckAccountRoute { |
|
|
|
|
|
|
|
static LoginCheckAccountRoute _fromState(GoRouterState state) => LoginCheckAccountRoute( |
|
|
|
|
|
|
|
serverUrl: state.uri.queryParameters['server-url']!, |
|
|
|
|
|
|
|
loginName: state.uri.queryParameters['login-name']!, |
|
|
|
|
|
|
|
password: state.uri.queryParameters['password']!, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login/check/account', |
|
|
|
|
|
|
|
queryParams: { |
|
|
|
|
|
|
|
'server-url': serverUrl, |
|
|
|
|
|
|
|
'login-name': loginName, |
|
|
|
|
|
|
|
'password': password, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RouteBase get $settingsRoute => GoRouteData.$route( |
|
|
|
|
|
|
|
path: '/settings', |
|
|
|
name: 'Settings', |
|
|
|
name: 'Settings', |
|
|
|
factory: $SettingsRouteExtension._fromState, |
|
|
|
factory: $SettingsRouteExtension._fromState, |
|
|
|
routes: [ |
|
|
|
routes: [ |
|
|
@ -55,26 +200,8 @@ RouteBase get $homeRoute => GoRouteData.$route( |
|
|
|
factory: $AccountSettingsRouteExtension._fromState, |
|
|
|
factory: $AccountSettingsRouteExtension._fromState, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
extension $HomeRouteExtension on HomeRoute { |
|
|
|
|
|
|
|
static HomeRoute _fromState(GoRouterState state) => const HomeRoute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/', |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $SettingsRouteExtension on SettingsRoute { |
|
|
|
extension $SettingsRouteExtension on SettingsRoute { |
|
|
|
static SettingsRoute _fromState(GoRouterState state) => SettingsRoute( |
|
|
|
static SettingsRoute _fromState(GoRouterState state) => SettingsRoute( |
|
|
|
initialCategory: |
|
|
|
initialCategory: |
|
|
@ -255,130 +382,3 @@ T? _$convertMapValue<T>( |
|
|
|
extension<T extends Enum> on Map<T, String> { |
|
|
|
extension<T extends Enum> on Map<T, String> { |
|
|
|
T _$fromName(String value) => entries.singleWhere((element) => element.value == value).key; |
|
|
|
T _$fromName(String value) => entries.singleWhere((element) => element.value == value).key; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RouteBase get $loginRoute => GoRouteData.$route( |
|
|
|
|
|
|
|
path: '/login', |
|
|
|
|
|
|
|
name: 'login', |
|
|
|
|
|
|
|
factory: $LoginRouteExtension._fromState, |
|
|
|
|
|
|
|
routes: [ |
|
|
|
|
|
|
|
GoRouteData.$route( |
|
|
|
|
|
|
|
path: 'flow', |
|
|
|
|
|
|
|
factory: $LoginFlowRouteExtension._fromState, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
GoRouteData.$route( |
|
|
|
|
|
|
|
path: 'qrcode', |
|
|
|
|
|
|
|
factory: $LoginQrcodeRouteExtension._fromState, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
GoRouteData.$route( |
|
|
|
|
|
|
|
path: 'check/server', |
|
|
|
|
|
|
|
factory: $LoginCheckServerStatusRouteExtension._fromState, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
GoRouteData.$route( |
|
|
|
|
|
|
|
path: 'check/account', |
|
|
|
|
|
|
|
factory: $LoginCheckAccountRouteExtension._fromState, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginRouteExtension on LoginRoute { |
|
|
|
|
|
|
|
static LoginRoute _fromState(GoRouterState state) => const LoginRoute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login', |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginFlowRouteExtension on LoginFlowRoute { |
|
|
|
|
|
|
|
static LoginFlowRoute _fromState(GoRouterState state) => LoginFlowRoute( |
|
|
|
|
|
|
|
serverUrl: state.uri.queryParameters['server-url']!, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login/flow', |
|
|
|
|
|
|
|
queryParams: { |
|
|
|
|
|
|
|
'server-url': serverUrl, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginQrcodeRouteExtension on LoginQrcodeRoute { |
|
|
|
|
|
|
|
static LoginQrcodeRoute _fromState(GoRouterState state) => const LoginQrcodeRoute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login/qrcode', |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginCheckServerStatusRouteExtension on LoginCheckServerStatusRoute { |
|
|
|
|
|
|
|
static LoginCheckServerStatusRoute _fromState(GoRouterState state) => LoginCheckServerStatusRoute( |
|
|
|
|
|
|
|
serverUrl: state.uri.queryParameters['server-url']!, |
|
|
|
|
|
|
|
loginName: state.uri.queryParameters['login-name'], |
|
|
|
|
|
|
|
password: state.uri.queryParameters['password'], |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login/check/server', |
|
|
|
|
|
|
|
queryParams: { |
|
|
|
|
|
|
|
'server-url': serverUrl, |
|
|
|
|
|
|
|
if (loginName != null) 'login-name': loginName, |
|
|
|
|
|
|
|
if (password != null) 'password': password, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extension $LoginCheckAccountRouteExtension on LoginCheckAccountRoute { |
|
|
|
|
|
|
|
static LoginCheckAccountRoute _fromState(GoRouterState state) => LoginCheckAccountRoute( |
|
|
|
|
|
|
|
serverUrl: state.uri.queryParameters['server-url']!, |
|
|
|
|
|
|
|
loginName: state.uri.queryParameters['login-name']!, |
|
|
|
|
|
|
|
password: state.uri.queryParameters['password']!, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String get location => GoRouteData.$location( |
|
|
|
|
|
|
|
'/login/check/account', |
|
|
|
|
|
|
|
queryParams: { |
|
|
|
|
|
|
|
'server-url': serverUrl, |
|
|
|
|
|
|
|
'login-name': loginName, |
|
|
|
|
|
|
|
'password': password, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void go(BuildContext context) => context.go(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void replace(BuildContext context) => context.replace(location); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|