From e6f4be638ad8ab2f751a0287b9b7f9dd3148b580 Mon Sep 17 00:00:00 2001 From: Landung 'Don' Setiawan Date: Mon, 23 Dec 2024 10:02:05 -0800 Subject: [PATCH] refactor: Update constant strings --- src/support_sphere/lib/constants/string_catalog.dart | 2 ++ .../pages/main_app/resource/resource_main_body.dart | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/support_sphere/lib/constants/string_catalog.dart b/src/support_sphere/lib/constants/string_catalog.dart index f4314eb..bbd5101 100644 --- a/src/support_sphere/lib/constants/string_catalog.dart +++ b/src/support_sphere/lib/constants/string_catalog.dart @@ -115,6 +115,8 @@ class ResourceStrings { static const String manageResources = 'Manage Resources'; static const String resourcesInventory = 'Resources Inventory'; static const String noUserResources = 'You have not added any resources yet'; + static const String markAsUpToDate = "Mark as up to date"; + static const String deleteItem = "Delete Item"; } class AddResourceInventoryFormStrings { diff --git a/src/support_sphere/lib/presentation/pages/main_app/resource/resource_main_body.dart b/src/support_sphere/lib/presentation/pages/main_app/resource/resource_main_body.dart index 85aa0c4..9aae950 100644 --- a/src/support_sphere/lib/presentation/pages/main_app/resource/resource_main_body.dart +++ b/src/support_sphere/lib/presentation/pages/main_app/resource/resource_main_body.dart @@ -9,7 +9,6 @@ import 'package:support_sphere/data/models/resource.dart'; import 'package:support_sphere/logic/bloc/auth/authentication_bloc.dart'; import 'package:support_sphere/logic/cubit/resource_cubit.dart'; import 'package:support_sphere/presentation/components/container_card.dart'; -import 'package:support_sphere/presentation/components/manage_resource_card.dart'; import 'package:support_sphere/presentation/components/resource_card.dart'; import 'package:support_sphere/presentation/components/resource_search_bar.dart'; import 'package:support_sphere/presentation/components/resource_type_filter.dart'; @@ -145,7 +144,7 @@ class AllResourcesTab extends StatelessWidget { builder: (context, state) { if (state.resources.isEmpty) { return const Center( - child: Text("No resources found"), + child: Text(ResourceStrings.noResourcesFound), ); } return ListView.builder( @@ -357,7 +356,7 @@ class UserResourcesTab extends StatelessWidget { icon: const FaIcon(FontAwesomeIcons.circleCheck), iconAlignment: IconAlignment.end, onPressed: () {}, - label: Text("Mark as up to date")), + label: const Text(ResourceStrings.markAsUpToDate)), const SizedBox(height: 8), ElevatedButton.icon( style: ButtonStyle( @@ -365,7 +364,7 @@ class UserResourcesTab extends StatelessWidget { WidgetStateProperty.all(Colors.redAccent)), onPressed: () {}, label: const Text( - "Delete Item", + ResourceStrings.deleteItem, style: TextStyle(color: Colors.white), )) ],