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:
SkyJourney
2026-05-14 12:51:05 +08:00
commit 61017f1c39
204 changed files with 15386 additions and 0 deletions
+81
View File
@@ -0,0 +1,81 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'dio_client.dart';
// **************************************************************************
// RiverpodGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// 完整 7 拦截器栈:
/// CertPinning → Auth → TokenRefresh → Retry → Error → AuthLogout → Log
///
/// 顺序敏感:
/// - CertPinning 最早(在请求出去前校验)
/// - Auth 注 TokenTokenRefresh 在 401 时拦截再发
/// - Retry 在网络/5xx 错误时退避重试
/// - Error 把所有 DioException 映射为应用层 Failure
/// - **AuthLogout 必须在 Error 之后**:依赖 e.error 已被映射为 AuthFailure
/// - Log 最后,记录最终结果(Release 包 noop
@ProviderFor(dioClient)
final dioClientProvider = DioClientProvider._();
/// 完整 7 拦截器栈:
/// CertPinning → Auth → TokenRefresh → Retry → Error → AuthLogout → Log
///
/// 顺序敏感:
/// - CertPinning 最早(在请求出去前校验)
/// - Auth 注 TokenTokenRefresh 在 401 时拦截再发
/// - Retry 在网络/5xx 错误时退避重试
/// - Error 把所有 DioException 映射为应用层 Failure
/// - **AuthLogout 必须在 Error 之后**:依赖 e.error 已被映射为 AuthFailure
/// - Log 最后,记录最终结果(Release 包 noop
final class DioClientProvider extends $FunctionalProvider<Dio, Dio, Dio>
with $Provider<Dio> {
/// 完整 7 拦截器栈:
/// CertPinning → Auth → TokenRefresh → Retry → Error → AuthLogout → Log
///
/// 顺序敏感:
/// - CertPinning 最早(在请求出去前校验)
/// - Auth 注 TokenTokenRefresh 在 401 时拦截再发
/// - Retry 在网络/5xx 错误时退避重试
/// - Error 把所有 DioException 映射为应用层 Failure
/// - **AuthLogout 必须在 Error 之后**:依赖 e.error 已被映射为 AuthFailure
/// - Log 最后,记录最终结果(Release 包 noop
DioClientProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'dioClientProvider',
isAutoDispose: false,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$dioClientHash();
@$internal
@override
$ProviderElement<Dio> $createElement($ProviderPointer pointer) =>
$ProviderElement(pointer);
@override
Dio create(Ref ref) {
return dioClient(ref);
}
/// {@macro riverpod.override_with_value}
Override overrideWithValue(Dio value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<Dio>(value),
);
}
}
String _$dioClientHash() => r'f740b06528c313c24f8288686585bdf379411fa2';