mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 17:40:43 +00:00
- Use close icon on main screens
- Minor UI fixes
This commit is contained in:
parent
5296a2118a
commit
55bf964a27
7 changed files with 24 additions and 35 deletions
|
@ -7,7 +7,6 @@ import 'package:cake_wallet/ionia/ionia_anypay.dart';
|
|||
import 'package:cake_wallet/ionia/ionia_gift_card.dart';
|
||||
import 'package:cake_wallet/ionia/ionia_tip.dart';
|
||||
import 'package:cake_wallet/src/screens/buy/onramper_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_dashboard_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/transactions_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/display_settings_page.dart';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/palette.dart';
|
||||
|
@ -20,7 +21,7 @@ abstract class BasePage extends StatelessWidget {
|
|||
|
||||
String? get title => null;
|
||||
|
||||
bool get isModalBackButton => false;
|
||||
bool get canUseCloseIcon => false;
|
||||
|
||||
Color get backgroundLightColor => Colors.white;
|
||||
|
||||
|
@ -50,23 +51,27 @@ abstract class BasePage extends StatelessWidget {
|
|||
}
|
||||
|
||||
final _backButton = Icon(Icons.arrow_back_ios,
|
||||
color: titleColor ?? Theme.of(context).primaryTextTheme!.headline6!.color!,
|
||||
color: titleColor ?? Theme.of(context).primaryTextTheme.headline6!.color!,
|
||||
size: 16,);
|
||||
final _closeButton = currentTheme.type == ThemeType.dark
|
||||
? closeButtonImageDarkTheme : closeButtonImage;
|
||||
|
||||
bool isMobileView = ResponsiveLayoutUtil.instance.isMobile(context);
|
||||
|
||||
return SizedBox(
|
||||
height: 37,
|
||||
width: 37,
|
||||
height: isMobileView ? 37 : 45,
|
||||
width: isMobileView ? 37 : 45,
|
||||
child: ButtonTheme(
|
||||
minWidth: double.minPositive,
|
||||
child: TextButton(
|
||||
// FIX-ME: Style
|
||||
//highlightColor: Colors.transparent,
|
||||
//splashColor: Colors.transparent,
|
||||
//padding: EdgeInsets.all(0),
|
||||
style: ButtonStyle(
|
||||
overlayColor: MaterialStateColor.resolveWith((states) => Colors.transparent),
|
||||
),
|
||||
onPressed: () => onClose(context),
|
||||
child: isModalBackButton ? _closeButton : _backButton),
|
||||
child: canUseCloseIcon && !isMobileView
|
||||
? _closeButton
|
||||
: _backButton,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import 'package:flutter_mobx/flutter_mobx.dart';
|
|||
import 'package:mobx/mobx.dart';
|
||||
import 'package:smooth_page_indicator/smooth_page_indicator.dart';
|
||||
import 'package:cake_wallet/main.dart';
|
||||
import 'package:cake_wallet/router.dart' as Router;
|
||||
|
||||
class DashboardPage extends StatelessWidget {
|
||||
DashboardPage({
|
||||
|
@ -52,7 +51,6 @@ class DashboardPage extends StatelessWidget {
|
|||
desktopSidebarViewModel: desktopSidebarViewModel,
|
||||
dashboardViewModel: dashboardViewModel,
|
||||
child: DesktopDashboardPage(
|
||||
desktopSidebarViewModel: desktopSidebarViewModel,
|
||||
balancePage: balancePage,
|
||||
dashboardViewModel: dashboardViewModel,
|
||||
addressListViewModel: addressListViewModel,
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'package:cake_wallet/routes.dart';
|
|||
import 'package:cake_wallet/src/screens/yat_emoji_id.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/desktop_sidebar_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/balance_page.dart';
|
||||
|
@ -18,13 +17,11 @@ class DesktopDashboardPage extends StatelessWidget {
|
|||
required this.balancePage,
|
||||
required this.dashboardViewModel,
|
||||
required this.addressListViewModel,
|
||||
required this.desktopSidebarViewModel,
|
||||
});
|
||||
|
||||
final BalancePage balancePage;
|
||||
final DashboardViewModel dashboardViewModel;
|
||||
final WalletAddressListViewModel addressListViewModel;
|
||||
final DesktopSidebarViewModel desktopSidebarViewModel;
|
||||
|
||||
static final GlobalKey<NavigatorState> desktopKey = GlobalKey<NavigatorState>();
|
||||
|
||||
|
|
|
@ -42,26 +42,10 @@ class AddressPage extends BasePage {
|
|||
bool get resizeToAvoidBottomInset => false;
|
||||
|
||||
@override
|
||||
Widget leading(BuildContext context) {
|
||||
final _backButton = Icon(Icons.arrow_back_ios,
|
||||
color: Theme.of(context).accentTextTheme!.headline2!.backgroundColor!,
|
||||
size: 16,);
|
||||
Color get titleColor => Colors.white;
|
||||
|
||||
return SizedBox(
|
||||
height: 37,
|
||||
width: 37,
|
||||
child: ButtonTheme(
|
||||
minWidth: double.minPositive,
|
||||
child: TextButton(
|
||||
// FIX-ME: Style
|
||||
//highlightColor: Colors.transparent,
|
||||
//splashColor: Colors.transparent,
|
||||
//padding: EdgeInsets.all(0),
|
||||
onPressed: () => onClose(context),
|
||||
child: _backButton),
|
||||
),
|
||||
);
|
||||
}
|
||||
@override
|
||||
bool get canUseCloseIcon => true;
|
||||
|
||||
@override
|
||||
Widget middle(BuildContext context) {
|
||||
|
|
|
@ -108,6 +108,9 @@ class ExchangePage extends BasePage {
|
|||
exchangeViewModel.reset();
|
||||
});
|
||||
|
||||
@override
|
||||
bool get canUseCloseIcon => true;
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
WidgetsBinding.instance
|
||||
|
|
|
@ -51,6 +51,9 @@ class SendPage extends BasePage {
|
|||
@override
|
||||
bool get extendBodyBehindAppBar => true;
|
||||
|
||||
@override
|
||||
bool get canUseCloseIcon => true;
|
||||
|
||||
@override
|
||||
AppBarStyle get appBarStyle => AppBarStyle.transparent;
|
||||
|
||||
|
@ -58,7 +61,7 @@ class SendPage extends BasePage {
|
|||
final double initialHeight = sendViewModel.isElectrumWallet ? 490 : 465;
|
||||
|
||||
if (!ResponsiveLayoutUtil.instance.isMobile(context)) {
|
||||
return initialHeight - 77;
|
||||
return initialHeight - 66;
|
||||
}
|
||||
return initialHeight;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue