new project stable version

This commit is contained in:
2026-05-10 19:11:31 +03:00
commit 3616f84556
391 changed files with 23857 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
sealed class ActiveRideEvent {}
class LoadScooterOrder extends ActiveRideEvent {
final int orderId;
LoadScooterOrder(this.orderId);
}
class PauseRide extends ActiveRideEvent {
final int orderId;
PauseRide(this.orderId);
}
class ResumeRide extends ActiveRideEvent {
final int orderId;
ResumeRide(this.orderId);
}
class FinishRide extends ActiveRideEvent {
final int orderId;
FinishRide(this.orderId);
}
class SyncScooterOrder extends ActiveRideEvent {
final int orderId;
SyncScooterOrder(this.orderId);
}

View File

@@ -0,0 +1,27 @@
abstract class AddCardEvent {}
class AddCardSubmitted extends AddCardEvent {}
class CardNumberChanged extends AddCardEvent {
final String cardNumber;
CardNumberChanged(this.cardNumber);
}
class ExpiryDateChanged extends AddCardEvent {
final String expiryDate;
ExpiryDateChanged(this.expiryDate);
}
class CvvChanged extends AddCardEvent {
final String cvv;
CvvChanged(this.cvv);
}
class CardHolderChanged extends AddCardEvent {
final String cardHolder;
CardHolderChanged(this.cardHolder);
}

View File

@@ -0,0 +1,23 @@
abstract class PhoneAuthEvent {}
class PhoneAuthStarted extends PhoneAuthEvent {}
class PhoneChanged extends PhoneAuthEvent {
final String phone;
PhoneChanged(this.phone);
}
class IsAdultChanged extends PhoneAuthEvent {
final bool isAdult;
IsAdultChanged(this.isAdult);
}
class PrivacyAcceptedChanged extends PhoneAuthEvent {
final bool accepted;
PrivacyAcceptedChanged(this.accepted);
}
class SubmitPhonePressed extends PhoneAuthEvent {}

View File

@@ -0,0 +1,3 @@
sealed class CurrentRidesEvent {}
class LoadClientOrders extends CurrentRidesEvent {}

View File

@@ -0,0 +1,13 @@
import '../../domain/entities/user_profile.dart';
abstract class EditProfileEvent {}
class EditProfileStarted extends EditProfileEvent {}
class EditProfileSubmitted extends EditProfileEvent {
final UserProfile profile;
EditProfileSubmitted(this.profile);
}

View File

@@ -0,0 +1,33 @@
import '../../domain/entities/client_notification.dart';
import '../../domain/entities/point.dart';
import '../../domain/entities/scooter.dart';
import '../../domain/entities/zone.dart';
abstract class ScooterEvent {}
class CheckUser extends ScooterEvent {}
class FetchScooters extends ScooterEvent {
final List<double> area;
final List<double> areaScooters;
FetchScooters(this.area, this.areaScooters);
}
class UpdateMap extends ScooterEvent {}
class FetchProfileData extends ScooterEvent {}
class LogoutPressed extends ScooterEvent {}
class UpdateUserLocation extends ScooterEvent {
final double latitude;
final double longitude;
UpdateUserLocation(this.latitude, this.longitude);
}
class NotificationReceived extends ScooterEvent {
final ClientNotification notification;
NotificationReceived(this.notification);
}

View File

@@ -0,0 +1,33 @@
sealed class MapSettingsModalEvent {}
class AllGeomarksToggled extends MapSettingsModalEvent {
final bool value;
AllGeomarksToggled(this.value);
}
class AllGeozonesToggled extends MapSettingsModalEvent {
final bool value;
AllGeozonesToggled(this.value);
}
class RestrictedDrivingZonesToggled extends MapSettingsModalEvent {
final bool value;
RestrictedDrivingZonesToggled(this.value);
}
class RestrictedParkingZonesToggled extends MapSettingsModalEvent {
final bool value;
RestrictedParkingZonesToggled(this.value);
}
class ParkingZonesToggled extends MapSettingsModalEvent {
final bool value;
ParkingZonesToggled(this.value);
}
class ApllyButtonClick extends MapSettingsModalEvent {}
class MapSettingsModalStarted extends MapSettingsModalEvent {}

View File

@@ -0,0 +1,7 @@
abstract class NewsEvent {
const NewsEvent();
}
class NewsFetchRequested extends NewsEvent {
const NewsFetchRequested();
}

View File

@@ -0,0 +1,29 @@
import '../../domain/entities/payment_card.dart';
sealed class PaymentConfirmEvent {}
class PaymentConfirmStarted extends PaymentConfirmEvent {
final int orderId;
PaymentConfirmStarted(this.orderId);
}
class PaymentCardChanged extends PaymentConfirmEvent {
final PaymentCard card;
PaymentCardChanged(this.card);
}
class SelectBalancePressed extends PaymentConfirmEvent {}
class PayRide extends PaymentConfirmEvent {
final int orderId;
final int? cardId;
final bool isBalance;
final List<int> photoIds;
PayRide({
required this.orderId,
required this.cardId,
required this.isBalance,
required this.photoIds,
});
}

View File

@@ -0,0 +1,3 @@
sealed class PaymentMethodSheetEvent {}
class PaymentMethodSheetStarted extends PaymentMethodSheetEvent {}

View File

@@ -0,0 +1,15 @@
sealed class PaymentMethodsEvent {}
class PaymentMethodsStarted extends PaymentMethodsEvent {}
class PaymentMethodsDeleteCard extends PaymentMethodsEvent {
final int cardId;
PaymentMethodsDeleteCard(this.cardId);
}
class PaymentMethodsSetMainCard extends PaymentMethodsEvent {
final int cardId;
PaymentMethodsSetMainCard(this.cardId);
}

View File

@@ -0,0 +1,15 @@
abstract class PinEvent {}
class PinScreenStarted extends PinEvent {}
class PinDigitChanged extends PinEvent {
final String pin;
PinDigitChanged(this.pin);
}
class PinSubmitted extends PinEvent {
final String pin;
PinSubmitted(this.pin);
}

View File

@@ -0,0 +1,15 @@
import 'dart:io';
import '../../domain/entities/user_profile.dart';
abstract class ProfileEvent {}
class ProfileStarted extends ProfileEvent {}
class ProfileUpdated extends ProfileEvent {}
class ProfilePhotoUpdated extends ProfileEvent{
final File imageFile;
ProfilePhotoUpdated(this.imageFile);
}

View File

@@ -0,0 +1,13 @@
sealed class ReservedRideEvent {}
class StartRide extends ReservedRideEvent {
final int orderId;
StartRide(this.orderId);
}
class CancelRide extends ReservedRideEvent {
final int orderId;
CancelRide(this.orderId);
}

View File

@@ -0,0 +1,7 @@
abstract class RouteEvent {}
class FetchRouteEvent extends RouteEvent {
final int orderId;
FetchRouteEvent(this.orderId);
}

View File

@@ -0,0 +1,11 @@
abstract class ScooterCodeEvent {}
class ScooterCodeChanged extends ScooterCodeEvent {
final String code;
ScooterCodeChanged(this.code);
}
class ScooterCodeSubmitted extends ScooterCodeEvent {
final String code;
ScooterCodeSubmitted(this.code);
}

View File

@@ -0,0 +1,6 @@
sealed class ScooterDetailEvent {}
class LoadScooterDetails extends ScooterDetailEvent {
final int scooterId;
LoadScooterDetails(this.scooterId);
}

View File

@@ -0,0 +1,13 @@
import '../../domain/entities/scooter.dart';
sealed class ScooterDetailModalEvent {}
class ScooterDetailModalStarted extends ScooterDetailModalEvent {
final List<Scooter> scooters;
final double userLatitude;
final double userLongitude;
ScooterDetailModalStarted(this.scooters, this.userLatitude, this.userLongitude);
}

View File

@@ -0,0 +1,13 @@
abstract class SendPhotoEvent {}
class PhotoSelected extends SendPhotoEvent {
final List<String> imagePaths;
PhotoSelected(this.imagePaths);
}
class PhotoUploadSubmitted extends SendPhotoEvent {
final int orderId;
PhotoUploadSubmitted(this.orderId);
}

View File

@@ -0,0 +1,15 @@
import 'package:equatable/equatable.dart';
abstract class SplashEvent extends Equatable {
const SplashEvent();
@override
List<Object> get props => [];
}
// Событие, которое будет отправляться со SplashScreen
class AuthCheckRequested extends SplashEvent {}
class AuthStarted extends SplashEvent {}
class PinVerificationSuccess extends SplashEvent {}

View File

@@ -0,0 +1,20 @@
import '../../domain/entities/subscription_period.dart';
abstract class SubscriptionDetailsEvent {}
class LoadDetailsEvent extends SubscriptionDetailsEvent {
final int subscriptionId;
LoadDetailsEvent(this.subscriptionId);
}
class SelectPeriodEvent extends SubscriptionDetailsEvent {
final SubscriptionPeriod period;
SelectPeriodEvent(this.period);
}
class ToggleAgreementEvent extends SubscriptionDetailsEvent {
final bool value;
ToggleAgreementEvent(this.value);
}
class ActivateSubscriptionPressed extends SubscriptionDetailsEvent {}

View File

@@ -0,0 +1,5 @@
// subscription_event.dart
abstract class SubscriptionEvent {}
class LoadSubscriptionsEvent extends SubscriptionEvent {}

View File

@@ -0,0 +1,31 @@
import 'package:be_happy/domain/entities/payment_card.dart';
sealed class TariffSheetEvent {}
class TariffSheetStarted extends TariffSheetEvent {
final int scooterId;
TariffSheetStarted(this.scooterId);
}
class PaymentCardChanged extends TariffSheetEvent {
final PaymentCard card;
PaymentCardChanged(this.card);
}
class SelectBalancePressed extends TariffSheetEvent {}
class BookScooterPressed extends TariffSheetEvent {
final int scooterId;
final int planId;
final int? subscriptionId;
final int? cardId;
final bool isBalance;
final bool isInsurance;
BookScooterPressed(this.scooterId, this.planId, this.subscriptionId,
this.cardId, this.isBalance, this.isInsurance);
}

View File

@@ -0,0 +1,23 @@
import 'package:be_happy/domain/entities/certificate.dart';
import 'package:be_happy/domain/entities/payment_card.dart';
import '../../domain/entities/top_up_tariff.dart';
abstract class TopUpEvent {}
class LoadTopUpData extends TopUpEvent {}
class SelectCertificate extends TopUpEvent {
final Certificate certificate;
SelectCertificate(this.certificate);
}
class SelectCard extends TopUpEvent {
final PaymentCard card;
SelectCard(this.card);
}
class ToggleAgreement extends TopUpEvent {
final bool value;
ToggleAgreement(this.value);
}

View File

@@ -0,0 +1,18 @@
abstract class VerifyCodeEvent {}
class VerifyCodeStarted extends VerifyCodeEvent {
final String phoneNumber;
final String tempToken;
VerifyCodeStarted({required this.phoneNumber, required this.tempToken});
}
class CodeChanged extends VerifyCodeEvent {
final String code;
CodeChanged(this.code);
}
class ResendCodePressed extends VerifyCodeEvent {}
class VerifyCodeSubmitted extends VerifyCodeEvent {}