u
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:chat/configs/app_colors.dart';
|
||||
import 'package:chat/routes/user_routes.dart';
|
||||
import 'package:chat/services/auth_service.dart';
|
||||
import 'package:chat/utils/ui_tools.dart';
|
||||
import 'package:chat/views/home/widgets/action_item.dart';
|
||||
@@ -26,61 +27,70 @@ class _UserSettingSafePageState extends State<UserSettingSafePage> {
|
||||
'导出助记词',
|
||||
isFirst: true,
|
||||
isLast: true,
|
||||
onTap: () {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: AppColors.white,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(8)),
|
||||
),
|
||||
builder: (context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const SizedBox(height: 16),
|
||||
const Text('您的助记词'),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(32),
|
||||
child: Text(
|
||||
AuthService.to.mnemonic,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(
|
||||
text: AuthService.to.mnemonic,
|
||||
),
|
||||
);
|
||||
UiTools.toast('复制成功');
|
||||
Get.back();
|
||||
},
|
||||
child: const Text('复制'),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
onTap: _showMnemonic,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
ActionItem(
|
||||
'绑定手机',
|
||||
isFirst: true,
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
Get.toNamed(UserRoutes.settingSafeMobile);
|
||||
},
|
||||
),
|
||||
ActionItem(
|
||||
'绑定邮箱',
|
||||
isLast: true,
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
Get.toNamed(UserRoutes.settingSafeEmail);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _showMnemonic() {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: AppColors.white,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(8)),
|
||||
),
|
||||
builder: (context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const SizedBox(height: 16),
|
||||
const Text('您的助记词'),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(32),
|
||||
child: Text(
|
||||
AuthService.to.mnemonic,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
wordSpacing: 6,
|
||||
height: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(
|
||||
text: AuthService.to.mnemonic,
|
||||
),
|
||||
);
|
||||
UiTools.toast('复制成功');
|
||||
Get.back();
|
||||
},
|
||||
child: const Text('复制'),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user