mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 09:29:48 +00:00
Update all cards with shadow and proper alignment
This commit is contained in:
parent
03ab60b96a
commit
a66dc74ac6
5 changed files with 60 additions and 36 deletions
|
@ -365,7 +365,7 @@ class _DashboardPageView extends BasePage {
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
|
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
|
||||||
.withAlpha(50),
|
.withAlpha(50),
|
||||||
spreadRadius: 5,
|
spreadRadius: 3,
|
||||||
blurRadius: 7
|
blurRadius: 7
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -497,7 +497,7 @@ class _DashboardPageView extends BasePage {
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
|
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
|
||||||
.withAlpha(50),
|
.withAlpha(50),
|
||||||
spreadRadius: 5,
|
spreadRadius: 3,
|
||||||
blurRadius: 7
|
blurRadius: 7
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
|
@ -308,6 +308,8 @@ class CryptoBalanceWidget extends StatelessWidget {
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
|
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
|
||||||
child: DashBoardRoundedCardWidget(
|
child: DashBoardRoundedCardWidget(
|
||||||
|
marginV: 0,
|
||||||
|
marginH: 0,
|
||||||
customBorder: 30,
|
customBorder: 30,
|
||||||
title: S.of(context).silent_payments,
|
title: S.of(context).silent_payments,
|
||||||
subTitle: S.of(context).enable_silent_payments_scanning,
|
subTitle: S.of(context).enable_silent_payments_scanning,
|
||||||
|
@ -370,7 +372,7 @@ class CryptoBalanceWidget extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
if (dashboardViewModel.showMwebCard) ...[
|
if (dashboardViewModel.showMwebCard) ...[
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 15),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
|
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
|
||||||
child: DashBoardRoundedCardWidget(
|
child: DashBoardRoundedCardWidget(
|
||||||
|
@ -836,7 +838,7 @@ class BalanceRowWidget extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (hasSecondAdditionalBalance || hasSecondAvailableBalance) ...[
|
if (hasSecondAdditionalBalance || hasSecondAvailableBalance) ...[
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 15),
|
||||||
Container(
|
Container(
|
||||||
margin: const EdgeInsets.only(left: 16, right: 16),
|
margin: const EdgeInsets.only(left: 16, right: 16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
@ -846,6 +848,14 @@ class BalanceRowWidget extends StatelessWidget {
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
|
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: Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
|
@ -22,13 +22,13 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 10),
|
Padding(
|
||||||
Text(
|
padding: EdgeInsets.only(left: 24, top: 16),
|
||||||
|
child: Text(
|
||||||
'Cake ${S.of(context).features}',
|
'Cake ${S.of(context).features}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
|
@ -36,10 +36,11 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
|
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 2),
|
||||||
DashBoardRoundedCardWidget(
|
DashBoardRoundedCardWidget(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (Platform.isMacOS) {
|
if (Platform.isMacOS) {
|
||||||
|
@ -57,7 +58,6 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
|
||||||
DashBoardRoundedCardWidget(
|
DashBoardRoundedCardWidget(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (Platform.isMacOS) {
|
if (Platform.isMacOS) {
|
||||||
|
@ -75,7 +75,6 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
|
||||||
DashBoardRoundedCardWidget(
|
DashBoardRoundedCardWidget(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (Platform.isMacOS) {
|
if (Platform.isMacOS) {
|
||||||
|
@ -93,7 +92,6 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
|
||||||
DashBoardRoundedCardWidget(
|
DashBoardRoundedCardWidget(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (Platform.isMacOS) {
|
if (Platform.isMacOS) {
|
||||||
|
@ -111,7 +109,6 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
|
||||||
DashBoardRoundedCardWidget(
|
DashBoardRoundedCardWidget(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (Platform.isMacOS) {
|
if (Platform.isMacOS) {
|
||||||
|
@ -129,7 +126,6 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
|
||||||
DashBoardRoundedCardWidget(
|
DashBoardRoundedCardWidget(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (Platform.isMacOS) {
|
if (Platform.isMacOS) {
|
||||||
|
@ -147,7 +143,6 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
|
||||||
DashBoardRoundedCardWidget(
|
DashBoardRoundedCardWidget(
|
||||||
onTap: () => _launchUrl("cake.nano-gpt.com"),
|
onTap: () => _launchUrl("cake.nano-gpt.com"),
|
||||||
title: "NanoGPT",
|
title: "NanoGPT",
|
||||||
|
@ -159,7 +154,6 @@ class CakeFeaturesPage extends StatelessWidget {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
|
||||||
Observer(
|
Observer(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (!dashboardViewModel.hasSignMessages) {
|
if (!dashboardViewModel.hasSignMessages) {
|
||||||
|
|
|
@ -21,8 +21,8 @@ class ActionButton extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return TextButton(
|
||||||
onTap: () {
|
onPressed: () {
|
||||||
if (route?.isNotEmpty ?? false) {
|
if (route?.isNotEmpty ?? false) {
|
||||||
Navigator.of(context, rootNavigator: true).pushNamed(route!);
|
Navigator.of(context, rootNavigator: true).pushNamed(route!);
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,7 +31,7 @@ class ActionButton extends StatelessWidget {
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Colors.transparent,
|
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,
|
alignment: alignment,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
|
|
@ -16,6 +16,8 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
||||||
this.onClose,
|
this.onClose,
|
||||||
this.customBorder,
|
this.customBorder,
|
||||||
super.key,
|
super.key,
|
||||||
|
this.marginV,
|
||||||
|
this.marginH
|
||||||
});
|
});
|
||||||
|
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
|
@ -27,29 +29,46 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
||||||
final Widget? icon;
|
final Widget? icon;
|
||||||
final Image? image;
|
final Image? image;
|
||||||
final double? customBorder;
|
final double? customBorder;
|
||||||
|
final double? marginV;
|
||||||
|
final double? marginH;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
hoverColor: Colors.transparent,
|
//onTap: onTap,
|
||||||
splashColor: Colors.transparent,
|
//hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
//splashColor: Colors.transparent,
|
||||||
|
//highlightColor: Colors.transparent,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
TextButton(
|
Container(
|
||||||
onPressed: onTap,
|
margin: EdgeInsets.symmetric(horizontal: marginH ?? 20, vertical: marginV ?? 8),
|
||||||
style: TextButton.styleFrom(
|
//padding: EdgeInsets.all(20),
|
||||||
backgroundColor: Theme.of(context)
|
width: double.infinity,
|
||||||
.extension<SyncIndicatorTheme>()!
|
decoration: BoxDecoration(
|
||||||
.syncedBackgroundColor,
|
borderRadius: BorderRadius.circular(customBorder ?? 20),
|
||||||
shape: RoundedRectangleBorder(
|
border: Border.all(
|
||||||
borderRadius: BorderRadius.circular(customBorder ?? 20)),
|
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
|
||||||
side: BorderSide(
|
),
|
||||||
color: Theme.of(context)
|
boxShadow: [
|
||||||
.extension<BalancePageTheme>()!
|
BoxShadow(
|
||||||
.cardBorderColor),
|
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
|
||||||
padding: EdgeInsets.all(24)
|
.withAlpha(50),
|
||||||
),
|
spreadRadius: 3,
|
||||||
|
blurRadius: 7
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: onTap,
|
||||||
|
style: TextButton.styleFrom(
|
||||||
|
backgroundColor: Theme.of(context)
|
||||||
|
.extension<SyncIndicatorTheme>()!
|
||||||
|
.syncedBackgroundColor,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(customBorder ?? 20)),
|
||||||
|
padding: EdgeInsets.all(24)
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
@ -98,6 +117,7 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
if (onClose != null)
|
if (onClose != null)
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 10,
|
top: 10,
|
||||||
|
|
Loading…
Reference in a new issue