buildLauncherIconYaml static method

String buildLauncherIconYaml(
  1. RebrandConfig config,
  2. String imagePath
)

Implementation

static String buildLauncherIconYaml(RebrandConfig config, String imagePath) {
  final lines = <String>['flutter_launcher_icons:'];

  _addYamlLine(
    lines,
    'android',
    config.enableAndroid ? 'launcher_icon' : false,
    indent: 2,
  );
  _addYamlLine(lines, 'ios', config.enableIOS, indent: 2);
  _addYamlLine(lines, 'image_path', imagePath, indent: 2);
  _addYamlLine(lines, 'min_sdk_android', 21, indent: 2);
  _addYamlLine(
    lines,
    'adaptive_icon_background',
    config.splashColor,
    indent: 2,
  );
  _addYamlLine(lines, 'adaptive_icon_foreground', imagePath, indent: 2);

  return '${lines.join('\n')}\n';
}