import 'package:chat/configs/app_colors.dart'; import 'package:chat/routes/auth_routes.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; class AuthPage extends StatefulWidget { const AuthPage({Key? key}) : super(key: key); @override State createState() => _AuthPageState(); } class _AuthPageState extends State { @override Widget build(BuildContext context) { return Scaffold( body: Padding( padding: const EdgeInsets.all(24.0), child: Column( children: [ const SizedBox(height: 128), const Text( 'ZH-CHAT', style: TextStyle( fontSize: 48, fontWeight: FontWeight.bold, color: AppColors.primary, ), ), const SizedBox(height: 24), Image.asset( 'assets/images/login_bg.png', fit: BoxFit.contain, color: AppColors.primary, ), const SizedBox(height: 48), Container( decoration: BoxDecoration( color: AppColors.active, borderRadius: BorderRadius.circular(8), image: const DecorationImage( image: AssetImage('assets/images/login_bg.png'), opacity: 0.2, fit: BoxFit.contain, alignment: Alignment.topRight, ), ), padding: const EdgeInsets.all(24), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Text( '助记词账户', style: TextStyle( color: AppColors.white, fontSize: 24, fontWeight: FontWeight.bold, ), ), const SizedBox(height: 40), Row( children: [ ElevatedButton( onPressed: () { Get.toNamed(AuthRoutes.create); }, style: ButtonStyle( backgroundColor: MaterialStateProperty.all( AppColors.white, ), ), child: const Text( '创建账户', style: TextStyle( color: AppColors.active, ), ), ), const SizedBox(width: 16), ElevatedButton( onPressed: () { Get.toNamed(AuthRoutes.import); }, child: const Text('导入账户'), ), ], ), ], ), ), ], ), ), ); } }