feat: 切换邮箱认证并重构前后端启动与门禁

This commit is contained in:
qzl
2026-04-02 18:39:35 +08:00
parent 92cdfd9fca
commit 31594558eb
116 changed files with 5608 additions and 628 deletions
@@ -0,0 +1,136 @@
import 'package:flutter/material.dart';
@immutable
class AppColorPalette extends ThemeExtension<AppColorPalette> {
const AppColorPalette({
required this.accentPurple,
required this.historyGoldBg,
required this.historyGoldText,
required this.historyBlueBg,
required this.historyBlueText,
required this.historyGrayBg,
required this.historyGrayText,
required this.categoryCareerBg,
required this.categoryCareerText,
required this.categoryLoveBg,
required this.categoryLoveText,
required this.categoryMoneyBg,
required this.categoryMoneyText,
required this.notificationDot,
required this.warning,
required this.warningContainer,
required this.onWarningContainer,
});
final Color accentPurple;
final Color historyGoldBg;
final Color historyGoldText;
final Color historyBlueBg;
final Color historyBlueText;
final Color historyGrayBg;
final Color historyGrayText;
final Color categoryCareerBg;
final Color categoryCareerText;
final Color categoryLoveBg;
final Color categoryLoveText;
final Color categoryMoneyBg;
final Color categoryMoneyText;
final Color notificationDot;
final Color warning;
final Color warningContainer;
final Color onWarningContainer;
@override
ThemeExtension<AppColorPalette> copyWith({
Color? accentPurple,
Color? historyGoldBg,
Color? historyGoldText,
Color? historyBlueBg,
Color? historyBlueText,
Color? historyGrayBg,
Color? historyGrayText,
Color? categoryCareerBg,
Color? categoryCareerText,
Color? categoryLoveBg,
Color? categoryLoveText,
Color? categoryMoneyBg,
Color? categoryMoneyText,
Color? notificationDot,
Color? warning,
Color? warningContainer,
Color? onWarningContainer,
}) {
return AppColorPalette(
accentPurple: accentPurple ?? this.accentPurple,
historyGoldBg: historyGoldBg ?? this.historyGoldBg,
historyGoldText: historyGoldText ?? this.historyGoldText,
historyBlueBg: historyBlueBg ?? this.historyBlueBg,
historyBlueText: historyBlueText ?? this.historyBlueText,
historyGrayBg: historyGrayBg ?? this.historyGrayBg,
historyGrayText: historyGrayText ?? this.historyGrayText,
categoryCareerBg: categoryCareerBg ?? this.categoryCareerBg,
categoryCareerText: categoryCareerText ?? this.categoryCareerText,
categoryLoveBg: categoryLoveBg ?? this.categoryLoveBg,
categoryLoveText: categoryLoveText ?? this.categoryLoveText,
categoryMoneyBg: categoryMoneyBg ?? this.categoryMoneyBg,
categoryMoneyText: categoryMoneyText ?? this.categoryMoneyText,
notificationDot: notificationDot ?? this.notificationDot,
warning: warning ?? this.warning,
warningContainer: warningContainer ?? this.warningContainer,
onWarningContainer: onWarningContainer ?? this.onWarningContainer,
);
}
@override
ThemeExtension<AppColorPalette> lerp(
covariant ThemeExtension<AppColorPalette>? other,
double t,
) {
if (other is! AppColorPalette) {
return this;
}
return AppColorPalette(
accentPurple: Color.lerp(accentPurple, other.accentPurple, t)!,
historyGoldBg: Color.lerp(historyGoldBg, other.historyGoldBg, t)!,
historyGoldText: Color.lerp(historyGoldText, other.historyGoldText, t)!,
historyBlueBg: Color.lerp(historyBlueBg, other.historyBlueBg, t)!,
historyBlueText: Color.lerp(historyBlueText, other.historyBlueText, t)!,
historyGrayBg: Color.lerp(historyGrayBg, other.historyGrayBg, t)!,
historyGrayText: Color.lerp(historyGrayText, other.historyGrayText, t)!,
categoryCareerBg: Color.lerp(
categoryCareerBg,
other.categoryCareerBg,
t,
)!,
categoryCareerText: Color.lerp(
categoryCareerText,
other.categoryCareerText,
t,
)!,
categoryLoveBg: Color.lerp(categoryLoveBg, other.categoryLoveBg, t)!,
categoryLoveText: Color.lerp(
categoryLoveText,
other.categoryLoveText,
t,
)!,
categoryMoneyBg: Color.lerp(categoryMoneyBg, other.categoryMoneyBg, t)!,
categoryMoneyText: Color.lerp(
categoryMoneyText,
other.categoryMoneyText,
t,
)!,
notificationDot: Color.lerp(notificationDot, other.notificationDot, t)!,
warning: Color.lerp(warning, other.warning, t)!,
warningContainer: Color.lerp(
warningContainer,
other.warningContainer,
t,
)!,
onWarningContainer: Color.lerp(
onWarningContainer,
other.onWarningContainer,
t,
)!,
);
}
}
+17
View File
@@ -0,0 +1,17 @@
class AppSpacing {
static const double xs = 4;
static const double sm = 8;
static const double md = 12;
static const double lg = 16;
static const double xl = 24;
static const double xxl = 32;
static const double xxxl = 60;
}
class AppRadius {
static const double sm = 8;
static const double md = 12;
static const double lg = 16;
static const double xl = 20;
static const double full = 999;
}