AGConnectCloudDBZoneSnapshot.fromMap constructor

AGConnectCloudDBZoneSnapshot.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory AGConnectCloudDBZoneSnapshot.fromMap(Map<String, dynamic> map) {
  if (map == null) return null;

  return AGConnectCloudDBZoneSnapshot(
    isFromCloud: map['isFromCloud'] == null ? null : map['isFromCloud'],
    hasPendingWrites: map['hasPendingWrites'] == null ? null : map['hasPendingWrites'],
    snapshotObjects: map['snapshotObjects'] == null
        ? const <Map<String, dynamic>>[]
        : (map['snapshotObjects'] as List<dynamic>).map(
            (dynamic i) {
              return Map<String, dynamic>.from(i as Map<dynamic, dynamic>);
            },
          ).toList(),
    upsertedObjects: map['upsertedObjects'] == null
        ? const <Map<String, dynamic>>[]
        : (map['upsertedObjects'] as List<dynamic>).map(
            (dynamic i) {
              return Map<String, dynamic>.from(i as Map<dynamic, dynamic>);
            },
          ).toList(),
    deletedObjects: map['deletedObjects'] == null
        ? const <Map<String, dynamic>>[]
        : (map['deletedObjects'] as List<dynamic>).map(
            (dynamic i) {
              return Map<String, dynamic>.from(i as Map<dynamic, dynamic>);
            },
          ).toList(),
  );
}