From f77549310a2b71836b9947756f2fc14d949b2683 Mon Sep 17 00:00:00 2001 From: asif Date: Mon, 25 Aug 2025 19:45:20 +0530 Subject: [PATCH 1/2] Changed some formatting issues --- lib/config/themes.dart | 67 ++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/lib/config/themes.dart b/lib/config/themes.dart index 15d1557..4569b93 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -2,40 +2,37 @@ import 'package:flutter/material.dart'; import 'theme_type.dart'; class AppThemes { -static ThemeData getLightTheme(ThemeType type) { -// Define a seed color based on the theme type -final Color seedColor; -switch (type) { -case ThemeType.green: -seedColor = Colors.green; -break; -case ThemeType.orange: -seedColor = Colors.orange; -break; -case ThemeType.blue: -seedColor = Colors.blue; -break; -case ThemeType.violet: -default: -seedColor = Colors.deepPurple; -break; + static ThemeData getLightTheme(ThemeType type) { + final Color seedColor; + switch (type) { + case ThemeType.green: + seedColor = Colors.green; + break; + case ThemeType.orange: + seedColor = Colors.orange; + break; + case ThemeType.blue: + seedColor = Colors.blue; + break; + case ThemeType.violet: + seedColor = Colors.deepPurple; + break; + } + + final colorScheme = ColorScheme.fromSeed( + seedColor: seedColor, + brightness: Brightness.light, // Explicitly set for a light theme + ); + + return ThemeData.from( + colorScheme: colorScheme, + useMaterial3: true, // Recommended for modern Flutter apps + ).copyWith( + scaffoldBackgroundColor: Colors.white, + bottomNavigationBarTheme: BottomNavigationBarThemeData( + backgroundColor: colorScheme.surface, + ), + ); + } } -// Create a ColorScheme from the seed color -final colorScheme = ColorScheme.fromSeed( -seedColor: seedColor, -brightness: Brightness.light, // Explicitly set for a light theme -); - -// Create the ThemeData from the ColorScheme -return ThemeData.from( -colorScheme: colorScheme, -useMaterial3: true, // Recommended for modern Flutter apps -).copyWith( -scaffoldBackgroundColor: Colors.white, -bottomNavigationBarTheme: BottomNavigationBarThemeData( -backgroundColor: colorScheme.surface, -), -); -} -} \ No newline at end of file From 351ee84414b27c03ddd2542da891fe73b31acd7c Mon Sep 17 00:00:00 2001 From: asif Date: Mon, 25 Aug 2025 19:47:19 +0530 Subject: [PATCH 2/2] formatted some files --- lib/api/services/imps_service.dart | 2 -- lib/config/themes.dart | 1 - .../screens/account_statement_screen.dart | 34 +++++++++---------- .../dashboard/screens/dashboard_screen.dart | 2 +- .../dashboard/widgets/account_card.dart | 2 +- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/lib/api/services/imps_service.dart b/lib/api/services/imps_service.dart index a2c2c2c..937696b 100644 --- a/lib/api/services/imps_service.dart +++ b/lib/api/services/imps_service.dart @@ -29,5 +29,3 @@ class ImpsService { } } } - - diff --git a/lib/config/themes.dart b/lib/config/themes.dart index 4569b93..d34083c 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -35,4 +35,3 @@ class AppThemes { ); } } - diff --git a/lib/features/accounts/screens/account_statement_screen.dart b/lib/features/accounts/screens/account_statement_screen.dart index 7917e5d..9c8cc68 100644 --- a/lib/features/accounts/screens/account_statement_screen.dart +++ b/lib/features/accounts/screens/account_statement_screen.dart @@ -281,21 +281,21 @@ class _AccountStatementScreen extends State { tx.type == 'CR' ? Colors.green : Colors.red, ), title: Text( - tx.date ?? '', - style: const TextStyle(fontSize: 15), - ), - subtitle: Text( - tx.name != null - ? (tx.name!.length > 18 - ? tx.name!.substring(0, 22) - : tx.name!) - : '', - style: const TextStyle(fontSize: 12), - ), - trailing: Text( - "₹${tx.amount}", - style: const TextStyle(fontSize: 17), - ), + tx.date ?? '', + style: const TextStyle(fontSize: 15), + ), + subtitle: Text( + tx.name != null + ? (tx.name!.length > 18 + ? tx.name!.substring(0, 22) + : tx.name!) + : '', + style: const TextStyle(fontSize: 12), + ), + trailing: Text( + "₹${tx.amount}", + style: const TextStyle(fontSize: 17), + ), onTap: () { Navigator.push( context, @@ -308,8 +308,8 @@ class _AccountStatementScreen extends State { ); }, separatorBuilder: (context, index) { - return const Divider(); - }, + return const Divider(); + }, ), ), ], diff --git a/lib/features/dashboard/screens/dashboard_screen.dart b/lib/features/dashboard/screens/dashboard_screen.dart index 4704ffb..1eb68a2 100644 --- a/lib/features/dashboard/screens/dashboard_screen.dart +++ b/lib/features/dashboard/screens/dashboard_screen.dart @@ -576,7 +576,7 @@ class _DashboardScreenState extends State { style: const TextStyle(fontSize: 15), ), subtitle: Text( - tx.name != null + tx.name != null ? (tx.name!.length > 18 ? tx.name!.substring(0, 22) : tx.name!) diff --git a/lib/features/dashboard/widgets/account_card.dart b/lib/features/dashboard/widgets/account_card.dart index 0669481..4a66715 100644 --- a/lib/features/dashboard/widgets/account_card.dart +++ b/lib/features/dashboard/widgets/account_card.dart @@ -50,7 +50,7 @@ class AccountCard extends StatelessWidget { Text( account.accountNumber, style: TextStyle( - color:Theme.of(context).scaffoldBackgroundColor, fontSize: 16), + color: Theme.of(context).scaffoldBackgroundColor, fontSize: 16), ), const SizedBox(height: 30), Text(