UI: Move QRCode to appbar in wallet option screen

This commit is contained in:
poka 2022-07-22 22:18:03 +02:00
parent c203364dc3
commit a7d2e9a5d2
1 changed files with 37 additions and 18 deletions

View File

@ -74,6 +74,25 @@ class WalletOptions extends StatelessWidget {
return Text(wallet.name!); return Text(wallet.name!);
}), }),
), ),
actions: [
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) {
return QrCodeFullscreen(
_walletOptions.address.text,
);
}),
);
},
child: QrImageWidget(
data: _walletOptions.address.text,
version: QrVersions.auto,
size: 80,
),
),
],
), ),
bottomNavigationBar: _homeProvider.bottomAppBar(context), bottomNavigationBar: _homeProvider.bottomAppBar(context),
body: Stack(children: [ body: Stack(children: [
@ -141,24 +160,24 @@ class WalletOptions extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
InkWell( // InkWell(
onTap: () { // onTap: () {
Navigator.push( // Navigator.push(
context, // context,
MaterialPageRoute(builder: (context) { // MaterialPageRoute(builder: (context) {
return QrCodeFullscreen( // return QrCodeFullscreen(
_walletOptions.address.text, // _walletOptions.address.text,
); // );
}), // }),
); // );
}, // },
child: QrImageWidget( // child: QrImageWidget(
data: _walletOptions.address.text, // data: _walletOptions.address.text,
version: QrVersions.auto, // version: QrVersions.auto,
size: isTall ? 150 : 80, // size: isTall ? 150 : 80,
), // ),
), // ),
SizedBox(height: 15 * ratio), SizedBox(height: 30 * ratio),
Consumer<WalletOptionsProvider>( Consumer<WalletOptionsProvider>(
builder: (context, walletProvider, _) { builder: (context, walletProvider, _) {
return Column(children: [ return Column(children: [