feat(payment): 优化套餐配置和支付服务

- 简化套餐配置结构,删除冗余的 default.yaml 和 us.yaml
- 优化 Apple IAP 服务和验证逻辑
- 更新套餐数据模型和协议文档
- 添加支付相关测试用例
This commit is contained in:
ZL-Q
2026-04-28 17:21:14 +08:00
parent a940f2ea47
commit 295dbc09ab
23 changed files with 285 additions and 304 deletions
@@ -20,6 +20,8 @@ class AppColorPalette extends ThemeExtension<AppColorPalette> {
required this.warning,
required this.warningContainer,
required this.onWarningContainer,
required this.incomeGreenBg,
required this.incomeGreenText,
});
final Color accentPurple;
@@ -39,6 +41,8 @@ class AppColorPalette extends ThemeExtension<AppColorPalette> {
final Color warning;
final Color warningContainer;
final Color onWarningContainer;
final Color incomeGreenBg;
final Color incomeGreenText;
@override
ThemeExtension<AppColorPalette> copyWith({
@@ -59,6 +63,8 @@ class AppColorPalette extends ThemeExtension<AppColorPalette> {
Color? warning,
Color? warningContainer,
Color? onWarningContainer,
Color? incomeGreenBg,
Color? incomeGreenText,
}) {
return AppColorPalette(
accentPurple: accentPurple ?? this.accentPurple,
@@ -78,6 +84,8 @@ class AppColorPalette extends ThemeExtension<AppColorPalette> {
warning: warning ?? this.warning,
warningContainer: warningContainer ?? this.warningContainer,
onWarningContainer: onWarningContainer ?? this.onWarningContainer,
incomeGreenBg: incomeGreenBg ?? this.incomeGreenBg,
incomeGreenText: incomeGreenText ?? this.incomeGreenText,
);
}
@@ -131,6 +139,8 @@ class AppColorPalette extends ThemeExtension<AppColorPalette> {
other.onWarningContainer,
t,
)!,
incomeGreenBg: Color.lerp(incomeGreenBg, other.incomeGreenBg, t)!,
incomeGreenText: Color.lerp(incomeGreenText, other.incomeGreenText, t)!,
);
}
}