diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d29021..93bcf99 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -7,6 +7,9 @@ # The following line activates a set of recommended lints for Flutter apps, # packages, and plugins designed to encourage good coding practices. +analyzer: + errors: + dead_code: ignore include: package:flutter_lints/flutter.yaml linter: diff --git a/lib/api/services/imps_service.dart b/lib/api/services/imps_service.dart index 937696b..a2c2c2c 100644 --- a/lib/api/services/imps_service.dart +++ b/lib/api/services/imps_service.dart @@ -29,3 +29,5 @@ class ImpsService { } } } + + diff --git a/lib/api/services/rtgs_service.dart b/lib/api/services/rtgs_service.dart index 9e67dc9..6c9177d 100644 --- a/lib/api/services/rtgs_service.dart +++ b/lib/api/services/rtgs_service.dart @@ -1,4 +1,5 @@ import 'package:dio/dio.dart'; +import 'package:kmobile/data/models/imps_transaction.dart'; import 'package:kmobile/data/models/rtgs_response.dart'; import 'package:kmobile/data/models/rtgs_transaction.dart'; @@ -28,4 +29,6 @@ class RtgsService { throw Exception('An unexpected error occurred: ${e.toString()}'); } } + + processImpsTransaction(ImpsTransaction impsTx) {} } diff --git a/lib/app.dart b/lib/app.dart index 99a2633..6425276 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -99,7 +99,7 @@ class _KMobileState extends State { title: 'kMobile', theme: themeState.getThemeData(), //darkTheme: themeState.getThemeData(), - themeMode: ThemeMode.system, + themeMode: ThemeMode.light, onGenerateRoute: AppRoutes.generateRoute, initialRoute: AppRoutes.splash, home: showSplash ? const SplashScreen() : const AuthGate(), diff --git a/lib/config/themes.dart b/lib/config/themes.dart index e6d45df..15d1557 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -2,31 +2,40 @@ import 'package:flutter/material.dart'; import 'theme_type.dart'; class AppThemes { - static ThemeData getLightTheme(ThemeType type) { - switch (type) { - case ThemeType.green: - return ThemeData(primarySwatch: Colors.green); - case ThemeType.orange: - return ThemeData(primarySwatch: Colors.orange); - case ThemeType.blue: - return ThemeData(primarySwatch: Colors.blue); - case ThemeType.violet: - default: - return ThemeData(primarySwatch: Colors.deepPurple); - } - } - - // static ThemeData getDarkTheme(ThemeType type) { - // switch (type) { - // case ThemeType.green: - // return ThemeData.dark().copyWith(primaryColor: Colors.green); - // case ThemeType.orange: - // return ThemeData.dark().copyWith(primaryColor: Colors.orange); - // case ThemeType.blue: - // return ThemeData.dark().copyWith(primaryColor: Colors.blue); - // case ThemeType.violet: - // default: - // return ThemeData.dark().copyWith(primaryColor: Colors.deepPurple); - // } - // } +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; } + +// 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 diff --git a/lib/features/accounts/screens/account_statement_screen.dart b/lib/features/accounts/screens/account_statement_screen.dart index 716cd0e..1f04768 100644 --- a/lib/features/accounts/screens/account_statement_screen.dart +++ b/lib/features/accounts/screens/account_statement_screen.dart @@ -262,7 +262,7 @@ class _AccountStatementScreen extends State { fontSize: 16, color: Colors.grey[600]), ), ) - : ListView.builder( + : ListView.separated( itemCount: _transactions.length, itemBuilder: (context, index) { final tx = _transactions[index]; @@ -275,21 +275,21 @@ class _AccountStatementScreen extends State { tx.type == 'CR' ? Colors.green : Colors.red, ), title: Text( - tx.name != null - ? (tx.name!.length > 18 - ? tx.name!.substring(0, 22) - : tx.name!) - : '', - style: const TextStyle(fontSize: 14), - ), - subtitle: Text( - tx.date ?? '', - style: const TextStyle(fontSize: 12), - ), - trailing: Text( - "₹${tx.amount}", - style: const TextStyle(fontSize: 16), - ), + 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, @@ -301,6 +301,9 @@ class _AccountStatementScreen extends State { }, ); }, + separatorBuilder: (context, index) { + return const Divider(); + }, ), ), ], diff --git a/lib/features/dashboard/screens/dashboard_screen.dart b/lib/features/dashboard/screens/dashboard_screen.dart index 1a704de..4704ffb 100644 --- a/lib/features/dashboard/screens/dashboard_screen.dart +++ b/lib/features/dashboard/screens/dashboard_screen.dart @@ -572,20 +572,20 @@ class _DashboardScreenState extends State { tx.type == 'CR' ? Colors.green : Colors.red, ), title: Text( - tx.name != null + 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: 14), - ), - subtitle: Text( - tx.date ?? '', style: const TextStyle(fontSize: 12), ), trailing: Text( "₹${tx.amount}", - style: const TextStyle(fontSize: 16), + style: const TextStyle(fontSize: 17), ), onTap: () { Navigator.push(