aboutsummaryrefslogtreecommitdiff
path: root/lib/view/src/source/state.dart
blob: 9adc287d1e905da460bcfbacafc19dd359382d63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import 'package:aves/l10n/l10n.dart';
import 'package:aves_model/aves_model.dart';

extension ExtraSourceStateView on SourceState {
  String? getName(AppLocalizations l10n) {
    return switch (this) {
      SourceState.loading => l10n.sourceStateLoading,
      SourceState.cataloguing => l10n.sourceStateCataloguing,
      SourceState.locatingCountries => l10n.sourceStateLocatingCountries,
      SourceState.locatingPlaces => l10n.sourceStateLocatingPlaces,
      SourceState.ready => null,
    };
  }
}