YSWalletExportPrivate.dart 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import 'package:flutter/material.dart';
  2. import '../base/YSBase.dart';
  3. import '../generated/l10n.dart';
  4. import '../tools/YSColors.dart';
  5. import '../tools/YSTools.dart';
  6. class YSWalletExportPrivate extends StatefulWidget {
  7. final Map wallet;
  8. const YSWalletExportPrivate({Key? key, required this.wallet}) : super(key: key);
  9. @override
  10. YSWalletExportPrivateState createState() => YSWalletExportPrivateState();
  11. }
  12. class YSWalletExportPrivateState extends State<YSWalletExportPrivate> {
  13. @override
  14. Widget build(BuildContext context) {
  15. return YSBase(
  16. isBake: true,
  17. ysChild: Padding(
  18. padding: EdgeInsets.only(left: hsp(20),right: hsp(20)),
  19. child: Column(
  20. children: [
  21. Container(
  22. padding: EdgeInsets.only(top: hsp(20)),
  23. height: ysHeight(context)-ysTOP(context)-hsp(150),
  24. child: Align(
  25. alignment: Alignment.center,
  26. child: Column(
  27. //仅供直接扫描
  28. // 维码禁止保存、截图、以及拍照。仅供用户在安全环境下直接扫描来方便地导入钱包
  29. // 在安全环境下使用请在确保四周无人及无摄像头的情况下使用。二维码一旦被他人获取将造成无可挽回的资产损失。
  30. crossAxisAlignment: CrossAxisAlignment.start,
  31. children: [
  32. Align(
  33. alignment: Alignment.center,
  34. child: SizedBox(
  35. height: hsp(200),
  36. width: hsp(200),
  37. child: YSCodeImage.codeImage(widget.wallet['private']),
  38. ),
  39. ),
  40. Container(
  41. width: ysWidth(context),
  42. margin: EdgeInsets.only(bottom: hsp(30),top: hsp(20)),
  43. decoration: BoxDecoration(
  44. color: YSColors.lineColor(context),
  45. borderRadius: const BorderRadius.all(Radius.circular(10))
  46. ),
  47. padding: EdgeInsets.all(hsp(15)),
  48. child: Column(
  49. children: [
  50. Text(S.current.SIYAODIZHI,style: YSColors.contentStyle(context),),
  51. Text(widget.wallet['private'],style: YSColors.subStyle(context),textAlign: TextAlign.center,)
  52. ],
  53. ),
  54. ),
  55. GestureDetector(
  56. onTap: (){
  57. YSCopyPaste.copy(widget.wallet['private']);
  58. },
  59. behavior: HitTestBehavior.opaque,
  60. child: Container(
  61. margin: EdgeInsets.only(top: hsp(50)),
  62. height: hsp(50),
  63. alignment: Alignment.center,
  64. decoration: BoxDecoration(
  65. color: YSColors.buttonColor(context),
  66. borderRadius: const BorderRadius.all(Radius.circular(5))
  67. ),
  68. child: Text(S.current.FUZHI,style: YSColors.buttonStyle(context),),
  69. ),
  70. )
  71. ],
  72. ),
  73. ),
  74. ),
  75. ],
  76. ),
  77. ),
  78. );
  79. }
  80. }