add todo fix random bad widget ancestor after onboarding

This commit is contained in:
poka 2022-09-05 08:09:12 +02:00
parent 58572a5e0e
commit d9222fe6ba
3 changed files with 17 additions and 5 deletions

0
integration_test/duniter/data/gecko_tests.json Normal file → Executable file
View File

View File

@ -145,6 +145,7 @@ Future onboardingNewChest() async {
// Check if string "ĞD" is present in screen // Check if string "ĞD" is present in screen
await waitFor('Mon portefeuille co'); await waitFor('Mon portefeuille co');
await waitFor('0.0 $currencyName'); await waitFor('0.0 $currencyName');
// await waitFor('Scanner un');
} }
Future addDerivation() async { Future addDerivation() async {

View File

@ -55,13 +55,24 @@ Widget finishButton(BuildContext context) {
child: ElevatedButton( child: ElevatedButton(
key: keyGoWalletsHome, key: keyGoWalletsHome,
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
foregroundColor: Colors.white, elevation: 4, backgroundColor: orangeC, // foreground foregroundColor: Colors.white, elevation: 4,
backgroundColor: orangeC, // foreground
), ),
onPressed: () { onPressed: () {
// sleep(const Duration(milliseconds: 50)); //TODO: fix bad widget ancestor when pupUntil (multi_chest test failed)
Navigator.popUntil(homeContext, ModalRoute.withName('/'));
// sleep(const Duration(milliseconds: 500)); // Navigator.popUntil(homeContext, ModalRoute.withName('/'));
Navigator.pushNamed(homeContext, '/mywallets'); // Navigator.of(homeContext, rootNavigator: true)
// .popUntil(ModalRoute.withName('/'));
// while (Navigator.of(homeContext).canPop()) {
// Navigator.of(homeContext).pop();
// }
// Navigator.pushNamed(homeContext, '/mywallets');
Navigator.pushNamedAndRemoveUntil(
context, '/mywallets', (route) => route.isFirst);
// Navigator.pushNamedAndRemoveUntil( // Navigator.pushNamedAndRemoveUntil(
// homeContext, '/mywallets', ModalRoute.withName('/')); // homeContext, '/mywallets', ModalRoute.withName('/'));
}, },