Template
chore: 初始化脚手架 — sunny_mochi 企业级 Flutter 模板
Core 基础设施:Flavor 三包体系、Drift+SQLCipher 加密数据库 7 拦截器 Dio 网络栈、CrashReporter 崩溃日志、Sealed Failure 错误体系 5 色板主题系统、Auth 认证骨架(Clean Architecture)、Dev Panel、Mock Adapter 通过验证:flutter analyze(0 errors)、flutter test(全绿)、staging APK 74.8MB
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'routes.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// GoRouterGenerator
|
||||
// **************************************************************************
|
||||
|
||||
List<RouteBase> get $appRoutes => [
|
||||
$shellRouteData,
|
||||
$loginRoute,
|
||||
$devPanelRoute,
|
||||
$errorReportRoute,
|
||||
];
|
||||
|
||||
RouteBase get $shellRouteData => StatefulShellRouteData.$route(
|
||||
factory: $ShellRouteDataExtension._fromState,
|
||||
branches: [
|
||||
StatefulShellBranchData.$branch(
|
||||
routes: [
|
||||
GoRouteData.$route(path: '/home', factory: $HomeRoute._fromState),
|
||||
],
|
||||
),
|
||||
StatefulShellBranchData.$branch(
|
||||
routes: [
|
||||
GoRouteData.$route(path: '/mine', factory: $MineRoute._fromState),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
extension $ShellRouteDataExtension on ShellRouteData {
|
||||
static ShellRouteData _fromState(GoRouterState state) =>
|
||||
const ShellRouteData();
|
||||
}
|
||||
|
||||
mixin $HomeRoute on GoRouteData {
|
||||
static HomeRoute _fromState(GoRouterState state) => const HomeRoute();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/home');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
mixin $MineRoute on GoRouteData {
|
||||
static MineRoute _fromState(GoRouterState state) => const MineRoute();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/mine');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $loginRoute =>
|
||||
GoRouteData.$route(path: '/login', factory: $LoginRoute._fromState);
|
||||
|
||||
mixin $LoginRoute on GoRouteData {
|
||||
static LoginRoute _fromState(GoRouterState state) => const LoginRoute();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/login');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $devPanelRoute =>
|
||||
GoRouteData.$route(path: '/dev', factory: $DevPanelRoute._fromState);
|
||||
|
||||
mixin $DevPanelRoute on GoRouteData {
|
||||
static DevPanelRoute _fromState(GoRouterState state) => const DevPanelRoute();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/dev');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $errorReportRoute => GoRouteData.$route(
|
||||
path: '/error-report',
|
||||
factory: $ErrorReportRoute._fromState,
|
||||
);
|
||||
|
||||
mixin $ErrorReportRoute on GoRouteData {
|
||||
static ErrorReportRoute _fromState(GoRouterState state) =>
|
||||
const ErrorReportRoute();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/error-report');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
Reference in New Issue
Block a user