fileExtension property

  1. @override
String get fileExtension
override

Used to save the file on the storage, includes a dot. For example '.jpeg'

Implementation

@override
String get fileExtension {
  var fileExtension = '';
  final contentTypeHeader = _header(HttpHeaders.contentTypeHeader);
  if (contentTypeHeader != null) {
    final contentType = ContentType.parse(contentTypeHeader);
    fileExtension = contentType.fileExtension;
  }
  return fileExtension;
}