From 04670f26164a503faaa54593510bf645f7e73aa0 Mon Sep 17 00:00:00 2001 From: devesh-m Date: Sun, 17 Nov 2024 17:00:07 +0530 Subject: [PATCH 1/3] Fixed This issue --- lib/views/pages/profile/profile_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/views/pages/profile/profile_screen.dart b/lib/views/pages/profile/profile_screen.dart index da1da51..c065698 100644 --- a/lib/views/pages/profile/profile_screen.dart +++ b/lib/views/pages/profile/profile_screen.dart @@ -60,7 +60,7 @@ class _ProfileScreenState extends State { Column( children: [ Text( - "ALICE", + widget.name, style: const TextStyle( fontSize: 24, fontWeight: FontWeight.bold, From 3753c2da0f7951e1b66cfbbac9b93735b7ab843e Mon Sep 17 00:00:00 2001 From: devesh-m Date: Sun, 17 Nov 2024 17:21:53 +0530 Subject: [PATCH 2/3] Fixed This Issue --- lib/views/pages/main_home/home_pages/home_screen.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/views/pages/main_home/home_pages/home_screen.dart b/lib/views/pages/main_home/home_pages/home_screen.dart index ffe191b..00b6c5b 100644 --- a/lib/views/pages/main_home/home_pages/home_screen.dart +++ b/lib/views/pages/main_home/home_pages/home_screen.dart @@ -70,7 +70,10 @@ class _HomeScreenState extends State { HomeCardConst( title: _text.donate, col: const Color.fromARGB(255, 255, 122, 122), - onPressed: () {}, + onPressed: () { + Navigator.push(context, MaterialPageRoute(builder: (ctx)=> LocateBloodBanks())); + }, + ), HomeCardConst( title: _text.required, From 4ad64b628e6668ec732a11d7fd65087ee437afb3 Mon Sep 17 00:00:00 2001 From: devesh-m Date: Sun, 17 Nov 2024 17:34:37 +0530 Subject: [PATCH 3/3] Fixed Blood bank dart issue --- lib/services/blood_bank_service.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/services/blood_bank_service.dart b/lib/services/blood_bank_service.dart index c061260..3733ede 100644 --- a/lib/services/blood_bank_service.dart +++ b/lib/services/blood_bank_service.dart @@ -10,9 +10,12 @@ class BloodBankService { Future> getBloodBanks() async { final response = await http.get(Uri.parse(apiUrl)); - + if (response.statusCode == 200) { final data = jsonDecode(response.body); + if (data["records"]==null){ + return []; + } return data['records']; // Modify as per the API response structure } else { return [];