diff --git a/integration_test/scenarios/gecko_complete.dart b/integration_test/scenarios/gecko_complete.dart index 0671b08..b5f87a5 100644 --- a/integration_test/scenarios/gecko_complete.dart +++ b/integration_test/scenarios/gecko_complete.dart @@ -100,7 +100,7 @@ Future certifyTest5() async { await waitFor('thisWalletIsDefault'.tr()); // Search Wallet 5 again - await tapKey(keyAppBarSearch); + await tapKey(keyAppBarHome); final addressToSearch = await clipPaste(); final endAddress = addressToSearch.substring(addressToSearch.length - 6); expect(addressToSearch, test5.address); diff --git a/lib/models/widgets_keys.dart b/lib/models/widgets_keys.dart index 88883a5..cb558bc 100644 --- a/lib/models/widgets_keys.dart +++ b/lib/models/widgets_keys.dart @@ -5,7 +5,7 @@ const keyInfoPopup = Key('keyInfoPopup'); const keyGoNext = Key('keyGoNext'); const keyCancel = Key('keyCancel'); const keyConfirm = Key('keyConfirm'); -const keyAppBarSearch = Key('keyAppBarSearch'); +const keyAppBarHome = Key('keyAppBarSearch'); const keyAppBarQrcode = Key('keyAppBarQrcode'); const keyAppBarChest = Key('keyAppBarChest'); diff --git a/lib/screens/wallet_view.dart b/lib/screens/wallet_view.dart index 51b5ac3..83571cc 100644 --- a/lib/screens/wallet_view.dart +++ b/lib/screens/wallet_view.dart @@ -1,5 +1,4 @@ -//FIXME: flutter upgrades should fix this... one day. -// ignore_for_file: use_build_context_synchronously, prefer_const_constructors +// ignore_for_file: use_build_context_synchronously import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/services.dart'; @@ -25,6 +24,9 @@ import 'package:gecko/widgets/payment_popup.dart'; import 'package:provider/provider.dart'; import 'package:qr_flutter/qr_flutter.dart'; +const double buttonSize = 100; +const double buttonFontSize = 18; + class WalletViewScreen extends StatelessWidget { const WalletViewScreen( {required this.address, required this.username, this.avatar, Key? key}) @@ -32,8 +34,6 @@ class WalletViewScreen extends StatelessWidget { final String address; final String? username; final Image? avatar; - final double buttonSize = 100; - final double buttonFontSize = 18; @override Widget build(BuildContext context) { @@ -149,7 +149,7 @@ class WalletViewScreen extends StatelessWidget { Text( "displayNActivity".tr(), textAlign: TextAlign.center, - style: TextStyle( + style: const TextStyle( fontSize: buttonFontSize, fontWeight: FontWeight.w500), ), ]), @@ -277,7 +277,7 @@ class WalletViewScreen extends StatelessWidget { ? "certify".tr() : "createIdentity".tr(), textAlign: TextAlign.center, - style: TextStyle( + style: const TextStyle( fontSize: buttonFontSize, fontWeight: FontWeight.w500), ), @@ -319,7 +319,7 @@ class WalletViewScreen extends StatelessWidget { Text( "copyAddress".tr(), textAlign: TextAlign.center, - style: TextStyle( + style: const TextStyle( fontSize: buttonFontSize, fontWeight: FontWeight.w500), ), ]), diff --git a/lib/widgets/bottom_app_bar.dart b/lib/widgets/bottom_app_bar.dart index 3a5c031..a72693c 100644 --- a/lib/widgets/bottom_app_bar.dart +++ b/lib/widgets/bottom_app_bar.dart @@ -37,7 +37,7 @@ class GeckoBottomAppBar extends StatelessWidget { const Spacer(), const SizedBox(width: 11), IconButton( - key: keyAppBarSearch, + key: keyAppBarHome, iconSize: 55, icon: const Icon(Icons.home_outlined), onPressed: () { @@ -52,7 +52,6 @@ class GeckoBottomAppBar extends StatelessWidget { const Spacer(), IconButton( key: keyAppBarQrcode, - iconSize: 70, icon: const Image(image: AssetImage('assets/qrcode-scan.png')), onPressed: () async { historyProvider.scan(homeContext); @@ -61,6 +60,7 @@ class GeckoBottomAppBar extends StatelessWidget { const Spacer(), const SizedBox(width: 15), Stack( + alignment: AlignmentDirectional.center, children: [ if (lockAction) Center( @@ -86,7 +86,6 @@ class GeckoBottomAppBar extends StatelessWidget { ), IconButton( key: keyAppBarChest, - iconSize: 60, icon: const Image(image: AssetImage('assets/wallet.png')), onPressed: lockAction ? null