CacheSummaryRow.fromJson constructor

CacheSummaryRow.fromJson(
  1. Map<String, dynamic> json, {
  2. ValueSerializer? serializer,
})

Implementation

factory CacheSummaryRow.fromJson(Map<String, dynamic> json,
    {ValueSerializer? serializer}) {
  serializer ??= driftRuntimeOptions.defaultSerializer;
  return CacheSummaryRow(
    id: serializer.fromJson<int>(json['id']),
    size: serializer.fromJson<int>(json['size']),
    modified: serializer.fromJson<PreciseDateTime?>(json['modified']),
    maxSize: serializer.fromJson<int?>(json['maxSize']),
  );
}