canProvide method

bool canProvide(
  1. DataFormat<Object> format
)

Returns true value for data format is possibly available in this reader.

Note that it is possible for getValue to return null even though canProvide returns yes, because in some cases this can not be fully determined from the format string, but only from the data itself.

For example on some platforms file URI and regular URI have same type, so when receiving Formats.fileUri the decoder will have to fetch the value and will return null if URI is not a file uri.

Implementation

bool canProvide(DataFormat format) {
  return getFormats([format]).isNotEmpty;
}