Files
notas/lib/widgets/category_style.dart
T

41 lines
773 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.label_outline_rounded,
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;
}
}