mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Dart 3.9 / Flutter 3.35 [first LLM release] (#2714)
I got carried away with Gemini and basically rewrote CI and the release process for the new LLM reality. This work was largely completed by Gemini. - Bump all SDK versions to the current beta (3.9.0-0) - Run `flutter channel beta` - Wrote `ci_script.dart` to replace the bash scripts - Converted repository to pub workspace #2499 - Added llm.md and release.md - Added redirect for deprecated Samples Index ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I have added sample code updates to the [changelog]. - [x] I updated/added relevant documentation (doc comments with `///`).
This commit is contained in:
@@ -109,56 +109,46 @@ class _$ActivityCopyWithImpl<$Res, $Val extends Activity>
|
||||
}) {
|
||||
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,
|
||||
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,
|
||||
);
|
||||
@@ -215,56 +205,46 @@ class __$$ActivityImplCopyWithImpl<$Res>
|
||||
}) {
|
||||
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,
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -88,36 +88,30 @@ class _$BookingCopyWithImpl<$Res, $Val extends Booking>
|
||||
}) {
|
||||
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,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
destinationRef:
|
||||
null == destinationRef
|
||||
? _value.destinationRef
|
||||
: destinationRef // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
activitiesRef:
|
||||
null == activitiesRef
|
||||
? _value.activitiesRef
|
||||
: activitiesRef // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
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,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
destinationRef: null == destinationRef
|
||||
? _value.destinationRef
|
||||
: destinationRef // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
activitiesRef: null == activitiesRef
|
||||
? _value.activitiesRef
|
||||
: activitiesRef // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
@@ -165,36 +159,30 @@ class __$$BookingImplCopyWithImpl<$Res>
|
||||
}) {
|
||||
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,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
destinationRef:
|
||||
null == destinationRef
|
||||
? _value.destinationRef
|
||||
: destinationRef // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
activitiesRef:
|
||||
null == activitiesRef
|
||||
? _value._activitiesRef
|
||||
: activitiesRef // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
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,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
destinationRef: null == destinationRef
|
||||
? _value.destinationRef
|
||||
: destinationRef // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
activitiesRef: null == activitiesRef
|
||||
? _value._activitiesRef
|
||||
: activitiesRef // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,10 +13,9 @@ _$BookingImpl _$$BookingImplFromJson(Map<String, dynamic> json) =>
|
||||
endDate: DateTime.parse(json['endDate'] as String),
|
||||
name: json['name'] as String,
|
||||
destinationRef: json['destinationRef'] as String,
|
||||
activitiesRef:
|
||||
(json['activitiesRef'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
activitiesRef: (json['activitiesRef'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$BookingImplToJson(_$BookingImpl instance) =>
|
||||
|
||||
@@ -62,16 +62,14 @@ class _$ContinentCopyWithImpl<$Res, $Val extends Continent>
|
||||
$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,
|
||||
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,
|
||||
);
|
||||
@@ -106,16 +104,14 @@ class __$$ContinentImplCopyWithImpl<$Res>
|
||||
$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,
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -95,41 +95,34 @@ class _$DestinationCopyWithImpl<$Res, $Val extends Destination>
|
||||
}) {
|
||||
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,
|
||||
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,
|
||||
);
|
||||
@@ -180,41 +173,34 @@ class __$$DestinationImplCopyWithImpl<$Res>
|
||||
}) {
|
||||
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,
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,16 +64,14 @@ class _$LoginRequestCopyWithImpl<$Res, $Val extends LoginRequest>
|
||||
$Res call({Object? email = null, Object? password = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
email:
|
||||
null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
password:
|
||||
null == password
|
||||
? _value.password
|
||||
: password // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
email: null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
password: null == password
|
||||
? _value.password
|
||||
: password // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
@@ -108,16 +106,14 @@ class __$$LoginRequestImplCopyWithImpl<$Res>
|
||||
$Res call({Object? email = null, Object? password = null}) {
|
||||
return _then(
|
||||
_$LoginRequestImpl(
|
||||
email:
|
||||
null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
password:
|
||||
null == password
|
||||
? _value.password
|
||||
: password // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
email: null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
password: null == password
|
||||
? _value.password
|
||||
: password // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,16 +64,14 @@ class _$LoginResponseCopyWithImpl<$Res, $Val extends LoginResponse>
|
||||
$Res call({Object? token = null, Object? userId = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
token:
|
||||
null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
userId:
|
||||
null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
token: null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
@@ -108,16 +106,14 @@ class __$$LoginResponseImplCopyWithImpl<$Res>
|
||||
$Res call({Object? token = null, Object? userId = null}) {
|
||||
return _then(
|
||||
_$LoginResponseImpl(
|
||||
token:
|
||||
null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
userId:
|
||||
null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
token: null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -72,26 +72,22 @@ class _$UserCopyWithImpl<$Res, $Val extends User>
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
email:
|
||||
null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
picture:
|
||||
null == picture
|
||||
? _value.picture
|
||||
: picture // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
email: null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
picture: null == picture
|
||||
? _value.picture
|
||||
: picture // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
@@ -128,26 +124,22 @@ class __$$UserImplCopyWithImpl<$Res>
|
||||
}) {
|
||||
return _then(
|
||||
_$UserImpl(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
email:
|
||||
null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
picture:
|
||||
null == picture
|
||||
? _value.picture
|
||||
: picture // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
email: null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
picture: null == picture
|
||||
? _value.picture
|
||||
: picture // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -22,11 +22,10 @@ class BookingApi {
|
||||
BookingApi() {
|
||||
// Create a default booking
|
||||
final destination = Assets.destinations.first;
|
||||
final activitiesRef =
|
||||
Assets.activities
|
||||
.where((activity) => activity.destinationRef == destination.ref)
|
||||
.map((activity) => activity.ref)
|
||||
.toList();
|
||||
final activitiesRef = Assets.activities
|
||||
.where((activity) => activity.destinationRef == destination.ref)
|
||||
.map((activity) => activity.ref)
|
||||
.toList();
|
||||
_bookings.add(
|
||||
Booking(
|
||||
id: _sequentialId++,
|
||||
@@ -60,8 +59,9 @@ class BookingApi {
|
||||
// Get a booking by id
|
||||
router.get('/<id>', (Request request, String id) {
|
||||
final bookingId = int.parse(id);
|
||||
final booking =
|
||||
_bookings.where((booking) => booking.id == bookingId).firstOrNull;
|
||||
final booking = _bookings
|
||||
.where((booking) => booking.id == bookingId)
|
||||
.firstOrNull;
|
||||
|
||||
if (booking == null) {
|
||||
return Response.notFound('Invalid id');
|
||||
@@ -102,8 +102,9 @@ class BookingApi {
|
||||
// Delete booking
|
||||
router.delete('/<id>', (Request request, String id) async {
|
||||
final bookingId = int.parse(id);
|
||||
final booking =
|
||||
_bookings.where((booking) => booking.id == bookingId).firstOrNull;
|
||||
final booking = _bookings
|
||||
.where((booking) => booking.id == bookingId)
|
||||
.firstOrNull;
|
||||
if (booking == null) {
|
||||
return Response.notFound('Invalid id');
|
||||
}
|
||||
|
||||
@@ -21,10 +21,9 @@ class DestinationApi {
|
||||
});
|
||||
|
||||
router.get('/<id>/activity', (Request request, String id) {
|
||||
final list =
|
||||
Assets.activities
|
||||
.where((activity) => activity.destinationRef == id)
|
||||
.toList();
|
||||
final list = Assets.activities
|
||||
.where((activity) => activity.destinationRef == id)
|
||||
.toList();
|
||||
return Response.ok(
|
||||
json.encode(list),
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
|
||||
Reference in New Issue
Block a user