fix: Align center safe button in bottomappbar
This commit is contained in:
parent
3ec18ba00e
commit
cb840b947a
|
@ -100,7 +100,7 @@ Future certifyTest5() async {
|
||||||
await waitFor('thisWalletIsDefault'.tr());
|
await waitFor('thisWalletIsDefault'.tr());
|
||||||
|
|
||||||
// Search Wallet 5 again
|
// Search Wallet 5 again
|
||||||
await tapKey(keyAppBarSearch);
|
await tapKey(keyAppBarHome);
|
||||||
final addressToSearch = await clipPaste();
|
final addressToSearch = await clipPaste();
|
||||||
final endAddress = addressToSearch.substring(addressToSearch.length - 6);
|
final endAddress = addressToSearch.substring(addressToSearch.length - 6);
|
||||||
expect(addressToSearch, test5.address);
|
expect(addressToSearch, test5.address);
|
||||||
|
|
|
@ -5,7 +5,7 @@ const keyInfoPopup = Key('keyInfoPopup');
|
||||||
const keyGoNext = Key('keyGoNext');
|
const keyGoNext = Key('keyGoNext');
|
||||||
const keyCancel = Key('keyCancel');
|
const keyCancel = Key('keyCancel');
|
||||||
const keyConfirm = Key('keyConfirm');
|
const keyConfirm = Key('keyConfirm');
|
||||||
const keyAppBarSearch = Key('keyAppBarSearch');
|
const keyAppBarHome = Key('keyAppBarSearch');
|
||||||
const keyAppBarQrcode = Key('keyAppBarQrcode');
|
const keyAppBarQrcode = Key('keyAppBarQrcode');
|
||||||
const keyAppBarChest = Key('keyAppBarChest');
|
const keyAppBarChest = Key('keyAppBarChest');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//FIXME: flutter upgrades should fix this... one day.
|
// ignore_for_file: use_build_context_synchronously
|
||||||
// ignore_for_file: use_build_context_synchronously, prefer_const_constructors
|
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
@ -25,6 +24,9 @@ import 'package:gecko/widgets/payment_popup.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:qr_flutter/qr_flutter.dart';
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
|
|
||||||
|
const double buttonSize = 100;
|
||||||
|
const double buttonFontSize = 18;
|
||||||
|
|
||||||
class WalletViewScreen extends StatelessWidget {
|
class WalletViewScreen extends StatelessWidget {
|
||||||
const WalletViewScreen(
|
const WalletViewScreen(
|
||||||
{required this.address, required this.username, this.avatar, Key? key})
|
{required this.address, required this.username, this.avatar, Key? key})
|
||||||
|
@ -32,8 +34,6 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
final String address;
|
final String address;
|
||||||
final String? username;
|
final String? username;
|
||||||
final Image? avatar;
|
final Image? avatar;
|
||||||
final double buttonSize = 100;
|
|
||||||
final double buttonFontSize = 18;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -149,7 +149,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
"displayNActivity".tr(),
|
"displayNActivity".tr(),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: buttonFontSize, fontWeight: FontWeight.w500),
|
fontSize: buttonFontSize, fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
|
@ -277,7 +277,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
? "certify".tr()
|
? "certify".tr()
|
||||||
: "createIdentity".tr(),
|
: "createIdentity".tr(),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: buttonFontSize,
|
fontSize: buttonFontSize,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
|
@ -319,7 +319,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
"copyAddress".tr(),
|
"copyAddress".tr(),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: buttonFontSize, fontWeight: FontWeight.w500),
|
fontSize: buttonFontSize, fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -37,7 +37,7 @@ class GeckoBottomAppBar extends StatelessWidget {
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
const SizedBox(width: 11),
|
const SizedBox(width: 11),
|
||||||
IconButton(
|
IconButton(
|
||||||
key: keyAppBarSearch,
|
key: keyAppBarHome,
|
||||||
iconSize: 55,
|
iconSize: 55,
|
||||||
icon: const Icon(Icons.home_outlined),
|
icon: const Icon(Icons.home_outlined),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -52,7 +52,6 @@ class GeckoBottomAppBar extends StatelessWidget {
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
key: keyAppBarQrcode,
|
key: keyAppBarQrcode,
|
||||||
iconSize: 70,
|
|
||||||
icon: const Image(image: AssetImage('assets/qrcode-scan.png')),
|
icon: const Image(image: AssetImage('assets/qrcode-scan.png')),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
historyProvider.scan(homeContext);
|
historyProvider.scan(homeContext);
|
||||||
|
@ -61,6 +60,7 @@ class GeckoBottomAppBar extends StatelessWidget {
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
const SizedBox(width: 15),
|
const SizedBox(width: 15),
|
||||||
Stack(
|
Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
children: [
|
children: [
|
||||||
if (lockAction)
|
if (lockAction)
|
||||||
Center(
|
Center(
|
||||||
|
@ -86,7 +86,6 @@ class GeckoBottomAppBar extends StatelessWidget {
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
key: keyAppBarChest,
|
key: keyAppBarChest,
|
||||||
iconSize: 60,
|
|
||||||
icon: const Image(image: AssetImage('assets/wallet.png')),
|
icon: const Image(image: AssetImage('assets/wallet.png')),
|
||||||
onPressed: lockAction
|
onPressed: lockAction
|
||||||
? null
|
? null
|
||||||
|
|
Loading…
Reference in New Issue