tryCreateSplashByConfig function

Future<void> tryCreateSplashByConfig(
  1. Map<String, dynamic> config
)

Function that will be called on supported platforms to create the splash screen based on a config argument.

Implementation

Future<void> tryCreateSplashByConfig(Map<String, dynamic> config) async {
  String jsonFile = config['jsonFile'] ?? '';

  if (!config.containsKey('android') || config['android']) {
    await _createAndroidSplash(
      jsonPath: jsonFile,
    );
    await _createWebSplash(path: jsonFile);
  }
}