getContent method

Future<String?> getContent()
inherited

Returns the content after resolve it.

Implementation

Future<String?> getContent() async {
  if (hasContent) return _content;

  if (resource == null) return null;

  try {
    _readFuture = resource!.readAsString();
    var c = await _readFuture;
    _onLoad(c, false);
    return c;
  } catch (e) {
    _onLoad(null, true);
    return null;
  }
}