close method Null safety

Future<void> close()

Implementation

Future<void> close() async {
  if (_file == null) {
    return;
  }
  var fp = _file;
  _file = null;
  _position = 0;
  await fp!.close();
}