theme switching & add AI logo to theme

This commit is contained in:
2025-01-27 12:44:27 +02:00
parent 6dee21aca5
commit 14c901f22e
2 changed files with 16 additions and 0 deletions

View File

@@ -43,6 +43,10 @@ class _MzanziInnovationHubState extends State<MzanziInnovationHub> {
setState(() {
theme.mode = "Light";
});
} else if (_themeMode == ThemeMode.dark) {
setState(() {
theme.mode = "Dark";
});
} else {
setState(() {
theme.mode = "Dark";

View File

@@ -227,6 +227,18 @@ class MyTheme {
return loading;
}
AssetImage aiLogoImage() {
if (mode == "Dark") {
return const AssetImage(
'images/mzansi_ai-dark.png',
);
} else {
return const AssetImage(
'images/mzansi_ai-light.png',
);
}
}
void setScreenType(double width) {
if (width <= 800) {
screenType = "mobile";