Browse Source

settings: Add reset method

pull/48/head
jld3103 2 years ago
parent
commit
a5e56fa92f
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 4
      packages/settings/lib/src/options/option.dart

4
packages/settings/lib/src/options/option.dart

@ -34,6 +34,10 @@ abstract class Option<T> {
return stream.value ?? defaultValue.value;
}
Future reset() async {
await set(defaultValue.value);
}
void dispose() {
stream.close();
enabled.close();

Loading…
Cancel
Save