Categories page works!

This commit is contained in:
2023-06-01 00:52:44 -04:00
parent 0dd56cfaa6
commit c9c3f69886
12 changed files with 428 additions and 171 deletions
+33
View File
@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';
enum CategoryColor {
black("273036"),
blue("00a9b3"),
red("c71634"),
darkred("ff2816"),
lime("bfff55"),
green("189749"),
pink("ff65ae"),
purple("5b3ab1"),
cyan("005744"),
orange("ff6d01"),
yellow("fff336");
const CategoryColor(this.hex);
final String hex;
name() {
return this.toString().split('.').last;
}
backgroundColor() {
return Color(int.parse("0xff$hex"));
}
foregroundColor() {
return Color(int.parse("0xff$hex")).computeLuminance() > 0.3
? Colors.black
: Colors.white;
}
}