SchemaTable.fromJson constructor

SchemaTable.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory SchemaTable.fromJson(Map<String, Object?> json) => SchemaTable(
  name: json['name'] as String,
  schema: json['schema'] as String?,
  type: json['type'] as String?,
  sizeBytes: json['sizeBytes'] as int?,
  comment: json['comment'] as String?,
  engine: json['engine'] as String?,
  fields:
      (json['fields'] as List?)
          ?.map(
            (entry) =>
                SchemaColumn.fromJson((entry as Map).cast<String, Object?>()),
          )
          .toList() ??
      const <SchemaColumn>[],
);