|
|
@ -36,8 +36,7 @@ import '../domain/use_cases/booking/booking_share_use_case.dart';
|
|
|
|
List<SingleChildWidget> _sharedProviders = [
|
|
|
|
List<SingleChildWidget> _sharedProviders = [
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
lazy: true,
|
|
|
|
lazy: true,
|
|
|
|
create:
|
|
|
|
create: (context) => BookingCreateUseCase(
|
|
|
|
(context) => BookingCreateUseCase(
|
|
|
|
|
|
|
|
destinationRepository: context.read(),
|
|
|
|
destinationRepository: context.read(),
|
|
|
|
activityRepository: context.read(),
|
|
|
|
activityRepository: context.read(),
|
|
|
|
bookingRepository: context.read(),
|
|
|
|
bookingRepository: context.read(),
|
|
|
@ -57,8 +56,7 @@ List<SingleChildWidget> get providersRemote {
|
|
|
|
Provider(create: (context) => ApiClient()),
|
|
|
|
Provider(create: (context) => ApiClient()),
|
|
|
|
Provider(create: (context) => SharedPreferencesService()),
|
|
|
|
Provider(create: (context) => SharedPreferencesService()),
|
|
|
|
ChangeNotifierProvider(
|
|
|
|
ChangeNotifierProvider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
AuthRepositoryRemote(
|
|
|
|
AuthRepositoryRemote(
|
|
|
|
authApiClient: context.read(),
|
|
|
|
authApiClient: context.read(),
|
|
|
|
apiClient: context.read(),
|
|
|
|
apiClient: context.read(),
|
|
|
@ -67,20 +65,17 @@ List<SingleChildWidget> get providersRemote {
|
|
|
|
as AuthRepository,
|
|
|
|
as AuthRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
DestinationRepositoryRemote(apiClient: context.read())
|
|
|
|
DestinationRepositoryRemote(apiClient: context.read())
|
|
|
|
as DestinationRepository,
|
|
|
|
as DestinationRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
ContinentRepositoryRemote(apiClient: context.read())
|
|
|
|
ContinentRepositoryRemote(apiClient: context.read())
|
|
|
|
as ContinentRepository,
|
|
|
|
as ContinentRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
ActivityRepositoryRemote(apiClient: context.read())
|
|
|
|
ActivityRepositoryRemote(apiClient: context.read())
|
|
|
|
as ActivityRepository,
|
|
|
|
as ActivityRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -88,14 +83,12 @@ List<SingleChildWidget> get providersRemote {
|
|
|
|
value: ItineraryConfigRepositoryMemory() as ItineraryConfigRepository,
|
|
|
|
value: ItineraryConfigRepositoryMemory() as ItineraryConfigRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
BookingRepositoryRemote(apiClient: context.read())
|
|
|
|
BookingRepositoryRemote(apiClient: context.read())
|
|
|
|
as BookingRepository,
|
|
|
|
as BookingRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
UserRepositoryRemote(apiClient: context.read()) as UserRepository,
|
|
|
|
UserRepositoryRemote(apiClient: context.read()) as UserRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
..._sharedProviders,
|
|
|
|
..._sharedProviders,
|
|
|
@ -110,26 +103,22 @@ List<SingleChildWidget> get providersLocal {
|
|
|
|
ChangeNotifierProvider.value(value: AuthRepositoryDev() as AuthRepository),
|
|
|
|
ChangeNotifierProvider.value(value: AuthRepositoryDev() as AuthRepository),
|
|
|
|
Provider.value(value: LocalDataService()),
|
|
|
|
Provider.value(value: LocalDataService()),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
DestinationRepositoryLocal(localDataService: context.read())
|
|
|
|
DestinationRepositoryLocal(localDataService: context.read())
|
|
|
|
as DestinationRepository,
|
|
|
|
as DestinationRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
ContinentRepositoryLocal(localDataService: context.read())
|
|
|
|
ContinentRepositoryLocal(localDataService: context.read())
|
|
|
|
as ContinentRepository,
|
|
|
|
as ContinentRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
ActivityRepositoryLocal(localDataService: context.read())
|
|
|
|
ActivityRepositoryLocal(localDataService: context.read())
|
|
|
|
as ActivityRepository,
|
|
|
|
as ActivityRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
BookingRepositoryLocal(localDataService: context.read())
|
|
|
|
BookingRepositoryLocal(localDataService: context.read())
|
|
|
|
as BookingRepository,
|
|
|
|
as BookingRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -137,8 +126,7 @@ List<SingleChildWidget> get providersLocal {
|
|
|
|
value: ItineraryConfigRepositoryMemory() as ItineraryConfigRepository,
|
|
|
|
value: ItineraryConfigRepositoryMemory() as ItineraryConfigRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Provider(
|
|
|
|
Provider(
|
|
|
|
create:
|
|
|
|
create: (context) =>
|
|
|
|
(context) =>
|
|
|
|
|
|
|
|
UserRepositoryLocal(localDataService: context.read())
|
|
|
|
UserRepositoryLocal(localDataService: context.read())
|
|
|
|
as UserRepository,
|
|
|
|
as UserRepository,
|
|
|
|
),
|
|
|
|
),
|
|
|
|