FirebaseOptions.fromMap constructor Null safety

FirebaseOptions.fromMap(
  1. Map map
)

Named constructor to create FirebaseOptions from a Map.

This constructor is used when platforms cannot directly return a FirebaseOptions instance, for example when data is sent back from a MethodChannel.

Implementation

FirebaseOptions.fromMap(Map<dynamic, dynamic> map)
    : assert(map['apiKey'] != null, "'apiKey' cannot be null."),
      assert(map['appId'] != null, "'appId' cannot be null."),
      assert(map['messagingSenderId'] != null,
          "'messagingSenderId' cannot be null."),
      assert(map['projectId'] != null, "'projectId' cannot be null."),
      apiKey = map['apiKey'],
      appId = map['appId'],
      messagingSenderId = map['messagingSenderId'],
      projectId = map['projectId'],
      authDomain = map['authDomain'],
      databaseURL = map['databaseURL'],
      storageBucket = map['storageBucket'],
      measurementId = map['measurementId'],
      trackingId = map['trackingId'],
      deepLinkURLScheme = map['deepLinkURLScheme'],
      androidClientId = map['androidClientId'],
      iosClientId = map['iosClientId'],
      iosBundleId = map['iosBundleId'],
      appGroupId = map['appGroupId'];