add messages about offline status in onboarding screens

This commit is contained in:
poka 2022-08-17 23:01:20 +02:00
parent 0687ae072f
commit 0983c1d01e
18 changed files with 447 additions and 405 deletions

View File

@ -174,5 +174,6 @@
"noContacts": "You don't have any contact",
"addContact": "Add\nto contacts",
"removeContact": "Remove\nthis contact",
"derivationsScanProgress": "Scan address {}/{}"
"derivationsScanProgress": "Scan address {}/{}",
"youAreOffline": "You are offline..."
}

View File

@ -174,5 +174,6 @@
"noContacts": "You don't have any contact",
"addContact": "Add\nto contacts",
"removeContact": "Remove\nthis contact",
"derivationsScanProgress": "Scan address {}/{}"
"derivationsScanProgress": "Scan address {}/{}",
"youAreOffline": "You are offline..."
}

View File

@ -175,5 +175,6 @@
"noContacts": "Vous n'avez aucun contact",
"addContact": "Ajouter\naux contacts",
"removeContact": "Supprimer\nce contact",
"derivationsScanProgress": "Scan de l'adresse {}/{}"
"derivationsScanProgress": "Scan de l'adresse {}/{}",
"youAreOffline": "Vous êtes hors ligne..."
}

View File

@ -69,7 +69,8 @@ class SubstrateSdk with ChangeNotifier {
Future getStorageConst(String call) async {
return (await sdk.webView!
.evalJavascript('api.consts.$call', wrapPromise: false))[0];
.evalJavascript('api.consts.$call', wrapPromise: false) ??
[null])[0];
}
TxSenderData _setSender() {
@ -307,6 +308,8 @@ class SubstrateSdk with ChangeNotifier {
Future<void> connectNode(BuildContext ctx) async {
HomeProvider homeProvider = Provider.of<HomeProvider>(ctx, listen: false);
MyWalletsProvider myWalletProvider =
Provider.of<MyWalletsProvider>(ctx, listen: false);
homeProvider.changeMessage("connectionPending".tr(), 0);
@ -347,7 +350,7 @@ class SubstrateSdk with ChangeNotifier {
notifyListeners();
});
// currencyName = await getCurencyName();
await initCurrencyParameters();
notifyListeners();
homeProvider.changeMessage(
"wellConnectedToNode"
@ -359,7 +362,7 @@ class SubstrateSdk with ChangeNotifier {
debugConnection = res.toString();
notifyListeners();
homeProvider.changeMessage("noDuniterEndointAvailable".tr(), 0);
// snackNode(ctx, false);
if (!myWalletProvider.checkIfWalletExist()) snackNode(homeContext, false);
}
log.d(sdk.api.connectedNode?.endpoint);
@ -795,7 +798,7 @@ void snackNode(BuildContext context, bool isConnected) {
String message;
if (!isConnected) {
message =
"${"noDuniterNodeAvailableTryLater".tr()}:\n${configBox.get('endpoint').first}";
"noDuniterNodeAvailableTryLater".tr();
} else {
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);

View File

@ -159,8 +159,7 @@ class CommonElements {
}
Widget offlineInfo(BuildContext context) {
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
final double screenWidth = MediaQuery.of(context).size.width;
final double screenWidth = MediaQuery.of(homeContext).size.width;
return Consumer<SubstrateSdk>(builder: (context, sub, _) {
return Visibility(
visible: !sub.nodeConnected,
@ -174,7 +173,7 @@ class CommonElements {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Vous êtes hors ligne...",
'youAreOffline'.tr(),
style: TextStyle(color: Colors.grey[50]),
textAlign: TextAlign.center,
),

View File

@ -167,7 +167,6 @@ class HomeScreen extends StatelessWidget {
sub.reload();
} else {
await sub.connectNode(ctx);
await sub.initCurrencyParameters();
}
});
}

View File

@ -49,110 +49,114 @@ class RestoreChest extends StatelessWidget {
child: Text('restoreAChest'.tr()),
)),
body: SafeArea(
child: Column(children: <Widget>[
SizedBox(height: isTall ? 30 : 15),
bubbleSpeak('toRestoreEnterMnemonic'.tr()),
SizedBox(height: isTall ? 30 : 15),
child: Stack(children: [
Column(children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
arrayCell(context, genW.cellController0),
arrayCell(context, genW.cellController1),
arrayCell(context, genW.cellController2),
arrayCell(context, genW.cellController3),
]),
const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
arrayCell(context, genW.cellController4),
arrayCell(context, genW.cellController5),
arrayCell(context, genW.cellController6),
arrayCell(context, genW.cellController7),
]),
const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
arrayCell(context, genW.cellController8),
arrayCell(context, genW.cellController9),
arrayCell(context, genW.cellController10),
arrayCell(context, genW.cellController11),
]),
]),
// const Spacer(),
if (genW.isSentenceComplete(context))
Expanded(
child: Align(
alignment: Alignment.center,
child: SizedBox(
width: 410,
height: 70,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
elevation: 4,
primary: orangeC, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async {
if (await sub.isMnemonicValid(genW.generatedMnemonic!)) {
genW.resetImportView();
await Navigator.push(
context,
FaderTransition(
page: skipIntro
? const OnboardingStepNine(
scanDerivation: true)
: const OnboardingStepSeven(
scanDerivation: true),
isFast: true),
);
} else {
await badMnemonicPopup(context);
}
},
child: Text(
'restoreThisChest'.tr(),
style: const TextStyle(
fontSize: 24, fontWeight: FontWeight.w600),
),
),
),
// SizedBox(height: isTall ? 80 : 80),
))
else
Column(children: [
const SizedBox(height: 20),
SizedBox(
width: 190,
height: 60,
child: ElevatedButton(
SizedBox(height: isTall ? 30 : 15),
bubbleSpeak('toRestoreEnterMnemonic'.tr()),
SizedBox(height: isTall ? 30 : 15),
Column(children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
arrayCell(context, genW.cellController0),
arrayCell(context, genW.cellController1),
arrayCell(context, genW.cellController2),
arrayCell(context, genW.cellController3),
]),
const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
arrayCell(context, genW.cellController4),
arrayCell(context, genW.cellController5),
arrayCell(context, genW.cellController6),
arrayCell(context, genW.cellController7),
]),
const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
arrayCell(context, genW.cellController8),
arrayCell(context, genW.cellController9),
arrayCell(context, genW.cellController10),
arrayCell(context, genW.cellController11),
]),
]),
// const Spacer(),
if (genW.isSentenceComplete(context))
Expanded(
child: Align(
alignment: Alignment.center,
child: SizedBox(
width: 410,
height: 70,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
elevation: 4,
primary: yellowC, // background
onPrimary: Colors.black, // foreground
primary: orangeC, // background
onPrimary: Colors.white, // foreground
),
onPressed: () {
genW.pasteMnemonic(context);
onPressed: () async {
if (await sub
.isMnemonicValid(genW.generatedMnemonic!)) {
genW.resetImportView();
await Navigator.push(
context,
FaderTransition(
page: skipIntro
? const OnboardingStepNine(
scanDerivation: true)
: const OnboardingStepSeven(
scanDerivation: true),
isFast: true),
);
} else {
await badMnemonicPopup(context);
}
},
child: Row(
children: [
const Icon(
Icons.content_paste_go,
size: 25,
),
const SizedBox(width: 10),
Text(
'pasteFromClipboard'.tr(),
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 17, fontWeight: FontWeight.w400),
),
],
)),
)
])
child: Text(
'restoreThisChest'.tr(),
style: const TextStyle(
fontSize: 24, fontWeight: FontWeight.w600),
),
),
),
// SizedBox(height: isTall ? 80 : 80),
))
else
Column(children: [
const SizedBox(height: 20),
SizedBox(
width: 190,
height: 60,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
elevation: 4,
primary: yellowC, // background
onPrimary: Colors.black, // foreground
),
onPressed: () {
genW.pasteMnemonic(context);
},
child: Row(
children: [
const Icon(
Icons.content_paste_go,
size: 25,
),
const SizedBox(width: 10),
Text(
'pasteFromClipboard'.tr(),
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 17, fontWeight: FontWeight.w400),
),
],
)),
)
])
]),
CommonElements().offlineInfo(context),
]),
),
),

View File

@ -27,15 +27,18 @@ class OnboardingStepOne extends StatelessWidget {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: common.infoIntro(
context,
'geckoGenerateYourWalletFromMnemonic'.tr(),
'fabrication-de-portefeuille.png',
'>',
const OnboardingStepTwo(),
0,
isMd: true,
),
child: Stack(children: [
common.infoIntro(
context,
'geckoGenerateYourWalletFromMnemonic'.tr(),
'fabrication-de-portefeuille.png',
'>',
const OnboardingStepTwo(),
0,
isMd: true,
),
CommonElements().offlineInfo(context),
]),
),
);
}

View File

@ -49,79 +49,82 @@ class OnboardingStepTen extends StatelessWidget {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: Column(children: <Widget>[
SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(9),
SizedBox(height: isTall ? 40 : 20),
common.buildText("geckoWillCheckPassword".tr()),
SizedBox(height: isTall ? 80 : 20),
Visibility(
visible: generateWalletProvider.scanedValidWalletNumber != -1,
child: Padding(
padding: const EdgeInsets.only(bottom: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("derivationsScanProgress".tr(args: [
'${generateWalletProvider.scanedWalletNumber}',
'${generateWalletProvider.numberScan + 1}'
])),
const SizedBox(width: 10),
SizedBox(
height: 22,
width: 22,
child: CircularProgressIndicator(
color: orangeC,
strokeWidth: 3,
child: Stack(children: [
Column(children: <Widget>[
SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(9),
SizedBox(height: isTall ? 40 : 20),
common.buildText("geckoWillCheckPassword".tr()),
SizedBox(height: isTall ? 80 : 20),
Visibility(
visible: generateWalletProvider.scanedValidWalletNumber != -1,
child: Padding(
padding: const EdgeInsets.only(bottom: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("derivationsScanProgress".tr(args: [
'${generateWalletProvider.scanedWalletNumber}',
'${generateWalletProvider.numberScan + 1}'
])),
const SizedBox(width: 10),
SizedBox(
height: 22,
width: 22,
child: CircularProgressIndicator(
color: orangeC,
strokeWidth: 3,
),
),
),
],
],
),
),
),
),
Consumer<SubstrateSdk>(builder: (context, sub, _) {
return sub.nodeConnected
? pinForm(context, walletOptions, pinLenght, 1, 2)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Text(
'Vous devez vous connecter à internet\npour valider votre coffre',
style: TextStyle(
fontSize: 20,
color: Colors.redAccent,
fontWeight: FontWeight.w500,
Consumer<SubstrateSdk>(builder: (context, sub, _) {
return sub.nodeConnected
? pinForm(context, walletOptions, pinLenght, 1, 2)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Text(
'Vous devez vous connecter à internet\npour valider votre coffre',
style: TextStyle(
fontSize: 20,
color: Colors.redAccent,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
textAlign: TextAlign.center,
]);
}),
Consumer<SubstrateSdk>(builder: (context, sub, _) {
return sub.nodeConnected
? InkWell(
onTap: () {
walletOptions.changePinCacheChoice();
},
child: Row(children: [
const SizedBox(height: 30),
const Spacer(),
Icon(
configBox.get('isCacheChecked') ?? false
? Icons.check_box
: Icons.check_box_outline_blank,
color: orangeC,
),
]);
}),
Consumer<SubstrateSdk>(builder: (context, sub, _) {
return sub.nodeConnected
? InkWell(
onTap: () {
walletOptions.changePinCacheChoice();
},
child: Row(children: [
const SizedBox(height: 30),
const Spacer(),
Icon(
configBox.get('isCacheChecked') ?? false
? Icons.check_box
: Icons.check_box_outline_blank,
color: orangeC,
),
const SizedBox(width: 8),
Text(
'rememberPassword'.tr(),
style:
TextStyle(fontSize: 16, color: Colors.grey[700]),
),
const Spacer()
]))
: const Text('');
}),
const SizedBox(height: 10),
const SizedBox(width: 8),
Text(
'rememberPassword'.tr(),
style: TextStyle(
fontSize: 16, color: Colors.grey[700]),
),
const Spacer()
]))
: const Text('');
}),
const SizedBox(height: 10),
]),
CommonElements().offlineInfo(context),
]),
));
}

View File

@ -29,13 +29,16 @@ class OnboardingStepTwo extends StatelessWidget {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: common.infoIntro(
context,
'keepThisMnemonicSecure'.tr(),
'fabrication-de-portefeuille-impossible-sans-phrase.png',
'>',
const OnboardingStepThree(),
1),
child: Stack(children: [
common.infoIntro(
context,
'keepThisMnemonicSecure'.tr(),
'fabrication-de-portefeuille-impossible-sans-phrase.png',
'>',
const OnboardingStepThree(),
1),
CommonElements().offlineInfo(context),
]),
),
);
}

View File

@ -29,8 +29,11 @@ class OnboardingStepThree extends StatelessWidget {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: common.infoIntro(context, 'warningForgotPassword'.tr(),
'forgot_password.png'.tr(), '>', const OnboardingStepFor(), 2),
child: Stack(children: [
common.infoIntro(context, 'warningForgotPassword'.tr(),
'forgot_password.png'.tr(), '>', const OnboardingStepFor(), 2),
CommonElements().offlineInfo(context),
]),
),
);
}

View File

@ -29,14 +29,17 @@ class OnboardingStepFor extends StatelessWidget {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: common.infoIntro(
context,
'itsTimeToUseAPenAndPaper'.tr(),
'gecko_also_can_forget.png'.tr(),
'>',
const OnboardingStepFive(),
3,
isMd: true),
child: Stack(children: [
common.infoIntro(
context,
'itsTimeToUseAPenAndPaper'.tr(),
'gecko_also_can_forget.png'.tr(),
'>',
const OnboardingStepFive(),
3,
isMd: true),
CommonElements().offlineInfo(context),
]),
),
);
}

View File

@ -48,57 +48,62 @@ class _ChooseChestState extends State<OnboardingStepFive> {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: Column(children: [
SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(4),
SizedBox(height: isTall ? 40 : 20),
common.buildText('geckoGeneratedYourMnemonicKeepItSecret'.tr()),
SizedBox(height: 35 * ratio),
sentanceArray(context),
SizedBox(height: 17 * ratio),
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) {
return PrintWallet(generateWalletProvider.generatedMnemonic);
}),
);
},
child: Image.asset(
'assets/printer.png',
height: 42 * ratio,
),
),
const SizedBox(height: 40),
Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
width: 380 * ratio,
height: 60 * ratio,
child: ElevatedButton(
key: const Key('generateMnemonic'),
style: ElevatedButton.styleFrom(
elevation: 4,
primary: const Color(0xffFFD58D),
onPrimary: Colors.black, // foreground
),
onPressed: () {
// _generateWalletProvider.reloadBuild();
setState(() {});
},
child: Text("chooseAnotherMnemonic".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 22 * ratio,
fontWeight: FontWeight.w600))),
child: Stack(children: [
Column(children: [
SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(4),
SizedBox(height: isTall ? 40 : 20),
common.buildText('geckoGeneratedYourMnemonicKeepItSecret'.tr()),
SizedBox(height: 35 * ratio),
sentanceArray(context),
SizedBox(height: 17 * ratio),
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) {
return PrintWallet(
generateWalletProvider.generatedMnemonic);
}),
);
},
child: Image.asset(
'assets/printer.png',
height: 42 * ratio,
),
),
),
SizedBox(height: 22 * ratio),
nextButton(context, "iNotedMyMnemonic".tr(), false, widget.skipIntro),
SizedBox(height: 35 * ratio),
const SizedBox(height: 40),
Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
width: 380 * ratio,
height: 60 * ratio,
child: ElevatedButton(
key: const Key('generateMnemonic'),
style: ElevatedButton.styleFrom(
elevation: 4,
primary: const Color(0xffFFD58D),
onPrimary: Colors.black, // foreground
),
onPressed: () {
// _generateWalletProvider.reloadBuild();
setState(() {});
},
child: Text("chooseAnotherMnemonic".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 22 * ratio,
fontWeight: FontWeight.w600))),
),
),
),
SizedBox(height: 22 * ratio),
nextButton(
context, "iNotedMyMnemonic".tr(), false, widget.skipIntro),
SizedBox(height: 35 * ratio),
]),
CommonElements().offlineInfo(context),
]),
),
);

View File

@ -51,88 +51,92 @@ class OnboardingStepSix extends StatelessWidget {
),
),
body: SafeArea(
child: Align(
alignment: Alignment.topCenter,
child: Column(children: [
SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(5),
SizedBox(height: isTall ? 40 : 20),
common.buildText(
"didYouNoteMnemonicToBeSureTypeWord".tr(
args: [(generateWalletProvider.nbrWord + 1).toString()]),
20,
true),
SizedBox(height: isTall ? 70 : 20),
Text('${generateWalletProvider.nbrWord + 1}',
key: const Key('askedWord'),
style: TextStyle(
fontSize: isTall ? 17 : 15,
color: orangeC,
fontWeight: FontWeight.w400)),
const SizedBox(height: 10),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7),
border: Border.all(
color: Colors.grey[600]!,
width: 3,
)),
width: 430,
child: TextFormField(
key: const Key('inputWord'),
autofocus: true,
enabled: !generateWalletProvider.isAskedWordValid,
controller: wordController,
textInputAction: TextInputAction.next,
onChanged: (value) {
generateWalletProvider.checkAskedWord(
value, _mnemonicController.text);
},
maxLines: 1,
textAlign: TextAlign.center,
decoration: InputDecoration(
labelStyle: TextStyle(
fontSize: 22.0,
color: Colors.grey[500],
fontWeight: FontWeight.w500),
labelText: generateWalletProvider.isAskedWordValid
? "itsTheGoodWord".tr()
: "${generateWalletProvider.nbrWordAlpha} ${"nthMnemonicWord".tr()}",
fillColor: const Color(0xffeeeedd),
filled: true,
contentPadding: const EdgeInsets.all(12),
),
style: TextStyle(
fontSize: 40.0,
color: generateWalletProvider.askedWordColor,
fontWeight: FontWeight.w500))),
Visibility(
visible: generateWalletProvider.isAskedWordValid,
child: Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: nextButton(
context,
'continue'.tr(),
skipIntro
? const OnboardingStepNine()
: const OnboardingStepSeven(),
false),
child: Stack(children: [
Align(
alignment: Alignment.topCenter,
child: Column(children: [
SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(5),
SizedBox(height: isTall ? 40 : 20),
common.buildText(
"didYouNoteMnemonicToBeSureTypeWord".tr(args: [
(generateWalletProvider.nbrWord + 1).toString()
]),
20,
true),
SizedBox(height: isTall ? 70 : 20),
Text('${generateWalletProvider.nbrWord + 1}',
key: const Key('askedWord'),
style: TextStyle(
fontSize: isTall ? 17 : 15,
color: orangeC,
fontWeight: FontWeight.w400)),
const SizedBox(height: 10),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7),
border: Border.all(
color: Colors.grey[600]!,
width: 3,
)),
width: 430,
child: TextFormField(
key: const Key('inputWord'),
autofocus: true,
enabled: !generateWalletProvider.isAskedWordValid,
controller: wordController,
textInputAction: TextInputAction.next,
onChanged: (value) {
generateWalletProvider.checkAskedWord(
value, _mnemonicController.text);
},
maxLines: 1,
textAlign: TextAlign.center,
decoration: InputDecoration(
labelStyle: TextStyle(
fontSize: 22.0,
color: Colors.grey[500],
fontWeight: FontWeight.w500),
labelText: generateWalletProvider.isAskedWordValid
? "itsTheGoodWord".tr()
: "${generateWalletProvider.nbrWordAlpha} ${"nthMnemonicWord".tr()}",
fillColor: const Color(0xffeeeedd),
filled: true,
contentPadding: const EdgeInsets.all(12),
),
style: TextStyle(
fontSize: 40.0,
color: generateWalletProvider.askedWordColor,
fontWeight: FontWeight.w500))),
Visibility(
visible: generateWalletProvider.isAskedWordValid,
child: Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: nextButton(
context,
'continue'.tr(),
skipIntro
? const OnboardingStepNine()
: const OnboardingStepSeven(),
false),
),
),
),
),
// Visibility(
// visible: !_generateWalletProvider.isAskedWordValid,
// child: const Expanded(
// child: Align(
// alignment: Alignment.bottomCenter,
// child: Text(''),
// ),
// ),
// ),
SizedBox(height: 35 * ratio),
]),
),
// Visibility(
// visible: !_generateWalletProvider.isAskedWordValid,
// child: const Expanded(
// child: Align(
// alignment: Alignment.bottomCenter,
// child: Text(''),
// ),
// ),
// ),
SizedBox(height: 35 * ratio),
]),
),
CommonElements().offlineInfo(context),
]),
),
),
);

View File

@ -29,14 +29,17 @@ class OnboardingStepSeven extends StatelessWidget {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: common.infoIntro(
context,
'geckoWillGenerateAPassword'.tr(),
'coffre-fort-code-secret-dans-telephone.png',
'>',
OnboardingStepEight(scanDerivation: scanDerivation),
6,
boxHeight: 400),
child: Stack(children: [
common.infoIntro(
context,
'geckoWillGenerateAPassword'.tr(),
'coffre-fort-code-secret-dans-telephone.png',
'>',
OnboardingStepEight(scanDerivation: scanDerivation),
6,
boxHeight: 400),
CommonElements().offlineInfo(context),
]),
),
);
}

View File

@ -29,14 +29,17 @@ class OnboardingStepEight extends StatelessWidget {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: common.infoIntro(
context,
'thisPasswordProtectsYourWalletsInASecureChest'.tr(),
'coffre-fort-protege-les-portefeuilles.png',
'>',
OnboardingStepNine(scanDerivation: scanDerivation),
7,
isMd: true),
child: Stack(children: [
common.infoIntro(
context,
'thisPasswordProtectsYourWalletsInASecureChest'.tr(),
'coffre-fort-protege-les-portefeuilles.png',
'>',
OnboardingStepNine(scanDerivation: scanDerivation),
7,
isMd: true),
CommonElements().offlineInfo(context),
]),
),
);
}

View File

@ -41,61 +41,65 @@ class OnboardingStepNine extends StatelessWidget {
),
extendBodyBehindAppBar: true,
body: SafeArea(
child: Column(children: <Widget>[
SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(8),
SizedBox(height: isTall ? 40 : 20),
common.buildText("hereIsThePasswordKeepIt".tr(), 20, true),
const SizedBox(height: 100),
Stack(
alignment: Alignment.centerRight,
children: <Widget>[
TextField(
key: const Key('generatedPin'),
enabled: false,
controller: generateWalletProvider.pin,
maxLines: 1,
textAlign: TextAlign.center,
decoration: const InputDecoration(),
style: const TextStyle(
letterSpacing: 5,
fontSize: 35.0,
color: Colors.black,
fontWeight: FontWeight.bold)),
IconButton(
icon: const Icon(Icons.replay),
color: orangeC,
onPressed: () {
generateWalletProvider.changePinCode(reload: true);
},
),
],
),
Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
width: 380 * ratio,
height: 60 * ratio,
child: ElevatedButton(
key: const Key('changeSecretCode'),
style: ElevatedButton.styleFrom(
elevation: 4,
primary: const Color(0xffFFD58D),
onPrimary: Colors.black, // foreground
),
onPressed: () {
generateWalletProvider.changePinCode(reload: true);
},
child: Text("chooseAnotherPassword".tr(),
style: TextStyle(
fontSize: 22 * ratio,
fontWeight: FontWeight.w600))),
))),
SizedBox(height: 22 * ratio),
common.nextButton(context, "iNotedMyPassword".tr(),
OnboardingStepTen(scanDerivation: scanDerivation), false),
SizedBox(height: 35 * ratio),
child: Stack(children: [
Column(children: <Widget>[
SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(8),
SizedBox(height: isTall ? 40 : 20),
common.buildText("hereIsThePasswordKeepIt".tr(), 20, true),
const SizedBox(height: 100),
Stack(
alignment: Alignment.centerRight,
children: <Widget>[
TextField(
key: const Key('generatedPin'),
enabled: false,
controller: generateWalletProvider.pin,
maxLines: 1,
textAlign: TextAlign.center,
decoration: const InputDecoration(),
style: const TextStyle(
letterSpacing: 5,
fontSize: 35.0,
color: Colors.black,
fontWeight: FontWeight.bold)),
IconButton(
icon: const Icon(Icons.replay),
color: orangeC,
onPressed: () {
generateWalletProvider.changePinCode(reload: true);
},
),
],
),
Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
width: 380 * ratio,
height: 60 * ratio,
child: ElevatedButton(
key: const Key('changeSecretCode'),
style: ElevatedButton.styleFrom(
elevation: 4,
primary: const Color(0xffFFD58D),
onPrimary: Colors.black, // foreground
),
onPressed: () {
generateWalletProvider.changePinCode(
reload: true);
},
child: Text("chooseAnotherPassword".tr(),
style: TextStyle(
fontSize: 22 * ratio,
fontWeight: FontWeight.w600))),
))),
SizedBox(height: 22 * ratio),
common.nextButton(context, "iNotedMyPassword".tr(),
OnboardingStepTen(scanDerivation: scanDerivation), false),
SizedBox(height: 35 * ratio),
]),
CommonElements().offlineInfo(context),
]),
));
}

View File

@ -5,7 +5,7 @@ description: Pay with G1.
# 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
version: 0.0.9+22
version: 0.0.9+23
environment:
sdk: '>=2.12.0 <3.0.0'