close method
Implementation
@override
Future<void> close() {
final result = _pending.then((_) async {
if (_closed) return;
_closed = true;
try {
if (_lockPath != null) await _file.unlock(0x40000000, 0x40000200);
} finally {
try {
await _file.close();
} finally {
if (_lockPath != null) _leases.remove(_lockPath);
}
}
});
_pending = result.then<void>((_) {}, onError: (Object _, StackTrace __) {});
return result;
}