commit ab3aba334cdea3571d3fe3df9b96baeb24c23c66
parent 104ce305cb45402a93618fb018309a439294d0df
Author: maydayv7 <maydayv7@gmail.com>
Date: Sat, 6 Dec 2025 14:59:40 +0530
Fix project board page
Diffstat:
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/lib/ui/pages/define_brand_page.dart b/lib/ui/pages/define_brand_page.dart
@@ -60,9 +60,9 @@ class _DefineBrandPageState extends State<DefineBrandPage> {
Future<void> _handleFinish() async {
// 1. Basic Validation
if (_projectNameController.text.trim().isEmpty) {
- ScaffoldMessenger.of(context).showSnackBar(
- const SnackBar(content: Text('Project name is required')),
- );
+ ScaffoldMessenger.of(
+ context,
+ ).showSnackBar(const SnackBar(content: Text('Project name is required')));
return;
}
diff --git a/lib/ui/pages/project_board_page.dart b/lib/ui/pages/project_board_page.dart
@@ -10,6 +10,7 @@ import 'package:creekui/data/repos/project_repo.dart';
import 'package:creekui/data/repos/note_repo.dart';
import 'package:creekui/data/repos/image_repo.dart';
import 'package:creekui/ui/widgets/image_context_menu.dart';
+import 'package:creekui/ui/widgets/empty_state.dart';
import 'project_tag_page.dart';
import 'project_board_page_alternate.dart';
import 'image_save_page.dart';
@@ -80,12 +81,12 @@ class _ProjectBoardPageState extends State<ProjectBoardPage> {
await Future.wait(
images.map((img) async {
final Set<String> distinctCategories = {...img.tags};
- // final notes = await _noteRepo.getNotesForImage(img.id);
- // for (var note in notes) {
- // if (note.category.isNotEmpty) {
- // distinctCategories.add(note.category);
- // }
- // }
+ final notes = await _noteRepo.getNotesForImage(img.id);
+ for (var note in notes) {
+ if (note.category.isNotEmpty) {
+ distinctCategories.add(note.category);
+ }
+ }
if (distinctCategories.isEmpty) {
tempMap.putIfAbsent('Uncategorized', () => []).add(img);
} else {
@@ -219,11 +220,10 @@ class _ProjectBoardPageState extends State<ProjectBoardPage> {
Widget _buildCategorizedView() {
if (_isLoading) return const Center(child: CircularProgressIndicator());
if (_categorizedImages.isEmpty) {
- return Center(
- child: Text(
- "No images found",
- style: Variables.bodyStyle.copyWith(color: Variables.textSecondary),
- ),
+ return EmptyState(
+ icon: Icons.image_not_supported_outlined,
+ title: "No images found",
+ subtitle: "Try adding new images",
);
}