ObjectStore.fromJson constructor

ObjectStore.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ObjectStore.fromJson(Map<String, dynamic> json) {
  return ObjectStore(
    name: json['name'] as String,
    keyPath: KeyPath.fromJson(json['keyPath'] as Map<String, dynamic>),
    autoIncrement: json['autoIncrement'] as bool? ?? false,
    indexes: (json['indexes'] as List)
        .map((e) => ObjectStoreIndex.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}