mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-29 04:49:51 +00:00
minor cleanup [skip ci]
This commit is contained in:
parent
7db23599fa
commit
92fc6a4a60
2 changed files with 80 additions and 97 deletions
|
@ -39,7 +39,6 @@ class CryptoBalanceWidget extends StatelessWidget {
|
||||||
child: DashBoardRoundedCardWidget(
|
child: DashBoardRoundedCardWidget(
|
||||||
title: "Invalid monero bindings",
|
title: "Invalid monero bindings",
|
||||||
subTitle: dashboardViewModel.getMoneroError.toString(),
|
subTitle: dashboardViewModel.getMoneroError.toString(),
|
||||||
onTap: () {},
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +53,6 @@ class CryptoBalanceWidget extends StatelessWidget {
|
||||||
child: DashBoardRoundedCardWidget(
|
child: DashBoardRoundedCardWidget(
|
||||||
title: "Invalid wownero bindings",
|
title: "Invalid wownero bindings",
|
||||||
subTitle: dashboardViewModel.getWowneroError.toString(),
|
subTitle: dashboardViewModel.getWowneroError.toString(),
|
||||||
onTap: () {},
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
|
@ -206,7 +204,6 @@ class CryptoBalanceWidget extends StatelessWidget {
|
||||||
subTitle: "Here are the things that you should note:\n - " +
|
subTitle: "Here are the things that you should note:\n - " +
|
||||||
dashboardViewModel.isMoneroWalletBrokenReasons.join("\n - ") +
|
dashboardViewModel.isMoneroWalletBrokenReasons.join("\n - ") +
|
||||||
"\n\nPlease restart your wallet and if it doesn't help contact our support.",
|
"\n\nPlease restart your wallet and if it doesn't help contact our support.",
|
||||||
onTap: () {},
|
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
if (dashboardViewModel.showSilentPaymentsCard) ...[
|
if (dashboardViewModel.showSilentPaymentsCard) ...[
|
||||||
|
@ -344,7 +341,6 @@ class CryptoBalanceWidget extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () => {},
|
|
||||||
icon: Container(
|
icon: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
|
||||||
class DashBoardRoundedCardWidget extends StatelessWidget {
|
class DashBoardRoundedCardWidget extends StatelessWidget {
|
||||||
DashBoardRoundedCardWidget({
|
DashBoardRoundedCardWidget({
|
||||||
required this.onTap,
|
this.onTap,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.subTitle,
|
required this.subTitle,
|
||||||
this.hint,
|
this.hint,
|
||||||
|
@ -22,7 +22,7 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
||||||
this.marginH,
|
this.marginH,
|
||||||
});
|
});
|
||||||
|
|
||||||
final VoidCallback onTap;
|
final VoidCallback? onTap;
|
||||||
final VoidCallback? onClose;
|
final VoidCallback? onClose;
|
||||||
final String title;
|
final String title;
|
||||||
final String subTitle;
|
final String subTitle;
|
||||||
|
@ -38,104 +38,91 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return Stack(
|
||||||
//onTap: onTap,
|
children: [
|
||||||
//hoverColor: Colors.transparent,
|
Container(
|
||||||
//splashColor: Colors.transparent,
|
margin: EdgeInsets.symmetric(horizontal: marginH ?? 20, vertical: marginV ?? 8),
|
||||||
//highlightColor: Colors.transparent,
|
//padding: EdgeInsets.all(20),
|
||||||
child: Stack(
|
width: double.infinity,
|
||||||
children: [
|
decoration: BoxDecoration(
|
||||||
Container(
|
borderRadius: BorderRadius.circular(customBorder ?? 20),
|
||||||
margin: EdgeInsets.symmetric(horizontal: marginH ?? 20, vertical: marginV ?? 8),
|
border: Border.all(
|
||||||
//padding: EdgeInsets.all(20),
|
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
|
||||||
width: double.infinity,
|
),
|
||||||
decoration: BoxDecoration(
|
// boxShadow: [
|
||||||
borderRadius: BorderRadius.circular(customBorder ?? 20),
|
// BoxShadow(
|
||||||
border: Border.all(
|
// color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
|
||||||
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
|
// .withAlpha(50),
|
||||||
),
|
// spreadRadius: shadowSpread ?? 3,
|
||||||
// boxShadow: [
|
// blurRadius: shadowBlur ?? 7,
|
||||||
// BoxShadow(
|
// )
|
||||||
// color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor
|
// ],
|
||||||
// .withAlpha(50),
|
|
||||||
// spreadRadius: shadowSpread ?? 3,
|
|
||||||
// blurRadius: shadowBlur ?? 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: TextButton(
|
||||||
children: [
|
onPressed: onTap,
|
||||||
Row(
|
style: TextButton.styleFrom(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
backgroundColor:
|
||||||
children: [
|
Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
|
||||||
Expanded(
|
shape: RoundedRectangleBorder(
|
||||||
child: Column(
|
borderRadius: BorderRadius.circular(customBorder ?? 20)),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: EdgeInsets.all(24)),
|
||||||
children: [
|
child: Column(
|
||||||
Text(
|
children: [
|
||||||
title,
|
Row(
|
||||||
style: TextStyle(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<DashboardPageTheme>()!
|
||||||
|
.cardTextColor,
|
||||||
|
fontSize: 24,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
softWrap: true,
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Text(
|
||||||
|
subTitle,
|
||||||
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.extension<DashboardPageTheme>()!
|
.extension<DashboardPageTheme>()!
|
||||||
.cardTextColor,
|
.cardTextColor,
|
||||||
fontSize: 24,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w900,
|
fontFamily: 'Lato'),
|
||||||
),
|
softWrap: true,
|
||||||
softWrap: true,
|
),
|
||||||
),
|
],
|
||||||
SizedBox(height: 5),
|
|
||||||
Text(
|
|
||||||
subTitle,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context)
|
|
||||||
.extension<DashboardPageTheme>()!
|
|
||||||
.cardTextColor,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
fontFamily: 'Lato'),
|
|
||||||
softWrap: true,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
if (image != null)
|
),
|
||||||
image!
|
if (image != null) image! else if (svgPicture != null) svgPicture!,
|
||||||
else if (svgPicture != null)
|
if (icon != null) icon!
|
||||||
svgPicture!,
|
],
|
||||||
if (icon != null) icon!
|
),
|
||||||
],
|
if (hint != null) ...[
|
||||||
),
|
SizedBox(height: 10),
|
||||||
if (hint != null) ...[
|
hint!,
|
||||||
SizedBox(height: 10),
|
]
|
||||||
hint!,
|
],
|
||||||
]
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (onClose != null)
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
right: 10,
|
||||||
|
child: IconButton(
|
||||||
|
icon: Icon(Icons.close),
|
||||||
|
onPressed: onClose,
|
||||||
|
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||||
),
|
),
|
||||||
if (onClose != null)
|
),
|
||||||
Positioned(
|
],
|
||||||
top: 10,
|
|
||||||
right: 10,
|
|
||||||
child: IconButton(
|
|
||||||
icon: Icon(Icons.close),
|
|
||||||
onPressed: onClose,
|
|
||||||
color: Theme.of(context)
|
|
||||||
.extension<DashboardPageTheme>()!
|
|
||||||
.cardTextColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue