From c38f43e77a8de3ebaea60d041095a115f2d8d30f Mon Sep 17 00:00:00 2001 From: NATHANIEL ENDICK Date: Sun, 26 Feb 2023 09:30:40 -0500 Subject: [PATCH] theming --- lib/buy.dart | 39 ++++++++++++++++++++++++--------------- lib/main.dart | 19 +++++++++++-------- 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/lib/buy.dart b/lib/buy.dart index 454532a..0852510 100644 --- a/lib/buy.dart +++ b/lib/buy.dart @@ -316,29 +316,38 @@ class _BuyScreenState extends State { return InkWell( onTap: () { Dialogs.materialDialog( - color: CustomMaterialColor(240, 240, 240).mdColor, + color: Theme.of(context).scaffoldBackgroundColor, customView: const TransactionDetails(), customViewPosition: CustomViewPosition.BEFORE_ACTION, + msgAlign: TextAlign.center, msg: - 'Please read all the information below before purchasing.', + 'Please read all the information below before purchasing.\n', title: 'Transaction Details', context: context, actions: [ IconsOutlineButton( - onPressed: () {}, - text: 'Cancel', - iconData: Icons.cancel_outlined, - textStyle: const TextStyle(color: Colors.grey), - iconColor: Colors.grey, - ), + onPressed: () {}, + text: 'Cancel', + iconData: Icons.cancel_outlined, + color: Theme.of(context).primaryColor, + textStyle: TextStyle( + color: CustomMaterialColor(240, 240, 240) + .mdColor, + ), + iconColor: CustomMaterialColor(240, 240, 240) + .mdColor), IconsButton( - onPressed: () {}, - text: 'Purchase', - iconData: Icons.done, - color: Colors.blue, - iconColor: Colors.white, - ), + onPressed: () {}, + text: 'Purchase', + iconData: Icons.done, + color: Colors.green, + textStyle: TextStyle( + color: CustomMaterialColor(240, 240, 240) + .mdColor, + ), + iconColor: CustomMaterialColor(240, 240, 240) + .mdColor), ], ); }, @@ -453,7 +462,7 @@ class _TransactionDetailsState extends State { @override Widget build(BuildContext context) { return Container( - height: 80, + height: 200, color: Colors.blue, ); } diff --git a/lib/main.dart b/lib/main.dart index 21b08d5..5c746bf 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,14 +18,17 @@ class MyApp extends StatelessWidget { Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( - primarySwatch: CustomMaterialColor(205, 0, 48).mdColor, - scaffoldBackgroundColor: Colors.black87, - fontFamily: GoogleFonts.figtree().fontFamily, - textTheme: Theme.of(context).textTheme.apply( - bodyColor: CustomMaterialColor(240, 240, 240).mdColor, - displayColor: CustomMaterialColor(240, 240, 240).mdColor, - ), - ), + primarySwatch: CustomMaterialColor(205, 0, 48).mdColor, + scaffoldBackgroundColor: Colors.black87, + fontFamily: GoogleFonts.figtree().fontFamily, + textTheme: Theme.of(context).textTheme.apply( + bodyColor: CustomMaterialColor(240, 240, 240).mdColor, + displayColor: CustomMaterialColor(240, 240, 240).mdColor, + ), + textButtonTheme: TextButtonThemeData( + style: ButtonStyle( + textStyle: MaterialStatePropertyAll(TextStyle( + color: CustomMaterialColor(240, 240, 240).mdColor))))), home: const AuthGate(), ); }