toJson method

Map<String, dynamic>? toJson()

This method is most commonly used to convert FileField to JSON in order to prepare it for caching.

This method should not return a file, only data describing the file.

Implementation

Map<String, dynamic>? toJson() => <String, dynamic>{
      "filename": filename,
      "contentType": contentType,
    };