登录逻辑

This commit is contained in:
2022-10-21 14:03:48 +08:00
parent 30a9279ff1
commit 4bf03d234b
11 changed files with 154 additions and 135 deletions

View File

@@ -46,93 +46,95 @@ class _AuthCreatePageState extends State<AuthCreatePage>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('备份助记词'),
actions: [
TextButton(
onPressed: () {},
child: const Text('跳过备份'),
),
],
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TabBar(
controller: _tabController,
isScrollable: true,
indicatorColor: AppColors.primary,
indicatorWeight: 5,
indicatorSize: TabBarIndicatorSize.label,
tabs: const [
Tab(
text: 'English',
),
Tab(
text: '中文',
),
],
),
const Padding(
padding: EdgeInsets.only(right: 8.0),
child: Text(
'请务必抄下助记词,确定之后将进行校验',
style: TextStyle(
fontSize: 12,
return SafeArea(
child: Scaffold(
appBar: AppBar(
title: const Text('备份助记词'),
actions: [
TextButton(
onPressed: () {},
child: const Text('跳过备份'),
),
],
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TabBar(
controller: _tabController,
isScrollable: true,
indicatorColor: AppColors.primary,
indicatorWeight: 5,
indicatorSize: TabBarIndicatorSize.label,
tabs: const [
Tab(
text: 'English',
),
Tab(
text: '中文',
),
],
),
const Padding(
padding: EdgeInsets.only(right: 8.0),
child: Text(
'请务必抄下助记词,确定之后将进行校验',
style: TextStyle(
fontSize: 12,
),
),
),
),
],
),
Expanded(
child: TabBarView(
controller: _tabController,
children: [
_moArea(_englishMnemonic),
_moArea(_chineseMnemonic),
],
),
),
Container(
height: Get.height * 0.382,
padding: const EdgeInsets.all(16),
child: const Text(
'提示:请勿截图!如果有人获取您的助记词将直接获取您的资产,请抄写助记词并存放在安全的地方,我们会在下一屏幕进行校验,',
Expanded(
child: TabBarView(
controller: _tabController,
children: [
_moArea(_englishMnemonic),
_moArea(_chineseMnemonic),
],
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
ElevatedButton(
onPressed: () {
_generateMnemonic();
},
child: const Text('更换助记词'),
Container(
height: Get.height * 0.382,
padding: const EdgeInsets.all(16),
child: const Text(
'提示:请勿截图!如果有人获取您的助记词将直接获取您的资产,请抄写助记词并存放在安全的地方,我们会在下一屏幕进行校验,',
),
ElevatedButton(
onPressed: () {
var language = _tabController.index;
Get.toNamed(
AuthRoutes.createVerify,
arguments: {
'language': language == 0 ? 'english' : 'chinese',
'mnemonic':
language == 0 ? _englishMnemonic : _chineseMnemonic
},
);
},
child: const Text('开始备份'),
),
],
),
const SizedBox(
height: 16,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
ElevatedButton(
onPressed: () {
_generateMnemonic();
},
child: const Text('更换助记词'),
),
ElevatedButton(
onPressed: () {
var language = _tabController.index;
Get.toNamed(
AuthRoutes.createVerify,
arguments: {
'language': language == 0 ? 'english' : 'chinese',
'mnemonic':
language == 0 ? _englishMnemonic : _chineseMnemonic
},
);
},
child: const Text('开始备份'),
),
],
),
const SizedBox(
height: 16,
),
],
),
),
);
}