feat: implement core architecture, design system, localization, and trip features for both driver and rider apps.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
enum SettingsStatus { loaded, error }
|
||||
|
||||
class SettingsState extends Equatable {
|
||||
final SettingsStatus status;
|
||||
final ThemeMode themeMode;
|
||||
final Locale locale;
|
||||
|
||||
const SettingsState({
|
||||
this.status = SettingsStatus.loaded,
|
||||
this.themeMode = ThemeMode.system,
|
||||
this.locale = const Locale('ar'),
|
||||
});
|
||||
|
||||
SettingsState copyWith({
|
||||
SettingsStatus? status,
|
||||
ThemeMode? themeMode,
|
||||
Locale? locale,
|
||||
}) {
|
||||
return SettingsState(
|
||||
status: status ?? this.status,
|
||||
themeMode: themeMode ?? this.themeMode,
|
||||
locale: locale ?? this.locale,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [status, themeMode, locale];
|
||||
}
|
||||
Reference in New Issue
Block a user