createBackgroundImages function

void createBackgroundImages({
  1. required String? backgroundImage,
  2. required String? darkBackgroundImage,
})

Implementation

void createBackgroundImages({
  required String? backgroundImage,
  required String? darkBackgroundImage,
}) {
  print('[Web] Creating background images');

  final bgExtension =
      (backgroundImage?.endsWith('.gif') ?? false) ? 'gif' : 'png';
  _createBackgroundImage(
    backgroundImage: backgroundImage,
    fileName: "light-background.$bgExtension",
  );

  final darkBgExtension =
      (darkBackgroundImage?.endsWith('.gif') ?? false) ? 'gif' : 'png';
  _createBackgroundImage(
    backgroundImage: darkBackgroundImage,
    fileName: "dark-background.$darkBgExtension",
  );
}