modify method

  1. @override
void modify(
  1. Function func
)
override

Implementation

@override
void modify(Function func) {
  // Apply the modification function to the metadata
  func(_metadata);

  // Save the changes back to the file
  final file = File("${_ref.path}/images/${_metadata.id}.info/metadata.json");
  file.writeAsStringSync(jsonEncode(_metadata.toJson()));
}