fix: Expanded flex bottomBar

This commit is contained in:
poka 2022-05-27 17:49:02 +02:00
parent 79e0773820
commit 7ae1d2ecd2
3 changed files with 57 additions and 60 deletions

View File

@ -149,64 +149,61 @@ class HomeProvider with ChangeNotifier {
color: yellowC, color: yellowC,
width: double.infinity, width: double.infinity,
height: 80, height: 80,
child: Expanded( child: Row(
child: Row( // mainAxisAlignment: MainAxisAlignment.spaceAround,
// mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
children: [ const Spacer(flex: 1),
const Spacer(flex: 1), IconButton(
IconButton( iconSize: 40,
iconSize: 50, icon: const Image(image: AssetImage('assets/loupe-noire.png')),
icon: const Image(image: AssetImage('assets/loupe-noire.png')), onPressed: () {
onPressed: () { // Navigator.popUntil(
Navigator.popUntil( // context,
context, // ModalRoute.withName('/'),
ModalRoute.withName('/'), // );
); Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(builder: (context) {
MaterialPageRoute(builder: (context) { return const SearchScreen();
return const SearchScreen(); }),
}), );
); },
}, ),
), // SizedBox(width: 0),
// SizedBox(width: 0), const Spacer(flex: 2),
const Spacer(flex: 2), IconButton(
IconButton( iconSize: 60,
iconSize: 60, icon: const Image(image: AssetImage('assets/qrcode-scan.png')),
icon: const Image( onPressed: () async {
image: AssetImage('assets/qrcode-scan.png'), height: 50), // Navigator.popUntil(
onPressed: () async { // context,
Navigator.popUntil( // ModalRoute.withName('/'),
context, // );
ModalRoute.withName('/'), await _historyProvider.scan(context);
); },
await _historyProvider.scan(context); ),
}, const Spacer(flex: 2),
), IconButton(
const Spacer(flex: 2), iconSize: 60,
IconButton( icon: const Image(image: AssetImage('assets/wallet.png')),
iconSize: 60, onPressed: () {
icon: const Image(image: AssetImage('assets/wallet.png')), WalletData? defaultWallet =
onPressed: () { _myWalletProvider.getDefaultWallet();
WalletData? defaultWallet = Navigator.push(
_myWalletProvider.getDefaultWallet(); context,
Navigator.push( MaterialPageRoute(
context, builder: (context) {
MaterialPageRoute( return UnlockingWallet(
builder: (context) { wallet: defaultWallet,
return UnlockingWallet( action: "mywallets",
wallet: defaultWallet, );
action: "mywallets", },
); ),
}, );
), },
); ),
}, const Spacer(flex: 1),
), ],
const Spacer(flex: 1),
],
),
), ),
), ),
); );

View File

@ -56,7 +56,7 @@ class WalletsHome extends StatelessWidget {
style: TextStyle(color: Colors.grey[850])), style: TextStyle(color: Colors.grey[850])),
backgroundColor: const Color(0xffFFD58D), backgroundColor: const Color(0xffFFD58D),
), ),
bottomNavigationBar: _homeProvider.bottomAppBar(context, 2), bottomNavigationBar: _homeProvider.bottomAppBar(context, 3),
body: SafeArea( body: SafeArea(
child: myWalletsTiles(context, _currentChestNumber!), child: myWalletsTiles(context, _currentChestNumber!),
), ),

View File

@ -5,7 +5,7 @@ description: Pay with G1.
# pub.dev using `pub publish`. This is preferred for private packages. # pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.6+6 version: 0.0.6+7
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.12.0 <3.0.0'