1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-14 11:28:36 +00:00

Flutter 3.29 beta (#2571)

This commit is contained in:
Eric Windmill
2025-02-12 18:08:01 -05:00
committed by GitHub
parent d62c784789
commit 719fd72c38
685 changed files with 76244 additions and 53721 deletions

View File

@@ -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;

View File

@@ -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};