createSplash function

Future createSplash (
  1. String imagePath,
  2. String color,
  3. bool fill,
  4. bool androidDisableFullscreen
)

Create Android splash screen

Implementation

createSplash(String imagePath, String color, bool fill,
    bool androidDisableFullscreen) async {
  if (imagePath.isNotEmpty) {
    await _applyImage(imagePath);
  }

  await _applyLaunchBackgroundXml(imagePath, fill);

  // _applyColor will update launch_background.xml which may be created in _applyLaunchBackgroundXml
  // that's why we need to await _applyLaunchBackgroundXml()
  await _applyColor(color);

  if (!androidDisableFullscreen) {
    await _applyStylesXml();
  }

  await _applyMainActivityUpdate(_generatePrimaryColorDarkFromColor(color));
}