theme switching & add AI logo to theme
This commit is contained in:
@@ -43,6 +43,10 @@ class _MzanziInnovationHubState extends State<MzanziInnovationHub> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
theme.mode = "Light";
|
theme.mode = "Light";
|
||||||
});
|
});
|
||||||
|
} else if (_themeMode == ThemeMode.dark) {
|
||||||
|
setState(() {
|
||||||
|
theme.mode = "Dark";
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
setState(() {
|
setState(() {
|
||||||
theme.mode = "Dark";
|
theme.mode = "Dark";
|
||||||
|
|||||||
@@ -227,6 +227,18 @@ class MyTheme {
|
|||||||
return loading;
|
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) {
|
void setScreenType(double width) {
|
||||||
if (width <= 800) {
|
if (width <= 800) {
|
||||||
screenType = "mobile";
|
screenType = "mobile";
|
||||||
|
|||||||
Reference in New Issue
Block a user