diff options
Diffstat (limited to 'lib/data/data_providers/units_notifier.dart')
-rw-r--r-- | lib/data/data_providers/units_notifier.dart | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/data/data_providers/units_notifier.dart b/lib/data/data_providers/units_notifier.dart new file mode 100644 index 0000000..f7c25aa --- /dev/null +++ b/lib/data/data_providers/units_notifier.dart @@ -0,0 +1,13 @@ +import '../../export.dart'; + +class UnitsNotifier extends StateNotifier<Units> { + UnitsNotifier(super.state); + + void setDistanceUnit(DistanceUnit unit) { + state = state.copyWith(distanceUnit: unit); + } + + void setTemperatureUnit(TemperatureUnit unit) { + state = state.copyWith(temperatureUnit: unit); + } +} |