Continue design of chest choosing screen
This commit is contained in:
parent
d6cc44f623
commit
d9417be1bf
|
@ -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);
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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: <Widget>[
|
||||
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),
|
||||
]),
|
||||
));
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue