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(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 24),
|
padding: EdgeInsets.only(top: 20),
|
||||||
child: OptionTile(
|
child: OptionTile(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.support_agent,
|
Icons.support_agent,
|
||||||
|
@ -61,7 +61,7 @@ class SupportPage extends BasePage {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 24),
|
padding: EdgeInsets.only(top: 20),
|
||||||
child: OptionTile(
|
child: OptionTile(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.find_in_page,
|
Icons.find_in_page,
|
||||||
|
@ -74,7 +74,7 @@ class SupportPage extends BasePage {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 24),
|
padding: EdgeInsets.only(top: 20),
|
||||||
child: OptionTile(
|
child: OptionTile(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.contact_support,
|
Icons.contact_support,
|
||||||
|
|
|
@ -31,67 +31,73 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: onTap,
|
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
TextButton(
|
||||||
padding: EdgeInsets.all(20),
|
onPressed: onTap,
|
||||||
width: double.infinity,
|
style: TextButton.styleFrom(
|
||||||
decoration: BoxDecoration(
|
backgroundColor: Theme.of(context)
|
||||||
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
|
.extension<SyncIndicatorTheme>()!
|
||||||
borderRadius: BorderRadius.circular(customBorder ?? 20),
|
.syncedBackgroundColor,
|
||||||
border: Border.all(
|
shape: RoundedRectangleBorder(
|
||||||
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
|
borderRadius: BorderRadius.circular(customBorder ?? 20)),
|
||||||
|
side: BorderSide(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<BalancePageTheme>()!
|
||||||
|
.cardBorderColor),
|
||||||
|
padding: EdgeInsets.all(24)
|
||||||
),
|
),
|
||||||
),
|
child: Column(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
Row(
|
||||||
Row(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Expanded(
|
||||||
Expanded(
|
child: Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Text(
|
||||||
Text(
|
title,
|
||||||
title,
|
style: TextStyle(
|
||||||
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,
|
||||||
fontWeight: FontWeight.w500,
|
fontSize: 24,
|
||||||
fontFamily: 'Lato'),
|
fontWeight: FontWeight.w900,
|
||||||
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)
|
||||||
if (image != null) image!
|
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)
|
if (onClose != null)
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 10,
|
top: 10,
|
||||||
|
@ -99,7 +105,9 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(Icons.close),
|
icon: Icon(Icons.close),
|
||||||
onPressed: onClose,
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return Container(
|
||||||
onTap: onPressed,
|
width: double.infinity,
|
||||||
child: Container(
|
padding: EdgeInsets.only(left: 6, right: 6),
|
||||||
width: double.infinity,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.all(24),
|
child: TextButton(
|
||||||
alignment: Alignment.center,
|
style: TextButton.styleFrom(
|
||||||
decoration: BoxDecoration(
|
backgroundColor: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||||
color: Theme.of(context).cardColor,
|
padding: EdgeInsets.all(24)
|
||||||
),
|
),
|
||||||
|
onPressed: onPressed,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
@ -48,7 +49,9 @@ class OptionTile extends StatelessWidget {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context).extension<OptionTileTheme>()!.titleColor,
|
color: Theme.of(context)
|
||||||
|
.extension<OptionTileTheme>()!
|
||||||
|
.titleColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -58,7 +61,9 @@ class OptionTile extends StatelessWidget {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
color: Theme.of(context).extension<OptionTileTheme>()!.descriptionColor,
|
color: Theme.of(context)
|
||||||
|
.extension<OptionTileTheme>()!
|
||||||
|
.descriptionColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue