forked from axiom-team/gecko
add messages about offline status in onboarding screens
This commit is contained in:
parent
0687ae072f
commit
0983c1d01e
|
@ -174,5 +174,6 @@
|
||||||
"noContacts": "You don't have any contact",
|
"noContacts": "You don't have any contact",
|
||||||
"addContact": "Add\nto contacts",
|
"addContact": "Add\nto contacts",
|
||||||
"removeContact": "Remove\nthis contact",
|
"removeContact": "Remove\nthis contact",
|
||||||
"derivationsScanProgress": "Scan address {}/{}"
|
"derivationsScanProgress": "Scan address {}/{}",
|
||||||
|
"youAreOffline": "You are offline..."
|
||||||
}
|
}
|
|
@ -174,5 +174,6 @@
|
||||||
"noContacts": "You don't have any contact",
|
"noContacts": "You don't have any contact",
|
||||||
"addContact": "Add\nto contacts",
|
"addContact": "Add\nto contacts",
|
||||||
"removeContact": "Remove\nthis contact",
|
"removeContact": "Remove\nthis contact",
|
||||||
"derivationsScanProgress": "Scan address {}/{}"
|
"derivationsScanProgress": "Scan address {}/{}",
|
||||||
|
"youAreOffline": "You are offline..."
|
||||||
}
|
}
|
|
@ -175,5 +175,6 @@
|
||||||
"noContacts": "Vous n'avez aucun contact",
|
"noContacts": "Vous n'avez aucun contact",
|
||||||
"addContact": "Ajouter\naux contacts",
|
"addContact": "Ajouter\naux contacts",
|
||||||
"removeContact": "Supprimer\nce contact",
|
"removeContact": "Supprimer\nce contact",
|
||||||
"derivationsScanProgress": "Scan de l'adresse {}/{}"
|
"derivationsScanProgress": "Scan de l'adresse {}/{}",
|
||||||
|
"youAreOffline": "Vous êtes hors ligne..."
|
||||||
}
|
}
|
|
@ -69,7 +69,8 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
|
|
||||||
Future getStorageConst(String call) async {
|
Future getStorageConst(String call) async {
|
||||||
return (await sdk.webView!
|
return (await sdk.webView!
|
||||||
.evalJavascript('api.consts.$call', wrapPromise: false))[0];
|
.evalJavascript('api.consts.$call', wrapPromise: false) ??
|
||||||
|
[null])[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
TxSenderData _setSender() {
|
TxSenderData _setSender() {
|
||||||
|
@ -307,6 +308,8 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
|
|
||||||
Future<void> connectNode(BuildContext ctx) async {
|
Future<void> connectNode(BuildContext ctx) async {
|
||||||
HomeProvider homeProvider = Provider.of<HomeProvider>(ctx, listen: false);
|
HomeProvider homeProvider = Provider.of<HomeProvider>(ctx, listen: false);
|
||||||
|
MyWalletsProvider myWalletProvider =
|
||||||
|
Provider.of<MyWalletsProvider>(ctx, listen: false);
|
||||||
|
|
||||||
homeProvider.changeMessage("connectionPending".tr(), 0);
|
homeProvider.changeMessage("connectionPending".tr(), 0);
|
||||||
|
|
||||||
|
@ -347,7 +350,7 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
});
|
});
|
||||||
|
|
||||||
// currencyName = await getCurencyName();
|
await initCurrencyParameters();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
homeProvider.changeMessage(
|
homeProvider.changeMessage(
|
||||||
"wellConnectedToNode"
|
"wellConnectedToNode"
|
||||||
|
@ -359,7 +362,7 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
debugConnection = res.toString();
|
debugConnection = res.toString();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
homeProvider.changeMessage("noDuniterEndointAvailable".tr(), 0);
|
homeProvider.changeMessage("noDuniterEndointAvailable".tr(), 0);
|
||||||
// snackNode(ctx, false);
|
if (!myWalletProvider.checkIfWalletExist()) snackNode(homeContext, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
log.d(sdk.api.connectedNode?.endpoint);
|
log.d(sdk.api.connectedNode?.endpoint);
|
||||||
|
@ -795,7 +798,7 @@ void snackNode(BuildContext context, bool isConnected) {
|
||||||
String message;
|
String message;
|
||||||
if (!isConnected) {
|
if (!isConnected) {
|
||||||
message =
|
message =
|
||||||
"${"noDuniterNodeAvailableTryLater".tr()}:\n${configBox.get('endpoint').first}";
|
"noDuniterNodeAvailableTryLater".tr();
|
||||||
} else {
|
} else {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
|
|
|
@ -159,8 +159,7 @@ class CommonElements {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget offlineInfo(BuildContext context) {
|
Widget offlineInfo(BuildContext context) {
|
||||||
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final double screenWidth = MediaQuery.of(homeContext).size.width;
|
||||||
final double screenWidth = MediaQuery.of(context).size.width;
|
|
||||||
return Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
return Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||||
return Visibility(
|
return Visibility(
|
||||||
visible: !sub.nodeConnected,
|
visible: !sub.nodeConnected,
|
||||||
|
@ -174,7 +173,7 @@ class CommonElements {
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Vous êtes hors ligne...",
|
'youAreOffline'.tr(),
|
||||||
style: TextStyle(color: Colors.grey[50]),
|
style: TextStyle(color: Colors.grey[50]),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
|
|
@ -167,7 +167,6 @@ class HomeScreen extends StatelessWidget {
|
||||||
sub.reload();
|
sub.reload();
|
||||||
} else {
|
} else {
|
||||||
await sub.connectNode(ctx);
|
await sub.connectNode(ctx);
|
||||||
await sub.initCurrencyParameters();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,110 +49,114 @@ class RestoreChest extends StatelessWidget {
|
||||||
child: Text('restoreAChest'.tr()),
|
child: Text('restoreAChest'.tr()),
|
||||||
)),
|
)),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(children: <Widget>[
|
child: Stack(children: [
|
||||||
SizedBox(height: isTall ? 30 : 15),
|
|
||||||
bubbleSpeak('toRestoreEnterMnemonic'.tr()),
|
|
||||||
SizedBox(height: isTall ? 30 : 15),
|
|
||||||
Column(children: <Widget>[
|
Column(children: <Widget>[
|
||||||
Row(
|
SizedBox(height: isTall ? 30 : 15),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
bubbleSpeak('toRestoreEnterMnemonic'.tr()),
|
||||||
children: <Widget>[
|
SizedBox(height: isTall ? 30 : 15),
|
||||||
arrayCell(context, genW.cellController0),
|
Column(children: <Widget>[
|
||||||
arrayCell(context, genW.cellController1),
|
Row(
|
||||||
arrayCell(context, genW.cellController2),
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
arrayCell(context, genW.cellController3),
|
children: <Widget>[
|
||||||
]),
|
arrayCell(context, genW.cellController0),
|
||||||
const SizedBox(height: 15),
|
arrayCell(context, genW.cellController1),
|
||||||
Row(
|
arrayCell(context, genW.cellController2),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
arrayCell(context, genW.cellController3),
|
||||||
children: <Widget>[
|
]),
|
||||||
arrayCell(context, genW.cellController4),
|
const SizedBox(height: 15),
|
||||||
arrayCell(context, genW.cellController5),
|
Row(
|
||||||
arrayCell(context, genW.cellController6),
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
arrayCell(context, genW.cellController7),
|
children: <Widget>[
|
||||||
]),
|
arrayCell(context, genW.cellController4),
|
||||||
const SizedBox(height: 15),
|
arrayCell(context, genW.cellController5),
|
||||||
Row(
|
arrayCell(context, genW.cellController6),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
arrayCell(context, genW.cellController7),
|
||||||
children: <Widget>[
|
]),
|
||||||
arrayCell(context, genW.cellController8),
|
const SizedBox(height: 15),
|
||||||
arrayCell(context, genW.cellController9),
|
Row(
|
||||||
arrayCell(context, genW.cellController10),
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
arrayCell(context, genW.cellController11),
|
children: <Widget>[
|
||||||
]),
|
arrayCell(context, genW.cellController8),
|
||||||
]),
|
arrayCell(context, genW.cellController9),
|
||||||
// const Spacer(),
|
arrayCell(context, genW.cellController10),
|
||||||
if (genW.isSentenceComplete(context))
|
arrayCell(context, genW.cellController11),
|
||||||
Expanded(
|
]),
|
||||||
child: Align(
|
]),
|
||||||
alignment: Alignment.center,
|
// const Spacer(),
|
||||||
child: SizedBox(
|
if (genW.isSentenceComplete(context))
|
||||||
width: 410,
|
Expanded(
|
||||||
height: 70,
|
child: Align(
|
||||||
child: ElevatedButton(
|
alignment: Alignment.center,
|
||||||
style: ElevatedButton.styleFrom(
|
child: SizedBox(
|
||||||
elevation: 4,
|
width: 410,
|
||||||
primary: orangeC, // background
|
height: 70,
|
||||||
onPrimary: Colors.white, // foreground
|
child: ElevatedButton(
|
||||||
),
|
|
||||||
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(
|
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
elevation: 4,
|
elevation: 4,
|
||||||
primary: yellowC, // background
|
primary: orangeC, // background
|
||||||
onPrimary: Colors.black, // foreground
|
onPrimary: Colors.white, // foreground
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () async {
|
||||||
genW.pasteMnemonic(context);
|
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(
|
child: Text(
|
||||||
children: [
|
'restoreThisChest'.tr(),
|
||||||
const Icon(
|
style: const TextStyle(
|
||||||
Icons.content_paste_go,
|
fontSize: 24, fontWeight: FontWeight.w600),
|
||||||
size: 25,
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
),
|
||||||
Text(
|
// SizedBox(height: isTall ? 80 : 80),
|
||||||
'pasteFromClipboard'.tr(),
|
))
|
||||||
textAlign: TextAlign.center,
|
else
|
||||||
style: const TextStyle(
|
Column(children: [
|
||||||
fontSize: 17, fontWeight: FontWeight.w400),
|
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),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -27,15 +27,18 @@ class OnboardingStepOne extends StatelessWidget {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: common.infoIntro(
|
child: Stack(children: [
|
||||||
context,
|
common.infoIntro(
|
||||||
'geckoGenerateYourWalletFromMnemonic'.tr(),
|
context,
|
||||||
'fabrication-de-portefeuille.png',
|
'geckoGenerateYourWalletFromMnemonic'.tr(),
|
||||||
'>',
|
'fabrication-de-portefeuille.png',
|
||||||
const OnboardingStepTwo(),
|
'>',
|
||||||
0,
|
const OnboardingStepTwo(),
|
||||||
isMd: true,
|
0,
|
||||||
),
|
isMd: true,
|
||||||
|
),
|
||||||
|
CommonElements().offlineInfo(context),
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,79 +49,82 @@ class OnboardingStepTen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(children: <Widget>[
|
child: Stack(children: [
|
||||||
SizedBox(height: isTall ? 40 : 20),
|
Column(children: <Widget>[
|
||||||
common.buildProgressBar(9),
|
SizedBox(height: isTall ? 40 : 20),
|
||||||
SizedBox(height: isTall ? 40 : 20),
|
common.buildProgressBar(9),
|
||||||
common.buildText("geckoWillCheckPassword".tr()),
|
SizedBox(height: isTall ? 40 : 20),
|
||||||
SizedBox(height: isTall ? 80 : 20),
|
common.buildText("geckoWillCheckPassword".tr()),
|
||||||
Visibility(
|
SizedBox(height: isTall ? 80 : 20),
|
||||||
visible: generateWalletProvider.scanedValidWalletNumber != -1,
|
Visibility(
|
||||||
child: Padding(
|
visible: generateWalletProvider.scanedValidWalletNumber != -1,
|
||||||
padding: const EdgeInsets.only(bottom: 15),
|
child: Padding(
|
||||||
child: Row(
|
padding: const EdgeInsets.only(bottom: 15),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
child: Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
Text("derivationsScanProgress".tr(args: [
|
children: [
|
||||||
'${generateWalletProvider.scanedWalletNumber}',
|
Text("derivationsScanProgress".tr(args: [
|
||||||
'${generateWalletProvider.numberScan + 1}'
|
'${generateWalletProvider.scanedWalletNumber}',
|
||||||
])),
|
'${generateWalletProvider.numberScan + 1}'
|
||||||
const SizedBox(width: 10),
|
])),
|
||||||
SizedBox(
|
const SizedBox(width: 10),
|
||||||
height: 22,
|
SizedBox(
|
||||||
width: 22,
|
height: 22,
|
||||||
child: CircularProgressIndicator(
|
width: 22,
|
||||||
color: orangeC,
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 3,
|
color: orangeC,
|
||||||
|
strokeWidth: 3,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
return sub.nodeConnected
|
||||||
return sub.nodeConnected
|
? pinForm(context, walletOptions, pinLenght, 1, 2)
|
||||||
? pinForm(context, walletOptions, pinLenght, 1, 2)
|
: Row(
|
||||||
: Row(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
children: const [
|
||||||
children: const [
|
Text(
|
||||||
Text(
|
'Vous devez vous connecter à internet\npour valider votre coffre',
|
||||||
'Vous devez vous connecter à internet\npour valider votre coffre',
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontSize: 20,
|
||||||
fontSize: 20,
|
color: Colors.redAccent,
|
||||||
color: Colors.redAccent,
|
fontWeight: FontWeight.w500,
|
||||||
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,
|
||||||
),
|
),
|
||||||
]);
|
const SizedBox(width: 8),
|
||||||
}),
|
Text(
|
||||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
'rememberPassword'.tr(),
|
||||||
return sub.nodeConnected
|
style: TextStyle(
|
||||||
? InkWell(
|
fontSize: 16, color: Colors.grey[700]),
|
||||||
onTap: () {
|
),
|
||||||
walletOptions.changePinCacheChoice();
|
const Spacer()
|
||||||
},
|
]))
|
||||||
child: Row(children: [
|
: const Text('');
|
||||||
const SizedBox(height: 30),
|
}),
|
||||||
const Spacer(),
|
const SizedBox(height: 10),
|
||||||
Icon(
|
]),
|
||||||
configBox.get('isCacheChecked') ?? false
|
CommonElements().offlineInfo(context),
|
||||||
? 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),
|
|
||||||
]),
|
]),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,13 +29,16 @@ class OnboardingStepTwo extends StatelessWidget {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: common.infoIntro(
|
child: Stack(children: [
|
||||||
context,
|
common.infoIntro(
|
||||||
'keepThisMnemonicSecure'.tr(),
|
context,
|
||||||
'fabrication-de-portefeuille-impossible-sans-phrase.png',
|
'keepThisMnemonicSecure'.tr(),
|
||||||
'>',
|
'fabrication-de-portefeuille-impossible-sans-phrase.png',
|
||||||
const OnboardingStepThree(),
|
'>',
|
||||||
1),
|
const OnboardingStepThree(),
|
||||||
|
1),
|
||||||
|
CommonElements().offlineInfo(context),
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,11 @@ class OnboardingStepThree extends StatelessWidget {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: common.infoIntro(context, 'warningForgotPassword'.tr(),
|
child: Stack(children: [
|
||||||
'forgot_password.png'.tr(), '>', const OnboardingStepFor(), 2),
|
common.infoIntro(context, 'warningForgotPassword'.tr(),
|
||||||
|
'forgot_password.png'.tr(), '>', const OnboardingStepFor(), 2),
|
||||||
|
CommonElements().offlineInfo(context),
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,14 +29,17 @@ class OnboardingStepFor extends StatelessWidget {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: common.infoIntro(
|
child: Stack(children: [
|
||||||
context,
|
common.infoIntro(
|
||||||
'itsTimeToUseAPenAndPaper'.tr(),
|
context,
|
||||||
'gecko_also_can_forget.png'.tr(),
|
'itsTimeToUseAPenAndPaper'.tr(),
|
||||||
'>',
|
'gecko_also_can_forget.png'.tr(),
|
||||||
const OnboardingStepFive(),
|
'>',
|
||||||
3,
|
const OnboardingStepFive(),
|
||||||
isMd: true),
|
3,
|
||||||
|
isMd: true),
|
||||||
|
CommonElements().offlineInfo(context),
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,57 +48,62 @@ class _ChooseChestState extends State<OnboardingStepFive> {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(children: [
|
child: Stack(children: [
|
||||||
SizedBox(height: isTall ? 40 : 20),
|
Column(children: [
|
||||||
common.buildProgressBar(4),
|
SizedBox(height: isTall ? 40 : 20),
|
||||||
SizedBox(height: isTall ? 40 : 20),
|
common.buildProgressBar(4),
|
||||||
common.buildText('geckoGeneratedYourMnemonicKeepItSecret'.tr()),
|
SizedBox(height: isTall ? 40 : 20),
|
||||||
SizedBox(height: 35 * ratio),
|
common.buildText('geckoGeneratedYourMnemonicKeepItSecret'.tr()),
|
||||||
sentanceArray(context),
|
SizedBox(height: 35 * ratio),
|
||||||
SizedBox(height: 17 * ratio),
|
sentanceArray(context),
|
||||||
GestureDetector(
|
SizedBox(height: 17 * ratio),
|
||||||
onTap: () {
|
GestureDetector(
|
||||||
Navigator.push(
|
onTap: () {
|
||||||
context,
|
Navigator.push(
|
||||||
MaterialPageRoute(builder: (context) {
|
context,
|
||||||
return PrintWallet(generateWalletProvider.generatedMnemonic);
|
MaterialPageRoute(builder: (context) {
|
||||||
}),
|
return PrintWallet(
|
||||||
);
|
generateWalletProvider.generatedMnemonic);
|
||||||
},
|
}),
|
||||||
child: Image.asset(
|
);
|
||||||
'assets/printer.png',
|
},
|
||||||
height: 42 * ratio,
|
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))),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 40),
|
||||||
SizedBox(height: 22 * ratio),
|
Expanded(
|
||||||
nextButton(context, "iNotedMyMnemonic".tr(), false, widget.skipIntro),
|
child: Align(
|
||||||
SizedBox(height: 35 * ratio),
|
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),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -51,88 +51,92 @@ class OnboardingStepSix extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Align(
|
child: Stack(children: [
|
||||||
alignment: Alignment.topCenter,
|
Align(
|
||||||
child: Column(children: [
|
alignment: Alignment.topCenter,
|
||||||
SizedBox(height: isTall ? 40 : 20),
|
child: Column(children: [
|
||||||
common.buildProgressBar(5),
|
SizedBox(height: isTall ? 40 : 20),
|
||||||
SizedBox(height: isTall ? 40 : 20),
|
common.buildProgressBar(5),
|
||||||
common.buildText(
|
SizedBox(height: isTall ? 40 : 20),
|
||||||
"didYouNoteMnemonicToBeSureTypeWord".tr(
|
common.buildText(
|
||||||
args: [(generateWalletProvider.nbrWord + 1).toString()]),
|
"didYouNoteMnemonicToBeSureTypeWord".tr(args: [
|
||||||
20,
|
(generateWalletProvider.nbrWord + 1).toString()
|
||||||
true),
|
]),
|
||||||
SizedBox(height: isTall ? 70 : 20),
|
20,
|
||||||
Text('${generateWalletProvider.nbrWord + 1}',
|
true),
|
||||||
key: const Key('askedWord'),
|
SizedBox(height: isTall ? 70 : 20),
|
||||||
style: TextStyle(
|
Text('${generateWalletProvider.nbrWord + 1}',
|
||||||
fontSize: isTall ? 17 : 15,
|
key: const Key('askedWord'),
|
||||||
color: orangeC,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w400)),
|
fontSize: isTall ? 17 : 15,
|
||||||
const SizedBox(height: 10),
|
color: orangeC,
|
||||||
Container(
|
fontWeight: FontWeight.w400)),
|
||||||
decoration: BoxDecoration(
|
const SizedBox(height: 10),
|
||||||
borderRadius: BorderRadius.circular(7),
|
Container(
|
||||||
border: Border.all(
|
decoration: BoxDecoration(
|
||||||
color: Colors.grey[600]!,
|
borderRadius: BorderRadius.circular(7),
|
||||||
width: 3,
|
border: Border.all(
|
||||||
)),
|
color: Colors.grey[600]!,
|
||||||
width: 430,
|
width: 3,
|
||||||
child: TextFormField(
|
)),
|
||||||
key: const Key('inputWord'),
|
width: 430,
|
||||||
autofocus: true,
|
child: TextFormField(
|
||||||
enabled: !generateWalletProvider.isAskedWordValid,
|
key: const Key('inputWord'),
|
||||||
controller: wordController,
|
autofocus: true,
|
||||||
textInputAction: TextInputAction.next,
|
enabled: !generateWalletProvider.isAskedWordValid,
|
||||||
onChanged: (value) {
|
controller: wordController,
|
||||||
generateWalletProvider.checkAskedWord(
|
textInputAction: TextInputAction.next,
|
||||||
value, _mnemonicController.text);
|
onChanged: (value) {
|
||||||
},
|
generateWalletProvider.checkAskedWord(
|
||||||
maxLines: 1,
|
value, _mnemonicController.text);
|
||||||
textAlign: TextAlign.center,
|
},
|
||||||
decoration: InputDecoration(
|
maxLines: 1,
|
||||||
labelStyle: TextStyle(
|
textAlign: TextAlign.center,
|
||||||
fontSize: 22.0,
|
decoration: InputDecoration(
|
||||||
color: Colors.grey[500],
|
labelStyle: TextStyle(
|
||||||
fontWeight: FontWeight.w500),
|
fontSize: 22.0,
|
||||||
labelText: generateWalletProvider.isAskedWordValid
|
color: Colors.grey[500],
|
||||||
? "itsTheGoodWord".tr()
|
fontWeight: FontWeight.w500),
|
||||||
: "${generateWalletProvider.nbrWordAlpha} ${"nthMnemonicWord".tr()}",
|
labelText: generateWalletProvider.isAskedWordValid
|
||||||
fillColor: const Color(0xffeeeedd),
|
? "itsTheGoodWord".tr()
|
||||||
filled: true,
|
: "${generateWalletProvider.nbrWordAlpha} ${"nthMnemonicWord".tr()}",
|
||||||
contentPadding: const EdgeInsets.all(12),
|
fillColor: const Color(0xffeeeedd),
|
||||||
),
|
filled: true,
|
||||||
style: TextStyle(
|
contentPadding: const EdgeInsets.all(12),
|
||||||
fontSize: 40.0,
|
),
|
||||||
color: generateWalletProvider.askedWordColor,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w500))),
|
fontSize: 40.0,
|
||||||
Visibility(
|
color: generateWalletProvider.askedWordColor,
|
||||||
visible: generateWalletProvider.isAskedWordValid,
|
fontWeight: FontWeight.w500))),
|
||||||
child: Expanded(
|
Visibility(
|
||||||
child: Align(
|
visible: generateWalletProvider.isAskedWordValid,
|
||||||
alignment: Alignment.bottomCenter,
|
child: Expanded(
|
||||||
child: nextButton(
|
child: Align(
|
||||||
context,
|
alignment: Alignment.bottomCenter,
|
||||||
'continue'.tr(),
|
child: nextButton(
|
||||||
skipIntro
|
context,
|
||||||
? const OnboardingStepNine()
|
'continue'.tr(),
|
||||||
: const OnboardingStepSeven(),
|
skipIntro
|
||||||
false),
|
? const OnboardingStepNine()
|
||||||
|
: const OnboardingStepSeven(),
|
||||||
|
false),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
// Visibility(
|
||||||
// Visibility(
|
// visible: !_generateWalletProvider.isAskedWordValid,
|
||||||
// visible: !_generateWalletProvider.isAskedWordValid,
|
// child: const Expanded(
|
||||||
// child: const Expanded(
|
// child: Align(
|
||||||
// child: Align(
|
// alignment: Alignment.bottomCenter,
|
||||||
// alignment: Alignment.bottomCenter,
|
// child: Text(''),
|
||||||
// child: Text(''),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
SizedBox(height: 35 * ratio),
|
||||||
SizedBox(height: 35 * ratio),
|
]),
|
||||||
]),
|
),
|
||||||
),
|
CommonElements().offlineInfo(context),
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,14 +29,17 @@ class OnboardingStepSeven extends StatelessWidget {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: common.infoIntro(
|
child: Stack(children: [
|
||||||
context,
|
common.infoIntro(
|
||||||
'geckoWillGenerateAPassword'.tr(),
|
context,
|
||||||
'coffre-fort-code-secret-dans-telephone.png',
|
'geckoWillGenerateAPassword'.tr(),
|
||||||
'>',
|
'coffre-fort-code-secret-dans-telephone.png',
|
||||||
OnboardingStepEight(scanDerivation: scanDerivation),
|
'>',
|
||||||
6,
|
OnboardingStepEight(scanDerivation: scanDerivation),
|
||||||
boxHeight: 400),
|
6,
|
||||||
|
boxHeight: 400),
|
||||||
|
CommonElements().offlineInfo(context),
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,14 +29,17 @@ class OnboardingStepEight extends StatelessWidget {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: common.infoIntro(
|
child: Stack(children: [
|
||||||
context,
|
common.infoIntro(
|
||||||
'thisPasswordProtectsYourWalletsInASecureChest'.tr(),
|
context,
|
||||||
'coffre-fort-protege-les-portefeuilles.png',
|
'thisPasswordProtectsYourWalletsInASecureChest'.tr(),
|
||||||
'>',
|
'coffre-fort-protege-les-portefeuilles.png',
|
||||||
OnboardingStepNine(scanDerivation: scanDerivation),
|
'>',
|
||||||
7,
|
OnboardingStepNine(scanDerivation: scanDerivation),
|
||||||
isMd: true),
|
7,
|
||||||
|
isMd: true),
|
||||||
|
CommonElements().offlineInfo(context),
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,61 +41,65 @@ class OnboardingStepNine extends StatelessWidget {
|
||||||
),
|
),
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(children: <Widget>[
|
child: Stack(children: [
|
||||||
SizedBox(height: isTall ? 40 : 20),
|
Column(children: <Widget>[
|
||||||
common.buildProgressBar(8),
|
SizedBox(height: isTall ? 40 : 20),
|
||||||
SizedBox(height: isTall ? 40 : 20),
|
common.buildProgressBar(8),
|
||||||
common.buildText("hereIsThePasswordKeepIt".tr(), 20, true),
|
SizedBox(height: isTall ? 40 : 20),
|
||||||
const SizedBox(height: 100),
|
common.buildText("hereIsThePasswordKeepIt".tr(), 20, true),
|
||||||
Stack(
|
const SizedBox(height: 100),
|
||||||
alignment: Alignment.centerRight,
|
Stack(
|
||||||
children: <Widget>[
|
alignment: Alignment.centerRight,
|
||||||
TextField(
|
children: <Widget>[
|
||||||
key: const Key('generatedPin'),
|
TextField(
|
||||||
enabled: false,
|
key: const Key('generatedPin'),
|
||||||
controller: generateWalletProvider.pin,
|
enabled: false,
|
||||||
maxLines: 1,
|
controller: generateWalletProvider.pin,
|
||||||
textAlign: TextAlign.center,
|
maxLines: 1,
|
||||||
decoration: const InputDecoration(),
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(
|
decoration: const InputDecoration(),
|
||||||
letterSpacing: 5,
|
style: const TextStyle(
|
||||||
fontSize: 35.0,
|
letterSpacing: 5,
|
||||||
color: Colors.black,
|
fontSize: 35.0,
|
||||||
fontWeight: FontWeight.bold)),
|
color: Colors.black,
|
||||||
IconButton(
|
fontWeight: FontWeight.bold)),
|
||||||
icon: const Icon(Icons.replay),
|
IconButton(
|
||||||
color: orangeC,
|
icon: const Icon(Icons.replay),
|
||||||
onPressed: () {
|
color: orangeC,
|
||||||
generateWalletProvider.changePinCode(reload: true);
|
onPressed: () {
|
||||||
},
|
generateWalletProvider.changePinCode(reload: true);
|
||||||
),
|
},
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
Expanded(
|
),
|
||||||
child: Align(
|
Expanded(
|
||||||
alignment: Alignment.bottomCenter,
|
child: Align(
|
||||||
child: SizedBox(
|
alignment: Alignment.bottomCenter,
|
||||||
width: 380 * ratio,
|
child: SizedBox(
|
||||||
height: 60 * ratio,
|
width: 380 * ratio,
|
||||||
child: ElevatedButton(
|
height: 60 * ratio,
|
||||||
key: const Key('changeSecretCode'),
|
child: ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
key: const Key('changeSecretCode'),
|
||||||
elevation: 4,
|
style: ElevatedButton.styleFrom(
|
||||||
primary: const Color(0xffFFD58D),
|
elevation: 4,
|
||||||
onPrimary: Colors.black, // foreground
|
primary: const Color(0xffFFD58D),
|
||||||
),
|
onPrimary: Colors.black, // foreground
|
||||||
onPressed: () {
|
),
|
||||||
generateWalletProvider.changePinCode(reload: true);
|
onPressed: () {
|
||||||
},
|
generateWalletProvider.changePinCode(
|
||||||
child: Text("chooseAnotherPassword".tr(),
|
reload: true);
|
||||||
style: TextStyle(
|
},
|
||||||
fontSize: 22 * ratio,
|
child: Text("chooseAnotherPassword".tr(),
|
||||||
fontWeight: FontWeight.w600))),
|
style: TextStyle(
|
||||||
))),
|
fontSize: 22 * ratio,
|
||||||
SizedBox(height: 22 * ratio),
|
fontWeight: FontWeight.w600))),
|
||||||
common.nextButton(context, "iNotedMyPassword".tr(),
|
))),
|
||||||
OnboardingStepTen(scanDerivation: scanDerivation), false),
|
SizedBox(height: 22 * ratio),
|
||||||
SizedBox(height: 35 * ratio),
|
common.nextButton(context, "iNotedMyPassword".tr(),
|
||||||
|
OnboardingStepTen(scanDerivation: scanDerivation), false),
|
||||||
|
SizedBox(height: 35 * ratio),
|
||||||
|
]),
|
||||||
|
CommonElements().offlineInfo(context),
|
||||||
]),
|
]),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9+22
|
version: 0.0.9+23
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|
Loading…
Reference in New Issue