Skip to content
Snippets Groups Projects
Commit d9417be1 authored by poka's avatar poka
Browse files

Continue design of chest choosing screen

parent d6cc44f6
No related branches found
No related tags found
No related merge requests found
Pipeline #14044 waiting for manual action
...@@ -29,7 +29,7 @@ double ratio; ...@@ -29,7 +29,7 @@ double ratio;
var log = Logger(); var log = Logger();
// Colors // Colors
Color orangeC = Color(0xffD28928); Color orangeC = Color(0xffd07316);
Color yellowC = Color(0xffFFD68E); Color yellowC = Color(0xffFFD68E);
Color floattingYellow = Color(0xffEFEFBF); Color floattingYellow = Color(0xffEFEFBF);
Color backgroundColor = Color(0xFFF5F5F5); Color backgroundColor = Color(0xFFF5F5F5);
...@@ -51,9 +51,9 @@ class GenerateWalletsProvider with ChangeNotifier { ...@@ -51,9 +51,9 @@ class GenerateWalletsProvider with ChangeNotifier {
String chestName; String chestName;
if (chestNumber == 0) { if (chestNumber == 0) {
chestName = 'Coffre à Gecko'; chestName = 'Coffre à Ğecko';
} else { } else {
chestName = 'Coffre à Gecko ${chestNumber + 1}'; chestName = 'Coffre à Ğecko ${chestNumber + 1}';
} }
walletBox.add(myWallet); walletBox.add(myWallet);
ChestData thisChest = ChestData( ChestData thisChest = ChestData(
......
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.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:flutter/material.dart';
// import 'package:gecko/models/home.dart'; import 'package:gecko/screens/onBoarding/1.dart';
// import 'package:provider/provider.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class ChooseChest extends StatelessWidget { class ChooseChest extends StatelessWidget {
...@@ -19,59 +18,72 @@ class ChooseChest extends StatelessWidget { ...@@ -19,59 +18,72 @@ class ChooseChest extends StatelessWidget {
height: 22, height: 22,
child: Text('Sélectionner mon coffre'), 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( body: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
SizedBox(height: 150), SizedBox(height: 190),
Center( Center(
child: Image.asset( child: Image.asset(
'assets/chests/$currentChest.png', 'assets/chests/$currentChest.png',
), ),
), ),
SizedBox(height: 20), SizedBox(height: 40),
Text(chestBox.get(currentChest).name), Text(
ElevatedButton( 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( style: ElevatedButton.styleFrom(
primary: yellowC, // background primary: orangeC, // background
onPrimary: Colors.black, // foreground onPrimary: Colors.black, // foreground
), ),
onPressed: () { onPressed: () {
Navigator.push( configBox.put('currentChest', 0);
Navigator.popUntil(
context, context,
MaterialPageRoute(builder: (context) { ModalRoute.withName('/mywallets'),
return HomeScreen();
}),
); );
}, },
child: Text('Retour Accueil', style: TextStyle(fontSize: 20))), child: Text(
'Ouvrir ce coffre',
style: TextStyle(
fontSize: 22,
color: backgroundColor,
fontWeight: FontWeight.w600),
),
),
),
SizedBox(height: 20), SizedBox(height: 20),
GestureDetector( InkWell(
key: Key('createNewChest'),
onTap: () { onTap: () {
Navigator.popUntil( Navigator.push(
context, context,
ModalRoute.withName('/'), FaderTransition(page: OnboardingStepOne(), isFast: false),
); );
}, },
child: Icon(Icons.home)) 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),
]), ]),
)); ));
} }
......
...@@ -45,7 +45,7 @@ class WalletsHome extends StatelessWidget { ...@@ -45,7 +45,7 @@ class WalletsHome extends StatelessWidget {
ModalRoute.withName('/'), ModalRoute.withName('/'),
); );
}), }),
title: Text('Mes portefeuilles', title: Text(chestBox.get(_currentChest).name,
key: Key('myWallets'), style: TextStyle(color: Colors.grey[850])), key: Key('myWallets'), style: TextStyle(color: Colors.grey[850])),
backgroundColor: Color(0xffFFD58D), backgroundColor: Color(0xffFFD58D),
), ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment