From d3792a1a061627f2595b5c82d7006c2028c61426 Mon Sep 17 00:00:00 2001 From: Nilanjan Chakrabarti Date: Thu, 4 Sep 2025 17:57:12 +0530 Subject: [PATCH] Theme UI According to Client --- lib/app.dart | 6 +-- .../card/screens/card_management_screen.dart | 26 ++++++----- .../dashboard/screens/dashboard_screen.dart | 2 +- .../screens/branch_locator_screen.dart | 45 ++----------------- lib/main.dart | 12 ++--- pubspec.lock | 8 ---- pubspec.yaml | 2 + 7 files changed, 29 insertions(+), 72 deletions(-) diff --git a/lib/app.dart b/lib/app.dart index 636df8f..9272d47 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -342,10 +342,10 @@ class _NavigationScaffoldState extends State { bottomNavigationBar: BottomNavigationBar( currentIndex: _selectedIndex, type: BottomNavigationBarType.fixed, - backgroundColor: Theme.of(context).scaffoldBackgroundColor, - selectedItemColor: Theme.of(context).colorScheme.primary, + backgroundColor: const Color(0XFF1E58AD), + selectedItemColor: Theme.of(context).colorScheme.onPrimary, unselectedItemColor: - Theme.of(context).colorScheme.onSurface.withOpacity(0.7), + Theme.of(context).colorScheme.onSecondary, onTap: (index) { setState(() { _selectedIndex = index; diff --git a/lib/features/card/screens/card_management_screen.dart b/lib/features/card/screens/card_management_screen.dart index 3f0b086..8d00d33 100644 --- a/lib/features/card/screens/card_management_screen.dart +++ b/lib/features/card/screens/card_management_screen.dart @@ -1,3 +1,5 @@ +// ignore_for_file: unused_import + import 'package:flutter/material.dart'; import 'package:kmobile/features/card/screens/block_card_screen.dart'; import 'package:kmobile/features/card/screens/card_details_screen.dart'; @@ -35,12 +37,12 @@ class _CardManagementScreen extends State { icon: Symbols.remove_moderator, label: AppLocalizations.of(context).blockUnblockCard, onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => const BlockCardScreen(), - ), - ); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => const BlockCardScreen(), + // ), + // ); }, ), const Divider(height: 1), @@ -61,12 +63,12 @@ class _CardManagementScreen extends State { icon: Symbols.payment_card, label: AppLocalizations.of(context).viewCardDeatils, onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => const CardDetailsScreen(), - ), - ); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => const CardDetailsScreen(), + // ), + // ); }, ), const Divider(height: 1), diff --git a/lib/features/dashboard/screens/dashboard_screen.dart b/lib/features/dashboard/screens/dashboard_screen.dart index 4ffbb94..619cfcb 100644 --- a/lib/features/dashboard/screens/dashboard_screen.dart +++ b/lib/features/dashboard/screens/dashboard_screen.dart @@ -289,7 +289,7 @@ class _DashboardScreenState extends State { vertical: 10, ), decoration: BoxDecoration( - color: theme.colorScheme.primary, + color: Color(0xFF01A04C), borderRadius: BorderRadius.circular(16), ), child: Column( diff --git a/lib/features/service/screens/branch_locator_screen.dart b/lib/features/service/screens/branch_locator_screen.dart index 3e80e82..5133863 100644 --- a/lib/features/service/screens/branch_locator_screen.dart +++ b/lib/features/service/screens/branch_locator_screen.dart @@ -25,7 +25,7 @@ class BranchLocatorScreen extends StatefulWidget { class _BranchLocatorScreenState extends State { final TextEditingController _searchController = TextEditingController(); -// Static list of 5 branches +// Static list of 2 branches final List _branches = [ Branch( name: "Dharamsala - Head Office", @@ -36,7 +36,7 @@ class _BranchLocatorScreenState extends State { name: "Kangra", code: "033", ifsc: "KACE0000033", - address: "Rajput Bhawankangrapo Kangra, Kangra, HP "), + address: "Rajput Bhawankangrapo, Kangra, HP "), ]; List _filteredBranches = []; @@ -63,45 +63,6 @@ class _BranchLocatorScreenState extends State { }); } -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar( -// title: Text(AppLocalizations.of(context).branchLocator), -// ), -// body: Center( -// child: Column( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [ -// Icon( -// Icons.location_on, -// size: 80, -// color: Theme.of(context).primaryColor, -// ), -// const SizedBox(height: 16), -// Text( -// AppLocalizations.of(context).findnearbybranched, -// style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), -// ), -// const SizedBox(height: 24), -// ElevatedButton.icon( -// icon: const Icon(Icons.search), -// label: Text( AppLocalizations.of(context).searchbranch), -// onPressed: () { -// // Place API here - -// // ScaffoldMessenger.of(context).showSnackBar( -// // SnackBar(content: Text( AppLocalizations.of(context).branchsearchsoon)), -// // ); -// }, -// ), -// ], -// ), -// ), -// ); -// } -// } - @override Widget build(BuildContext context) { return Scaffold( @@ -139,7 +100,7 @@ class _BranchLocatorScreenState extends State { horizontal: 12, vertical: 6), child: ListTile( leading: Icon(Icons.location_city, - color: Theme.of(context).primaryColor), + color: Theme.of(context).colorScheme.primary), title: Text(branch.name, style: const TextStyle(fontWeight: FontWeight.bold)), diff --git a/lib/main.dart b/lib/main.dart index a00edcd..d79c64f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,12 +16,12 @@ void main() async { // Check for device compromise final compromisedMessage = await SecurityService.deviceCompromisedMessage; - // if (compromisedMessage != null) { - // runApp(MaterialApp( - // home: SecurityErrorScreen(message: compromisedMessage), - // )); - // return; - // } + if (compromisedMessage != null) { + runApp(MaterialApp( + home: SecurityErrorScreen(message: compromisedMessage), + )); + return; + } // Initialize dependencies await setupDependencies(); diff --git a/pubspec.lock b/pubspec.lock index 2dd6a96..832df6d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -357,14 +357,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.19.0" - jailbreak_root_detection: - dependency: "direct main" - description: - name: jailbreak_root_detection - sha256: c611229940a09785bd686364e92a40b07724926d2496c931527805101eb3da86 - url: "https://pub.dev" - source: hosted - version: "1.1.6" js: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 1cb7371..9169af7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,6 +60,8 @@ dependencies: lottie: ^2.6.0 share_plus: ^7.2.1 confetti: ^0.7.0 + # jailbreak_root_detection: "^1.1.6" +