FetchData.fromString constructor Null safety

FetchData.fromString(
  1. String string,
  2. {String mimeType = 'text/plain'}
)

Use a String as the source of the FetchData The mimeType defaults to text/plain.

Implementation

FetchData.fromString(String string, {String mimeType = 'text/plain'})
    : _string = string,
      _type = _FetchDataType.string,
      _mimeType = mimeType;