new project stable version
This commit is contained in:
29
lib/presentation/state/reserved_ride_state.dart
Normal file
29
lib/presentation/state/reserved_ride_state.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
enum ReservedRideStatus { initial, loading, success, failure }
|
||||
|
||||
class ReservedRideState {
|
||||
final ReservedRideStatus status;
|
||||
final String? errorMessage;
|
||||
final bool rideStarted;
|
||||
final bool rideCancelled;
|
||||
|
||||
const ReservedRideState({
|
||||
this.status = ReservedRideStatus.initial,
|
||||
this.errorMessage,
|
||||
this.rideStarted = false,
|
||||
this.rideCancelled = false,
|
||||
});
|
||||
|
||||
ReservedRideState copyWith({
|
||||
ReservedRideStatus? status,
|
||||
String? errorMessage,
|
||||
bool? rideStarted,
|
||||
bool? rideCancelled,
|
||||
}) {
|
||||
return ReservedRideState(
|
||||
status: status ?? this.status,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
rideStarted: rideStarted ?? this.rideStarted,
|
||||
rideCancelled: rideCancelled ?? this.rideCancelled,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user