Customised the GenerateName button according to PasteButton. Figma style is no longer applicable.

RafiaChy committed Jan 22, 2022 at 18:55 UTC a89397651fbc532ec236c7993fd51f1f5eee7a8a
3 files changed +36 -36
lib/src/screens/new_wallet/new_wallet_page.dart
+8 -6
@@ -127,17 +127,19 @@ class _WalletNameFormState extends State<WalletNameForm> {
127 });
128 },
129 icon: Container(
130 - padding: const EdgeInsets.all(7),
130 + padding: const EdgeInsets.all(8),
131 decoration: BoxDecoration(
132 borderRadius: BorderRadius.circular(6.0),
133 - color: Color.fromRGBO(91, 112, 146, 1),
133 + color: Theme.of(context).hintColor,
134 ),
135 - width: 27.0,
136 - height: 27.0,
135 + width: 34,
136 + height: 34,
137 child: Image.asset(
138 'assets/images/refresh_icon.png',
139 - width: 14,
140 - height: 13,
139 + color: Theme.of(context)
140 + .primaryTextTheme
141 + .display1
142 + .decorationColor,
143 ),
144 ),
145 ),
lib/src/screens/restore/wallet_restore_from_seed_form.dart
+26 -26
@@ -61,33 +61,33 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
61 controller: nameTextEditingController,
62 hintText: S.of(context).wallet_name,
63 validator: WalletNameValidator(),
64 - suffixIcon: IconButton(
65 - onPressed: () async {
66 - final String rName = await generateName();
64 + suffixIcon: Container(
65 + width: 12,
66 + height: 14,
67 + margin: const EdgeInsets.only( bottom: 15, left: 13),
68 + child: InkWell(
69 + onTap: () async {
70 + final String rName = await generateName();
71
68 - print(rName);
69 - setState(() {
70 - nameTextEditingController.text = rName;
71 - nameTextEditingController.selection =
72 - TextSelection.fromPosition(TextPosition(
73 - offset: nameTextEditingController.text.length));
74 - });
75 - },
76 - icon:Container(
77 - padding: const EdgeInsets.all(7)
78 - ,
79 - decoration: BoxDecoration(
80 - borderRadius: BorderRadius.circular(6.0),
81 - color: Color.fromRGBO(91, 112, 146, 1),),
82 - width: 27.0,
83 - height: 27.0,
84 -
85 - child: Image.asset(
86 - 'assets/images/refresh_icon.png',
87 - width: 14,
88 - height: 13,
89 - ),
90 - ),
72 + print(rName);
73 + setState(() {
74 + nameTextEditingController.text = rName;
75 + nameTextEditingController.selection =
76 + TextSelection.fromPosition(TextPosition(
77 + offset: nameTextEditingController.text.length));
78 + });
79 + },
80 + child: Container(
81 + padding: EdgeInsets.all(8),
82 + decoration: BoxDecoration(
83 + color: Theme.of(context).hintColor,
84 + borderRadius: BorderRadius.all(Radius.circular(6))),
85 + child: Image.asset('assets/images/refresh_icon.png',
86 + color: Theme.of(context)
87 + .primaryTextTheme
88 + .display1
89 + .decorationColor)),
90 + ),
91 ),
92 ),
93 Container(height: 20),
lib/src/widgets/seed_widget.dart
+2 -4
@@ -25,8 +25,7 @@ class SeedWidgetState extends State<SeedWidget> {
25 SeedWidgetState(String language, this.type)
26 : controller = TextEditingController(),
27 focusNode = FocusNode(),
28 - words = SeedValidator.getWordList(
29 - type:type, language: language) {
28 + words = SeedValidator.getWordList(type: type, language: language) {
29 focusNode.addListener(() {
30 setState(() {
31 if (!focusNode.hasFocus && controller.text.isEmpty) {
@@ -56,8 +55,7 @@ class SeedWidgetState extends State<SeedWidget> {
55
56 void changeSeedLanguage(String language) {
57 setState(() {
59 - words = SeedValidator.getWordList(
60 - type: type, language: language);
58 + words = SeedValidator.getWordList(type: type, language: language);
59 });
60 }
61