saveMetadatas method

  1. @override
Future<void> saveMetadatas(
  1. List<Metadata> metadatas
)
override

Implementation

@override
Future<void> saveMetadatas(List<Metadata> metadatas) async {
  final startTime = DateTime.now();
  isar_ds.isar.write((isar) {
    isar.dbMetadatas.putAll(metadatas
        .map((metadata) => DbMetadata.fromMetadata(metadata))
        .toList());
  });
  final endTime = DateTime.now();
  final duration = endTime.difference(startTime);
  Logger.log.t(
      "SAVED ${metadatas.length} UserMetadatas took ${duration.inMilliseconds} ms");
}