mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-23 19:16:09 +00:00
Customised the GenerateName button according to PasteButton. Figma style is no longer applicable.
This commit is contained in:
parent
1f021b09e4
commit
a89397651f
3 changed files with 36 additions and 36 deletions
|
@ -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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -61,33 +61,33 @@ 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,
|
||||||
final String rName = await generateName();
|
height: 14,
|
||||||
|
margin: const EdgeInsets.only( bottom: 15, left: 13),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
final String rName = await generateName();
|
||||||
|
|
||||||
print(rName);
|
print(rName);
|
||||||
setState(() {
|
setState(() {
|
||||||
nameTextEditingController.text = rName;
|
nameTextEditingController.text = rName;
|
||||||
nameTextEditingController.selection =
|
nameTextEditingController.selection =
|
||||||
TextSelection.fromPosition(TextPosition(
|
TextSelection.fromPosition(TextPosition(
|
||||||
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(
|
color: Theme.of(context).hintColor,
|
||||||
borderRadius: BorderRadius.circular(6.0),
|
borderRadius: BorderRadius.all(Radius.circular(6))),
|
||||||
color: Color.fromRGBO(91, 112, 146, 1),),
|
child: Image.asset('assets/images/refresh_icon.png',
|
||||||
width: 27.0,
|
color: Theme.of(context)
|
||||||
height: 27.0,
|
.primaryTextTheme
|
||||||
|
.display1
|
||||||
child: Image.asset(
|
.decorationColor)),
|
||||||
'assets/images/refresh_icon.png',
|
),
|
||||||
width: 14,
|
|
||||||
height: 13,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(height: 20),
|
Container(height: 20),
|
||||||
|
|
|
@ -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);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue