feat: Introduce category selection functionality in NoteEditorScreen and related components

This commit is contained in:
2026-05-21 19:31:29 +02:00
parent 7e210871dd
commit 8be7819528
7 changed files with 421 additions and 58 deletions
+41
View File
@@ -0,0 +1,41 @@
import 'package:flutter/material.dart';
class CategoryStyle {
CategoryStyle._();
static const List<Color> colors = <Color>[
Colors.amber,
Colors.blue,
Colors.green,
Colors.purple,
Colors.red,
Colors.teal,
Colors.orange,
Colors.grey,
];
static const List<IconData> icons = <IconData>[
Icons.folder,
Icons.work,
Icons.star,
Icons.home,
Icons.school,
Icons.book,
Icons.music_note,
Icons.lightbulb,
];
static IconData iconForCodePoint(int? codePoint) {
if (codePoint == null) {
return Icons.folder_outlined;
}
for (final IconData icon in icons) {
if (icon.codePoint == codePoint) {
return icon;
}
}
return Icons.folder_outlined;
}
}