fetchLauncherName function

String fetchLauncherName(
  1. Context context
)

Implementation

String fetchLauncherName(Context context) {
  final yamlKeyName = context.yamlKeyName;

  final Map yamlData = getYamlKeyData(context);
  final String? launcherName = yamlData["name"];

  if (launcherName == null) {
    throw Exception("You must set the launcher name under the '${yamlKeyName}' section of your pubspec.yaml file.");
  }

  return launcherName as String;
}