mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
remove unused code
This commit is contained in:
parent
28c599e68a
commit
016bca01f4
4 changed files with 12 additions and 26 deletions
|
@ -35,8 +35,6 @@ abstract class BasePage extends StatelessWidget {
|
|||
|
||||
Widget? get endDrawer => null;
|
||||
|
||||
PreferredSizeWidget? desktopAppBar(BuildContext context) => null;
|
||||
|
||||
AppBarStyle get appBarStyle => AppBarStyle.regular;
|
||||
|
||||
Widget Function(BuildContext, Widget)? get rootWrapper => null;
|
||||
|
@ -152,7 +150,7 @@ abstract class BasePage extends StatelessWidget {
|
|||
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
|
||||
extendBodyBehindAppBar: extendBodyBehindAppBar,
|
||||
endDrawer: endDrawer,
|
||||
appBar: desktopAppBar(context) ?? appBar(context),
|
||||
appBar: appBar(context),
|
||||
body: body(context),
|
||||
floatingActionButton: floatingActionButton(context));
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
import 'package:cake_wallet/di.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DesktopNavbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
class DesktopDashboardNavbar extends StatelessWidget implements ObstructingPreferredSizeWidget {
|
||||
final Widget leading;
|
||||
final Widget middle;
|
||||
final Widget trailing;
|
||||
|
||||
DesktopNavbar({
|
||||
DesktopDashboardNavbar({
|
||||
super.key,
|
||||
required this.leading,
|
||||
required this.middle,
|
||||
|
@ -41,4 +42,7 @@ class DesktopNavbar extends StatelessWidget implements PreferredSizeWidget {
|
|||
|
||||
@override
|
||||
Size get preferredSize => Size.fromHeight(60);
|
||||
|
||||
@override
|
||||
bool shouldFullyObstruct(BuildContext context) => false;
|
||||
}
|
|
@ -2,13 +2,14 @@ import 'package:cake_wallet/di.dart';
|
|||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_dashboard_page.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_dashboard_navbar.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator.dart';
|
||||
import 'package:cake_wallet/src/widgets/desktop_nav_bar.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/desktop_sidebar_view_model.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:cake_wallet/router.dart' as Router;
|
||||
|
@ -28,7 +29,7 @@ class DesktopSidebarWrapper extends BasePage {
|
|||
static Key _pageViewKey = GlobalKey();
|
||||
|
||||
@override
|
||||
PreferredSizeWidget desktopAppBar(BuildContext context) => DesktopNavbar(
|
||||
ObstructingPreferredSizeWidget appBar(BuildContext context) => DesktopDashboardNavbar(
|
||||
leading: Padding(
|
||||
padding: EdgeInsets.only(left: sideMenuWidth),
|
||||
child: getIt<DesktopWalletSelectionDropDown>(),
|
||||
|
@ -80,23 +81,6 @@ class DesktopSidebarWrapper extends BasePage {
|
|||
|
||||
double get sideMenuWidth => 76.0;
|
||||
|
||||
@override
|
||||
Widget Function(BuildContext, Widget) get rootWrapper =>
|
||||
(BuildContext context, Widget scaffold) => Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Theme.of(context).accentColor,
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
Theme.of(context).primaryColor,
|
||||
],
|
||||
begin: Alignment.topRight,
|
||||
end: Alignment.bottomLeft,
|
||||
),
|
||||
),
|
||||
child: scaffold,
|
||||
);
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
_setEffects();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
|
||||
factory NavBar({Widget? leading, Widget? middle, Widget? trailing, bool useDesktopAppbar = false, Color? backgroundColor,}) {
|
||||
factory NavBar({Widget? leading, Widget? middle, Widget? trailing, Color? backgroundColor}) {
|
||||
return NavBar._internal(
|
||||
leading: leading,
|
||||
middle: middle,
|
||||
|
@ -11,7 +11,7 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
|
|||
}
|
||||
|
||||
factory NavBar.withShadow(
|
||||
{Widget? leading, Widget? middle, Widget? trailing, Color? backgroundColor, bool useDesktopAppbar = false,}) {
|
||||
{Widget? leading, Widget? middle, Widget? trailing, Color? backgroundColor}) {
|
||||
return NavBar._internal(
|
||||
leading: leading,
|
||||
middle: middle,
|
||||
|
|
Loading…
Reference in a new issue