removeSplash function
Remove any splash screen by setting the default white splash
Implementation
void removeSplash({
required String? path,
required String? flavor,
}) {
print("Restoring Flutter's default native splash screen...");
final config = getConfig(configFile: path, flavor: flavor);
final removeConfig = <String, dynamic>{
_Parameter.color: '#ffffff',
_Parameter.darkColor: '#000000'
};
if (config.containsKey(_Parameter.android)) {
removeConfig[_Parameter.android] = config[_Parameter.android];
}
if (config.containsKey(_Parameter.ios)) {
removeConfig[_Parameter.ios] = config[_Parameter.ios];
}
if (config.containsKey(_Parameter.web)) {
removeConfig[_Parameter.web] = config[_Parameter.web];
}
if (config.containsKey(_Parameter.harmony)) {
removeConfig[_Parameter.harmony] = config[_Parameter.harmony];
}
/// Checks if the image that was specified in the config file does exist.
/// If not the developer will receive an error message and the process will exit.
if (config.containsKey(_Parameter.plistFiles)) {
removeConfig[_Parameter.plistFiles] = config[_Parameter.plistFiles];
}
createSplashByConfig(removeConfig);
}