Update all cards with shadow and proper alignment

This commit is contained in:
tuxpizza 2024-12-22 02:01:24 -05:00
parent 03ab60b96a
commit a66dc74ac6
5 changed files with 60 additions and 36 deletions

View file

@ -365,7 +365,7 @@ class _DashboardPageView extends BasePage {
BoxShadow(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
.withAlpha(50),
spreadRadius: 5,
spreadRadius: 3,
blurRadius: 7
)
],
@ -497,7 +497,7 @@ class _DashboardPageView extends BasePage {
BoxShadow(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
.withAlpha(50),
spreadRadius: 5,
spreadRadius: 3,
blurRadius: 7
)
],

View file

@ -308,6 +308,8 @@ class CryptoBalanceWidget extends StatelessWidget {
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
child: DashBoardRoundedCardWidget(
marginV: 0,
marginH: 0,
customBorder: 30,
title: S.of(context).silent_payments,
subTitle: S.of(context).enable_silent_payments_scanning,
@ -370,7 +372,7 @@ class CryptoBalanceWidget extends StatelessWidget {
),
],
if (dashboardViewModel.showMwebCard) ...[
SizedBox(height: 10),
SizedBox(height: 15),
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
child: DashBoardRoundedCardWidget(
@ -836,7 +838,7 @@ class BalanceRowWidget extends StatelessWidget {
),
),
if (hasSecondAdditionalBalance || hasSecondAvailableBalance) ...[
SizedBox(height: 10),
SizedBox(height: 15),
Container(
margin: const EdgeInsets.only(left: 16, right: 16),
decoration: BoxDecoration(
@ -846,6 +848,14 @@ class BalanceRowWidget extends StatelessWidget {
width: 1,
),
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
boxShadow: [
BoxShadow(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
.withAlpha(50),
spreadRadius: 3,
blurRadius: 7
)
],
),
child: Container(
child: Column(

View file

@ -22,13 +22,13 @@ class CakeFeaturesPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 10),
Text(
Padding(
padding: EdgeInsets.only(left: 24, top: 16),
child: Text(
'Cake ${S.of(context).features}',
style: TextStyle(
fontSize: 24,
@ -36,10 +36,11 @@ class CakeFeaturesPage extends StatelessWidget {
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
),
),
),
Expanded(
child: ListView(
children: <Widget>[
SizedBox(height: 20),
SizedBox(height: 2),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
@ -57,7 +58,6 @@ class CakeFeaturesPage extends StatelessWidget {
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
@ -75,7 +75,6 @@ class CakeFeaturesPage extends StatelessWidget {
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
@ -93,7 +92,6 @@ class CakeFeaturesPage extends StatelessWidget {
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
@ -111,7 +109,6 @@ class CakeFeaturesPage extends StatelessWidget {
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
@ -129,7 +126,6 @@ class CakeFeaturesPage extends StatelessWidget {
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
@ -147,7 +143,6 @@ class CakeFeaturesPage extends StatelessWidget {
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () => _launchUrl("cake.nano-gpt.com"),
title: "NanoGPT",
@ -159,7 +154,6 @@ class CakeFeaturesPage extends StatelessWidget {
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
Observer(
builder: (context) {
if (!dashboardViewModel.hasSignMessages) {

View file

@ -21,8 +21,8 @@ class ActionButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
return TextButton(
onPressed: () {
if (route?.isNotEmpty ?? false) {
Navigator.of(context, rootNavigator: true).pushNamed(route!);
} else {
@ -31,7 +31,7 @@ class ActionButton extends StatelessWidget {
},
child: Container(
color: Colors.transparent,
padding: EdgeInsets.only(top: 14, bottom: 16, left: 10, right: 10),
padding: EdgeInsets.only(top: 5, bottom: 5, left: 0, right: 0),
alignment: alignment,
child: Column(
mainAxisSize: MainAxisSize.max,

View file

@ -16,6 +16,8 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
this.onClose,
this.customBorder,
super.key,
this.marginV,
this.marginH
});
final VoidCallback onTap;
@ -27,16 +29,37 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
final Widget? icon;
final Image? image;
final double? customBorder;
final double? marginV;
final double? marginH;
@override
Widget build(BuildContext context) {
return InkWell(
hoverColor: Colors.transparent,
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
//onTap: onTap,
//hoverColor: Colors.transparent,
//splashColor: Colors.transparent,
//highlightColor: Colors.transparent,
child: Stack(
children: [
TextButton(
Container(
margin: EdgeInsets.symmetric(horizontal: marginH ?? 20, vertical: marginV ?? 8),
//padding: EdgeInsets.all(20),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(customBorder ?? 20),
border: Border.all(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
),
boxShadow: [
BoxShadow(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
.withAlpha(50),
spreadRadius: 3,
blurRadius: 7
)
],
),
child: TextButton(
onPressed: onTap,
style: TextButton.styleFrom(
backgroundColor: Theme.of(context)
@ -44,10 +67,6 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
.syncedBackgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(customBorder ?? 20)),
side: BorderSide(
color: Theme.of(context)
.extension<BalancePageTheme>()!
.cardBorderColor),
padding: EdgeInsets.all(24)
),
child: Column(
@ -98,6 +117,7 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
],
),
),
),
if (onClose != null)
Positioned(
top: 10,