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

accessibility size

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