seek method
Updates the file cursor offset to the position
(in bytes) specified. The byte position starts from the top
(beginning) of the file and must be positive.
Throws a NotAllowedError if PermissionState is not granted.
Implementation
Future<void> seek(int position) {
assert(position >= 0, "The byte position must be positive.");
try {
return promiseToFuture(callMethod(this, "seek", [position]));
} catch (error) {
if (jsIsNativeError(error, "NotAllowedError")) {
throw NotAllowedError();
} else {
rethrow;
}
}
}