Skip to content

Commit

Permalink
refactor: Update constant strings
Browse files Browse the repository at this point in the history
  • Loading branch information
lsetiawan committed Dec 23, 2024
1 parent 94f315d commit e6f4be6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/support_sphere/lib/constants/string_catalog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -357,15 +356,15 @@ 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(
backgroundColor:
WidgetStateProperty.all(Colors.redAccent)),
onPressed: () {},
label: const Text(
"Delete Item",
ResourceStrings.deleteItem,
style: TextStyle(color: Colors.white),
))
],
Expand Down

0 comments on commit e6f4be6

Please sign in to comment.