webcrypto.dart
webcrypto.dart copied to clipboard
Consider removing `KeyPair` class in favor of a record `typedef KeyPair<T,S> = ({T privateKey, S publicKey});`
We could do:
typedef KeyPair<T,S> = ({T privateKey, S publicKey});
Instead of having a KeyPair class, it's not like we need the class for anything, all it does is create a type that doesn't have to exist.
It would be a cleaner API t use a record.
Given that there is no public constructor for KeyPair and the fact that it is final; I'm not even sure it's really a breaking change.
Making this change is probably easy. But I think we should land it along with a breaking version bump, so 0.5.x -> 0.6.0 or something like that.