41 lines
758 B
Dart
41 lines
758 B
Dart
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;
|
|
}
|
|
} |