mirror of
https://github.com/flutter/samples.git
synced 2025-11-13 00:08:24 +00:00
Flutter 3.29 beta (#2571)
This commit is contained in:
@@ -8,13 +8,7 @@ part 'activity.freezed.dart';
|
||||
|
||||
part 'activity.g.dart';
|
||||
|
||||
enum TimeOfDay {
|
||||
any,
|
||||
morning,
|
||||
afternoon,
|
||||
evening,
|
||||
night,
|
||||
}
|
||||
enum TimeOfDay { any, morning, afternoon, evening, night }
|
||||
|
||||
@freezed
|
||||
class Activity with _$Activity {
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'activity.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
Activity _$ActivityFromJson(Map<String, dynamic> json) {
|
||||
return _Activity.fromJson(json);
|
||||
@@ -66,17 +67,18 @@ abstract class $ActivityCopyWith<$Res> {
|
||||
factory $ActivityCopyWith(Activity value, $Res Function(Activity) then) =
|
||||
_$ActivityCopyWithImpl<$Res, Activity>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String name,
|
||||
String description,
|
||||
String locationName,
|
||||
int duration,
|
||||
TimeOfDay timeOfDay,
|
||||
bool familyFriendly,
|
||||
int price,
|
||||
String destinationRef,
|
||||
String ref,
|
||||
String imageUrl});
|
||||
$Res call({
|
||||
String name,
|
||||
String description,
|
||||
String locationName,
|
||||
int duration,
|
||||
TimeOfDay timeOfDay,
|
||||
bool familyFriendly,
|
||||
int price,
|
||||
String destinationRef,
|
||||
String ref,
|
||||
String imageUrl,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -105,48 +107,61 @@ class _$ActivityCopyWithImpl<$Res, $Val extends Activity>
|
||||
Object? ref = null,
|
||||
Object? imageUrl = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
locationName: null == locationName
|
||||
? _value.locationName
|
||||
: locationName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
duration: null == duration
|
||||
? _value.duration
|
||||
: duration // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
timeOfDay: null == timeOfDay
|
||||
? _value.timeOfDay
|
||||
: timeOfDay // ignore: cast_nullable_to_non_nullable
|
||||
as TimeOfDay,
|
||||
familyFriendly: null == familyFriendly
|
||||
? _value.familyFriendly
|
||||
: familyFriendly // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
price: null == price
|
||||
? _value.price
|
||||
: price // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
destinationRef: null == destinationRef
|
||||
? _value.destinationRef
|
||||
: destinationRef // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ref: null == ref
|
||||
? _value.ref
|
||||
: ref // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
imageUrl: null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
locationName:
|
||||
null == locationName
|
||||
? _value.locationName
|
||||
: locationName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
duration:
|
||||
null == duration
|
||||
? _value.duration
|
||||
: duration // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
timeOfDay:
|
||||
null == timeOfDay
|
||||
? _value.timeOfDay
|
||||
: timeOfDay // ignore: cast_nullable_to_non_nullable
|
||||
as TimeOfDay,
|
||||
familyFriendly:
|
||||
null == familyFriendly
|
||||
? _value.familyFriendly
|
||||
: familyFriendly // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
price:
|
||||
null == price
|
||||
? _value.price
|
||||
: price // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
destinationRef:
|
||||
null == destinationRef
|
||||
? _value.destinationRef
|
||||
: destinationRef // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ref:
|
||||
null == ref
|
||||
? _value.ref
|
||||
: ref // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
imageUrl:
|
||||
null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,21 +169,23 @@ class _$ActivityCopyWithImpl<$Res, $Val extends Activity>
|
||||
abstract class _$$ActivityImplCopyWith<$Res>
|
||||
implements $ActivityCopyWith<$Res> {
|
||||
factory _$$ActivityImplCopyWith(
|
||||
_$ActivityImpl value, $Res Function(_$ActivityImpl) then) =
|
||||
__$$ActivityImplCopyWithImpl<$Res>;
|
||||
_$ActivityImpl value,
|
||||
$Res Function(_$ActivityImpl) then,
|
||||
) = __$$ActivityImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String name,
|
||||
String description,
|
||||
String locationName,
|
||||
int duration,
|
||||
TimeOfDay timeOfDay,
|
||||
bool familyFriendly,
|
||||
int price,
|
||||
String destinationRef,
|
||||
String ref,
|
||||
String imageUrl});
|
||||
$Res call({
|
||||
String name,
|
||||
String description,
|
||||
String locationName,
|
||||
int duration,
|
||||
TimeOfDay timeOfDay,
|
||||
bool familyFriendly,
|
||||
int price,
|
||||
String destinationRef,
|
||||
String ref,
|
||||
String imageUrl,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -176,8 +193,9 @@ class __$$ActivityImplCopyWithImpl<$Res>
|
||||
extends _$ActivityCopyWithImpl<$Res, _$ActivityImpl>
|
||||
implements _$$ActivityImplCopyWith<$Res> {
|
||||
__$$ActivityImplCopyWithImpl(
|
||||
_$ActivityImpl _value, $Res Function(_$ActivityImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$ActivityImpl _value,
|
||||
$Res Function(_$ActivityImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of Activity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -195,65 +213,78 @@ class __$$ActivityImplCopyWithImpl<$Res>
|
||||
Object? ref = null,
|
||||
Object? imageUrl = null,
|
||||
}) {
|
||||
return _then(_$ActivityImpl(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
locationName: null == locationName
|
||||
? _value.locationName
|
||||
: locationName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
duration: null == duration
|
||||
? _value.duration
|
||||
: duration // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
timeOfDay: null == timeOfDay
|
||||
? _value.timeOfDay
|
||||
: timeOfDay // ignore: cast_nullable_to_non_nullable
|
||||
as TimeOfDay,
|
||||
familyFriendly: null == familyFriendly
|
||||
? _value.familyFriendly
|
||||
: familyFriendly // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
price: null == price
|
||||
? _value.price
|
||||
: price // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
destinationRef: null == destinationRef
|
||||
? _value.destinationRef
|
||||
: destinationRef // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ref: null == ref
|
||||
? _value.ref
|
||||
: ref // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
imageUrl: null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
return _then(
|
||||
_$ActivityImpl(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
locationName:
|
||||
null == locationName
|
||||
? _value.locationName
|
||||
: locationName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
duration:
|
||||
null == duration
|
||||
? _value.duration
|
||||
: duration // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
timeOfDay:
|
||||
null == timeOfDay
|
||||
? _value.timeOfDay
|
||||
: timeOfDay // ignore: cast_nullable_to_non_nullable
|
||||
as TimeOfDay,
|
||||
familyFriendly:
|
||||
null == familyFriendly
|
||||
? _value.familyFriendly
|
||||
: familyFriendly // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
price:
|
||||
null == price
|
||||
? _value.price
|
||||
: price // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
destinationRef:
|
||||
null == destinationRef
|
||||
? _value.destinationRef
|
||||
: destinationRef // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ref:
|
||||
null == ref
|
||||
? _value.ref
|
||||
: ref // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
imageUrl:
|
||||
null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ActivityImpl implements _Activity {
|
||||
const _$ActivityImpl(
|
||||
{required this.name,
|
||||
required this.description,
|
||||
required this.locationName,
|
||||
required this.duration,
|
||||
required this.timeOfDay,
|
||||
required this.familyFriendly,
|
||||
required this.price,
|
||||
required this.destinationRef,
|
||||
required this.ref,
|
||||
required this.imageUrl});
|
||||
const _$ActivityImpl({
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.locationName,
|
||||
required this.duration,
|
||||
required this.timeOfDay,
|
||||
required this.familyFriendly,
|
||||
required this.price,
|
||||
required this.destinationRef,
|
||||
required this.ref,
|
||||
required this.imageUrl,
|
||||
});
|
||||
|
||||
factory _$ActivityImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ActivityImplFromJson(json);
|
||||
@@ -331,17 +362,18 @@ class _$ActivityImpl implements _Activity {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
name,
|
||||
description,
|
||||
locationName,
|
||||
duration,
|
||||
timeOfDay,
|
||||
familyFriendly,
|
||||
price,
|
||||
destinationRef,
|
||||
ref,
|
||||
imageUrl);
|
||||
runtimeType,
|
||||
name,
|
||||
description,
|
||||
locationName,
|
||||
duration,
|
||||
timeOfDay,
|
||||
familyFriendly,
|
||||
price,
|
||||
destinationRef,
|
||||
ref,
|
||||
imageUrl,
|
||||
);
|
||||
|
||||
/// Create a copy of Activity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -353,24 +385,23 @@ class _$ActivityImpl implements _Activity {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ActivityImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$ActivityImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Activity implements Activity {
|
||||
const factory _Activity(
|
||||
{required final String name,
|
||||
required final String description,
|
||||
required final String locationName,
|
||||
required final int duration,
|
||||
required final TimeOfDay timeOfDay,
|
||||
required final bool familyFriendly,
|
||||
required final int price,
|
||||
required final String destinationRef,
|
||||
required final String ref,
|
||||
required final String imageUrl}) = _$ActivityImpl;
|
||||
const factory _Activity({
|
||||
required final String name,
|
||||
required final String description,
|
||||
required final String locationName,
|
||||
required final int duration,
|
||||
required final TimeOfDay timeOfDay,
|
||||
required final bool familyFriendly,
|
||||
required final int price,
|
||||
required final String destinationRef,
|
||||
required final String ref,
|
||||
required final String imageUrl,
|
||||
}) = _$ActivityImpl;
|
||||
|
||||
factory _Activity.fromJson(Map<String, dynamic> json) =
|
||||
_$ActivityImpl.fromJson;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'booking.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
Booking _$BookingFromJson(Map<String, dynamic> json) {
|
||||
return _Booking.fromJson(json);
|
||||
@@ -50,12 +51,13 @@ abstract class $BookingCopyWith<$Res> {
|
||||
factory $BookingCopyWith(Booking value, $Res Function(Booking) then) =
|
||||
_$BookingCopyWithImpl<$Res, Booking>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int? id,
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
Destination destination,
|
||||
List<Activity> activity});
|
||||
$Res call({
|
||||
int? id,
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
Destination destination,
|
||||
List<Activity> activity,
|
||||
});
|
||||
|
||||
$DestinationCopyWith<$Res> get destination;
|
||||
}
|
||||
@@ -81,28 +83,36 @@ class _$BookingCopyWithImpl<$Res, $Val extends Booking>
|
||||
Object? destination = null,
|
||||
Object? activity = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
startDate: null == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endDate: null == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
destination: null == destination
|
||||
? _value.destination
|
||||
: destination // ignore: cast_nullable_to_non_nullable
|
||||
as Destination,
|
||||
activity: null == activity
|
||||
? _value.activity
|
||||
: activity // ignore: cast_nullable_to_non_nullable
|
||||
as List<Activity>,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id:
|
||||
freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
startDate:
|
||||
null == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endDate:
|
||||
null == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
destination:
|
||||
null == destination
|
||||
? _value.destination
|
||||
: destination // ignore: cast_nullable_to_non_nullable
|
||||
as Destination,
|
||||
activity:
|
||||
null == activity
|
||||
? _value.activity
|
||||
: activity // ignore: cast_nullable_to_non_nullable
|
||||
as List<Activity>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of Booking
|
||||
@@ -119,16 +129,18 @@ class _$BookingCopyWithImpl<$Res, $Val extends Booking>
|
||||
/// @nodoc
|
||||
abstract class _$$BookingImplCopyWith<$Res> implements $BookingCopyWith<$Res> {
|
||||
factory _$$BookingImplCopyWith(
|
||||
_$BookingImpl value, $Res Function(_$BookingImpl) then) =
|
||||
__$$BookingImplCopyWithImpl<$Res>;
|
||||
_$BookingImpl value,
|
||||
$Res Function(_$BookingImpl) then,
|
||||
) = __$$BookingImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int? id,
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
Destination destination,
|
||||
List<Activity> activity});
|
||||
$Res call({
|
||||
int? id,
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
Destination destination,
|
||||
List<Activity> activity,
|
||||
});
|
||||
|
||||
@override
|
||||
$DestinationCopyWith<$Res> get destination;
|
||||
@@ -139,8 +151,9 @@ class __$$BookingImplCopyWithImpl<$Res>
|
||||
extends _$BookingCopyWithImpl<$Res, _$BookingImpl>
|
||||
implements _$$BookingImplCopyWith<$Res> {
|
||||
__$$BookingImplCopyWithImpl(
|
||||
_$BookingImpl _value, $Res Function(_$BookingImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$BookingImpl _value,
|
||||
$Res Function(_$BookingImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of Booking
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -153,41 +166,48 @@ class __$$BookingImplCopyWithImpl<$Res>
|
||||
Object? destination = null,
|
||||
Object? activity = null,
|
||||
}) {
|
||||
return _then(_$BookingImpl(
|
||||
id: freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
startDate: null == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endDate: null == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
destination: null == destination
|
||||
? _value.destination
|
||||
: destination // ignore: cast_nullable_to_non_nullable
|
||||
as Destination,
|
||||
activity: null == activity
|
||||
? _value._activity
|
||||
: activity // ignore: cast_nullable_to_non_nullable
|
||||
as List<Activity>,
|
||||
));
|
||||
return _then(
|
||||
_$BookingImpl(
|
||||
id:
|
||||
freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
startDate:
|
||||
null == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endDate:
|
||||
null == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
destination:
|
||||
null == destination
|
||||
? _value.destination
|
||||
: destination // ignore: cast_nullable_to_non_nullable
|
||||
as Destination,
|
||||
activity:
|
||||
null == activity
|
||||
? _value._activity
|
||||
: activity // ignore: cast_nullable_to_non_nullable
|
||||
as List<Activity>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$BookingImpl implements _Booking {
|
||||
const _$BookingImpl(
|
||||
{this.id,
|
||||
required this.startDate,
|
||||
required this.endDate,
|
||||
required this.destination,
|
||||
required final List<Activity> activity})
|
||||
: _activity = activity;
|
||||
const _$BookingImpl({
|
||||
this.id,
|
||||
required this.startDate,
|
||||
required this.endDate,
|
||||
required this.destination,
|
||||
required final List<Activity> activity,
|
||||
}) : _activity = activity;
|
||||
|
||||
factory _$BookingImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$BookingImplFromJson(json);
|
||||
@@ -241,8 +261,14 @@ class _$BookingImpl implements _Booking {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, startDate, endDate,
|
||||
destination, const DeepCollectionEquality().hash(_activity));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
startDate,
|
||||
endDate,
|
||||
destination,
|
||||
const DeepCollectionEquality().hash(_activity),
|
||||
);
|
||||
|
||||
/// Create a copy of Booking
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -254,19 +280,18 @@ class _$BookingImpl implements _Booking {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$BookingImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$BookingImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Booking implements Booking {
|
||||
const factory _Booking(
|
||||
{final int? id,
|
||||
required final DateTime startDate,
|
||||
required final DateTime endDate,
|
||||
required final Destination destination,
|
||||
required final List<Activity> activity}) = _$BookingImpl;
|
||||
const factory _Booking({
|
||||
final int? id,
|
||||
required final DateTime startDate,
|
||||
required final DateTime endDate,
|
||||
required final Destination destination,
|
||||
required final List<Activity> activity,
|
||||
}) = _$BookingImpl;
|
||||
|
||||
factory _Booking.fromJson(Map<String, dynamic> json) = _$BookingImpl.fromJson;
|
||||
|
||||
|
||||
@@ -11,11 +11,13 @@ _$BookingImpl _$$BookingImplFromJson(Map<String, dynamic> json) =>
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
startDate: DateTime.parse(json['startDate'] as String),
|
||||
endDate: DateTime.parse(json['endDate'] as String),
|
||||
destination:
|
||||
Destination.fromJson(json['destination'] as Map<String, dynamic>),
|
||||
activity: (json['activity'] as List<dynamic>)
|
||||
.map((e) => Activity.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
destination: Destination.fromJson(
|
||||
json['destination'] as Map<String, dynamic>,
|
||||
),
|
||||
activity:
|
||||
(json['activity'] as List<dynamic>)
|
||||
.map((e) => Activity.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$BookingImplToJson(_$BookingImpl instance) =>
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'booking_summary.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
BookingSummary _$BookingSummaryFromJson(Map<String, dynamic> json) {
|
||||
return _BookingSummary.fromJson(json);
|
||||
@@ -45,8 +46,9 @@ mixin _$BookingSummary {
|
||||
/// @nodoc
|
||||
abstract class $BookingSummaryCopyWith<$Res> {
|
||||
factory $BookingSummaryCopyWith(
|
||||
BookingSummary value, $Res Function(BookingSummary) then) =
|
||||
_$BookingSummaryCopyWithImpl<$Res, BookingSummary>;
|
||||
BookingSummary value,
|
||||
$Res Function(BookingSummary) then,
|
||||
) = _$BookingSummaryCopyWithImpl<$Res, BookingSummary>;
|
||||
@useResult
|
||||
$Res call({int id, String name, DateTime startDate, DateTime endDate});
|
||||
}
|
||||
@@ -71,33 +73,41 @@ class _$BookingSummaryCopyWithImpl<$Res, $Val extends BookingSummary>
|
||||
Object? startDate = null,
|
||||
Object? endDate = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
startDate: null == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endDate: null == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
startDate:
|
||||
null == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endDate:
|
||||
null == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$BookingSummaryImplCopyWith<$Res>
|
||||
implements $BookingSummaryCopyWith<$Res> {
|
||||
factory _$$BookingSummaryImplCopyWith(_$BookingSummaryImpl value,
|
||||
$Res Function(_$BookingSummaryImpl) then) =
|
||||
__$$BookingSummaryImplCopyWithImpl<$Res>;
|
||||
factory _$$BookingSummaryImplCopyWith(
|
||||
_$BookingSummaryImpl value,
|
||||
$Res Function(_$BookingSummaryImpl) then,
|
||||
) = __$$BookingSummaryImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String name, DateTime startDate, DateTime endDate});
|
||||
@@ -108,8 +118,9 @@ class __$$BookingSummaryImplCopyWithImpl<$Res>
|
||||
extends _$BookingSummaryCopyWithImpl<$Res, _$BookingSummaryImpl>
|
||||
implements _$$BookingSummaryImplCopyWith<$Res> {
|
||||
__$$BookingSummaryImplCopyWithImpl(
|
||||
_$BookingSummaryImpl _value, $Res Function(_$BookingSummaryImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$BookingSummaryImpl _value,
|
||||
$Res Function(_$BookingSummaryImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of BookingSummary
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -121,35 +132,42 @@ class __$$BookingSummaryImplCopyWithImpl<$Res>
|
||||
Object? startDate = null,
|
||||
Object? endDate = null,
|
||||
}) {
|
||||
return _then(_$BookingSummaryImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
startDate: null == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endDate: null == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
));
|
||||
return _then(
|
||||
_$BookingSummaryImpl(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
startDate:
|
||||
null == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endDate:
|
||||
null == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$BookingSummaryImpl implements _BookingSummary {
|
||||
const _$BookingSummaryImpl(
|
||||
{required this.id,
|
||||
required this.name,
|
||||
required this.startDate,
|
||||
required this.endDate});
|
||||
const _$BookingSummaryImpl({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.startDate,
|
||||
required this.endDate,
|
||||
});
|
||||
|
||||
factory _$BookingSummaryImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$BookingSummaryImplFromJson(json);
|
||||
@@ -198,22 +216,23 @@ class _$BookingSummaryImpl implements _BookingSummary {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$BookingSummaryImplCopyWith<_$BookingSummaryImpl> get copyWith =>
|
||||
__$$BookingSummaryImplCopyWithImpl<_$BookingSummaryImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$BookingSummaryImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$BookingSummaryImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _BookingSummary implements BookingSummary {
|
||||
const factory _BookingSummary(
|
||||
{required final int id,
|
||||
required final String name,
|
||||
required final DateTime startDate,
|
||||
required final DateTime endDate}) = _$BookingSummaryImpl;
|
||||
const factory _BookingSummary({
|
||||
required final int id,
|
||||
required final String name,
|
||||
required final DateTime startDate,
|
||||
required final DateTime endDate,
|
||||
}) = _$BookingSummaryImpl;
|
||||
|
||||
factory _BookingSummary.fromJson(Map<String, dynamic> json) =
|
||||
_$BookingSummaryImpl.fromJson;
|
||||
|
||||
@@ -15,10 +15,10 @@ _$BookingSummaryImpl _$$BookingSummaryImplFromJson(Map<String, dynamic> json) =>
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$BookingSummaryImplToJson(
|
||||
_$BookingSummaryImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'startDate': instance.startDate.toIso8601String(),
|
||||
'endDate': instance.endDate.toIso8601String(),
|
||||
};
|
||||
_$BookingSummaryImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'startDate': instance.startDate.toIso8601String(),
|
||||
'endDate': instance.endDate.toIso8601String(),
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'continent.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
Continent _$ContinentFromJson(Map<String, dynamic> json) {
|
||||
return _Continent.fromJson(json);
|
||||
@@ -58,20 +59,22 @@ class _$ContinentCopyWithImpl<$Res, $Val extends Continent>
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? imageUrl = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
imageUrl: null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
$Res call({Object? name = null, Object? imageUrl = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
imageUrl:
|
||||
null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,8 +82,9 @@ class _$ContinentCopyWithImpl<$Res, $Val extends Continent>
|
||||
abstract class _$$ContinentImplCopyWith<$Res>
|
||||
implements $ContinentCopyWith<$Res> {
|
||||
factory _$$ContinentImplCopyWith(
|
||||
_$ContinentImpl value, $Res Function(_$ContinentImpl) then) =
|
||||
__$$ContinentImplCopyWithImpl<$Res>;
|
||||
_$ContinentImpl value,
|
||||
$Res Function(_$ContinentImpl) then,
|
||||
) = __$$ContinentImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String imageUrl});
|
||||
@@ -91,27 +95,29 @@ class __$$ContinentImplCopyWithImpl<$Res>
|
||||
extends _$ContinentCopyWithImpl<$Res, _$ContinentImpl>
|
||||
implements _$$ContinentImplCopyWith<$Res> {
|
||||
__$$ContinentImplCopyWithImpl(
|
||||
_$ContinentImpl _value, $Res Function(_$ContinentImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$ContinentImpl _value,
|
||||
$Res Function(_$ContinentImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of Continent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? imageUrl = null,
|
||||
}) {
|
||||
return _then(_$ContinentImpl(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
imageUrl: null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
$Res call({Object? name = null, Object? imageUrl = null}) {
|
||||
return _then(
|
||||
_$ContinentImpl(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
imageUrl:
|
||||
null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,16 +166,15 @@ class _$ContinentImpl implements _Continent {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ContinentImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$ContinentImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Continent implements Continent {
|
||||
const factory _Continent(
|
||||
{required final String name,
|
||||
required final String imageUrl}) = _$ContinentImpl;
|
||||
const factory _Continent({
|
||||
required final String name,
|
||||
required final String imageUrl,
|
||||
}) = _$ContinentImpl;
|
||||
|
||||
factory _Continent.fromJson(Map<String, dynamic> json) =
|
||||
_$ContinentImpl.fromJson;
|
||||
|
||||
@@ -13,7 +13,4 @@ _$ContinentImpl _$$ContinentImplFromJson(Map<String, dynamic> json) =>
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ContinentImplToJson(_$ContinentImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'imageUrl': instance.imageUrl,
|
||||
};
|
||||
<String, dynamic>{'name': instance.name, 'imageUrl': instance.imageUrl};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'destination.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
Destination _$DestinationFromJson(Map<String, dynamic> json) {
|
||||
return _Destination.fromJson(json);
|
||||
@@ -54,17 +55,19 @@ mixin _$Destination {
|
||||
/// @nodoc
|
||||
abstract class $DestinationCopyWith<$Res> {
|
||||
factory $DestinationCopyWith(
|
||||
Destination value, $Res Function(Destination) then) =
|
||||
_$DestinationCopyWithImpl<$Res, Destination>;
|
||||
Destination value,
|
||||
$Res Function(Destination) then,
|
||||
) = _$DestinationCopyWithImpl<$Res, Destination>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String ref,
|
||||
String name,
|
||||
String country,
|
||||
String continent,
|
||||
String knownFor,
|
||||
List<String> tags,
|
||||
String imageUrl});
|
||||
$Res call({
|
||||
String ref,
|
||||
String name,
|
||||
String country,
|
||||
String continent,
|
||||
String knownFor,
|
||||
List<String> tags,
|
||||
String imageUrl,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -90,36 +93,46 @@ class _$DestinationCopyWithImpl<$Res, $Val extends Destination>
|
||||
Object? tags = null,
|
||||
Object? imageUrl = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
ref: null == ref
|
||||
? _value.ref
|
||||
: ref // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
country: null == country
|
||||
? _value.country
|
||||
: country // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
continent: null == continent
|
||||
? _value.continent
|
||||
: continent // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
knownFor: null == knownFor
|
||||
? _value.knownFor
|
||||
: knownFor // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
tags: null == tags
|
||||
? _value.tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
imageUrl: null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
ref:
|
||||
null == ref
|
||||
? _value.ref
|
||||
: ref // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
country:
|
||||
null == country
|
||||
? _value.country
|
||||
: country // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
continent:
|
||||
null == continent
|
||||
? _value.continent
|
||||
: continent // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
knownFor:
|
||||
null == knownFor
|
||||
? _value.knownFor
|
||||
: knownFor // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
tags:
|
||||
null == tags
|
||||
? _value.tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
imageUrl:
|
||||
null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,18 +140,20 @@ class _$DestinationCopyWithImpl<$Res, $Val extends Destination>
|
||||
abstract class _$$DestinationImplCopyWith<$Res>
|
||||
implements $DestinationCopyWith<$Res> {
|
||||
factory _$$DestinationImplCopyWith(
|
||||
_$DestinationImpl value, $Res Function(_$DestinationImpl) then) =
|
||||
__$$DestinationImplCopyWithImpl<$Res>;
|
||||
_$DestinationImpl value,
|
||||
$Res Function(_$DestinationImpl) then,
|
||||
) = __$$DestinationImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String ref,
|
||||
String name,
|
||||
String country,
|
||||
String continent,
|
||||
String knownFor,
|
||||
List<String> tags,
|
||||
String imageUrl});
|
||||
$Res call({
|
||||
String ref,
|
||||
String name,
|
||||
String country,
|
||||
String continent,
|
||||
String knownFor,
|
||||
List<String> tags,
|
||||
String imageUrl,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -146,8 +161,9 @@ class __$$DestinationImplCopyWithImpl<$Res>
|
||||
extends _$DestinationCopyWithImpl<$Res, _$DestinationImpl>
|
||||
implements _$$DestinationImplCopyWith<$Res> {
|
||||
__$$DestinationImplCopyWithImpl(
|
||||
_$DestinationImpl _value, $Res Function(_$DestinationImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$DestinationImpl _value,
|
||||
$Res Function(_$DestinationImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of Destination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -162,51 +178,60 @@ class __$$DestinationImplCopyWithImpl<$Res>
|
||||
Object? tags = null,
|
||||
Object? imageUrl = null,
|
||||
}) {
|
||||
return _then(_$DestinationImpl(
|
||||
ref: null == ref
|
||||
? _value.ref
|
||||
: ref // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
country: null == country
|
||||
? _value.country
|
||||
: country // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
continent: null == continent
|
||||
? _value.continent
|
||||
: continent // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
knownFor: null == knownFor
|
||||
? _value.knownFor
|
||||
: knownFor // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
tags: null == tags
|
||||
? _value._tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
imageUrl: null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
return _then(
|
||||
_$DestinationImpl(
|
||||
ref:
|
||||
null == ref
|
||||
? _value.ref
|
||||
: ref // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
country:
|
||||
null == country
|
||||
? _value.country
|
||||
: country // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
continent:
|
||||
null == continent
|
||||
? _value.continent
|
||||
: continent // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
knownFor:
|
||||
null == knownFor
|
||||
? _value.knownFor
|
||||
: knownFor // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
tags:
|
||||
null == tags
|
||||
? _value._tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
imageUrl:
|
||||
null == imageUrl
|
||||
? _value.imageUrl
|
||||
: imageUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$DestinationImpl implements _Destination {
|
||||
const _$DestinationImpl(
|
||||
{required this.ref,
|
||||
required this.name,
|
||||
required this.country,
|
||||
required this.continent,
|
||||
required this.knownFor,
|
||||
required final List<String> tags,
|
||||
required this.imageUrl})
|
||||
: _tags = tags;
|
||||
const _$DestinationImpl({
|
||||
required this.ref,
|
||||
required this.name,
|
||||
required this.country,
|
||||
required this.continent,
|
||||
required this.knownFor,
|
||||
required final List<String> tags,
|
||||
required this.imageUrl,
|
||||
}) : _tags = tags;
|
||||
|
||||
factory _$DestinationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DestinationImplFromJson(json);
|
||||
@@ -270,8 +295,16 @@ class _$DestinationImpl implements _Destination {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, ref, name, country, continent,
|
||||
knownFor, const DeepCollectionEquality().hash(_tags), imageUrl);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
ref,
|
||||
name,
|
||||
country,
|
||||
continent,
|
||||
knownFor,
|
||||
const DeepCollectionEquality().hash(_tags),
|
||||
imageUrl,
|
||||
);
|
||||
|
||||
/// Create a copy of Destination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -283,21 +316,20 @@ class _$DestinationImpl implements _Destination {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$DestinationImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$DestinationImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Destination implements Destination {
|
||||
const factory _Destination(
|
||||
{required final String ref,
|
||||
required final String name,
|
||||
required final String country,
|
||||
required final String continent,
|
||||
required final String knownFor,
|
||||
required final List<String> tags,
|
||||
required final String imageUrl}) = _$DestinationImpl;
|
||||
const factory _Destination({
|
||||
required final String ref,
|
||||
required final String name,
|
||||
required final String country,
|
||||
required final String continent,
|
||||
required final String knownFor,
|
||||
required final List<String> tags,
|
||||
required final String imageUrl,
|
||||
}) = _$DestinationImpl;
|
||||
|
||||
factory _Destination.fromJson(Map<String, dynamic> json) =
|
||||
_$DestinationImpl.fromJson;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'itinerary_config.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
ItineraryConfig _$ItineraryConfigFromJson(Map<String, dynamic> json) {
|
||||
return _ItineraryConfig.fromJson(json);
|
||||
@@ -51,16 +52,18 @@ mixin _$ItineraryConfig {
|
||||
/// @nodoc
|
||||
abstract class $ItineraryConfigCopyWith<$Res> {
|
||||
factory $ItineraryConfigCopyWith(
|
||||
ItineraryConfig value, $Res Function(ItineraryConfig) then) =
|
||||
_$ItineraryConfigCopyWithImpl<$Res, ItineraryConfig>;
|
||||
ItineraryConfig value,
|
||||
$Res Function(ItineraryConfig) then,
|
||||
) = _$ItineraryConfigCopyWithImpl<$Res, ItineraryConfig>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String? continent,
|
||||
DateTime? startDate,
|
||||
DateTime? endDate,
|
||||
int? guests,
|
||||
String? destination,
|
||||
List<String> activities});
|
||||
$Res call({
|
||||
String? continent,
|
||||
DateTime? startDate,
|
||||
DateTime? endDate,
|
||||
int? guests,
|
||||
String? destination,
|
||||
List<String> activities,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -85,50 +88,61 @@ class _$ItineraryConfigCopyWithImpl<$Res, $Val extends ItineraryConfig>
|
||||
Object? destination = freezed,
|
||||
Object? activities = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
continent: freezed == continent
|
||||
? _value.continent
|
||||
: continent // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
startDate: freezed == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
endDate: freezed == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
guests: freezed == guests
|
||||
? _value.guests
|
||||
: guests // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
destination: freezed == destination
|
||||
? _value.destination
|
||||
: destination // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
activities: null == activities
|
||||
? _value.activities
|
||||
: activities // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
continent:
|
||||
freezed == continent
|
||||
? _value.continent
|
||||
: continent // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
startDate:
|
||||
freezed == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
endDate:
|
||||
freezed == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
guests:
|
||||
freezed == guests
|
||||
? _value.guests
|
||||
: guests // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
destination:
|
||||
freezed == destination
|
||||
? _value.destination
|
||||
: destination // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
activities:
|
||||
null == activities
|
||||
? _value.activities
|
||||
: activities // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ItineraryConfigImplCopyWith<$Res>
|
||||
implements $ItineraryConfigCopyWith<$Res> {
|
||||
factory _$$ItineraryConfigImplCopyWith(_$ItineraryConfigImpl value,
|
||||
$Res Function(_$ItineraryConfigImpl) then) =
|
||||
__$$ItineraryConfigImplCopyWithImpl<$Res>;
|
||||
factory _$$ItineraryConfigImplCopyWith(
|
||||
_$ItineraryConfigImpl value,
|
||||
$Res Function(_$ItineraryConfigImpl) then,
|
||||
) = __$$ItineraryConfigImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String? continent,
|
||||
DateTime? startDate,
|
||||
DateTime? endDate,
|
||||
int? guests,
|
||||
String? destination,
|
||||
List<String> activities});
|
||||
$Res call({
|
||||
String? continent,
|
||||
DateTime? startDate,
|
||||
DateTime? endDate,
|
||||
int? guests,
|
||||
String? destination,
|
||||
List<String> activities,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -136,8 +150,9 @@ class __$$ItineraryConfigImplCopyWithImpl<$Res>
|
||||
extends _$ItineraryConfigCopyWithImpl<$Res, _$ItineraryConfigImpl>
|
||||
implements _$$ItineraryConfigImplCopyWith<$Res> {
|
||||
__$$ItineraryConfigImplCopyWithImpl(
|
||||
_$ItineraryConfigImpl _value, $Res Function(_$ItineraryConfigImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$ItineraryConfigImpl _value,
|
||||
$Res Function(_$ItineraryConfigImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ItineraryConfig
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -151,46 +166,54 @@ class __$$ItineraryConfigImplCopyWithImpl<$Res>
|
||||
Object? destination = freezed,
|
||||
Object? activities = null,
|
||||
}) {
|
||||
return _then(_$ItineraryConfigImpl(
|
||||
continent: freezed == continent
|
||||
? _value.continent
|
||||
: continent // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
startDate: freezed == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
endDate: freezed == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
guests: freezed == guests
|
||||
? _value.guests
|
||||
: guests // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
destination: freezed == destination
|
||||
? _value.destination
|
||||
: destination // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
activities: null == activities
|
||||
? _value._activities
|
||||
: activities // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
));
|
||||
return _then(
|
||||
_$ItineraryConfigImpl(
|
||||
continent:
|
||||
freezed == continent
|
||||
? _value.continent
|
||||
: continent // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
startDate:
|
||||
freezed == startDate
|
||||
? _value.startDate
|
||||
: startDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
endDate:
|
||||
freezed == endDate
|
||||
? _value.endDate
|
||||
: endDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
guests:
|
||||
freezed == guests
|
||||
? _value.guests
|
||||
: guests // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
destination:
|
||||
freezed == destination
|
||||
? _value.destination
|
||||
: destination // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
activities:
|
||||
null == activities
|
||||
? _value._activities
|
||||
: activities // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ItineraryConfigImpl implements _ItineraryConfig {
|
||||
const _$ItineraryConfigImpl(
|
||||
{this.continent,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.guests,
|
||||
this.destination,
|
||||
final List<String> activities = const []})
|
||||
: _activities = activities;
|
||||
const _$ItineraryConfigImpl({
|
||||
this.continent,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.guests,
|
||||
this.destination,
|
||||
final List<String> activities = const [],
|
||||
}) : _activities = activities;
|
||||
|
||||
factory _$ItineraryConfigImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ItineraryConfigImplFromJson(json);
|
||||
@@ -245,14 +268,23 @@ class _$ItineraryConfigImpl implements _ItineraryConfig {
|
||||
(identical(other.guests, guests) || other.guests == guests) &&
|
||||
(identical(other.destination, destination) ||
|
||||
other.destination == destination) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._activities, _activities));
|
||||
const DeepCollectionEquality().equals(
|
||||
other._activities,
|
||||
_activities,
|
||||
));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, continent, startDate, endDate,
|
||||
guests, destination, const DeepCollectionEquality().hash(_activities));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
continent,
|
||||
startDate,
|
||||
endDate,
|
||||
guests,
|
||||
destination,
|
||||
const DeepCollectionEquality().hash(_activities),
|
||||
);
|
||||
|
||||
/// Create a copy of ItineraryConfig
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -261,24 +293,25 @@ class _$ItineraryConfigImpl implements _ItineraryConfig {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ItineraryConfigImplCopyWith<_$ItineraryConfigImpl> get copyWith =>
|
||||
__$$ItineraryConfigImplCopyWithImpl<_$ItineraryConfigImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ItineraryConfigImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$ItineraryConfigImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _ItineraryConfig implements ItineraryConfig {
|
||||
const factory _ItineraryConfig(
|
||||
{final String? continent,
|
||||
final DateTime? startDate,
|
||||
final DateTime? endDate,
|
||||
final int? guests,
|
||||
final String? destination,
|
||||
final List<String> activities}) = _$ItineraryConfigImpl;
|
||||
const factory _ItineraryConfig({
|
||||
final String? continent,
|
||||
final DateTime? startDate,
|
||||
final DateTime? endDate,
|
||||
final int? guests,
|
||||
final String? destination,
|
||||
final List<String> activities,
|
||||
}) = _$ItineraryConfigImpl;
|
||||
|
||||
factory _ItineraryConfig.fromJson(Map<String, dynamic> json) =
|
||||
_$ItineraryConfigImpl.fromJson;
|
||||
|
||||
@@ -7,30 +7,33 @@ part of 'itinerary_config.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ItineraryConfigImpl _$$ItineraryConfigImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ItineraryConfigImpl(
|
||||
continent: json['continent'] as String?,
|
||||
startDate: json['startDate'] == null
|
||||
Map<String, dynamic> json,
|
||||
) => _$ItineraryConfigImpl(
|
||||
continent: json['continent'] as String?,
|
||||
startDate:
|
||||
json['startDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['startDate'] as String),
|
||||
endDate: json['endDate'] == null
|
||||
endDate:
|
||||
json['endDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['endDate'] as String),
|
||||
guests: (json['guests'] as num?)?.toInt(),
|
||||
destination: json['destination'] as String?,
|
||||
activities: (json['activities'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
guests: (json['guests'] as num?)?.toInt(),
|
||||
destination: json['destination'] as String?,
|
||||
activities:
|
||||
(json['activities'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ItineraryConfigImplToJson(
|
||||
_$ItineraryConfigImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'continent': instance.continent,
|
||||
'startDate': instance.startDate?.toIso8601String(),
|
||||
'endDate': instance.endDate?.toIso8601String(),
|
||||
'guests': instance.guests,
|
||||
'destination': instance.destination,
|
||||
'activities': instance.activities,
|
||||
};
|
||||
_$ItineraryConfigImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'continent': instance.continent,
|
||||
'startDate': instance.startDate?.toIso8601String(),
|
||||
'endDate': instance.endDate?.toIso8601String(),
|
||||
'guests': instance.guests,
|
||||
'destination': instance.destination,
|
||||
'activities': instance.activities,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'user.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
User _$UserFromJson(Map<String, dynamic> json) {
|
||||
return _User.fromJson(json);
|
||||
@@ -57,28 +58,31 @@ class _$UserCopyWithImpl<$Res, $Val extends User>
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? picture = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
picture: null == picture
|
||||
? _value.picture
|
||||
: picture // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
$Res call({Object? name = null, Object? picture = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
picture:
|
||||
null == picture
|
||||
? _value.picture
|
||||
: picture // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$UserImplCopyWith<$Res> implements $UserCopyWith<$Res> {
|
||||
factory _$$UserImplCopyWith(
|
||||
_$UserImpl value, $Res Function(_$UserImpl) then) =
|
||||
__$$UserImplCopyWithImpl<$Res>;
|
||||
_$UserImpl value,
|
||||
$Res Function(_$UserImpl) then,
|
||||
) = __$$UserImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String picture});
|
||||
@@ -89,26 +93,27 @@ class __$$UserImplCopyWithImpl<$Res>
|
||||
extends _$UserCopyWithImpl<$Res, _$UserImpl>
|
||||
implements _$$UserImplCopyWith<$Res> {
|
||||
__$$UserImplCopyWithImpl(_$UserImpl _value, $Res Function(_$UserImpl) _then)
|
||||
: super(_value, _then);
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? picture = null,
|
||||
}) {
|
||||
return _then(_$UserImpl(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
picture: null == picture
|
||||
? _value.picture
|
||||
: picture // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
$Res call({Object? name = null, Object? picture = null}) {
|
||||
return _then(
|
||||
_$UserImpl(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
picture:
|
||||
null == picture
|
||||
? _value.picture
|
||||
: picture // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,15 +161,15 @@ class _$UserImpl implements _User {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$UserImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$UserImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _User implements User {
|
||||
const factory _User(
|
||||
{required final String name, required final String picture}) = _$UserImpl;
|
||||
const factory _User({
|
||||
required final String name,
|
||||
required final String picture,
|
||||
}) = _$UserImpl;
|
||||
|
||||
factory _User.fromJson(Map<String, dynamic> json) = _$UserImpl.fromJson;
|
||||
|
||||
|
||||
@@ -7,12 +7,9 @@ part of 'user.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$UserImpl _$$UserImplFromJson(Map<String, dynamic> json) => _$UserImpl(
|
||||
name: json['name'] as String,
|
||||
picture: json['picture'] as String,
|
||||
);
|
||||
name: json['name'] as String,
|
||||
picture: json['picture'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UserImplToJson(_$UserImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'picture': instance.picture,
|
||||
};
|
||||
<String, dynamic>{'name': instance.name, 'picture': instance.picture};
|
||||
|
||||
Reference in New Issue
Block a user