Skip to content
Snippets Groups Projects
Commit dbbab648 authored by poka's avatar poka
Browse files

accessibility size

parent f007d12c
Branches
Tags
No related merge requests found
Pipeline #39841 waiting for manual action
Showing
with 787 additions and 758 deletions
...@@ -3,11 +3,10 @@ import 'package:easy_localization/easy_localization.dart'; ...@@ -3,11 +3,10 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/models/chest_data.dart'; import 'package:gecko/models/chest_data.dart';
import 'package:gecko/models/scale_functions.dart';
import 'package:gecko/models/wallet_data.dart'; import 'package:gecko/models/wallet_data.dart';
import 'package:gecko/models/widgets_keys.dart';
import 'package:gecko/providers/my_wallets.dart'; import 'package:gecko/providers/my_wallets.dart';
import 'package:gecko/providers/substrate_sdk.dart'; import 'package:gecko/providers/substrate_sdk.dart';
import 'package:gecko/widgets/commons/confirmation_dialog.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class ChestProvider with ChangeNotifier { class ChestProvider with ChangeNotifier {
...@@ -21,8 +20,7 @@ class ChestProvider with ChangeNotifier { ...@@ -21,8 +20,7 @@ class ChestProvider with ChangeNotifier {
if (answer ?? false) { if (answer ?? false) {
await sub.deleteAccounts(getChestWallets(chest)); await sub.deleteAccounts(getChestWallets(chest));
await chestBox.delete(chest.key); await chestBox.delete(chest.key);
final myWalletProvider = final myWalletProvider = Provider.of<MyWalletsProvider>(context, listen: false);
Provider.of<MyWalletsProvider>(context, listen: false);
myWalletProvider.pinCode = ''; myWalletProvider.pinCode = '';
...@@ -52,36 +50,10 @@ class ChestProvider with ChangeNotifier { ...@@ -52,36 +50,10 @@ class ChestProvider with ChangeNotifier {
} }
Future<bool?> _confirmDeletingChest(context, String? walletName) async { Future<bool?> _confirmDeletingChest(context, String? walletName) async {
return showDialog<bool>( return showConfirmationDialog(
context: context, context: context,
barrierDismissible: true, type: ConfirmationDialogType.warning,
builder: (BuildContext context) { message: 'areYouSureToDeleteWallet'.tr(args: [walletName!]),
return AlertDialog(
title: Text(
'areYouSureToDeleteWallet'.tr(args: [walletName!]),
style: scaledTextStyle(fontSize: 16),
),
actions: <Widget>[
TextButton(
child: Text("no".tr(),
style:
scaledTextStyle(fontSize: 16, color: Colors.blueAccent),
key: keyCancel),
onPressed: () {
Navigator.pop(context, false);
},
),
TextButton(
child: Text("yes".tr(),
style: scaledTextStyle(fontSize: 16, color: Colors.red),
key: keyConfirm),
onPressed: () {
Navigator.pop(context, true);
},
),
],
);
},
); );
} }
} }
...@@ -225,12 +225,13 @@ Widget welcomeHome(context) { ...@@ -225,12 +225,13 @@ Widget welcomeHome(context) {
Padding( Padding(
padding: const EdgeInsets.only(top: 1), padding: const EdgeInsets.only(top: 1),
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ child: Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Text( Expanded(
child: Text(
"fastAppDescription".tr(args: [currencyName]), "fastAppDescription".tr(args: [currencyName]),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: scaledTextStyle( style: scaledTextStyle(
color: Colors.white, color: Colors.white,
fontSize: 19, fontSize: isTall ? 19 : 17,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
shadows: const <Shadow>[ shadows: const <Shadow>[
Shadow( Shadow(
...@@ -245,6 +246,7 @@ Widget welcomeHome(context) { ...@@ -245,6 +246,7 @@ Widget welcomeHome(context) {
), ),
], ],
), ),
),
) )
]), ]),
), ),
...@@ -270,10 +272,10 @@ Widget welcomeHome(context) { ...@@ -270,10 +272,10 @@ Widget welcomeHome(context) {
Expanded( Expanded(
child: Stack(children: <Widget>[ child: Stack(children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only(top: scaleSize(55)), padding: EdgeInsets.only(top: scaleSize(isTall ? 55 : 0)),
child: Image( child: Image(
image: const AssetImage('assets/home/gecko-bienvenue.png'), image: const AssetImage('assets/home/gecko-bienvenue.png'),
height: scaleSize(180), height: scaleSize(isTall ? 180 : 160),
), ),
), ),
Positioned( Positioned(
...@@ -293,7 +295,7 @@ Widget welcomeHome(context) { ...@@ -293,7 +295,7 @@ Widget welcomeHome(context) {
foregroundColor: Colors.white, foregroundColor: Colors.white,
backgroundColor: orangeC, backgroundColor: orangeC,
elevation: 0, elevation: 0,
padding: EdgeInsets.symmetric(vertical: scaleSize(12)), padding: EdgeInsets.symmetric(vertical: scaleSize(8)),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
), ),
...@@ -330,7 +332,7 @@ Widget welcomeHome(context) { ...@@ -330,7 +332,7 @@ Widget welcomeHome(context) {
key: keyRestoreChest, key: keyRestoreChest,
style: OutlinedButton.styleFrom( style: OutlinedButton.styleFrom(
side: BorderSide(width: scaleSize(4), color: orangeC), side: BorderSide(width: scaleSize(4), color: orangeC),
padding: EdgeInsets.symmetric(vertical: scaleSize(12)), padding: EdgeInsets.symmetric(vertical: scaleSize(8)),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
), ),
......
...@@ -45,8 +45,13 @@ class _ChangePinScreenState extends State<ChangePinScreen> { ...@@ -45,8 +45,13 @@ class _ChangePinScreenState extends State<ChangePinScreen> {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: GeckoAppBar(widget.walletName!), appBar: GeckoAppBar(widget.walletName!),
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: SingleChildScrollView(
const SizedBox(height: 80), child: Padding(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const SizedBox(height: 60),
Text( Text(
'choosePassword'.tr(), 'choosePassword'.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
...@@ -58,7 +63,11 @@ class _ChangePinScreenState extends State<ChangePinScreen> { ...@@ -58,7 +63,11 @@ class _ChangePinScreenState extends State<ChangePinScreen> {
), ),
const SizedBox(height: 30), const SizedBox(height: 30),
pinForm(context), pinForm(context),
]), const SizedBox(height: 40),
],
),
),
),
), ),
); );
} }
......
...@@ -59,6 +59,7 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -59,6 +59,7 @@ class ChestOptionsContent extends StatelessWidget {
final isAlone = myWalletProvider.listWallets.length == 1; final isAlone = myWalletProvider.listWallets.length == 1;
return Column( return Column(
spacing: 5,
children: [ children: [
InkWell( InkWell(
key: keyShowSeed, key: keyShowSeed,
...@@ -74,8 +75,7 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -74,8 +75,7 @@ class ChestOptionsContent extends StatelessWidget {
); );
}, },
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
children: [ children: [
Icon( Icon(
...@@ -84,12 +84,15 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -84,12 +84,15 @@ class ChestOptionsContent extends StatelessWidget {
color: Colors.black87, color: Colors.black87,
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
'displayMnemonic'.tr(), 'displayMnemonic'.tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: Colors.black87, color: Colors.black87,
), ),
softWrap: true,
),
), ),
], ],
), ),
...@@ -112,8 +115,7 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -112,8 +115,7 @@ class ChestOptionsContent extends StatelessWidget {
); );
}, },
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
children: [ children: [
Icon( Icon(
...@@ -122,12 +124,15 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -122,12 +124,15 @@ class ChestOptionsContent extends StatelessWidget {
color: const Color.fromARGB(255, 255, 142, 142), color: const Color.fromARGB(255, 255, 142, 142),
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
'changePassword'.tr(), 'changePassword'.tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: Colors.black87, color: Colors.black87,
), ),
softWrap: true,
),
), ),
], ],
), ),
...@@ -149,8 +154,7 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -149,8 +154,7 @@ class ChestOptionsContent extends StatelessWidget {
} }
: null, : null,
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
children: [ children: [
Icon( Icon(
...@@ -159,12 +163,15 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -159,12 +163,15 @@ class ChestOptionsContent extends StatelessWidget {
color: sub.nodeConnected ? Colors.black87 : Colors.grey[400], color: sub.nodeConnected ? Colors.black87 : Colors.grey[400],
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
'createDerivation'.tr(), 'createDerivation'.tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: sub.nodeConnected ? Colors.black87 : Colors.grey[500], color: sub.nodeConnected ? Colors.black87 : Colors.grey[500],
), ),
softWrap: true,
),
), ),
], ],
), ),
...@@ -180,8 +187,7 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -180,8 +187,7 @@ class ChestOptionsContent extends StatelessWidget {
await chestProvider.deleteChest(context, currentChest); await chestProvider.deleteChest(context, currentChest);
}, },
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset(
...@@ -190,12 +196,15 @@ class ChestOptionsContent extends StatelessWidget { ...@@ -190,12 +196,15 @@ class ChestOptionsContent extends StatelessWidget {
color: const Color(0xffD80000), color: const Color(0xffD80000),
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
'deleteChest'.tr(), 'deleteChest'.tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: const Color(0xffD80000), color: const Color(0xffD80000),
), ),
softWrap: true,
),
), ),
], ],
), ),
......
...@@ -102,7 +102,6 @@ class ManageMembership extends StatelessWidget { ...@@ -102,7 +102,6 @@ class ManageMembership extends StatelessWidget {
Widget migrateIdentity(BuildContext context) { Widget migrateIdentity(BuildContext context) {
return Container( return Container(
height: scaleSize(48),
margin: EdgeInsets.symmetric(vertical: scaleSize(8)), margin: EdgeInsets.symmetric(vertical: scaleSize(8)),
child: InkWell( child: InkWell(
key: keyMigrateIdentity, key: keyMigrateIdentity,
...@@ -115,7 +114,7 @@ class ManageMembership extends StatelessWidget { ...@@ -115,7 +114,7 @@ class ManageMembership extends StatelessWidget {
); );
}, },
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
child: Row( child: Row(
children: [ children: [
Icon( Icon(
...@@ -140,7 +139,6 @@ class ManageMembership extends StatelessWidget { ...@@ -140,7 +139,6 @@ class ManageMembership extends StatelessWidget {
Widget revokeMyIdentity(BuildContext context) { Widget revokeMyIdentity(BuildContext context) {
return Container( return Container(
height: scaleSize(48),
margin: EdgeInsets.symmetric(vertical: scaleSize(8)), margin: EdgeInsets.symmetric(vertical: scaleSize(8)),
child: InkWell( child: InkWell(
key: keyRevokeIdty, key: keyRevokeIdty,
...@@ -170,7 +168,7 @@ class ManageMembership extends StatelessWidget { ...@@ -170,7 +168,7 @@ class ManageMembership extends StatelessWidget {
); );
}, },
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: scaleSize(19)), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset(
......
...@@ -40,7 +40,8 @@ class RestoreChest extends StatelessWidget { ...@@ -40,7 +40,8 @@ class RestoreChest extends StatelessWidget {
appBar: GeckoAppBar('restoreAChest'.tr()), appBar: GeckoAppBar('restoreAChest'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
Column(children: <Widget>[ SingleChildScrollView(
child: Column(children: <Widget>[
ScaledSizedBox(height: isTall ? 20 : 3), ScaledSizedBox(height: isTall ? 20 : 3),
bubbleSpeak('toRestoreEnterMnemonic'.tr()), bubbleSpeak('toRestoreEnterMnemonic'.tr()),
ScaledSizedBox(height: isTall ? 20 : 5), ScaledSizedBox(height: isTall ? 20 : 5),
...@@ -67,7 +68,8 @@ class RestoreChest extends StatelessWidget { ...@@ -67,7 +68,8 @@ class RestoreChest extends StatelessWidget {
]), ]),
]), ]),
if (genW.isSentenceComplete(context)) if (genW.isSentenceComplete(context))
Expanded( Container(
padding: EdgeInsets.symmetric(vertical: scaleSize(20)),
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
child: ScaledSizedBox( child: ScaledSizedBox(
...@@ -113,13 +115,14 @@ class RestoreChest extends StatelessWidget { ...@@ -113,13 +115,14 @@ class RestoreChest extends StatelessWidget {
), ),
), ),
), ),
)) ),
)
else else
Column(children: [ Column(children: [
ScaledSizedBox(height: 20), ScaledSizedBox(height: 20),
ScaledSizedBox( ScaledSizedBox(
width: 180, width: 180,
height: 50, // height: 50,
child: ElevatedButton( child: ElevatedButton(
key: keyPastMnemonic, key: keyPastMnemonic,
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
...@@ -169,6 +172,7 @@ class RestoreChest extends StatelessWidget { ...@@ -169,6 +172,7 @@ class RestoreChest extends StatelessWidget {
) )
]) ])
]), ]),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
......
...@@ -31,8 +31,11 @@ class ShowSeed extends StatelessWidget { ...@@ -31,8 +31,11 @@ class ShowSeed extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: GeckoAppBar('myMnemonic'.tr()), appBar: GeckoAppBar('myMnemonic'.tr()),
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: SingleChildScrollView(
const Spacer(flex: 1), child: Padding(
padding: EdgeInsets.symmetric(vertical: scaleSize(20)),
child: Column(
children: <Widget>[
FutureBuilder( FutureBuilder(
future: sub.getSeed(defaultWallet.address, walletProvider.pinCode), future: sub.getSeed(defaultWallet.address, walletProvider.pinCode),
builder: (BuildContext context, AsyncSnapshot<String?> seed) { builder: (BuildContext context, AsyncSnapshot<String?> seed) {
...@@ -49,13 +52,14 @@ class ShowSeed extends StatelessWidget { ...@@ -49,13 +52,14 @@ class ShowSeed extends StatelessWidget {
return const Text(''); return const Text('');
} }
return Row(mainAxisAlignment: MainAxisAlignment.center, children: [ return Column(
Column(children: [ children: [
BuildText(text: 'keepYourMnemonicSecret'.tr(), size: 16), BuildText(text: 'keepYourMnemonicSecret'.tr(), size: 16),
ScaledSizedBox(height: 35), ScaledSizedBox(height: 35),
sentanceArray(context, seed.data!.split(' ')), sentanceArray(context, seed.data!.split(' ')),
ScaledSizedBox(height: 20), ScaledSizedBox(height: 20),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
ScaledSizedBox( ScaledSizedBox(
height: 39, height: 39,
...@@ -102,10 +106,10 @@ class ShowSeed extends StatelessWidget { ...@@ -102,10 +106,10 @@ class ShowSeed extends StatelessWidget {
), ),
], ],
), ),
]), ],
]); );
}), }),
const Spacer(flex: 3), ScaledSizedBox(height: 50),
ScaledSizedBox( ScaledSizedBox(
width: 240, width: 240,
height: 55, height: 55,
...@@ -133,8 +137,10 @@ class ShowSeed extends StatelessWidget { ...@@ -133,8 +137,10 @@ class ShowSeed extends StatelessWidget {
), ),
), ),
), ),
const Spacer(flex: 2), ],
]), ),
),
),
)); ));
} }
......
...@@ -55,6 +55,7 @@ class _UnlockingWalletState extends State<UnlockingWallet> { ...@@ -55,6 +55,7 @@ class _UnlockingWalletState extends State<UnlockingWallet> {
child: Scaffold( child: Scaffold(
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
body: SafeArea( body: SafeArea(
child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
...@@ -180,6 +181,7 @@ class _UnlockingWalletState extends State<UnlockingWallet> { ...@@ -180,6 +181,7 @@ class _UnlockingWalletState extends State<UnlockingWallet> {
), ),
), ),
), ),
),
); );
} }
......
...@@ -95,9 +95,9 @@ class WalletOptions extends StatelessWidget { ...@@ -95,9 +95,9 @@ class WalletOptions extends StatelessWidget {
await walletProvider.editWalletName(context, [wallet.id[0], wallet.id[1]]); await walletProvider.editWalletName(context, [wallet.id[0], wallet.id[1]]);
}, },
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(17), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(17)),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
'assets/walletOptions/edit.png', 'assets/walletOptions/edit.png',
...@@ -105,12 +105,15 @@ class WalletOptions extends StatelessWidget { ...@@ -105,12 +105,15 @@ class WalletOptions extends StatelessWidget {
color: const Color(0xFF4A90E2).withValues(alpha: 0.8), color: const Color(0xFF4A90E2).withValues(alpha: 0.8),
), ),
ScaledSizedBox(width: 18), ScaledSizedBox(width: 18),
Text( Expanded(
child: Text(
"editWalletName".tr(), "editWalletName".tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: Colors.black87, color: Colors.black87,
), ),
softWrap: true,
),
), ),
], ],
), ),
...@@ -212,9 +215,9 @@ class WalletOptions extends StatelessWidget { ...@@ -212,9 +215,9 @@ class WalletOptions extends StatelessWidget {
); );
}, },
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
'assets/walletOptions/clock.png', 'assets/walletOptions/clock.png',
...@@ -222,12 +225,15 @@ class WalletOptions extends StatelessWidget { ...@@ -222,12 +225,15 @@ class WalletOptions extends StatelessWidget {
color: const Color(0xFF4A90E2).withValues(alpha: 0.8), color: const Color(0xFF4A90E2).withValues(alpha: 0.8),
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
"displayActivity".tr(), "displayActivity".tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: Colors.black87, color: Colors.black87,
), ),
softWrap: true,
),
), ),
], ],
), ),
...@@ -273,9 +279,9 @@ class WalletOptions extends StatelessWidget { ...@@ -273,9 +279,9 @@ class WalletOptions extends StatelessWidget {
: null, : null,
child: canDelete child: canDelete
? Container( ? Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
'assets/walletOptions/trash.png', 'assets/walletOptions/trash.png',
...@@ -283,12 +289,15 @@ class WalletOptions extends StatelessWidget { ...@@ -283,12 +289,15 @@ class WalletOptions extends StatelessWidget {
color: const Color(0xffD80000), color: const Color(0xffD80000),
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
'deleteThisWallet'.tr(), 'deleteThisWallet'.tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: const Color(0xffD80000), color: const Color(0xffD80000),
), ),
softWrap: true,
),
), ),
], ],
), ),
...@@ -369,9 +378,9 @@ class WalletOptions extends StatelessWidget { ...@@ -369,9 +378,9 @@ class WalletOptions extends StatelessWidget {
} }
: null, : null,
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Icon( Icon(
Icons.check_circle_outline, Icons.check_circle_outline,
...@@ -379,12 +388,15 @@ class WalletOptions extends StatelessWidget { ...@@ -379,12 +388,15 @@ class WalletOptions extends StatelessWidget {
color: walletProvider.isDefaultWallet ? Colors.grey[400] : const Color(0xFF4CAF50).withValues(alpha: 0.8), color: walletProvider.isDefaultWallet ? Colors.grey[400] : const Color(0xFF4CAF50).withValues(alpha: 0.8),
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
walletProvider.isDefaultWallet ? 'thisWalletIsDefault'.tr() : 'defineWalletAsDefault'.tr(), walletProvider.isDefaultWallet ? 'thisWalletIsDefault'.tr() : 'defineWalletAsDefault'.tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: walletProvider.isDefaultWallet ? Colors.grey[500] : Colors.black87, color: walletProvider.isDefaultWallet ? Colors.grey[500] : Colors.black87,
), ),
softWrap: true,
),
), ),
], ],
), ),
...@@ -467,9 +479,9 @@ Widget aloneWalletOptions() { ...@@ -467,9 +479,9 @@ Widget aloneWalletOptions() {
} }
}, },
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Icon( Icon(
Icons.add_circle_outline, Icons.add_circle_outline,
...@@ -477,12 +489,15 @@ Widget aloneWalletOptions() { ...@@ -477,12 +489,15 @@ Widget aloneWalletOptions() {
color: sub.nodeConnected ? Color(0xFF4CAF50).withValues(alpha: 0.8) : Colors.grey[400], color: sub.nodeConnected ? Color(0xFF4CAF50).withValues(alpha: 0.8) : Colors.grey[400],
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
'createNewWallet'.tr(), 'createNewWallet'.tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: sub.nodeConnected ? Colors.black87 : Colors.grey[500], color: sub.nodeConnected ? Colors.black87 : Colors.grey[500],
), ),
softWrap: true,
),
), ),
], ],
), ),
...@@ -498,8 +513,7 @@ Widget aloneWalletOptions() { ...@@ -498,8 +513,7 @@ Widget aloneWalletOptions() {
); );
}, },
child: Container( child: Container(
height: scaleSize(48), padding: EdgeInsets.symmetric(horizontal: scaleSize(16), vertical: scaleSize(12)),
padding: EdgeInsets.symmetric(horizontal: scaleSize(16)),
child: Row( child: Row(
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
...@@ -507,12 +521,15 @@ Widget aloneWalletOptions() { ...@@ -507,12 +521,15 @@ Widget aloneWalletOptions() {
height: scaleSize(24), height: scaleSize(24),
), ),
ScaledSizedBox(width: 16), ScaledSizedBox(width: 16),
Text( Expanded(
child: Text(
'importG1v1'.tr(), 'importG1v1'.tr(),
style: scaledTextStyle( style: scaledTextStyle(
fontSize: 16, fontSize: 16,
color: Colors.black87, color: Colors.black87,
), ),
softWrap: true,
),
), ),
], ],
), ),
......
...@@ -17,7 +17,8 @@ class OnboardingStepOne extends StatelessWidget { ...@@ -17,7 +17,8 @@ class OnboardingStepOne extends StatelessWidget {
appBar: GeckoAppBar('newWallet'.tr()), appBar: GeckoAppBar('newWallet'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
InfoIntro( SingleChildScrollView(
child: InfoIntro(
text: 'geckoGenerateYourWalletFromMnemonic'.tr(), text: 'geckoGenerateYourWalletFromMnemonic'.tr(),
assetName: 'fabrication-de-portefeuille.png', assetName: 'fabrication-de-portefeuille.png',
buttonText: '>', buttonText: '>',
...@@ -25,6 +26,7 @@ class OnboardingStepOne extends StatelessWidget { ...@@ -25,6 +26,7 @@ class OnboardingStepOne extends StatelessWidget {
pagePosition: 0, pagePosition: 0,
isMd: true, isMd: true,
), ),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
......
...@@ -68,7 +68,8 @@ class _OnboardingStepTenState extends State<OnboardingStepTen> { ...@@ -68,7 +68,8 @@ class _OnboardingStepTenState extends State<OnboardingStepTen> {
appBar: GeckoAppBar('myPassword'.tr()), appBar: GeckoAppBar('myPassword'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
Column(children: <Widget>[ SingleChildScrollView(
child: Column(children: <Widget>[
ScaledSizedBox(height: isTall ? 25 : 5), ScaledSizedBox(height: isTall ? 25 : 5),
const BuildProgressBar(pagePosition: 9), const BuildProgressBar(pagePosition: 9),
ScaledSizedBox(height: isTall ? 25 : 5), ScaledSizedBox(height: isTall ? 25 : 5),
...@@ -125,6 +126,7 @@ class _OnboardingStepTenState extends State<OnboardingStepTen> { ...@@ -125,6 +126,7 @@ class _OnboardingStepTenState extends State<OnboardingStepTen> {
: const Text(''); : const Text('');
}), }),
]), ]),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
)), )),
...@@ -228,11 +230,14 @@ class _OnboardingStepTenState extends State<OnboardingStepTen> { ...@@ -228,11 +230,14 @@ class _OnboardingStepTenState extends State<OnboardingStepTen> {
myWalletProvider.debounceResetPinCode(); myWalletProvider.debounceResetPinCode();
// Set default wallet to number 0 of current chest // Set default wallet to number 0 of current chest
final defaultWallet = myWalletProvider.listWallets.firstWhereOrNull((w) => w.isMembre) ?? WalletData? defaultWallet = myWalletProvider.listWallets.firstWhereOrNull((w) => w.isMembre) ??
myWalletProvider.listWallets.firstWhereOrNull((w) => w.hasIdentity) ?? myWalletProvider.listWallets.firstWhereOrNull((w) => w.hasIdentity) ??
myWalletProvider.listWallets.firstWhereOrNull((w) => w.number == 0) ?? myWalletProvider.listWallets.firstWhereOrNull((w) => w.number == 0);
myWalletProvider.listWallets.first;
await sub.setCurrentWallet(defaultWallet); if (defaultWallet == null && myWalletProvider.listWallets.isNotEmpty) {
defaultWallet = myWalletProvider.listWallets.first;
}
if (defaultWallet != null) await sub.setCurrentWallet(defaultWallet);
Navigator.push( Navigator.push(
context, context,
......
...@@ -24,7 +24,13 @@ class OnboardingStepEleven extends StatelessWidget { ...@@ -24,7 +24,13 @@ class OnboardingStepEleven extends StatelessWidget {
appBar: GeckoAppBar('allGood'.tr()), appBar: GeckoAppBar('allGood'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
Column(children: <Widget>[ SingleChildScrollView(
child: SizedBox(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
ScaledSizedBox(height: isTall ? 25 : 5), ScaledSizedBox(height: isTall ? 25 : 5),
BuildText(text: "yourChestAndWalletWereCreatedSuccessfully".tr()), BuildText(text: "yourChestAndWalletWereCreatedSuccessfully".tr()),
ScaledSizedBox(height: isTall ? 15 : 5), ScaledSizedBox(height: isTall ? 15 : 5),
...@@ -32,11 +38,15 @@ class OnboardingStepEleven extends StatelessWidget { ...@@ -32,11 +38,15 @@ class OnboardingStepEleven extends StatelessWidget {
'assets/onBoarding/gecko-clin.gif', 'assets/onBoarding/gecko-clin.gif',
height: scaleSize(isTall ? 330 : 280), height: scaleSize(isTall ? 330 : 280),
), ),
Expanded( Container(
child: Align(alignment: Alignment.bottomCenter, child: finishButton(context)), padding: EdgeInsets.symmetric(vertical: scaleSize(20)),
child: finishButton(context),
), ),
ScaledSizedBox(height: isTall ? 40 : 5), ScaledSizedBox(height: isTall ? 40 : 5),
]), ],
),
),
),
Align( Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: ConfettiWidget( child: ConfettiWidget(
......
...@@ -18,13 +18,14 @@ class OnboardingStepTwo extends StatelessWidget { ...@@ -18,13 +18,14 @@ class OnboardingStepTwo extends StatelessWidget {
appBar: GeckoAppBar('yourMnemonic'.tr()), appBar: GeckoAppBar('yourMnemonic'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
InfoIntro( SingleChildScrollView(
child: InfoIntro(
text: 'keepThisMnemonicSecure'.tr(), text: 'keepThisMnemonicSecure'.tr(),
assetName: assetName: 'fabrication-de-portefeuille-impossible-sans-phrase.png',
'fabrication-de-portefeuille-impossible-sans-phrase.png',
buttonText: '>', buttonText: '>',
nextScreen: const OnboardingStepThree(), nextScreen: const OnboardingStepThree(),
pagePosition: 1), pagePosition: 1),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
......
...@@ -18,7 +18,8 @@ class OnboardingStepThree extends StatelessWidget { ...@@ -18,7 +18,8 @@ class OnboardingStepThree extends StatelessWidget {
appBar: GeckoAppBar('yourMnemonic'.tr()), appBar: GeckoAppBar('yourMnemonic'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
InfoIntro( SingleChildScrollView(
child: InfoIntro(
text: 'warningForgotPassword'.tr(), text: 'warningForgotPassword'.tr(),
assetName: 'forgot_password.png'.tr(), assetName: 'forgot_password.png'.tr(),
buttonText: '>', buttonText: '>',
...@@ -26,6 +27,7 @@ class OnboardingStepThree extends StatelessWidget { ...@@ -26,6 +27,7 @@ class OnboardingStepThree extends StatelessWidget {
pagePosition: 2, pagePosition: 2,
boxHeight: 316, boxHeight: 316,
), ),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
......
...@@ -18,13 +18,15 @@ class OnboardingStepFor extends StatelessWidget { ...@@ -18,13 +18,15 @@ class OnboardingStepFor extends StatelessWidget {
appBar: GeckoAppBar('yourMnemonic'.tr()), appBar: GeckoAppBar('yourMnemonic'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
InfoIntro( SingleChildScrollView(
child: InfoIntro(
text: 'itsTimeToUseAPenAndPaper'.tr(), text: 'itsTimeToUseAPenAndPaper'.tr(),
assetName: 'gecko_also_can_forget.png'.tr(), assetName: 'gecko_also_can_forget.png'.tr(),
buttonText: '>', buttonText: '>',
nextScreen: const OnboardingStepFive(), nextScreen: const OnboardingStepFive(),
pagePosition: 3, pagePosition: 3,
isMd: true), isMd: true),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
......
...@@ -147,7 +147,8 @@ class _ChooseChestState extends State<OnboardingStepFive> { ...@@ -147,7 +147,8 @@ class _ChooseChestState extends State<OnboardingStepFive> {
appBar: GeckoAppBar('yourMnemonic'.tr()), appBar: GeckoAppBar('yourMnemonic'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
Column(children: [ SingleChildScrollView(
child: Column(children: [
ScaledSizedBox(height: isTall ? 25 : 5), ScaledSizedBox(height: isTall ? 25 : 5),
const BuildProgressBar(pagePosition: 4), const BuildProgressBar(pagePosition: 4),
ScaledSizedBox(height: isTall ? 25 : 5), ScaledSizedBox(height: isTall ? 25 : 5),
...@@ -206,9 +207,8 @@ class _ChooseChestState extends State<OnboardingStepFive> { ...@@ -206,9 +207,8 @@ class _ChooseChestState extends State<OnboardingStepFive> {
], ],
), ),
ScaledSizedBox(height: isTall ? 17 : 5), ScaledSizedBox(height: isTall ? 17 : 5),
Expanded( Container(
child: Align( padding: EdgeInsets.symmetric(vertical: scaleSize(20)),
alignment: Alignment.bottomCenter,
child: ScaledSizedBox( child: ScaledSizedBox(
width: 350, width: 350,
height: 55, height: 55,
...@@ -238,14 +238,15 @@ class _ChooseChestState extends State<OnboardingStepFive> { ...@@ -238,14 +238,15 @@ class _ChooseChestState extends State<OnboardingStepFive> {
color: Colors.black, color: Colors.black,
), ),
), ),
)), ),
), ),
), ),
), ),
ScaledSizedBox(height: isTall ? 20 : 10), ScaledSizedBox(height: isTall ? 20 : 10),
nextButton(context, "iNotedMyMnemonic".tr(), false, widget.skipIntro), nextButton(context, "iNotedMyMnemonic".tr(), false, widget.skipIntro),
isTall ? const Spacer() : const SizedBox(height: 5), ScaledSizedBox(height: isTall ? 40 : 5),
]), ]),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
...@@ -265,7 +266,7 @@ Widget nextButton(BuildContext context, String text, bool isFast, bool skipIntro ...@@ -265,7 +266,7 @@ Widget nextButton(BuildContext context, String text, bool isFast, bool skipIntro
foregroundColor: Colors.white, foregroundColor: Colors.white,
backgroundColor: orangeC, backgroundColor: orangeC,
elevation: 2, elevation: 2,
padding: const EdgeInsets.symmetric(vertical: 12), padding: const EdgeInsets.symmetric(vertical: 8),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
), ),
......
...@@ -37,11 +37,11 @@ class OnboardingStepSix extends StatelessWidget { ...@@ -37,11 +37,11 @@ class OnboardingStepSix extends StatelessWidget {
}, },
child: Scaffold( child: Scaffold(
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
resizeToAvoidBottomInset: false,
appBar: GeckoAppBar('yourMnemonic'.tr()), appBar: GeckoAppBar('yourMnemonic'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
Align( SingleChildScrollView(
child: Align(
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
child: Column(children: [ child: Column(children: [
ScaledSizedBox(height: isTall ? 25 : 5), ScaledSizedBox(height: isTall ? 25 : 5),
...@@ -84,13 +84,11 @@ class OnboardingStepSix extends StatelessWidget { ...@@ -84,13 +84,11 @@ class OnboardingStepSix extends StatelessWidget {
style: scaledTextStyle(fontSize: 25, color: generateWalletProvider.askedWordColor, fontWeight: FontWeight.w500))), style: scaledTextStyle(fontSize: 25, color: generateWalletProvider.askedWordColor, fontWeight: FontWeight.w500))),
Visibility( Visibility(
visible: generateWalletProvider.isAskedWordValid, visible: generateWalletProvider.isAskedWordValid,
child: Expanded( child: Container(
child: Align( padding: EdgeInsets.symmetric(vertical: scaleSize(20)),
alignment: Alignment.bottomCenter,
child: nextButton(context, 'continue'.tr(), skipIntro ? const OnboardingStepNine() : const OnboardingStepSeven(), false), child: nextButton(context, 'continue'.tr(), skipIntro ? const OnboardingStepNine() : const OnboardingStepSeven(), false),
), ),
), ),
),
// Visibility( // Visibility(
// visible: !_generateWalletProvider.isAskedWordValid, // visible: !_generateWalletProvider.isAskedWordValid,
// child: const Expanded( // child: const Expanded(
...@@ -103,6 +101,7 @@ class OnboardingStepSix extends StatelessWidget { ...@@ -103,6 +101,7 @@ class OnboardingStepSix extends StatelessWidget {
ScaledSizedBox(height: 40), ScaledSizedBox(height: 40),
]), ]),
), ),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
......
...@@ -19,13 +19,15 @@ class OnboardingStepSeven extends StatelessWidget { ...@@ -19,13 +19,15 @@ class OnboardingStepSeven extends StatelessWidget {
appBar: GeckoAppBar('myPassword'.tr()), appBar: GeckoAppBar('myPassword'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
InfoIntro( SingleChildScrollView(
child: InfoIntro(
text: 'geckoWillGenerateAPassword'.tr(), text: 'geckoWillGenerateAPassword'.tr(),
assetName: 'coffre-fort-code-secret-dans-telephone.png', assetName: 'coffre-fort-code-secret-dans-telephone.png',
buttonText: '>', buttonText: '>',
nextScreen: OnboardingStepEight(scanDerivation: scanDerivation), nextScreen: OnboardingStepEight(scanDerivation: scanDerivation),
pagePosition: 6, pagePosition: 6,
boxHeight: 320), boxHeight: 320),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
......
...@@ -19,7 +19,8 @@ class OnboardingStepEight extends StatelessWidget { ...@@ -19,7 +19,8 @@ class OnboardingStepEight extends StatelessWidget {
appBar: GeckoAppBar('myPassword'.tr()), appBar: GeckoAppBar('myPassword'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
InfoIntro( SingleChildScrollView(
child: InfoIntro(
text: 'thisPasswordProtectsYourWalletsInASecureChest'.tr(), text: 'thisPasswordProtectsYourWalletsInASecureChest'.tr(),
assetName: 'coffre-fort-protege-les-portefeuilles.png', assetName: 'coffre-fort-protege-les-portefeuilles.png',
buttonText: '>', buttonText: '>',
...@@ -27,6 +28,7 @@ class OnboardingStepEight extends StatelessWidget { ...@@ -27,6 +28,7 @@ class OnboardingStepEight extends StatelessWidget {
pagePosition: 7, pagePosition: 7,
isMd: true, isMd: true,
boxHeight: 320), boxHeight: 320),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
......
...@@ -43,7 +43,9 @@ class _OnboardingStepNineState extends State<OnboardingStepNine> { ...@@ -43,7 +43,9 @@ class _OnboardingStepNineState extends State<OnboardingStepNine> {
appBar: GeckoAppBar('myPassword'.tr()), appBar: GeckoAppBar('myPassword'.tr()),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
Column(children: <Widget>[ SingleChildScrollView(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: Column(children: <Widget>[
ScaledSizedBox(height: isTall ? 25 : 5), ScaledSizedBox(height: isTall ? 25 : 5),
const BuildProgressBar(pagePosition: 8), const BuildProgressBar(pagePosition: 8),
ScaledSizedBox(height: isTall ? 25 : 5), ScaledSizedBox(height: isTall ? 25 : 5),
...@@ -51,6 +53,7 @@ class _OnboardingStepNineState extends State<OnboardingStepNine> { ...@@ -51,6 +53,7 @@ class _OnboardingStepNineState extends State<OnboardingStepNine> {
ScaledSizedBox(height: isTall ? 60 : 10), ScaledSizedBox(height: isTall ? 60 : 10),
pinForm(context, 1, 2), pinForm(context, 1, 2),
]), ]),
),
const OfflineInfo(), const OfflineInfo(),
]), ]),
), ),
...@@ -119,11 +122,7 @@ class _OnboardingStepNineState extends State<OnboardingStepNine> { ...@@ -119,11 +122,7 @@ class _OnboardingStepNineState extends State<OnboardingStepNine> {
if (isPinComplex(pin)) { if (isPinComplex(pin)) {
Navigator.push( Navigator.push(
context, context,
FaderTransition( FaderTransition(page: OnboardingStepTen(scanDerivation: widget.scanDerivation, pinCode: enterPin.text), isFast: false),
page: OnboardingStepTen(
scanDerivation: widget.scanDerivation,
pinCode: enterPin.text),
isFast: false),
); );
} else { } else {
hasError = true; hasError = true;
...@@ -148,22 +147,7 @@ bool isPinComplex(String pin) { ...@@ -148,22 +147,7 @@ bool isPinComplex(String pin) {
if (RegExp(r'^(\d)\1{3}$').hasMatch(pin)) return false; if (RegExp(r'^(\d)\1{3}$').hasMatch(pin)) return false;
// Check for common sequences // Check for common sequences
List<String> sequences = [ List<String> sequences = ['0123', '1234', '2345', '3456', '4567', '5678', '6789', '9876', '8765', '7654', '6543', '5432', '4321', '3210'];
'0123',
'1234',
'2345',
'3456',
'4567',
'5678',
'6789',
'9876',
'8765',
'7654',
'6543',
'5432',
'4321',
'3210'
];
if (sequences.contains(pin)) return false; if (sequences.contains(pin)) return false;
// Check if digits are too close to each other // Check if digits are too close to each other
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment