2022-05-23 10:53:44 +02:00
|
|
|
// ignore_for_file: file_names
|
|
|
|
|
2022-06-17 01:13:14 +02:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2022-11-30 05:22:37 +01:00
|
|
|
|
2022-05-23 10:53:44 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:gecko/globals.dart';
|
2022-08-23 00:25:16 +02:00
|
|
|
import 'package:gecko/models/widgets_keys.dart';
|
2022-05-23 10:53:44 +02:00
|
|
|
import 'package:gecko/screens/common_elements.dart';
|
|
|
|
|
2022-05-25 20:40:25 +02:00
|
|
|
class OnboardingStepEleven extends StatelessWidget {
|
|
|
|
const OnboardingStepEleven({Key? key}) : super(key: key);
|
2022-05-23 10:53:44 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
CommonElements common = CommonElements();
|
|
|
|
|
|
|
|
return Scaffold(
|
2022-05-29 00:00:57 +02:00
|
|
|
backgroundColor: backgroundColor,
|
2022-05-23 10:53:44 +02:00
|
|
|
appBar: AppBar(
|
|
|
|
toolbarHeight: 60 * ratio,
|
2022-06-18 00:48:07 +02:00
|
|
|
title: SizedBox(
|
2022-05-23 10:53:44 +02:00
|
|
|
height: 22,
|
|
|
|
child: Text(
|
2022-06-18 00:48:07 +02:00
|
|
|
'allGood'.tr(),
|
|
|
|
style: const TextStyle(fontWeight: FontWeight.w600),
|
2022-05-23 10:53:44 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
extendBodyBehindAppBar: true,
|
|
|
|
body: SafeArea(
|
|
|
|
child: Column(children: <Widget>[
|
|
|
|
const SizedBox(height: 40),
|
2022-06-18 00:48:07 +02:00
|
|
|
common.buildText("yourChestAndWalletWereCreatedSuccessfully".tr()),
|
2022-05-23 10:53:44 +02:00
|
|
|
SizedBox(height: isTall ? 20 : 10),
|
|
|
|
Image.asset(
|
|
|
|
'assets/onBoarding/gecko-clin.gif',
|
|
|
|
height: isTall ? 400 : 300,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
child: finishButton(context)),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 40),
|
|
|
|
]),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget finishButton(BuildContext context) {
|
|
|
|
return SizedBox(
|
2022-05-25 20:40:25 +02:00
|
|
|
width: 380 * ratio,
|
|
|
|
height: 60 * ratio,
|
2022-05-23 10:53:44 +02:00
|
|
|
child: ElevatedButton(
|
2022-08-23 00:25:16 +02:00
|
|
|
key: keyGoWalletsHome,
|
2022-05-23 10:53:44 +02:00
|
|
|
style: ElevatedButton.styleFrom(
|
2022-09-05 08:09:12 +02:00
|
|
|
foregroundColor: Colors.white, elevation: 4,
|
|
|
|
backgroundColor: orangeC, // foreground
|
2022-05-23 10:53:44 +02:00
|
|
|
),
|
|
|
|
onPressed: () {
|
2022-09-05 08:09:12 +02:00
|
|
|
//TODO: fix bad widget ancestor when pupUntil (multi_chest test failed)
|
|
|
|
|
|
|
|
// Navigator.popUntil(homeContext, ModalRoute.withName('/'));
|
|
|
|
// Navigator.of(homeContext, rootNavigator: true)
|
|
|
|
// .popUntil(ModalRoute.withName('/'));
|
|
|
|
// while (Navigator.of(homeContext).canPop()) {
|
|
|
|
// Navigator.of(homeContext).pop();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// Navigator.pushNamed(homeContext, '/mywallets');
|
|
|
|
|
2022-12-02 21:18:28 +01:00
|
|
|
// final tmpConext = homeContext;
|
2022-09-01 04:51:51 +02:00
|
|
|
// Navigator.pushNamedAndRemoveUntil(
|
2022-12-02 21:18:28 +01:00
|
|
|
// context, '/mywallets', (route) => route.isFirst);
|
|
|
|
// .then((value) => homeContext = tmpConext);
|
|
|
|
|
|
|
|
Navigator.pushNamedAndRemoveUntil(
|
|
|
|
homeContext, '/mywallets', ModalRoute.withName('/'));
|
2022-05-23 10:53:44 +02:00
|
|
|
},
|
2022-06-17 01:13:14 +02:00
|
|
|
child: Text("accessMyChest".tr(),
|
2022-05-25 20:40:25 +02:00
|
|
|
style:
|
|
|
|
TextStyle(fontSize: 22 * ratio, fontWeight: FontWeight.w600))),
|
2022-05-23 10:53:44 +02:00
|
|
|
);
|
|
|
|
}
|