27 lines
780 B
Dart
27 lines
780 B
Dart
import '../../domain/entities/scooter.dart';
|
|
|
|
abstract class ScooterCodeState {
|
|
final String code;
|
|
final String? error;
|
|
|
|
const ScooterCodeState({this.code = '', this.error});
|
|
}
|
|
|
|
class ScooterCodeInitial extends ScooterCodeState {
|
|
const ScooterCodeInitial({super.code, super.error});
|
|
}
|
|
|
|
class ScooterCodeLoading extends ScooterCodeState {
|
|
const ScooterCodeLoading({super.code});
|
|
}
|
|
|
|
class ScooterCodeSuccess extends ScooterCodeState {
|
|
final Scooter scooter;
|
|
final String address;
|
|
final double distance;
|
|
const ScooterCodeSuccess(this.scooter, {super.code, required this.address, required this.distance});
|
|
}
|
|
|
|
class ScooterCodeFailure extends ScooterCodeState {
|
|
const ScooterCodeFailure(String error, {super.code}) : super(error: error);
|
|
} |