forked from yaso_meth/mih-project
theme switching & add AI logo to theme
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user