refactor: 拆分主页与公共组件,扫码登录改走 WinHTTP
- 抽出 lib/core 的日期/JSON 工具,收敛各页重复解析 - 主页与音乐风险页拆成组件,风险功能共用一套运行框架 - 修复设置页作为主页页签保存时弹掉根路由导致的黑屏 - 登录对齐 Astral aimedb 协议:84 位二维码校验、签名与请求头修正, 补 GlobalSign 中间证书;Windows 改用 WinHTTP 绕过服务端对 BoringSSL 的 TLS 指纹拦截(证书校验保持开启) - 补开发预览数据与测试
This commit is contained in:
1 parent
0cb5320290
commit
e9357f5969
55 files changed
+4387
-3392
No files matched your search
@@ -11,6 +11,7 @@ class AppCard extends StatelessWidget {
|
||||
final EdgeInsetsGeometry padding;
|
||||
final Color? borderColor;
|
||||
final EdgeInsetsGeometry? margin;
|
||||
final VoidCallback? onTap;
|
||||
|
||||
const AppCard({
|
||||
super.key,
|
||||
@@ -18,11 +19,14 @@ class AppCard extends StatelessWidget {
|
||||
this.padding = const EdgeInsets.all(20),
|
||||
this.borderColor,
|
||||
this.margin,
|
||||
this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final content = Padding(padding: padding, child: child);
|
||||
|
||||
return Card(
|
||||
elevation: 0,
|
||||
margin: margin,
|
||||
@@ -33,7 +37,13 @@ class AppCard extends StatelessWidget {
|
||||
theme.colorScheme.outline.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
child: Padding(padding: padding, child: child),
|
||||
child: onTap == null
|
||||
? content
|
||||
: InkWell(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
onTap: onTap,
|
||||
child: content,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user