expect method
Returns the ok value if Result is Ok.
Throws a Panic if the Result is Err, with the provided message
.
Implementation
@override
@pragma("vm:prefer-inline")
S expect(String message) {
throw Panic("Called `expect` on an `$runtimeType` of `$err`. $message");
}