DatabaseDefinitions.fromJson constructor

DatabaseDefinitions.fromJson(
  1. Map<String, dynamic> jsonSerialization
)

Implementation

factory DatabaseDefinitions.fromJson(Map<String, dynamic> jsonSerialization) {
  return DatabaseDefinitions(
    target: (jsonSerialization['target'] as List)
        .map((e) => _i2.TableDefinition.fromJson((e as Map<String, dynamic>)))
        .toList(),
    live: (jsonSerialization['live'] as List)
        .map((e) => _i2.TableDefinition.fromJson((e as Map<String, dynamic>)))
        .toList(),
    installedMigrations: (jsonSerialization['installedMigrations'] as List)
        .map((e) => _i3.DatabaseMigrationVersion.fromJson(
            (e as Map<String, dynamic>)))
        .toList(),
    latestAvailableMigrations:
        (jsonSerialization['latestAvailableMigrations'] as List)
            .map((e) => _i3.DatabaseMigrationVersion.fromJson(
                (e as Map<String, dynamic>)))
            .toList(),
  );
}