From fbf6df71810f7cd54d4bb70f35c30849f1d5b747 Mon Sep 17 00:00:00 2001 From: asif Date: Thu, 4 Dec 2025 12:44:39 +0530 Subject: [PATCH] Icon and logo issues fixed --- lib/config/themes.dart | 24 +++++++++- .../card/screens/block_card_screen.dart | 2 - .../card_pin_change_details_screen.dart | 2 - .../card/screens/card_pin_set_screen.dart | 2 - .../screens/cheque_management_screen.dart | 3 -- .../screens/customer_info_screen.dart | 10 ++-- .../dashboard/screens/dashboard_screen.dart | 46 ++++++++++--------- lib/features/profile/profile_screen.dart | 10 ++-- .../screens/quick_pay_within_bank_screen.dart | 3 -- .../screens/branch_locator_screen.dart | 3 -- 10 files changed, 56 insertions(+), 49 deletions(-) diff --git a/lib/config/themes.dart b/lib/config/themes.dart index f814fcf..d63bc50 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -15,7 +15,17 @@ class AppThemes { colorScheme: colorScheme, useMaterial3: true, textTheme: GoogleFonts.rubikTextTheme(), - ); + ).copyWith( + appBarTheme: AppBarTheme( + backgroundColor: const Color(0xFF01A04C), + titleTextStyle: TextStyle( + color: colorScheme.onPrimary, + fontWeight: FontWeight.w700, + fontSize: 20, + ), + iconTheme: IconThemeData(color: colorScheme.onPrimary), + actionsIconTheme: IconThemeData(color: colorScheme.onPrimary), + )); } static ThemeData getDarkTheme(ThemeType type) { @@ -32,7 +42,17 @@ class AppThemes { textTheme: GoogleFonts.rubikTextTheme( ThemeData(brightness: Brightness.dark).textTheme, ), - ); + ).copyWith( + appBarTheme: AppBarTheme( + backgroundColor: const Color(0xFF01A04C), + titleTextStyle: TextStyle( + color: colorScheme.onPrimary, + fontWeight: FontWeight.w700, + fontSize: 20, + ), + iconTheme: IconThemeData(color: colorScheme.onPrimary), + actionsIconTheme: IconThemeData(color: colorScheme.onPrimary), + )); } static Color _getSeedColor(ThemeType type) { diff --git a/lib/features/card/screens/block_card_screen.dart b/lib/features/card/screens/block_card_screen.dart index d93d8cd..2f94e0b 100644 --- a/lib/features/card/screens/block_card_screen.dart +++ b/lib/features/card/screens/block_card_screen.dart @@ -56,8 +56,6 @@ class _BlockCardScreen extends State { appBar: AppBar( title: Text( AppLocalizations.of(context).blockCard, - style: - const TextStyle(color: Colors.black, fontWeight: FontWeight.w500), ), centerTitle: false, ), diff --git a/lib/features/card/screens/card_pin_change_details_screen.dart b/lib/features/card/screens/card_pin_change_details_screen.dart index 486e3af..d5a196a 100644 --- a/lib/features/card/screens/card_pin_change_details_screen.dart +++ b/lib/features/card/screens/card_pin_change_details_screen.dart @@ -46,8 +46,6 @@ class _CardPinChangeDetailsScreen extends State { appBar: AppBar( title: Text( AppLocalizations.of(context).cardDetails, - style: - const TextStyle(color: Colors.black, fontWeight: FontWeight.w500), ), centerTitle: false, ), diff --git a/lib/features/card/screens/card_pin_set_screen.dart b/lib/features/card/screens/card_pin_set_screen.dart index 6c79125..cbd3fb2 100644 --- a/lib/features/card/screens/card_pin_set_screen.dart +++ b/lib/features/card/screens/card_pin_set_screen.dart @@ -46,8 +46,6 @@ class _CardPinSetScreen extends State { appBar: AppBar( title: Text( AppLocalizations.of(context).cardPin, - style: - const TextStyle(color: Colors.black, fontWeight: FontWeight.w500), ), centerTitle: false, ), diff --git a/lib/features/cheque/screens/cheque_management_screen.dart b/lib/features/cheque/screens/cheque_management_screen.dart index 20ce36b..fa0a4c5 100644 --- a/lib/features/cheque/screens/cheque_management_screen.dart +++ b/lib/features/cheque/screens/cheque_management_screen.dart @@ -17,9 +17,6 @@ class _ChequeManagementScreen extends State { appBar: AppBar( title: Text( AppLocalizations.of(context).chequeManagement, - style: TextStyle( - color: Theme.of(context).textTheme.titleLarge?.color, - fontWeight: FontWeight.w500), ), centerTitle: false, ), diff --git a/lib/features/customer_info/screens/customer_info_screen.dart b/lib/features/customer_info/screens/customer_info_screen.dart index 1a3ead5..2b2cd4f 100644 --- a/lib/features/customer_info/screens/customer_info_screen.dart +++ b/lib/features/customer_info/screens/customer_info_screen.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; import 'package:kmobile/data/models/user.dart'; +import 'package:material_symbols_icons/material_symbols_icons.dart'; import '../../../l10n/app_localizations.dart'; class CustomerInfoScreen extends StatefulWidget { @@ -57,14 +57,14 @@ class _CustomerInfoScreenState extends State { padding: const EdgeInsets.all(16.0), child: Row( children: [ - SizedBox( + const SizedBox( width: 56, height: 56, child: CircleAvatar( radius: 50, - child: SvgPicture.asset( - 'assets/images/avatar_male.svg', - fit: BoxFit.cover, + child: Icon( + Symbols.person, + size: 56, ), ), ), diff --git a/lib/features/dashboard/screens/dashboard_screen.dart b/lib/features/dashboard/screens/dashboard_screen.dart index 706c849..e4cf999 100644 --- a/lib/features/dashboard/screens/dashboard_screen.dart +++ b/lib/features/dashboard/screens/dashboard_screen.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:flutter_svg/svg.dart'; + import 'package:kmobile/data/models/user.dart'; import 'package:kmobile/di/injection.dart'; import 'package:kmobile/features/accounts/screens/account_info_screen.dart'; @@ -417,25 +417,27 @@ class _DashboardScreenState extends State child: Scaffold( backgroundColor: theme.scaffoldBackgroundColor, appBar: AppBar( - backgroundColor: const Color(0xFF01A04C), leading: Padding( padding: const EdgeInsets.only(left: 10.0), - // - child: CircleAvatar( - radius: 20, - backgroundColor: Colors.white, - child: Padding( - padding: const EdgeInsets.all(2.0), - child: ClipOval( - child: Image.asset( - 'assets/images/logo.png', - width: 40, - height: 40, - fit: BoxFit.cover, - ), - ), - ), - ), + child: Material( + elevation: 4.0, + clipBehavior: Clip.antiAlias, + shape: RoundedRectangleBorder( + side: const BorderSide(color: Colors.white, width: 1.5), + borderRadius: BorderRadius.circular(12.0), + ), + child: Container( + width: 40, + height: 40, + decoration: const BoxDecoration( + color: Colors.white, + ), + child: Image.asset( + 'assets/images/logo.png', + fit: BoxFit.fill, + ), + ), + ), ), title: Text( AppLocalizations.of(context).kccBankFull.replaceAll('-', '\u2011'), @@ -468,11 +470,11 @@ class _DashboardScreenState extends State ), ); }, - child: CircleAvatar( - backgroundColor: Colors.grey[200], + child: const CircleAvatar( radius: 21, - child: SvgPicture.asset( - 'assets/images/avatar_male.svg', + child: Icon( + Symbols.person, + size: 30, ), ), ), diff --git a/lib/features/profile/profile_screen.dart b/lib/features/profile/profile_screen.dart index 3bee767..aa64d38 100644 --- a/lib/features/profile/profile_screen.dart +++ b/lib/features/profile/profile_screen.dart @@ -1,7 +1,6 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_svg/svg.dart'; import 'package:kmobile/data/repositories/auth_repository.dart'; import 'package:kmobile/features/profile/daily_transaction_limit.dart'; import 'package:kmobile/features/profile/logout_dialog.dart'; @@ -10,6 +9,7 @@ import 'package:kmobile/security/secure_storage.dart'; import 'package:local_auth/local_auth.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:material_symbols_icons/material_symbols_icons.dart'; import '../../di/injection.dart'; import '../../l10n/app_localizations.dart'; import 'package:kmobile/features/profile/preferences/preference_screen.dart'; @@ -189,11 +189,11 @@ class _ProfileScreenState extends State { Container( width: 56, height: 56, - child: CircleAvatar( + child: const CircleAvatar( radius: 50, - child: SvgPicture.asset( - 'assets/images/avatar_male.svg', - fit: BoxFit.cover, + child: Icon( + Symbols.person, + size: 56, ), ), ), diff --git a/lib/features/quick_pay/screens/quick_pay_within_bank_screen.dart b/lib/features/quick_pay/screens/quick_pay_within_bank_screen.dart index 7c17719..ebfca80 100644 --- a/lib/features/quick_pay/screens/quick_pay_within_bank_screen.dart +++ b/lib/features/quick_pay/screens/quick_pay_within_bank_screen.dart @@ -143,9 +143,6 @@ class _QuickPayWithinBankScreen extends State { appBar: AppBar( title: Text( AppLocalizations.of(context).quickPayOwnBank, - style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, - fontWeight: FontWeight.w500), ), centerTitle: false, ), diff --git a/lib/features/service/screens/branch_locator_screen.dart b/lib/features/service/screens/branch_locator_screen.dart index 592d4e7..9f0483a 100644 --- a/lib/features/service/screens/branch_locator_screen.dart +++ b/lib/features/service/screens/branch_locator_screen.dart @@ -55,9 +55,6 @@ class _BranchLocatorScreenState extends State { appBar: AppBar( title: Text( "Branch Locator", - style: Theme.of(context).textTheme.titleLarge?.copyWith( - color: Theme.of(context).colorScheme.onSurface, - ), ), ), body: Stack(