11import 'package:data/dto/dto.dart' ;
2+
23import 'package:webtrit_phone_tools/src/commands/constants.dart' ;
34import 'package:webtrit_phone_tools/src/extension/extension.dart' ;
45
56class AppConfigFactory {
67 static Map <String , dynamic > createBuildCacheConfig (ApplicationDTO application, String keystorePath) {
7- if (application.androidVersion? .buildName == null || application.iosVersion? .buildName == null ) {
8+ if (application.androidVersion? .buildName == null ||
9+ application.androidVersion? .buildNumber == null ||
10+ application.iosVersion? .buildName == null ||
11+ application.iosVersion? .buildNumber == null ) {
812 throw Exception ('Android or iOS version build info is missing.' );
913 }
1014
@@ -25,24 +29,25 @@ class AppConfigFactory {
2529 return env;
2630 }
2731
28- static Map <String , String > createLauncherIconsEnv (String backgroundColorHex) {
29- final hexCode = backgroundColorHex.toHex6WithHash ();
32+ static Map <String , String > createLauncherIconsEnv ({
33+ required String launchBackgroundColorHex,
34+ required String splashBackgroundColorHex,
35+ }) {
3036 return {
3137 'LAUNCHER_ICON_IMAGE_ANDROID' : assetLauncherAndroidIconPath,
32- 'ICON_BACKGROUND_COLOR' : hexCode ,
38+ 'ICON_BACKGROUND_COLOR' : splashBackgroundColorHex. toHex6WithHash () ,
3339 'LAUNCHER_ICON_FOREGROUND' : assetLauncherIconAdaptiveForegroundPath,
3440 'LAUNCHER_ICON_IMAGE_IOS' : assetLauncherIosIconPath,
3541 'LAUNCHER_ICON_IMAGE_WEB' : assetLauncherWebIconPath,
36- 'THEME_COLOR' : hexCode ,
42+ 'THEME_COLOR' : launchBackgroundColorHex. toHex6WithHash () ,
3743 };
3844 }
3945
4046 static Map <String , String > createNativeSplashEnv (String backgroundColorHex) {
41- final hexCode = backgroundColorHex.toHex6WithHash ();
4247 return {
43- 'SPLASH_COLOR' : hexCode ,
48+ 'SPLASH_COLOR' : backgroundColorHex. toHex6WithHash () ,
4449 'SPLASH_IMAGE' : assetSplashIconPath,
45- 'ANDROID_12_SPLASH_COLOR' : hexCode ,
50+ 'ANDROID_12_SPLASH_COLOR' : backgroundColorHex. toHex6WithHash () ,
4651 };
4752 }
4853
0 commit comments