diff --git a/assets/chests/1.png b/assets/chests/1.png
index 327ce15..419b1ac 100644
Binary files a/assets/chests/1.png and b/assets/chests/1.png differ
diff --git a/assets/chests/2.png b/assets/chests/2.png
index bfb1a08..4ed6b34 100644
Binary files a/assets/chests/2.png and b/assets/chests/2.png differ
diff --git a/assets/chests/3.png b/assets/chests/3.png
index fb93100..66add24 100644
Binary files a/assets/chests/3.png and b/assets/chests/3.png differ
diff --git a/assets/chests/4.png b/assets/chests/4.png
index a759503..7bc245f 100644
Binary files a/assets/chests/4.png and b/assets/chests/4.png differ
diff --git a/assets/chests/5.png b/assets/chests/5.png
index 84d1490..8852a69 100644
Binary files a/assets/chests/5.png and b/assets/chests/5.png differ
diff --git a/assets/chests/6.png b/assets/chests/6.png
index 8f1556b..1de8739 100644
Binary files a/assets/chests/6.png and b/assets/chests/6.png differ
diff --git a/assets/chests/7.png b/assets/chests/7.png
index c34e084..06bae0e 100644
Binary files a/assets/chests/7.png and b/assets/chests/7.png differ
diff --git a/assets/home/loupe2.png b/assets/home/loupe2.png
new file mode 100644
index 0000000..5215d80
Binary files /dev/null and b/assets/home/loupe2.png differ
diff --git a/assets/home/wallet.svg b/assets/home/wallet.svg
new file mode 100644
index 0000000..7fa9217
--- /dev/null
+++ b/assets/home/wallet.svg
@@ -0,0 +1,92 @@
+
+
diff --git a/lib/main.dart b/lib/main.dart
index d53b367..9ad437f 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -41,12 +41,10 @@ import 'package:flutter/foundation.dart';
import 'package:responsive_framework/responsive_framework.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
-import 'package:flutter_driver/driver_extension.dart';
const bool enableSentry = true;
Future main() async {
- enableFlutterDriverExtension();
WidgetsFlutterBinding.ensureInitialized();
HomeProvider _homeProvider = HomeProvider();
diff --git a/lib/screens/home.dart b/lib/screens/home.dart
index ac99a87..e5f3e90 100644
--- a/lib/screens/home.dart
+++ b/lib/screens/home.dart
@@ -27,7 +27,7 @@ class HomeScreen extends StatelessWidget {
final bool isWalletsExists = _myWalletProvider.checkIfWalletExist();
- var statusBarHeight = MediaQuery.of(context).padding.top;
+ final double statusBarHeight = MediaQuery.of(context).padding.top;
isTall = false;
ratio = 1;
@@ -97,259 +97,254 @@ class HomeScreen extends StatelessWidget {
fit: BoxFit.cover,
),
),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Stack(children: [
- Positioned(
- top: statusBarHeight + 10,
- left: 15,
- child: Builder(
- builder: (context) => IconButton(
- key: const Key('drawerMenu'),
- icon: const Icon(
- Icons.menu,
- color: Colors.white,
- size: 35,
- ),
- onPressed: () => Scaffold.of(context).openDrawer(),
- ),
+ child:
+ Column(crossAxisAlignment: CrossAxisAlignment.start, children: <
+ Widget>[
+ Stack(children: [
+ Positioned(
+ top: statusBarHeight + 10,
+ left: 15,
+ child: Builder(
+ builder: (context) => IconButton(
+ key: const Key('drawerMenu'),
+ icon: const Icon(
+ Icons.menu,
+ color: Colors.white,
+ size: 35,
),
+ onPressed: () => Scaffold.of(context).openDrawer(),
),
- const Align(
- child: Image(
- image: AssetImage('assets/home/header.png'),
- height: 210),
- ),
- ]),
- Padding(
- padding: const EdgeInsets.only(top: 15),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: const [
- Text(
- "y'a pas de lézard ;-)",
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Colors.white,
- fontSize: 24,
- fontWeight: FontWeight.w700,
- shadows: [
- Shadow(
- offset: Offset(0, 0),
- blurRadius: 20,
- color: Colors.black,
- ),
- Shadow(
- offset: Offset(0, 0),
- blurRadius: 20,
- color: Colors.black,
- ),
- ],
- ),
- )
- ]),
),
- Expanded(
- flex: 1,
- child: Container(
- decoration: BoxDecoration(
- gradient: LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [
- Colors.transparent,
- Colors.black.withOpacity(0.9),
+ ),
+ const Align(
+ child: Image(
+ image: AssetImage('assets/home/header.png'), height: 210),
+ ),
+ ]),
+ Padding(
+ padding: EdgeInsets.only(top: 15 * ratio),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: const [
+ Text(
+ "y'a pas de lézard ;-)",
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 24,
+ fontWeight: FontWeight.w700,
+ shadows: [
+ Shadow(
+ offset: Offset(0, 0),
+ blurRadius: 20,
+ color: Colors.black,
+ ),
+ Shadow(
+ offset: Offset(0, 0),
+ blurRadius: 20,
+ color: Colors.black,
+ ),
],
),
- ),
- child: Column(children: [
- Padding(
- padding: EdgeInsets.only(top: isTall ? 240 : 130),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Column(children: [
- Container(
- child: ClipOval(
- child: Material(
- color: orangeC, // button color
- child: InkWell(
- child: const Padding(
- padding: EdgeInsets.all(18),
- child: Image(
- image: AssetImage(
- 'assets/home/loupe.png'),
- height: 70)),
- onTap: () {
- // Navigator.push(
- // context,
- // MaterialPageRoute(
- // builder: (context) {
- // return TemplateScreen();
- // }),
- // );
- }),
- ),
- ),
- decoration: const BoxDecoration(
- shape: BoxShape.circle,
- color: Colors.black,
- boxShadow: [
- BoxShadow(
- blurRadius: 2,
- offset: Offset(1, 1.5),
- spreadRadius: 0.5)
- ],
- ),
- ),
- const SizedBox(height: 12),
- const Text(
- "Rechercher un\nportfeuille",
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Colors.white,
- fontSize: 17,
- fontWeight: FontWeight.w500),
- )
- ]),
- const SizedBox(width: 120),
- Column(children: [
- Container(
- child: ClipOval(
- key: const Key('manageWallets'),
- child: Material(
- color: orangeC, // button color
- child: InkWell(
- child: const Padding(
- padding: EdgeInsets.all(18),
- child: Image(
- image: AssetImage(
- 'assets/home/wallet.png'),
- height: 75)),
- onTap: () {
- WalletData defaultWallet =
- _myWalletProvider
- .getDefaultWallet(
- configBox.get(
- 'currentChest'));
- isWalletsExists
- ? Navigator.push(context,
- MaterialPageRoute(
- builder: (context) {
- return UnlockingWallet(
- wallet: defaultWallet,
- action: "mywallets",
- );
- }))
-
- // Navigator.pushNamed(
- // context, '/mywallets')
- : Navigator.push(context,
- MaterialPageRoute(
- builder: (context) {
- return const NoKeyChainScreen();
- }));
- }),
- ),
- ),
- decoration: const BoxDecoration(
- shape: BoxShape.circle,
- color: Colors.black,
- boxShadow: [
- BoxShadow(
- blurRadius: 2,
- offset: Offset(1, 1.5),
- spreadRadius: 0.5)
- ],
- ),
- ),
- const SizedBox(height: 12),
- const Text(
- "Gérer mes\nportefeuilles",
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Colors.white,
- fontSize: 17,
- fontWeight: FontWeight.w500),
- )
- ])
- ]),
- ),
- Padding(
- padding: const EdgeInsets.only(top: 40),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Column(children: [
- Container(
- child: ClipOval(
- child: Material(
- color: orangeC, // button color
- child: InkWell(
- child: const Padding(
- padding: EdgeInsets.all(22),
- child: Image(
- image: AssetImage(
- 'assets/home/qrcode.png'),
- height: 60)),
- onTap: () async {
- await _historyProvider
- .scan(context);
- }),
- ),
- ),
- decoration: const BoxDecoration(
- shape: BoxShape.circle,
- color: Colors.black,
- boxShadow: [
- BoxShadow(
- blurRadius: 2,
- offset: Offset(1, 1.5),
- spreadRadius: 0.5)
- ],
- ),
- ),
- const SizedBox(height: 12),
- const Text(
- "Scanner un\nQR code",
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Colors.white,
- fontSize: 17,
- fontWeight: FontWeight.w500),
- )
- ])
- ]),
- ),
- ]),
- // bottomNavigationBar: BottomNavigationBar(
- // backgroundColor: Color(0xffFFD58D),
- // fixedColor: Colors.grey[850],
- // unselectedItemColor: Color(0xffBD935C),
- // type: BottomNavigationBarType.fixed,
- // onTap: (index) {
- // _homeProvider.currentIndex = index;
- // },
- // currentIndex: _homeProvider.currentIndex,
- // items: [
- // BottomNavigationBarItem(
- // icon: Image.asset('assets/block-space-disabled.png', height: 26),
- // activeIcon: Image.asset('assets/blockchain.png', height: 26),
- // label: 'Explorateur',
- // ),
- // BottomNavigationBarItem(
- // icon: Icon(Icons.lock),
- // label: 'Mes portefeuilles',
- // ),
- // ],
- // ),
+ )
+ ]),
+ ),
+ Expanded(
+ flex: 1,
+ child: Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ colors: [
+ Colors.transparent,
+ Colors.black.withOpacity(0.9),
+ ],
),
- )
- ]),
+ ),
+ child: Column(children: [
+ const Spacer(),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Column(children: [
+ Container(
+ child: ClipOval(
+ child: Material(
+ color: orangeC, // button color
+ child: InkWell(
+ child: const Padding(
+ padding: EdgeInsets.all(18),
+ child: Image(
+ image: AssetImage(
+ 'assets/home/loupe.png'),
+ height: 70)),
+ onTap: () {
+ // Navigator.push(
+ // context,
+ // MaterialPageRoute(
+ // builder: (context) {
+ // return TemplateScreen();
+ // }),
+ // );
+ }),
+ ),
+ ),
+ decoration: const BoxDecoration(
+ shape: BoxShape.circle,
+ color: Colors.black,
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 2,
+ offset: Offset(1, 1.5),
+ spreadRadius: 0.5)
+ ],
+ ),
+ ),
+ const SizedBox(height: 12),
+ const Text(
+ "Rechercher un\nportfeuille",
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 17,
+ fontWeight: FontWeight.w500),
+ )
+ ]),
+ const SizedBox(width: 120),
+ Column(children: [
+ Container(
+ child: ClipOval(
+ key: const Key('manageWallets'),
+ child: Material(
+ color: orangeC, // button color
+ child: InkWell(
+ child: const Padding(
+ padding: EdgeInsets.all(18),
+ child: Image(
+ image: AssetImage(
+ 'assets/home/wallet.png'),
+ height: 75)),
+ onTap: () {
+ WalletData defaultWallet =
+ _myWalletProvider.getDefaultWallet(
+ configBox.get('currentChest'));
+ isWalletsExists
+ ? Navigator.push(context,
+ MaterialPageRoute(
+ builder: (context) {
+ return UnlockingWallet(
+ wallet: defaultWallet,
+ action: "mywallets",
+ );
+ }))
+
+ // Navigator.pushNamed(
+ // context, '/mywallets')
+ : Navigator.push(context,
+ MaterialPageRoute(
+ builder: (context) {
+ return const NoKeyChainScreen();
+ }));
+ }),
+ ),
+ ),
+ decoration: const BoxDecoration(
+ shape: BoxShape.circle,
+ color: Colors.black,
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 2,
+ offset: Offset(1, 1.5),
+ spreadRadius: 0.5)
+ ],
+ ),
+ ),
+ const SizedBox(height: 12),
+ const Text(
+ "Gérer mes\nportefeuilles",
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 17,
+ fontWeight: FontWeight.w500),
+ )
+ ])
+ ]),
+ Padding(
+ padding: const EdgeInsets.only(top: 40),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Column(children: [
+ Container(
+ child: ClipOval(
+ child: Material(
+ color: orangeC, // button color
+ child: InkWell(
+ child: const Padding(
+ padding: EdgeInsets.all(18),
+ child: Image(
+ image: AssetImage(
+ 'assets/home/qrcode.png'),
+ height: 75)),
+ onTap: () async {
+ await _historyProvider.scan(context);
+ }),
+ ),
+ ),
+ decoration: const BoxDecoration(
+ shape: BoxShape.circle,
+ color: Colors.black,
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 2,
+ offset: Offset(1, 1.5),
+ spreadRadius: 0.5)
+ ],
+ ),
+ ),
+ const SizedBox(height: 12),
+ const Text(
+ "Scanner un\nQR code",
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 17,
+ fontWeight: FontWeight.w500),
+ )
+ ])
+ ]),
+ ),
+ SizedBox(height: isTall ? 80 : 40)
+ ]),
+ ),
+ )
+ ]),
),
),
),
+ // bottomNavigationBar: BottomNavigationBar(
+ // backgroundColor: backgroundColor,
+ // fixedColor: Colors.grey[850],
+ // unselectedItemColor: const Color(0xffBD935C),
+ // type: BottomNavigationBarType.fixed,
+ // onTap: (index) {
+ // _homeProvider.currentIndex = index;
+ // },
+ // currentIndex: _homeProvider.currentIndex,
+ // items: [
+ // BottomNavigationBarItem(
+ // icon: Image.asset('assets/block-space-disabled.png', height: 26),
+ // activeIcon: Image.asset('assets/blockchain.png', height: 26),
+ // label: 'Explorateur',
+ // ),
+ // const BottomNavigationBarItem(
+ // icon: Icon(Icons.lock),
+ // label: 'Mes portefeuilles',
+ // ),
+ // ],
+ // ),
);
}
}
diff --git a/lib/screens/myWallets/confirm_wallet_storage.dart b/lib/screens/myWallets/confirm_wallet_storage.dart
index e822f19..6861561 100644
--- a/lib/screens/myWallets/confirm_wallet_storage.dart
+++ b/lib/screens/myWallets/confirm_wallet_storage.dart
@@ -7,6 +7,7 @@ import 'package:gecko/globals.dart';
import 'package:gecko/models/generate_wallets.dart';
import 'package:gecko/models/my_wallets.dart';
import 'package:gecko/models/wallet_options.dart';
+import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
import 'package:provider/provider.dart';
// ignore: must_be_immutable
@@ -152,8 +153,15 @@ class ConfirmStoreWallet extends StatelessWidget with ChangeNotifier {
_walletOptions.reloadBuild();
_myWalletProvider.rebuildWidget();
});
- Navigator.popUntil(
- context, ModalRoute.withName('/'));
+ Navigator.pushAndRemoveUntil(context,
+ MaterialPageRoute(builder: (context) {
+ return UnlockingWallet(
+ wallet:
+ _myWalletProvider.getDefaultWallet(
+ configBox.get('currentChest')),
+ action: "mywallets",
+ );
+ }), ModalRoute.withName('/'));
}
: null,
child: const Text('Confirmer',
diff --git a/lib/screens/myWallets/generate_wallets.dart b/lib/screens/myWallets/generate_wallets.dart
index b85fdba..0adf9d5 100644
--- a/lib/screens/myWallets/generate_wallets.dart
+++ b/lib/screens/myWallets/generate_wallets.dart
@@ -1,10 +1,8 @@
import 'package:flutter/services.dart';
import 'package:gecko/globals.dart';
import 'package:gecko/models/generate_wallets.dart';
-import 'package:gecko/models/my_wallets.dart';
import 'package:gecko/screens/myWallets/confirm_wallet_storage.dart';
import 'package:flutter/material.dart';
-import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
import 'package:printing/printing.dart';
import 'package:provider/provider.dart';
import 'package:super_tooltip/super_tooltip.dart';
@@ -29,8 +27,6 @@ class GenerateFastChestScreen extends StatelessWidget {
Provider.of(context);
_generateWalletProvider.generateMnemonic();
- MyWalletsProvider _myWalletClass = MyWalletsProvider();
-
return Scaffold(
appBar: AppBar(
toolbarHeight: 60 * ratio,
@@ -122,14 +118,17 @@ class GenerateFastChestScreen extends StatelessWidget {
);
await Future.delayed(
const Duration(milliseconds: 20));
- await Navigator.pushAndRemoveUntil(context,
- MaterialPageRoute(builder: (context) {
- return UnlockingWallet(
- wallet: _myWalletClass.getDefaultWallet(
- configBox.get('currentChest')),
- action: "mywallets",
- );
- }), ModalRoute.withName('/'));
+ // if (_generateWalletProvider.hasBeenStored) {
+ // _generateWalletProvider.hasBeenStored = false;
+ // await Navigator.pushAndRemoveUntil(context,
+ // MaterialPageRoute(builder: (context) {
+ // return UnlockingWallet(
+ // wallet: _myWalletClass.getDefaultWallet(
+ // configBox.get('currentChest')),
+ // action: "mywallets",
+ // );
+ // }), ModalRoute.withName('/'));
+ // }
}
: null,
child: const Text('Enregistrer ce trousseau',
diff --git a/test_driver/app_test.dart b/test_driver/app_test.dart
index e9f4c76..0efe479 100644
--- a/test_driver/app_test.dart
+++ b/test_driver/app_test.dart
@@ -217,8 +217,9 @@ void main() {
{timeout = Timeout.none}) async {
expect(await getText('step9'),
"Super !\n\nJe vais maintenant créer votre code secret. \n\nVotre code secret chiffre votre trousseau de clefs, ce qui le rend inutilisable par d’autres, par exemple si vous perdez votre téléphone ou si on vous le vole.");
-
+ await sleep(800);
await tapOn('goStep10');
+ await sleep(50);
await tapOn('goStep11');
while (await getText('generatedPin') == '') {