mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Make more components TextButtons
This commit is contained in:
parent
569cafa7c6
commit
3acd45d403
3 changed files with 78 additions and 65 deletions
|
@ -42,7 +42,7 @@ class SupportPage extends BasePage {
|
|||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 24),
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: OptionTile(
|
||||
icon: Icon(
|
||||
Icons.support_agent,
|
||||
|
@ -61,7 +61,7 @@ class SupportPage extends BasePage {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 24),
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: OptionTile(
|
||||
icon: Icon(
|
||||
Icons.find_in_page,
|
||||
|
@ -74,7 +74,7 @@ class SupportPage extends BasePage {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 24),
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: OptionTile(
|
||||
icon: Icon(
|
||||
Icons.contact_support,
|
||||
|
|
|
@ -31,21 +31,24 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
hoverColor: Colors.transparent,
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(20),
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
|
||||
borderRadius: BorderRadius.circular(customBorder ?? 20),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
|
||||
),
|
||||
TextButton(
|
||||
onPressed: onTap,
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Theme.of(context)
|
||||
.extension<SyncIndicatorTheme>()!
|
||||
.syncedBackgroundColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(customBorder ?? 20)),
|
||||
side: BorderSide(
|
||||
color: Theme.of(context)
|
||||
.extension<BalancePageTheme>()!
|
||||
.cardBorderColor),
|
||||
padding: EdgeInsets.all(24)
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
|
@ -59,8 +62,9 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
|||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
color: Theme.of(context)
|
||||
.extension<DashboardPageTheme>()!
|
||||
.cardTextColor,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w900,
|
||||
),
|
||||
|
@ -80,8 +84,10 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
if (image != null) image!
|
||||
else if (svgPicture != null) svgPicture!,
|
||||
if (image != null)
|
||||
image!
|
||||
else if (svgPicture != null)
|
||||
svgPicture!,
|
||||
if (icon != null) icon!
|
||||
],
|
||||
),
|
||||
|
@ -99,7 +105,9 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
|||
child: IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: onClose,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
color: Theme.of(context)
|
||||
.extension<DashboardPageTheme>()!
|
||||
.cardTextColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -19,16 +19,17 @@ class OptionTile extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onPressed,
|
||||
child: Container(
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(24),
|
||||
padding: EdgeInsets.only(left: 6, right: 6),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
color: Theme.of(context).cardColor,
|
||||
child: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).cardColor,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
padding: EdgeInsets.all(24)
|
||||
),
|
||||
onPressed: onPressed,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
@ -48,7 +49,9 @@ class OptionTile extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<OptionTileTheme>()!.titleColor,
|
||||
color: Theme.of(context)
|
||||
.extension<OptionTileTheme>()!
|
||||
.titleColor,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
|
@ -58,7 +61,9 @@ class OptionTile extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Theme.of(context).extension<OptionTileTheme>()!.descriptionColor,
|
||||
color: Theme.of(context)
|
||||
.extension<OptionTileTheme>()!
|
||||
.descriptionColor,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue