diff --git a/lib/globals.dart b/lib/globals.dart index 6bb6c42..5bd9c9c 100644 --- a/lib/globals.dart +++ b/lib/globals.dart @@ -29,7 +29,7 @@ double ratio; var log = Logger(); // Colors -Color orangeC = Color(0xffD28928); +Color orangeC = Color(0xffd07316); Color yellowC = Color(0xffFFD68E); Color floattingYellow = Color(0xffEFEFBF); Color backgroundColor = Color(0xFFF5F5F5); diff --git a/lib/models/generateWallets.dart b/lib/models/generateWallets.dart index 93b7e95..1d1486e 100644 --- a/lib/models/generateWallets.dart +++ b/lib/models/generateWallets.dart @@ -51,9 +51,9 @@ class GenerateWalletsProvider with ChangeNotifier { String chestName; if (chestNumber == 0) { - chestName = 'Coffre à Gecko'; + chestName = 'Coffre à Ğecko'; } else { - chestName = 'Coffre à Gecko ${chestNumber + 1}'; + chestName = 'Coffre à Ğecko ${chestNumber + 1}'; } walletBox.add(myWallet); ChestData thisChest = ChestData( diff --git a/lib/screens/myWallets/chooseChest.dart b/lib/screens/myWallets/chooseChest.dart index 3a9fa19..c5ae73c 100644 --- a/lib/screens/myWallets/chooseChest.dart +++ b/lib/screens/myWallets/chooseChest.dart @@ -1,9 +1,8 @@ import 'package:flutter/services.dart'; import 'package:gecko/globals.dart'; -import 'package:gecko/screens/home.dart'; +import 'package:gecko/screens/commonElements.dart'; import 'package:flutter/material.dart'; -// import 'package:gecko/models/home.dart'; -// import 'package:provider/provider.dart'; +import 'package:gecko/screens/onBoarding/1.dart'; // ignore: must_be_immutable class ChooseChest extends StatelessWidget { @@ -19,59 +18,72 @@ class ChooseChest extends StatelessWidget { height: 22, child: Text('Sélectionner mon coffre'), )), - floatingActionButton: Container( - height: 80.0, - width: 80.0, - child: FittedBox( - child: FloatingActionButton( - heroTag: "tplButton", - onPressed: () => Navigator.push( - context, - MaterialPageRoute(builder: (context) { - return HomeScreen(); - }), - ), - child: Container( - height: 40.0, - width: 40.0, - child: Icon(Icons.home, color: Colors.grey[850]), - ), - backgroundColor: - floattingYellow, //smoothYellow, //Color.fromARGB(500, 204, 255, 255), - ))), body: SafeArea( child: Column(children: [ - SizedBox(height: 150), + SizedBox(height: 190), Center( child: Image.asset( 'assets/chests/$currentChest.png', ), ), - SizedBox(height: 20), - Text(chestBox.get(currentChest).name), - ElevatedButton( + SizedBox(height: 40), + Text( + chestBox.get(currentChest).name, + style: TextStyle(fontSize: 21), + ), + SizedBox(height: 15), + Image.asset('assets/chests/vector.png'), + SizedBox(height: 15), + Text( + 'Choisir un autre\ncoffre', + textAlign: TextAlign.center, + style: TextStyle(fontSize: 13), + ), + SizedBox(height: 80), + SizedBox( + width: 400, + height: 70, + child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: yellowC, // background + primary: orangeC, // background onPrimary: Colors.black, // foreground ), onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) { - return HomeScreen(); - }), - ); - }, - child: Text('Retour Accueil', style: TextStyle(fontSize: 20))), - SizedBox(height: 20), - GestureDetector( - onTap: () { + configBox.put('currentChest', 0); Navigator.popUntil( context, - ModalRoute.withName('/'), + ModalRoute.withName('/mywallets'), ); }, - child: Icon(Icons.home)) + child: Text( + 'Ouvrir ce coffre', + style: TextStyle( + fontSize: 22, + color: backgroundColor, + fontWeight: FontWeight.w600), + ), + ), + ), + SizedBox(height: 20), + InkWell( + key: Key('createNewChest'), + onTap: () { + Navigator.push( + context, + FaderTransition(page: OnboardingStepOne(), isFast: false), + ); + }, + child: SizedBox( + width: 400, + height: 70, + child: Center( + child: Text('Créer un nouveau coffre', + style: TextStyle( + fontSize: 22, + color: orangeC, + fontWeight: FontWeight.w600))), + )), + SizedBox(height: 10), ]), )); } diff --git a/lib/screens/myWallets/walletsHome.dart b/lib/screens/myWallets/walletsHome.dart index def780b..8f2b6f7 100644 --- a/lib/screens/myWallets/walletsHome.dart +++ b/lib/screens/myWallets/walletsHome.dart @@ -45,7 +45,7 @@ class WalletsHome extends StatelessWidget { ModalRoute.withName('/'), ); }), - title: Text('Mes portefeuilles', + title: Text(chestBox.get(_currentChest).name, key: Key('myWallets'), style: TextStyle(color: Colors.grey[850])), backgroundColor: Color(0xffFFD58D), ),