-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unnecesary async
/Future
?
#166
Comments
I think because of the parallel web-support which enforces usage as Future<>. |
You can use this design: abstract interface class Interface {
FutureOr<SecretKey> newSecretKeyFromBytes(List<int> bytes);
}
class ImplementationWeb extends Interface {
@override
Future<SecretKey> newSecretKeyFromBytes(List<int> bytes) =>
throw ('Not implemented');
}
class ImplementationNative extends Interface {
@override
SecretKey newSecretKeyFromBytes(List<int> bytes) => throw ('Not implemented');
} This |
I would have to agree with this. I want to use The above design would go a long way to solving that for those that don't need it. |
The text was updated successfully, but these errors were encountered: