主要四个页面的基础页面

This commit is contained in:
2022-10-19 17:47:04 +08:00
parent 2ddccb3f9d
commit 49ad269c2b
13 changed files with 156 additions and 74 deletions

View File

@@ -1,6 +1,9 @@
import 'package:chat/configs/app_colors.dart';
import 'package:chat/routes/app_routes.dart';
import 'package:chat/services/auth_service.dart';
import 'package:chat/utils/hd_wallet.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class AuthImportPage extends StatefulWidget {
const AuthImportPage({Key? key}) : super(key: key);
@@ -47,7 +50,12 @@ class _AuthImportPageState extends State<AuthImportPage> {
const Text('支持导入所有遵循BIP标准生成的助记词'),
ElevatedButton(
onPressed: () {
HDWallet.mnemonicToAddress(_editingController.text);
String? address =
HDWallet.mnemonicToAddress(_editingController.text);
if (address != null) {
AuthService.to.login(address);
Get.offAllNamed(AppRoutes.app);
}
},
child: const Text('开始导入'),
),