feat(app): 完成 P0 钱包解锁、下载落盘与手机号登录

This commit is contained in:
Zhou Weidong committed 2026-10-19 23:46:47 +08:00
1 parent de941c841c
commit 136ee74618
47 files changed
+3264 -70

No files matched your search

+8 -16
View File
@@ -13,6 +13,7 @@ import '../../core/theme/app_dimens.dart';
import '../../core/theme/app_theme.dart';
import '../../l10n/app_localizations.dart';
import 'auth_logic.dart';
import 'phone_auth_sheet.dart';
part 'auth_widgets.dart';
part 'auth_form_widgets.dart';
@@ -334,22 +335,13 @@ class _AuthPageState extends State<AuthPage> {
style: const TextStyle(color: Color(0xFF9A96A3), fontSize: 11),
),
const SizedBox(height: 22),
_AuthEntryButton(
key: const Key('auth-entry-google'),
label: 'G ${l10n.authContinueGoogle}',
background: Colors.white,
foreground: const Color(0xFF1A1A1A),
leadingColor: const Color(0xFF4285F4),
onTap: () => _comingSoon(l10n),
),
const SizedBox(height: 11),
_AuthEntryButton(
key: const Key('auth-entry-phone'),
label: l10n.authPhoneSignIn,
icon: Icons.phone_android_rounded,
background: AppColors.input,
foreground: AppColors.onSurface,
onTap: () => _comingSoon(l10n),
onTap: _openPhoneSheet,
),
const SizedBox(height: 11),
_AuthEntryButton(
@@ -374,10 +366,12 @@ class _AuthPageState extends State<AuthPage> {
],
);
void _comingSoon(AppLocalizations l10n) {
ScaffoldMessenger.of(
Future<void> _openPhoneSheet() async {
final signedIn = await showPhoneAuthSheet(
context,
).showSnackBar(SnackBar(content: Text(l10n.comingSoon)));
signUp: _logic.signUpMode,
);
if (signedIn == true && mounted) Navigator.of(context).maybePop();
}
Widget _authCard(AppLocalizations l10n) => _AuthCard(
@@ -427,7 +421,6 @@ class _AuthEntryButton extends StatelessWidget {
required this.foreground,
required this.onTap,
this.icon,
this.leadingColor,
});
final String label;
@@ -435,7 +428,6 @@ class _AuthEntryButton extends StatelessWidget {
final Color foreground;
final VoidCallback onTap;
final IconData? icon;
final Color? leadingColor;
@override
Widget build(BuildContext context) {
@@ -451,7 +443,7 @@ class _AuthEntryButton extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (icon != null)
Icon(icon, size: 16, color: leadingColor ?? foreground),
Icon(icon, size: 16, color: foreground),
if (icon != null) const SizedBox(width: 7),
Flexible(
child: Text(