mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Fixups for master CI (#2118)
## 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 updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. <!-- Links --> [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/wiki/Chat [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
// coverage:ignore-file
|
// coverage:ignore-file
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||||
|
|
||||||
part of 'models.dart';
|
part of 'models.dart';
|
||||||
|
|
||||||
@@ -31,56 +31,61 @@ mixin _$Increment {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract class $IncrementCopyWith<$Res> {
|
abstract class $IncrementCopyWith<$Res> {
|
||||||
factory $IncrementCopyWith(Increment value, $Res Function(Increment) then) =
|
factory $IncrementCopyWith(Increment value, $Res Function(Increment) then) =
|
||||||
_$IncrementCopyWithImpl<$Res>;
|
_$IncrementCopyWithImpl<$Res, Increment>;
|
||||||
|
@useResult
|
||||||
$Res call({int by});
|
$Res call({int by});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$IncrementCopyWithImpl<$Res> implements $IncrementCopyWith<$Res> {
|
class _$IncrementCopyWithImpl<$Res, $Val extends Increment>
|
||||||
|
implements $IncrementCopyWith<$Res> {
|
||||||
_$IncrementCopyWithImpl(this._value, this._then);
|
_$IncrementCopyWithImpl(this._value, this._then);
|
||||||
|
|
||||||
final Increment _value;
|
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function(Increment) _then;
|
final $Val _value;
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? by = freezed,
|
Object? by = null,
|
||||||
}) {
|
}) {
|
||||||
return _then(_value.copyWith(
|
return _then(_value.copyWith(
|
||||||
by: by == freezed
|
by: null == by
|
||||||
? _value.by
|
? _value.by
|
||||||
: by // ignore: cast_nullable_to_non_nullable
|
: by // ignore: cast_nullable_to_non_nullable
|
||||||
as int,
|
as int,
|
||||||
));
|
) as $Val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract class _$$_IncrementCopyWith<$Res> implements $IncrementCopyWith<$Res> {
|
abstract class _$$IncrementImplCopyWith<$Res>
|
||||||
factory _$$_IncrementCopyWith(
|
implements $IncrementCopyWith<$Res> {
|
||||||
_$_Increment value, $Res Function(_$_Increment) then) =
|
factory _$$IncrementImplCopyWith(
|
||||||
__$$_IncrementCopyWithImpl<$Res>;
|
_$IncrementImpl value, $Res Function(_$IncrementImpl) then) =
|
||||||
|
__$$IncrementImplCopyWithImpl<$Res>;
|
||||||
@override
|
@override
|
||||||
|
@useResult
|
||||||
$Res call({int by});
|
$Res call({int by});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class __$$_IncrementCopyWithImpl<$Res> extends _$IncrementCopyWithImpl<$Res>
|
class __$$IncrementImplCopyWithImpl<$Res>
|
||||||
implements _$$_IncrementCopyWith<$Res> {
|
extends _$IncrementCopyWithImpl<$Res, _$IncrementImpl>
|
||||||
__$$_IncrementCopyWithImpl(
|
implements _$$IncrementImplCopyWith<$Res> {
|
||||||
_$_Increment _value, $Res Function(_$_Increment) _then)
|
__$$IncrementImplCopyWithImpl(
|
||||||
: super(_value, (v) => _then(v as _$_Increment));
|
_$IncrementImpl _value, $Res Function(_$IncrementImpl) _then)
|
||||||
|
: super(_value, _then);
|
||||||
@override
|
|
||||||
_$_Increment get _value => super._value as _$_Increment;
|
|
||||||
|
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? by = freezed,
|
Object? by = null,
|
||||||
}) {
|
}) {
|
||||||
return _then(_$_Increment(
|
return _then(_$IncrementImpl(
|
||||||
by: by == freezed
|
by: null == by
|
||||||
? _value.by
|
? _value.by
|
||||||
: by // ignore: cast_nullable_to_non_nullable
|
: by // ignore: cast_nullable_to_non_nullable
|
||||||
as int,
|
as int,
|
||||||
@@ -90,11 +95,11 @@ class __$$_IncrementCopyWithImpl<$Res> extends _$IncrementCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class _$_Increment implements _Increment {
|
class _$IncrementImpl implements _Increment {
|
||||||
const _$_Increment({required this.by});
|
const _$IncrementImpl({required this.by});
|
||||||
|
|
||||||
factory _$_Increment.fromJson(Map<String, dynamic> json) =>
|
factory _$IncrementImpl.fromJson(Map<String, dynamic> json) =>
|
||||||
_$$_IncrementFromJson(json);
|
_$$IncrementImplFromJson(json);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final int by;
|
final int by;
|
||||||
@@ -105,42 +110,42 @@ class _$_Increment implements _Increment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) ||
|
return identical(this, other) ||
|
||||||
(other.runtimeType == runtimeType &&
|
(other.runtimeType == runtimeType &&
|
||||||
other is _$_Increment &&
|
other is _$IncrementImpl &&
|
||||||
const DeepCollectionEquality().equals(other.by, by));
|
(identical(other.by, by) || other.by == by));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(ignore: true)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode => Object.hash(runtimeType, by);
|
||||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(by));
|
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(ignore: true)
|
||||||
@override
|
@override
|
||||||
_$$_IncrementCopyWith<_$_Increment> get copyWith =>
|
@pragma('vm:prefer-inline')
|
||||||
__$$_IncrementCopyWithImpl<_$_Increment>(this, _$identity);
|
_$$IncrementImplCopyWith<_$IncrementImpl> get copyWith =>
|
||||||
|
__$$IncrementImplCopyWithImpl<_$IncrementImpl>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return _$$_IncrementToJson(
|
return _$$IncrementImplToJson(
|
||||||
this,
|
this,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _Increment implements Increment {
|
abstract class _Increment implements Increment {
|
||||||
const factory _Increment({required final int by}) = _$_Increment;
|
const factory _Increment({required final int by}) = _$IncrementImpl;
|
||||||
|
|
||||||
factory _Increment.fromJson(Map<String, dynamic> json) =
|
factory _Increment.fromJson(Map<String, dynamic> json) =
|
||||||
_$_Increment.fromJson;
|
_$IncrementImpl.fromJson;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get by;
|
int get by;
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(ignore: true)
|
||||||
_$$_IncrementCopyWith<_$_Increment> get copyWith =>
|
_$$IncrementImplCopyWith<_$IncrementImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,54 +165,60 @@ mixin _$Count {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract class $CountCopyWith<$Res> {
|
abstract class $CountCopyWith<$Res> {
|
||||||
factory $CountCopyWith(Count value, $Res Function(Count) then) =
|
factory $CountCopyWith(Count value, $Res Function(Count) then) =
|
||||||
_$CountCopyWithImpl<$Res>;
|
_$CountCopyWithImpl<$Res, Count>;
|
||||||
|
@useResult
|
||||||
$Res call({int value});
|
$Res call({int value});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$CountCopyWithImpl<$Res> implements $CountCopyWith<$Res> {
|
class _$CountCopyWithImpl<$Res, $Val extends Count>
|
||||||
|
implements $CountCopyWith<$Res> {
|
||||||
_$CountCopyWithImpl(this._value, this._then);
|
_$CountCopyWithImpl(this._value, this._then);
|
||||||
|
|
||||||
final Count _value;
|
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function(Count) _then;
|
final $Val _value;
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? value = freezed,
|
Object? value = null,
|
||||||
}) {
|
}) {
|
||||||
return _then(_value.copyWith(
|
return _then(_value.copyWith(
|
||||||
value: value == freezed
|
value: null == value
|
||||||
? _value.value
|
? _value.value
|
||||||
: value // ignore: cast_nullable_to_non_nullable
|
: value // ignore: cast_nullable_to_non_nullable
|
||||||
as int,
|
as int,
|
||||||
));
|
) as $Val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract class _$$_CountCopyWith<$Res> implements $CountCopyWith<$Res> {
|
abstract class _$$CountImplCopyWith<$Res> implements $CountCopyWith<$Res> {
|
||||||
factory _$$_CountCopyWith(_$_Count value, $Res Function(_$_Count) then) =
|
factory _$$CountImplCopyWith(
|
||||||
__$$_CountCopyWithImpl<$Res>;
|
_$CountImpl value, $Res Function(_$CountImpl) then) =
|
||||||
|
__$$CountImplCopyWithImpl<$Res>;
|
||||||
@override
|
@override
|
||||||
|
@useResult
|
||||||
$Res call({int value});
|
$Res call({int value});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class __$$_CountCopyWithImpl<$Res> extends _$CountCopyWithImpl<$Res>
|
class __$$CountImplCopyWithImpl<$Res>
|
||||||
implements _$$_CountCopyWith<$Res> {
|
extends _$CountCopyWithImpl<$Res, _$CountImpl>
|
||||||
__$$_CountCopyWithImpl(_$_Count _value, $Res Function(_$_Count) _then)
|
implements _$$CountImplCopyWith<$Res> {
|
||||||
: super(_value, (v) => _then(v as _$_Count));
|
__$$CountImplCopyWithImpl(
|
||||||
|
_$CountImpl _value, $Res Function(_$CountImpl) _then)
|
||||||
@override
|
: super(_value, _then);
|
||||||
_$_Count get _value => super._value as _$_Count;
|
|
||||||
|
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? value = freezed,
|
Object? value = null,
|
||||||
}) {
|
}) {
|
||||||
return _then(_$_Count(
|
return _then(_$CountImpl(
|
||||||
value == freezed
|
null == value
|
||||||
? _value.value
|
? _value.value
|
||||||
: value // ignore: cast_nullable_to_non_nullable
|
: value // ignore: cast_nullable_to_non_nullable
|
||||||
as int,
|
as int,
|
||||||
@@ -217,11 +228,11 @@ class __$$_CountCopyWithImpl<$Res> extends _$CountCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class _$_Count implements _Count {
|
class _$CountImpl implements _Count {
|
||||||
const _$_Count(this.value);
|
const _$CountImpl(this.value);
|
||||||
|
|
||||||
factory _$_Count.fromJson(Map<String, dynamic> json) =>
|
factory _$CountImpl.fromJson(Map<String, dynamic> json) =>
|
||||||
_$$_CountFromJson(json);
|
_$$CountImplFromJson(json);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final int value;
|
final int value;
|
||||||
@@ -232,40 +243,40 @@ class _$_Count implements _Count {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) ||
|
return identical(this, other) ||
|
||||||
(other.runtimeType == runtimeType &&
|
(other.runtimeType == runtimeType &&
|
||||||
other is _$_Count &&
|
other is _$CountImpl &&
|
||||||
const DeepCollectionEquality().equals(other.value, value));
|
(identical(other.value, value) || other.value == value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(ignore: true)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode => Object.hash(runtimeType, value);
|
||||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(value));
|
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(ignore: true)
|
||||||
@override
|
@override
|
||||||
_$$_CountCopyWith<_$_Count> get copyWith =>
|
@pragma('vm:prefer-inline')
|
||||||
__$$_CountCopyWithImpl<_$_Count>(this, _$identity);
|
_$$CountImplCopyWith<_$CountImpl> get copyWith =>
|
||||||
|
__$$CountImplCopyWithImpl<_$CountImpl>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return _$$_CountToJson(
|
return _$$CountImplToJson(
|
||||||
this,
|
this,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _Count implements Count {
|
abstract class _Count implements Count {
|
||||||
const factory _Count(final int value) = _$_Count;
|
const factory _Count(final int value) = _$CountImpl;
|
||||||
|
|
||||||
factory _Count.fromJson(Map<String, dynamic> json) = _$_Count.fromJson;
|
factory _Count.fromJson(Map<String, dynamic> json) = _$CountImpl.fromJson;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get value;
|
int get value;
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(ignore: true)
|
||||||
_$$_CountCopyWith<_$_Count> get copyWith =>
|
_$$CountImplCopyWith<_$CountImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,19 +6,21 @@ part of 'models.dart';
|
|||||||
// JsonSerializableGenerator
|
// JsonSerializableGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
_$_Increment _$$_IncrementFromJson(Map<String, dynamic> json) => _$_Increment(
|
_$IncrementImpl _$$IncrementImplFromJson(Map<String, dynamic> json) =>
|
||||||
|
_$IncrementImpl(
|
||||||
by: json['by'] as int,
|
by: json['by'] as int,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$_IncrementToJson(_$_Increment instance) =>
|
Map<String, dynamic> _$$IncrementImplToJson(_$IncrementImpl instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'by': instance.by,
|
'by': instance.by,
|
||||||
};
|
};
|
||||||
|
|
||||||
_$_Count _$$_CountFromJson(Map<String, dynamic> json) => _$_Count(
|
_$CountImpl _$$CountImplFromJson(Map<String, dynamic> json) => _$CountImpl(
|
||||||
json['value'] as int,
|
json['value'] as int,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$_CountToJson(_$_Count instance) => <String, dynamic>{
|
Map<String, dynamic> _$$CountImplToJson(_$CountImpl instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
'value': instance.value,
|
'value': instance.value,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class _SavedLintsPageState extends State<SavedLintsPage> {
|
|||||||
var saved = await profilesStore
|
var saved = await profilesStore
|
||||||
.exportProfileFile(profile);
|
.exportProfileFile(profile);
|
||||||
|
|
||||||
if (!mounted) return;
|
if (!context.mounted) return;
|
||||||
|
|
||||||
if (!saved) {
|
if (!saved) {
|
||||||
_showSnackBar(
|
_showSnackBar(
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class _LintExpansionTileState extends State<LintExpansionTile> {
|
|||||||
return const _ProfileTypeDialog();
|
return const _ProfileTypeDialog();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (!mounted) return;
|
if (!context.mounted) return;
|
||||||
if (destinationProfileType == ProfileType.newProfile) {
|
if (destinationProfileType == ProfileType.newProfile) {
|
||||||
await showDialog<String>(
|
await showDialog<String>(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -264,7 +264,7 @@ class _NewProfileDialogState extends State<NewProfileDialog> {
|
|||||||
);
|
);
|
||||||
await Provider.of<ProfilesStore>(context, listen: false)
|
await Provider.of<ProfilesStore>(context, listen: false)
|
||||||
.addToNewProfile(newProfile);
|
.addToNewProfile(newProfile);
|
||||||
if (!mounted) return;
|
if (!context.mounted) return;
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -304,7 +304,7 @@ class _ExistingProfileDialogState extends State<ExistingProfileDialog> {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
await profilesStore.addToExistingProfile(
|
await profilesStore.addToExistingProfile(
|
||||||
savedProfiles[index], widget.rule);
|
savedProfiles[index], widget.rule);
|
||||||
if (!mounted) return;
|
if (!context.mounted) return;
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class _MethodChannelDemoState extends State<MethodChannelDemo> {
|
|||||||
final value = await Counter.increment(counterValue: count);
|
final value = await Counter.increment(counterValue: count);
|
||||||
setState(() => count = value);
|
setState(() => count = value);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (!mounted) return;
|
if (!context.mounted) return;
|
||||||
showErrorMessage(
|
showErrorMessage(
|
||||||
context,
|
context,
|
||||||
(error as PlatformException).message!,
|
(error as PlatformException).message!,
|
||||||
@@ -65,7 +65,7 @@ class _MethodChannelDemoState extends State<MethodChannelDemo> {
|
|||||||
final value = await Counter.decrement(counterValue: count);
|
final value = await Counter.decrement(counterValue: count);
|
||||||
setState(() => count = value);
|
setState(() => count = value);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (!mounted) return;
|
if (!context.mounted) return;
|
||||||
showErrorMessage(
|
showErrorMessage(
|
||||||
context,
|
context,
|
||||||
(error as PlatformException).message!,
|
(error as PlatformException).message!,
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
child: const Text('Yes'),
|
child: const Text('Yes'),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await prefs.restoreDefaults();
|
await prefs.restoreDefaults();
|
||||||
if (!mounted) return;
|
if (!context.mounted) return;
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user