partiColor property
Color
partiColor
Implementation
Color get partiColor {
Color _theColor = Colors.white;
if (code == politicalPartiesEnum.EXG) {
_theColor = Color.fromARGB(255, 94, 0, 0);
} else if (code == politicalPartiesEnum.LO) {
_theColor = Color.fromARGB(255, 154, 0, 0);
} else if (code == politicalPartiesEnum.NPA) {
_theColor = Color.fromARGB(255, 204, 0, 0);
} else if (code == politicalPartiesEnum.LFI ||
code == politicalPartiesEnum.NUPES_LFI ||
code == politicalPartiesEnum.NUPES_ALL) {
_theColor = nupesViolet;
} else if (code == politicalPartiesEnum.PCF ||
code == politicalPartiesEnum.NUPES_PCF) {
_theColor = nupesRouge;
} else if (code == politicalPartiesEnum.EELV ||
code == politicalPartiesEnum.NUPES_ECOLO) {
_theColor = nupesVert;
} else if (code == politicalPartiesEnum.DVE) {
_theColor = nupesJaune;
} else if (code == politicalPartiesEnum.PS ||
code == politicalPartiesEnum.NUPES_PS) {
_theColor = nupesRose;
} else if (code == politicalPartiesEnum.DVG) {
_theColor = liotRose;
} else if (code == politicalPartiesEnum.LREM) {
_theColor = renaissanceOrange;
} else if (code == politicalPartiesEnum.DVC) {
_theColor = modemJaune;
} else if (code == politicalPartiesEnum.LR) {
_theColor = republicainsBleu;
} else if (code == politicalPartiesEnum.DVD ||
code == politicalPartiesEnum.UDI) {
_theColor = udiBleu;
} else if (code == politicalPartiesEnum.DLF) {
_theColor = Color.fromARGB(255, 12, 0, 93);
} else if (code == politicalPartiesEnum.EXD) {
_theColor = Color.fromARGB(255, 0, 0, 0);
} else if (code == politicalPartiesEnum.RN) {
_theColor = rnBleu;
} else if (code == politicalPartiesEnum.DIV) {
_theColor = Color.fromARGB(255, 200, 200, 200);
} else if (code == politicalPartiesEnum.SE) {
_theColor = nonInscritGris;
} else if (code == politicalPartiesEnum.blancs_ou_nul) {
_theColor = Color.fromARGB(255, 190, 190, 190);
} else if (code == politicalPartiesEnum.abstention) {
_theColor = Color.fromARGB(255, 220, 220, 220);
}
return _theColor;
}