Make more components TextButtons

This commit is contained in:
tuxpizza 2024-12-20 05:00:49 -05:00
parent 569cafa7c6
commit 3acd45d403
3 changed files with 78 additions and 65 deletions

View file

@ -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,

View file

@ -31,21 +31,24 @@ 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: [
@ -59,8 +62,9 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
Text( Text(
title, title,
style: TextStyle( style: TextStyle(
color: color: Theme.of(context)
Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor, .extension<DashboardPageTheme>()!
.cardTextColor,
fontSize: 24, fontSize: 24,
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
), ),
@ -80,8 +84,10 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
], ],
), ),
), ),
if (image != null) image! if (image != null)
else if (svgPicture != null) svgPicture!, image!
else if (svgPicture != null)
svgPicture!,
if (icon != null) icon! if (icon != null) icon!
], ],
), ),
@ -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,
), ),
), ),
], ],

View file

@ -19,16 +19,17 @@ class OptionTile extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return Container(
onTap: onPressed,
child: Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(24), padding: EdgeInsets.only(left: 6, right: 6),
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( child: TextButton(
borderRadius: BorderRadius.all(Radius.circular(12)), style: TextButton.styleFrom(
color: Theme.of(context).cardColor, backgroundColor: Theme.of(context).cardColor,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
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,
), ),
), ),
) )