summaryrefslogtreecommitdiffstats
path: root/lib/data/data_providers/units_notifier.dart
blob: f7c25aab71a48e3b28bd3fb1e481c6cf6f2e1f66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
  }
}