fromMap static method

PigeonOptions fromMap(
  1. Map<String, Object> map
)

Creates a PigeonOptions from a Map representation where: x = PigeonOptions.fromMap(x.toMap()).

Implementation

static PigeonOptions fromMap(Map<String, Object> map) {
  return PigeonOptions(
    input: map['input'] as String?,
    dartOut: map['dartOut'] as String?,
    dartTestOut: map['dartTestOut'] as String?,
    objcHeaderOut: map['objcHeaderOut'] as String?,
    objcSourceOut: map['objcSourceOut'] as String?,
    objcOptions: map.containsKey('objcOptions')
        ? ObjcOptions.fromMap(map['objcOptions']! as Map<String, Object>)
        : null,
    javaOut: map['javaOut'] as String?,
    javaOptions: map.containsKey('javaOptions')
        ? JavaOptions.fromMap(map['javaOptions']! as Map<String, Object>)
        : null,
    swiftOut: map['swiftOut'] as String?,
    swiftOptions: map.containsKey('swiftOptions')
        ? SwiftOptions.fromList(map['swiftOptions']! as Map<String, Object>)
        : null,
    kotlinOut: map['kotlinOut'] as String?,
    kotlinOptions: map.containsKey('kotlinOptions')
        ? KotlinOptions.fromMap(map['kotlinOptions']! as Map<String, Object>)
        : null,
    cppHeaderOut: map['cppHeaderOut'] as String?,
    cppSourceOut: map['cppSourceOut'] as String?,
    cppOptions: map.containsKey('cppOptions')
        ? CppOptions.fromMap(map['cppOptions']! as Map<String, Object>)
        : null,
    dartOptions: map.containsKey('dartOptions')
        ? DartOptions.fromMap(map['dartOptions']! as Map<String, Object>)
        : null,
    copyrightHeader: map['copyrightHeader'] as String?,
    oneLanguage: map['oneLanguage'] as bool?,
    astOut: map['astOut'] as String?,
    debugGenerators: map['debugGenerators'] as bool?,
    basePath: map['basePath'] as String?,
    dartPackageName: map['dartPackageName'] as String?,
  );
}