46 lines
862 B
Dart
46 lines
862 B
Dart
part of 'settings_bloc.dart';
|
|
|
|
@immutable
|
|
abstract class SettingsState extends Equatable {
|
|
const SettingsState();
|
|
|
|
@override
|
|
List<Object> get props => [];
|
|
}
|
|
|
|
// ignore: must_be_immutable
|
|
class SettingsInitial extends SettingsState {
|
|
Locale locale;
|
|
SettingsInitial();
|
|
|
|
setLocale(locale) {
|
|
this.locale = locale;
|
|
}
|
|
|
|
@override
|
|
List<Object> get props => [locale];
|
|
}
|
|
|
|
class SettingsLoading extends SettingsState {
|
|
final Locale locale;
|
|
const SettingsLoading({this.locale});
|
|
|
|
@override
|
|
List<Object> get props => [locale];
|
|
}
|
|
|
|
class SettingsReady extends SettingsState {
|
|
final Locale locale;
|
|
const SettingsReady(this.locale);
|
|
|
|
@override
|
|
List<Object> get props => [locale];
|
|
}
|
|
|
|
class SettingsError extends SettingsState {
|
|
final String message;
|
|
const SettingsError(this.message);
|
|
|
|
@override
|
|
List<Object> get props => [message];
|
|
} |