Update [skip ci]

This commit is contained in:
tuxpizza 2024-12-21 23:16:00 -05:00
parent a9ee754b30
commit b31b1940d8
3 changed files with 247 additions and 11 deletions

View file

@ -38,6 +38,8 @@ import 'package:cake_wallet/src/screens/release_notes/release_notes_screen.dart'
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import '../../../themes/theme_base.dart';
class DashboardPage extends StatefulWidget {
DashboardPage({
required this.bottomSheetService,
@ -297,7 +299,8 @@ class _DashboardPageView extends BasePage {
),
),
),
Positioned(
currentTheme.type == ThemeType.bright
? Positioned(
top: 560,
bottom: 0,
left: 0,
@ -346,7 +349,7 @@ class _DashboardPageView extends BasePage {
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 50, sigmaY: 50),
child: Container(
clipBehavior: Clip.hardEdge,
//clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50.0),
border: Border.all(
@ -358,6 +361,14 @@ class _DashboardPageView extends BasePage {
color: Theme.of(context)
.extension<SyncIndicatorTheme>()!
.syncedBackgroundColor,
boxShadow: [
BoxShadow(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
.withAlpha(50),
spreadRadius: 5,
blurRadius: 7
)
],
),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
@ -416,7 +427,136 @@ class _DashboardPageView extends BasePage {
),
),
),
//],
// ],
),
),
),
);
},
),
)
:
Positioned(
top: 560,
bottom: 0,
left: 0,
right: 0,
child: Observer(
builder: (_) {
return ClipRect(
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
Theme.of(context)
.extension<DashboardPageTheme>()!
.thirdGradientBackgroundColor
.withAlpha(10),
Theme.of(context)
.extension<DashboardPageTheme>()!
.thirdGradientBackgroundColor
.withAlpha(75),
Theme.of(context)
.extension<DashboardPageTheme>()!
.thirdGradientBackgroundColor
.withAlpha(150),
Theme.of(context)
.extension<DashboardPageTheme>()!
.thirdGradientBackgroundColor,
Theme.of(context)
.extension<DashboardPageTheme>()!
.thirdGradientBackgroundColor
// Color.fromARGB(10, 245, 8, 82),
// Color.fromARGB(75, 245, 8, 82),
// Color.fromARGB(150, 245, 8, 82),
// Color.fromARGB(200, 245, 8, 82),
// Color.fromARGB(255, 245, 8, 82),
],
),
),
child: Container(
alignment: Alignment.bottomCenter,
padding: const EdgeInsets.only(
left: 16, right: 16, bottom: 24, top: 48),
child: Container(
//clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50.0),
border: Border.all(
color: Theme.of(context)
.extension<BalancePageTheme>()!
.cardBorderColor,
width: 1,
),
color: Theme.of(context)
.extension<SyncIndicatorTheme>()!
.syncedBackgroundColor,
boxShadow: [
BoxShadow(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
.withAlpha(50),
spreadRadius: 5,
blurRadius: 7
)
],
),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: MainActions.all
.where((element) =>
element.canShow
?.call(dashboardViewModel) ??
true)
.map(
(action) => Expanded(
child: Semantics(
button: true,
enabled: (action.isEnabled?.call(
dashboardViewModel) ??
true),
child: ActionButton(
key: ValueKey(
'dashboard_page_${action.name(context)}_action_button_key'),
image: Image.asset(
action.image,
height: 24,
width: 24,
color: action.isEnabled?.call(
dashboardViewModel) ??
true
? Theme.of(context)
.extension<
DashboardPageTheme>()!
.mainActionsIconColor
: Theme.of(context)
.extension<
BalancePageTheme>()!
.labelTextColor,
),
title: action.name(context),
onClick: () async =>
await action.onTap(context,
dashboardViewModel),
textColor: action.isEnabled?.call(
dashboardViewModel) ??
true
? null
: Theme.of(context)
.extension<
BalancePageTheme>()!
.labelTextColor,
),
),
),
)
.toList(),
),
),
),
),
),

View file

@ -304,7 +304,7 @@ class CryptoBalanceWidget extends StatelessWidget {
))
],
if (dashboardViewModel.showSilentPaymentsCard) ...[
SizedBox(height: 10),
SizedBox(height: 15),
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
child: DashBoardRoundedCardWidget(
@ -579,6 +579,14 @@ class BalanceRowWidget extends StatelessWidget {
Container(
margin: const EdgeInsets.only(left: 16, right: 16),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
.withAlpha(50),
spreadRadius: 3,
blurRadius: 7
)
],
borderRadius: BorderRadius.circular(30.0),
border: Border.all(
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,

View file

@ -23,13 +23,11 @@ class CakeFeaturesPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
padding: EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 50),
SizedBox(height: 10),
Text(
'Cake ${S.of(context).features}',
style: TextStyle(
@ -60,6 +58,96 @@ class CakeFeaturesPage extends StatelessWidget {
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
_launchUrl("buy.cakepay.com");
} else {
_navigatorToGiftCardsPage(context);
}
},
title: 'Cake Pay',
subTitle: S.of(context).cake_pay_subtitle,
image: Image.asset(
'assets/images/cards.png',
height: 100,
width: 115,
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
_launchUrl("buy.cakepay.com");
} else {
_navigatorToGiftCardsPage(context);
}
},
title: 'Cake Pay',
subTitle: S.of(context).cake_pay_subtitle,
image: Image.asset(
'assets/images/cards.png',
height: 100,
width: 115,
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
_launchUrl("buy.cakepay.com");
} else {
_navigatorToGiftCardsPage(context);
}
},
title: 'Cake Pay',
subTitle: S.of(context).cake_pay_subtitle,
image: Image.asset(
'assets/images/cards.png',
height: 100,
width: 115,
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
_launchUrl("buy.cakepay.com");
} else {
_navigatorToGiftCardsPage(context);
}
},
title: 'Cake Pay',
subTitle: S.of(context).cake_pay_subtitle,
image: Image.asset(
'assets/images/cards.png',
height: 100,
width: 115,
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () {
if (Platform.isMacOS) {
_launchUrl("buy.cakepay.com");
} else {
_navigatorToGiftCardsPage(context);
}
},
title: 'Cake Pay',
subTitle: S.of(context).cake_pay_subtitle,
image: Image.asset(
'assets/images/cards.png',
height: 100,
width: 115,
fit: BoxFit.cover,
),
),
SizedBox(height: 10),
DashBoardRoundedCardWidget(
onTap: () => _launchUrl("cake.nano-gpt.com"),
title: "NanoGPT",
@ -90,12 +178,12 @@ class CakeFeaturesPage extends StatelessWidget {
);
},
),
SizedBox(height: 125),
],
),
),
],
),
),
);
}