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

This commit is contained in:
RafiaChy 2022-01-22 18:55:05 +06:00
parent 1f021b09e4
commit a89397651f
3 changed files with 36 additions and 36 deletions

View file

@ -127,17 +127,19 @@ class _WalletNameFormState extends State<WalletNameForm> {
}); });
}, },
icon: Container( icon: Container(
padding: const EdgeInsets.all(7), padding: const EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Color.fromRGBO(91, 112, 146, 1), color: Theme.of(context).hintColor,
), ),
width: 27.0, width: 34,
height: 27.0, height: 34,
child: Image.asset( child: Image.asset(
'assets/images/refresh_icon.png', 'assets/images/refresh_icon.png',
width: 14, color: Theme.of(context)
height: 13, .primaryTextTheme
.display1
.decorationColor,
), ),
), ),
), ),

View file

@ -61,8 +61,12 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
controller: nameTextEditingController, controller: nameTextEditingController,
hintText: S.of(context).wallet_name, hintText: S.of(context).wallet_name,
validator: WalletNameValidator(), validator: WalletNameValidator(),
suffixIcon: IconButton( suffixIcon: Container(
onPressed: () async { width: 12,
height: 14,
margin: const EdgeInsets.only( bottom: 15, left: 13),
child: InkWell(
onTap: () async {
final String rName = await generateName(); final String rName = await generateName();
print(rName); print(rName);
@ -73,20 +77,16 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
offset: nameTextEditingController.text.length)); offset: nameTextEditingController.text.length));
}); });
}, },
icon:Container( child: Container(
padding: const EdgeInsets.all(7) padding: EdgeInsets.all(8),
,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), color: Theme.of(context).hintColor,
color: Color.fromRGBO(91, 112, 146, 1),), borderRadius: BorderRadius.all(Radius.circular(6))),
width: 27.0, child: Image.asset('assets/images/refresh_icon.png',
height: 27.0, color: Theme.of(context)
.primaryTextTheme
child: Image.asset( .display1
'assets/images/refresh_icon.png', .decorationColor)),
width: 14,
height: 13,
),
), ),
), ),
), ),

View file

@ -25,8 +25,7 @@ class SeedWidgetState extends State<SeedWidget> {
SeedWidgetState(String language, this.type) SeedWidgetState(String language, this.type)
: controller = TextEditingController(), : controller = TextEditingController(),
focusNode = FocusNode(), focusNode = FocusNode(),
words = SeedValidator.getWordList( words = SeedValidator.getWordList(type: type, language: language) {
type:type, language: language) {
focusNode.addListener(() { focusNode.addListener(() {
setState(() { setState(() {
if (!focusNode.hasFocus && controller.text.isEmpty) { if (!focusNode.hasFocus && controller.text.isEmpty) {
@ -56,8 +55,7 @@ class SeedWidgetState extends State<SeedWidget> {
void changeSeedLanguage(String language) { void changeSeedLanguage(String language) {
setState(() { setState(() {
words = SeedValidator.getWordList( words = SeedValidator.getWordList(type: type, language: language);
type: type, language: language);
}); });
} }