Create new asset folder and add images to it
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 224 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 170 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 206 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
@@ -248,7 +248,8 @@ class _MihInfoState extends State<MihInfo> {
|
||||
CircleAvatar(
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
backgroundImage: const AssetImage("images/founder.jpg"),
|
||||
backgroundImage: const AssetImage(
|
||||
"lib/mih_components/mih_package_components/assets/images/founder.jpg"),
|
||||
//'https://media.licdn.com/dms/image/D4D03AQGd1-QhjtWWpA/profile-displayphoto-shrink_400_400/0/1671698053061?e=2147483647&v=beta&t=a3dJI5yxs5-KeXjj10LcNCFuC9IOfa8nNn3k_Qyr0CA'),
|
||||
radius: 75,
|
||||
),
|
||||
|
||||
@@ -32,7 +32,8 @@ class _BiometricCheckState extends State<BiometricCheck> {
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
child: Image.asset('images/logo_light.png'),
|
||||
child: Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/logo_light.png'),
|
||||
),
|
||||
),
|
||||
iconSize: 35,
|
||||
|
||||
@@ -244,7 +244,8 @@ class _RegisterState extends State<Register> {
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
child: Image.asset('images/logo_light.png'),
|
||||
child: Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/logo_light.png'),
|
||||
),
|
||||
),
|
||||
iconSize: 35,
|
||||
|
||||
@@ -262,7 +262,8 @@ class _ResetPasswordState extends State<ResetPassword> {
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
child: Image.asset('images/logo_light.png'),
|
||||
child: Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/logo_light.png'),
|
||||
),
|
||||
),
|
||||
iconSize: 35,
|
||||
|
||||
@@ -292,7 +292,8 @@ class _SignInState extends State<SignIn> {
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
child: Image.asset('images/logo_light.png'),
|
||||
child: Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/logo_light.png'),
|
||||
),
|
||||
),
|
||||
iconSize: 35,
|
||||
|
||||
@@ -37,7 +37,8 @@ class _MIHProfileGetterState extends State<MIHProfileGetter> {
|
||||
|
||||
ImageProvider<Object>? isPictureAvailable(String url) {
|
||||
if (url == "") {
|
||||
return const AssetImage('images/i-dont-know-2.png');
|
||||
return const AssetImage(
|
||||
'lib/mih_components/mih_package_components/assets/images/i-dont-know-2.png');
|
||||
} else if (url != "") {
|
||||
return NetworkImage(url);
|
||||
} else {
|
||||
|
||||
@@ -17,43 +17,62 @@ class _MihCardDisplayState extends State<MihCardDisplay> {
|
||||
Widget displayLoyaltyCard() {
|
||||
switch (widget.shopName.toLowerCase()) {
|
||||
case "apple tree":
|
||||
return Image.asset('images/loyalty_cards/apple_tree.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/apple_tree.png');
|
||||
case "best before":
|
||||
return Image.asset('images/loyalty_cards/best_before.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/best_before.png');
|
||||
case "checkers":
|
||||
return Image.asset('images/loyalty_cards/checkers.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/checkers.png');
|
||||
case "clicks":
|
||||
return Image.asset('images/loyalty_cards/Clicks_Club.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/Clicks_Club.png');
|
||||
case "cotton:on":
|
||||
return Image.asset('images/loyalty_cards/cotton_on_perks.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/cotton_on_perks.png');
|
||||
case "dis-chem":
|
||||
return Image.asset('images/loyalty_cards/dischem_benefit.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/dischem_benefit.png');
|
||||
case "pick n pay":
|
||||
return Image.asset('images/loyalty_cards/pnp_smart.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/pnp_smart.png');
|
||||
case "shoprite":
|
||||
return Image.asset('images/loyalty_cards/shoprite.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/shoprite.png');
|
||||
case "spar":
|
||||
return Image.asset('images/loyalty_cards/spar_rewards.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/spar_rewards.png');
|
||||
case "woolworths":
|
||||
return Image.asset('images/loyalty_cards/wrewards.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/wrewards.png');
|
||||
case "makro":
|
||||
return Image.asset('images/loyalty_cards/makro.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/makro.png');
|
||||
case "fresh stop":
|
||||
return Image.asset('images/loyalty_cards/fresh_stop.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/fresh_stop.png');
|
||||
case "panarottis":
|
||||
return Image.asset('images/loyalty_cards/panarottis.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/panarottis.png');
|
||||
case "shell":
|
||||
return Image.asset('images/loyalty_cards/Shell.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/Shell.png');
|
||||
case "edgars":
|
||||
return Image.asset('images/loyalty_cards/edgars.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/edgars.png');
|
||||
case "jet":
|
||||
return Image.asset('images/loyalty_cards/jet.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/jet.png');
|
||||
case "spur":
|
||||
return Image.asset('images/loyalty_cards/spur.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/spur.png');
|
||||
case "infinity":
|
||||
return Image.asset('images/loyalty_cards/infinity.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/infinity.png');
|
||||
case "eskom":
|
||||
return Image.asset('images/loyalty_cards/eskom.png');
|
||||
return Image.asset(
|
||||
'lib/mih_components/mih_package_components/assets/images/loyalty_cards/eskom.png');
|
||||
default:
|
||||
return const Placeholder();
|
||||
}
|
||||
|
||||
@@ -161,11 +161,11 @@ class MihTheme {
|
||||
AssetImage logoFrame() {
|
||||
if (mode == "Dark") {
|
||||
return const AssetImage(
|
||||
'images/frame_dark.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/frame_dark.png',
|
||||
);
|
||||
} else {
|
||||
return const AssetImage(
|
||||
'images/frame_light.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/frame_light.png',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -173,11 +173,11 @@ class MihTheme {
|
||||
AssetImage altLogoFrame() {
|
||||
if (mode == "Light") {
|
||||
return const AssetImage(
|
||||
'images/frame_dark.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/frame_dark.png',
|
||||
);
|
||||
} else {
|
||||
return const AssetImage(
|
||||
'images/frame_light.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/frame_light.png',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -185,11 +185,11 @@ class MihTheme {
|
||||
AssetImage logoImage() {
|
||||
if (mode == "Dark") {
|
||||
return const AssetImage(
|
||||
'images/logo_dark.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/logo_dark.png',
|
||||
);
|
||||
} else {
|
||||
return const AssetImage(
|
||||
'images/logo_light.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/logo_light.png',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -197,11 +197,11 @@ class MihTheme {
|
||||
AssetImage altLogoImage() {
|
||||
if (mode == "Light") {
|
||||
return const AssetImage(
|
||||
'images/logo_dark.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/logo_dark.png',
|
||||
);
|
||||
} else {
|
||||
return const AssetImage(
|
||||
'images/logo_light.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/logo_light.png',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -209,11 +209,11 @@ class MihTheme {
|
||||
AssetImage loadingImage() {
|
||||
if (mode == "Dark") {
|
||||
loading = const AssetImage(
|
||||
'images/loading_light.gif',
|
||||
'lib/mih_components/mih_package_components/assets/images/loading_light.gif',
|
||||
);
|
||||
} else {
|
||||
loading = const AssetImage(
|
||||
'images/loading_dark.gif',
|
||||
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif',
|
||||
);
|
||||
}
|
||||
return loading;
|
||||
@@ -222,11 +222,11 @@ class MihTheme {
|
||||
AssetImage altLoadingImage() {
|
||||
if (mode == "Dark") {
|
||||
loading = const AssetImage(
|
||||
'images/loading_dark.gif',
|
||||
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif',
|
||||
);
|
||||
} else {
|
||||
loading = const AssetImage(
|
||||
'images/loading_light.gif',
|
||||
'lib/mih_components/mih_package_components/assets/images/loading_light.gif',
|
||||
);
|
||||
}
|
||||
return loading;
|
||||
@@ -234,18 +234,22 @@ class MihTheme {
|
||||
|
||||
String loadingImageLocation() {
|
||||
if (mode == "Dark") {
|
||||
loadingAssetText = 'images/loading_light.gif';
|
||||
loadingAssetText =
|
||||
'lib/mih_components/mih_package_components/assets/images/loading_light.gif';
|
||||
} else {
|
||||
loadingAssetText = 'images/loading_dark.gif';
|
||||
loadingAssetText =
|
||||
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif';
|
||||
}
|
||||
return loadingAssetText;
|
||||
}
|
||||
|
||||
String altLoadingImageLocation() {
|
||||
if (mode == "Dark") {
|
||||
loadingAssetText = 'images/loading_dark.gif';
|
||||
loadingAssetText =
|
||||
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif';
|
||||
} else {
|
||||
loadingAssetText = 'images/loading_light.gif';
|
||||
loadingAssetText =
|
||||
'lib/mih_components/mih_package_components/assets/images/loading_light.gif';
|
||||
}
|
||||
return loadingAssetText;
|
||||
}
|
||||
@@ -253,11 +257,11 @@ class MihTheme {
|
||||
AssetImage aiLogoImage() {
|
||||
if (mode == "Dark") {
|
||||
return const AssetImage(
|
||||
'images/mzansi_ai-dark.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/mzansi_ai-dark.png',
|
||||
);
|
||||
} else {
|
||||
return const AssetImage(
|
||||
'images/mzansi_ai-light.png',
|
||||
'lib/mih_components/mih_package_components/assets/images/mzansi_ai-light.png',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,10 +101,10 @@ flutter:
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
assets:
|
||||
- images/
|
||||
- images/loyalty_cards/
|
||||
- images/app_icon/
|
||||
- images/splash_screen/
|
||||
- lib/mih_components/mih_package_components/assets/images/
|
||||
- lib/mih_components/mih_package_components/assets/images/loyalty_cards/
|
||||
- lib/mih_components/mih_package_components/assets/images/app_icon/
|
||||
- lib/mih_components/mih_package_components/assets/images/splash_screen/
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
@@ -156,12 +156,12 @@ flutter_native_splash:
|
||||
|
||||
# The image parameter allows you to specify an image used in the splash screen. It must be a
|
||||
# png file and should be sized for 4x pixel density.
|
||||
image: images/logo_light.png
|
||||
image: lib/mih_components/mih_package_components/assets/images/logo_light.png
|
||||
|
||||
# The branding property allows you to specify an image used as branding in the splash screen.
|
||||
# It must be a png file. It is supported for Android, iOS and the Web. For Android 12,
|
||||
# see the Android 12 section below.
|
||||
branding: images/branding_text.png
|
||||
branding: lib/mih_components/mih_package_components/assets/images/branding_text.png
|
||||
|
||||
# To position the branding image at the bottom of the screen you can use bottom, bottomRight,
|
||||
# and bottomLeft. The default values is bottom if not specified or specified something else.
|
||||
@@ -191,7 +191,7 @@ flutter_native_splash:
|
||||
# 640 pixels in diameter.
|
||||
# App icon without an icon background: This should be 1152×1152 pixels, and fit within a circle
|
||||
# 768 pixels in diameter.
|
||||
image: images/splash_screen/splash_screen_icon.png
|
||||
image: lib/mih_components/mih_package_components/assets/images/splash_screen/splash_screen_icon.png
|
||||
|
||||
# Splash screen background color.
|
||||
color: "#3A4454"
|
||||
@@ -200,7 +200,7 @@ flutter_native_splash:
|
||||
#icon_background_color: "#111111"
|
||||
|
||||
# The branding property allows you to specify an image used as branding in the splash screen.
|
||||
branding: images/branding_text.png
|
||||
branding: lib/mih_components/mih_package_components/assets/images/branding_text.png
|
||||
|
||||
# The image_dark, color_dark, icon_background_color_dark, and branding_dark set values that
|
||||
# apply when the device is in dark mode. If they are not specified, the app will use the
|
||||
|
||||