登录逻辑
This commit is contained in:
@@ -37,36 +37,41 @@ class _AuthImportPageState extends State<AuthImportPage> {
|
||||
appBar: AppBar(
|
||||
title: const Text('导入账户'),
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
TextField(
|
||||
controller: _editingController,
|
||||
maxLines: 4,
|
||||
decoration: const InputDecoration(
|
||||
hintText: '请输入您的助记词',
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: AppColors.border,
|
||||
width: 0.4,
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
TextField(
|
||||
controller: _editingController,
|
||||
maxLines: 5,
|
||||
decoration: const InputDecoration(
|
||||
hintText: '请输入您的助记词,以空格分割单词或汉字',
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: AppColors.border,
|
||||
width: 0.4,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Text('支持导入所有遵循BIP标准生成的助记词'),
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
String? address =
|
||||
HDWallet.mnemonicToAddress(_editingController.text);
|
||||
if (address != null) {
|
||||
var result = await AuthService.to.login(address);
|
||||
if (result) {
|
||||
Get.offAllNamed(AppRoutes.app);
|
||||
const SizedBox(height: 16),
|
||||
const Text('支持导入所有遵循BIP标准生成的助记词'),
|
||||
const SizedBox(height: 16),
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
String? address =
|
||||
HDWallet.mnemonicToAddress(_editingController.text);
|
||||
if (address != null) {
|
||||
var result = await AuthService.to.login(address);
|
||||
if (result) {
|
||||
Get.offAllNamed(AppRoutes.app);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
child: const Text('开始导入'),
|
||||
),
|
||||
],
|
||||
},
|
||||
child: const Text('开始导入'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user