restore chest: can use space to go next case
This commit is contained in:
parent
4e69b945ed
commit
71d321700b
|
@ -390,6 +390,7 @@ class GenerateWalletsProvider with ChangeNotifier {
|
||||||
const Duration(seconds: 1),
|
const Duration(seconds: 1),
|
||||||
onTimeout: () => 0,
|
onTimeout: () => 0,
|
||||||
);
|
);
|
||||||
|
// const balance = 0;
|
||||||
|
|
||||||
log.d(balance);
|
log.d(balance);
|
||||||
if (balance != 0) {
|
if (balance != 0) {
|
||||||
|
|
|
@ -77,7 +77,8 @@ class MyWalletsProvider with ChangeNotifier {
|
||||||
} else {
|
} else {
|
||||||
chest ??= getCurrentChest();
|
chest ??= getCurrentChest();
|
||||||
int? defaultWalletNumber = chestBox.get(chest)!.defaultWallet;
|
int? defaultWalletNumber = chestBox.get(chest)!.defaultWallet;
|
||||||
return getWalletDataById([chest, defaultWalletNumber])!;
|
return getWalletDataById([chest, defaultWalletNumber]) ??
|
||||||
|
WalletData(chest: chest, number: 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,11 +184,23 @@ class RestoreChest extends StatelessWidget {
|
||||||
return Container(
|
return Container(
|
||||||
width: 102,
|
width: 102,
|
||||||
height: 40 * ratio,
|
height: 40 * ratio,
|
||||||
|
// child: RawKeyboardListener(
|
||||||
|
// focusNode: FocusNode(), // or FocusNode()
|
||||||
|
// onKey: (event) {
|
||||||
|
// if (event.logicalKey == LogicalKeyboardKey.space) {
|
||||||
|
// FocusScope.of(context).nextFocus();
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
controller: cellCtl,
|
controller: cellCtl,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
|
if (v.contains(' ')) {
|
||||||
|
cellCtl.text = cellCtl.text.replaceAll(' ', '');
|
||||||
|
FocusScope.of(context).nextFocus();
|
||||||
|
}
|
||||||
bool isValid = generateWalletProvider.isBipWord(v);
|
bool isValid = generateWalletProvider.isBipWord(v);
|
||||||
if (isValid) cellCtl.text = cellCtl.text.toLowerCase();
|
if (isValid) cellCtl.text = cellCtl.text.toLowerCase();
|
||||||
if (isValid && generateWalletProvider.cellController11.text.isEmpty) {
|
if (isValid && generateWalletProvider.cellController11.text.isEmpty) {
|
||||||
|
@ -198,6 +210,7 @@ class RestoreChest extends StatelessWidget {
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(fontSize: 20),
|
style: const TextStyle(fontSize: 20),
|
||||||
),
|
),
|
||||||
|
// ),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Colors.grey),
|
border: Border.all(color: Colors.grey),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|
|
@ -5,7 +5,7 @@ description: Pay with G1.
|
||||||
# pub.dev using `pub publish`. This is preferred for private packages.
|
# pub.dev using `pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
version: 0.0.8+5
|
version: 0.0.8+6
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|
Loading…
Reference in New Issue