Update menu

This commit is contained in:
tuxpizza 2024-09-24 00:40:34 -04:00
parent cf1e8a306c
commit 14b613b2c7
3 changed files with 34 additions and 16 deletions

View file

@ -173,6 +173,7 @@ class _DashboardPageView extends BasePage {
return Container( return Container(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
//padding: EdgeInsets.all(20),
width: 40, width: 40,
child: TextButton( child: TextButton(
key: ValueKey('dashboard_page_wallet_menu_button_key'), key: ValueKey('dashboard_page_wallet_menu_button_key'),

View file

@ -22,7 +22,7 @@ class MenuWidgetState extends State<MenuWidget> {
: this.menuWidth = 0, : this.menuWidth = 0,
this.screenWidth = 0, this.screenWidth = 0,
this.screenHeight = 0, this.screenHeight = 0,
this.headerHeight = 120, this.headerHeight = 500,
this.tileHeight = 60, this.tileHeight = 60,
this.fromTopEdge = 50, this.fromTopEdge = 50,
this.fromBottomEdge = 25, this.fromBottomEdge = 25,
@ -137,6 +137,7 @@ class MenuWidgetState extends State<MenuWidget> {
itemBuilder: (_, index) { itemBuilder: (_, index) {
if (index == 0) { if (index == 0) {
return Container( return Container(
margin: EdgeInsets.only(bottom: 10),
height: headerHeight, height: headerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient(colors: [ gradient: LinearGradient(colors: [
@ -205,8 +206,8 @@ class MenuWidgetState extends State<MenuWidget> {
); );
}, },
separatorBuilder: (_, index) => Container( separatorBuilder: (_, index) => Container(
height: 1, height: 0,
color: Theme.of(context).extension<CakeMenuTheme>()!.dividerColor, color: Colors.transparent
), ),
itemCount: itemCount + 1, itemCount: itemCount + 1,
), ),

View file

@ -1,6 +1,10 @@
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/themes/extensions/menu_theme.dart'; import 'package:cake_wallet/themes/extensions/menu_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/option_tile_theme.dart';
class SettingActionButton extends StatelessWidget { class SettingActionButton extends StatelessWidget {
final bool isLastTile; final bool isLastTile;
@ -34,18 +38,29 @@ class SettingActionButton extends StatelessWidget {
: selectionActive : selectionActive
? Palette.darkBlue ? Palette.darkBlue
: Theme.of(context).extension<CakeMenuTheme>()!.settingTitleColor; : Theme.of(context).extension<CakeMenuTheme>()!.settingTitleColor;
return InkWell( return Container(
onTap: onTap, //padding: EdgeInsets.only(top: 5, left: 15, bottom: 5),
hoverColor: Colors.transparent, margin: EdgeInsets.only(top: 5, left: 20, bottom: 5),
child: TextButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.black12),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
side: BorderSide(
//color: Colors.black12,
width: 100
),
borderRadius: BorderRadius.only(topLeft: Radius.circular(20), bottomLeft: Radius.circular(20),
),
),
),
),
onPressed: onTap,
//hoverColor: Colors.transparent,
child: Container( child: Container(
height: tileHeight, width: double.infinity,
padding: isLastTile padding: EdgeInsets.only(top: 12, left: 20, bottom: 12, right: 15),
? EdgeInsets.only( //margin: EdgeInsets.only(top: 5, left: 15, bottom: 5),
left: 24,
right: 24,
top: fromBottomEdge,
)
: EdgeInsets.only(left: 24, right: 24),
alignment: isLastTile ? Alignment.topLeft : null, alignment: isLastTile ? Alignment.topLeft : null,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -70,15 +85,16 @@ class SettingActionButton extends StatelessWidget {
), ),
), ),
), ),
if (isArrowVisible) if(isArrowVisible)
Icon( Icon(
Icons.arrow_forward_ios, Icons.arrow_forward_ios,
color: color, color: Colors.grey,
size: 16, size: 16,
) )
], ],
), ),
), ),
),
); );
} }
} }