Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
1068 lines
30 KiB
Dart
1068 lines
30 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// coverage:ignore-file
|
|
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
|
// 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 'request_report.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$RequestFrameReport {
|
|
int get count;
|
|
@JsonKey(name: 'over16ms')
|
|
int get slowFrames;
|
|
int get maxBuildUs;
|
|
int get maxRasterUs;
|
|
int get maxTimerDelayUs;
|
|
|
|
/// Create a copy of RequestFrameReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$RequestFrameReportCopyWith<RequestFrameReport> get copyWith =>
|
|
_$RequestFrameReportCopyWithImpl<RequestFrameReport>(
|
|
this as RequestFrameReport,
|
|
_$identity,
|
|
);
|
|
|
|
/// Serializes this RequestFrameReport to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as RequestFrameReport;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is RequestFrameReport &&
|
|
(identical(other.count, _this.count) ||
|
|
other.count == _this.count) &&
|
|
(identical(other.slowFrames, _this.slowFrames) ||
|
|
other.slowFrames == _this.slowFrames) &&
|
|
(identical(other.maxBuildUs, _this.maxBuildUs) ||
|
|
other.maxBuildUs == _this.maxBuildUs) &&
|
|
(identical(other.maxRasterUs, _this.maxRasterUs) ||
|
|
other.maxRasterUs == _this.maxRasterUs) &&
|
|
(identical(other.maxTimerDelayUs, _this.maxTimerDelayUs) ||
|
|
other.maxTimerDelayUs == _this.maxTimerDelayUs));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as RequestFrameReport;
|
|
return Object.hash(
|
|
runtimeType,
|
|
_this.count,
|
|
_this.slowFrames,
|
|
_this.maxBuildUs,
|
|
_this.maxRasterUs,
|
|
_this.maxTimerDelayUs,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as RequestFrameReport;
|
|
return 'RequestFrameReport(count: ${_this.count}, slowFrames: ${_this.slowFrames}, maxBuildUs: ${_this.maxBuildUs}, maxRasterUs: ${_this.maxRasterUs}, maxTimerDelayUs: ${_this.maxTimerDelayUs})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $RequestFrameReportCopyWith<$Res> {
|
|
factory $RequestFrameReportCopyWith(
|
|
RequestFrameReport value,
|
|
$Res Function(RequestFrameReport) _then,
|
|
) = _$RequestFrameReportCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
int count,
|
|
@JsonKey(name: 'over16ms') int slowFrames,
|
|
int maxBuildUs,
|
|
int maxRasterUs,
|
|
int maxTimerDelayUs,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$RequestFrameReportCopyWithImpl<$Res>
|
|
implements $RequestFrameReportCopyWith<$Res> {
|
|
_$RequestFrameReportCopyWithImpl(this._self, this._then);
|
|
|
|
final RequestFrameReport _self;
|
|
final $Res Function(RequestFrameReport) _then;
|
|
|
|
/// Create a copy of RequestFrameReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? count = null,
|
|
Object? slowFrames = null,
|
|
Object? maxBuildUs = null,
|
|
Object? maxRasterUs = null,
|
|
Object? maxTimerDelayUs = null,
|
|
}) {
|
|
return _then(
|
|
RequestFrameReport(
|
|
count: null == count
|
|
? _self.count
|
|
: count // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
slowFrames: null == slowFrames
|
|
? _self.slowFrames
|
|
: slowFrames // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
maxBuildUs: null == maxBuildUs
|
|
? _self.maxBuildUs
|
|
: maxBuildUs // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
maxRasterUs: null == maxRasterUs
|
|
? _self.maxRasterUs
|
|
: maxRasterUs // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
maxTimerDelayUs: null == maxTimerDelayUs
|
|
? _self.maxTimerDelayUs
|
|
: maxTimerDelayUs // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [RequestFrameReport].
|
|
extension RequestFrameReportPatterns on RequestFrameReport {
|
|
/// A variant of `map` that fallback to returning `orElse`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_RequestFrameReport value)? $default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestFrameReport() when $default != null:
|
|
return $default(_that);
|
|
case _:
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// Callbacks receives the raw object, upcasted.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case final Subclass2 value:
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_RequestFrameReport value) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestFrameReport():
|
|
return $default(_that);
|
|
case _:
|
|
throw StateError('Unexpected subclass');
|
|
}
|
|
}
|
|
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_RequestFrameReport value)? $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestFrameReport() when $default != null:
|
|
return $default(_that);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// A variant of `when` that fallback to an `orElse` callback.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function(
|
|
int count,
|
|
@JsonKey(name: 'over16ms') int slowFrames,
|
|
int maxBuildUs,
|
|
int maxRasterUs,
|
|
int maxTimerDelayUs,
|
|
)?
|
|
$default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestFrameReport() when $default != null:
|
|
return $default(
|
|
_that.count,
|
|
_that.slowFrames,
|
|
_that.maxBuildUs,
|
|
_that.maxRasterUs,
|
|
_that.maxTimerDelayUs,
|
|
);
|
|
case _:
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// As opposed to `map`, this offers destructuring.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case Subclass2(:final field2):
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function(
|
|
int count,
|
|
@JsonKey(name: 'over16ms') int slowFrames,
|
|
int maxBuildUs,
|
|
int maxRasterUs,
|
|
int maxTimerDelayUs,
|
|
)
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestFrameReport():
|
|
return $default(
|
|
_that.count,
|
|
_that.slowFrames,
|
|
_that.maxBuildUs,
|
|
_that.maxRasterUs,
|
|
_that.maxTimerDelayUs,
|
|
);
|
|
case _:
|
|
throw StateError('Unexpected subclass');
|
|
}
|
|
}
|
|
|
|
/// A variant of `when` that fallback to returning `null`
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function(
|
|
int count,
|
|
@JsonKey(name: 'over16ms') int slowFrames,
|
|
int maxBuildUs,
|
|
int maxRasterUs,
|
|
int maxTimerDelayUs,
|
|
)?
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestFrameReport() when $default != null:
|
|
return $default(
|
|
_that.count,
|
|
_that.slowFrames,
|
|
_that.maxBuildUs,
|
|
_that.maxRasterUs,
|
|
_that.maxTimerDelayUs,
|
|
);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _RequestFrameReport implements RequestFrameReport {
|
|
const _RequestFrameReport({
|
|
required this.count,
|
|
@JsonKey(name: 'over16ms') required this.slowFrames,
|
|
required this.maxBuildUs,
|
|
required this.maxRasterUs,
|
|
required this.maxTimerDelayUs,
|
|
});
|
|
factory _RequestFrameReport.fromJson(Map<String, dynamic> json) =>
|
|
_$RequestFrameReportFromJson(json);
|
|
|
|
@override
|
|
final int count;
|
|
@override
|
|
@JsonKey(name: 'over16ms')
|
|
final int slowFrames;
|
|
@override
|
|
final int maxBuildUs;
|
|
@override
|
|
final int maxRasterUs;
|
|
@override
|
|
final int maxTimerDelayUs;
|
|
|
|
/// Create a copy of RequestFrameReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$RequestFrameReportCopyWith<_RequestFrameReport> get copyWith =>
|
|
__$RequestFrameReportCopyWithImpl<_RequestFrameReport>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$RequestFrameReportToJson(this);
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _RequestFrameReport &&
|
|
(identical(other.count, count) || other.count == count) &&
|
|
(identical(other.slowFrames, slowFrames) ||
|
|
other.slowFrames == slowFrames) &&
|
|
(identical(other.maxBuildUs, maxBuildUs) ||
|
|
other.maxBuildUs == maxBuildUs) &&
|
|
(identical(other.maxRasterUs, maxRasterUs) ||
|
|
other.maxRasterUs == maxRasterUs) &&
|
|
(identical(other.maxTimerDelayUs, maxTimerDelayUs) ||
|
|
other.maxTimerDelayUs == maxTimerDelayUs));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(
|
|
runtimeType,
|
|
count,
|
|
slowFrames,
|
|
maxBuildUs,
|
|
maxRasterUs,
|
|
maxTimerDelayUs,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'RequestFrameReport(count: $count, slowFrames: $slowFrames, maxBuildUs: $maxBuildUs, maxRasterUs: $maxRasterUs, maxTimerDelayUs: $maxTimerDelayUs)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$RequestFrameReportCopyWith<$Res>
|
|
implements $RequestFrameReportCopyWith<$Res> {
|
|
factory _$RequestFrameReportCopyWith(
|
|
_RequestFrameReport value,
|
|
$Res Function(_RequestFrameReport) _then,
|
|
) = __$RequestFrameReportCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
int count,
|
|
@JsonKey(name: 'over16ms') int slowFrames,
|
|
int maxBuildUs,
|
|
int maxRasterUs,
|
|
int maxTimerDelayUs,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$RequestFrameReportCopyWithImpl<$Res>
|
|
implements _$RequestFrameReportCopyWith<$Res> {
|
|
__$RequestFrameReportCopyWithImpl(this._self, this._then);
|
|
|
|
final _RequestFrameReport _self;
|
|
final $Res Function(_RequestFrameReport) _then;
|
|
|
|
/// Create a copy of RequestFrameReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? count = null,
|
|
Object? slowFrames = null,
|
|
Object? maxBuildUs = null,
|
|
Object? maxRasterUs = null,
|
|
Object? maxTimerDelayUs = null,
|
|
}) {
|
|
return _then(
|
|
_RequestFrameReport(
|
|
count: null == count
|
|
? _self.count
|
|
: count // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
slowFrames: null == slowFrames
|
|
? _self.slowFrames
|
|
: slowFrames // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
maxBuildUs: null == maxBuildUs
|
|
? _self.maxBuildUs
|
|
: maxBuildUs // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
maxRasterUs: null == maxRasterUs
|
|
? _self.maxRasterUs
|
|
: maxRasterUs // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
maxTimerDelayUs: null == maxTimerDelayUs
|
|
? _self.maxTimerDelayUs
|
|
: maxTimerDelayUs // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$RequestReport {
|
|
int get version;
|
|
String get outcome;
|
|
int get elapsedUs;
|
|
int? get preparationUs;
|
|
RequestFrameReport get frames;
|
|
List<Map<String, Object?>> get runs;
|
|
@JsonKey(includeIfNull: false)
|
|
DateTime? get at;
|
|
@JsonKey(includeIfNull: false)
|
|
String? get requestId;
|
|
@JsonKey(includeIfNull: false)
|
|
String? get sessionId;
|
|
|
|
/// Create a copy of RequestReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$RequestReportCopyWith<RequestReport> get copyWith =>
|
|
_$RequestReportCopyWithImpl<RequestReport>(
|
|
this as RequestReport,
|
|
_$identity,
|
|
);
|
|
|
|
/// Serializes this RequestReport to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as RequestReport;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is RequestReport &&
|
|
(identical(other.version, _this.version) ||
|
|
other.version == _this.version) &&
|
|
(identical(other.outcome, _this.outcome) ||
|
|
other.outcome == _this.outcome) &&
|
|
(identical(other.elapsedUs, _this.elapsedUs) ||
|
|
other.elapsedUs == _this.elapsedUs) &&
|
|
(identical(other.preparationUs, _this.preparationUs) ||
|
|
other.preparationUs == _this.preparationUs) &&
|
|
(identical(other.frames, _this.frames) ||
|
|
other.frames == _this.frames) &&
|
|
const DeepCollectionEquality().equals(other.runs, _this.runs) &&
|
|
(identical(other.at, _this.at) || other.at == _this.at) &&
|
|
(identical(other.requestId, _this.requestId) ||
|
|
other.requestId == _this.requestId) &&
|
|
(identical(other.sessionId, _this.sessionId) ||
|
|
other.sessionId == _this.sessionId));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as RequestReport;
|
|
return Object.hash(
|
|
runtimeType,
|
|
_this.version,
|
|
_this.outcome,
|
|
_this.elapsedUs,
|
|
_this.preparationUs,
|
|
_this.frames,
|
|
const DeepCollectionEquality().hash(_this.runs),
|
|
_this.at,
|
|
_this.requestId,
|
|
_this.sessionId,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as RequestReport;
|
|
return 'RequestReport(version: ${_this.version}, outcome: ${_this.outcome}, elapsedUs: ${_this.elapsedUs}, preparationUs: ${_this.preparationUs}, frames: ${_this.frames}, runs: ${_this.runs}, at: ${_this.at}, requestId: ${_this.requestId}, sessionId: ${_this.sessionId})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $RequestReportCopyWith<$Res> {
|
|
factory $RequestReportCopyWith(
|
|
RequestReport value,
|
|
$Res Function(RequestReport) _then,
|
|
) = _$RequestReportCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
int version,
|
|
String outcome,
|
|
int elapsedUs,
|
|
int? preparationUs,
|
|
RequestFrameReport frames,
|
|
List<Map<String, Object?>> runs,
|
|
@JsonKey(includeIfNull: false) DateTime? at,
|
|
@JsonKey(includeIfNull: false) String? requestId,
|
|
@JsonKey(includeIfNull: false) String? sessionId,
|
|
});
|
|
|
|
$RequestFrameReportCopyWith<$Res> get frames;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$RequestReportCopyWithImpl<$Res>
|
|
implements $RequestReportCopyWith<$Res> {
|
|
_$RequestReportCopyWithImpl(this._self, this._then);
|
|
|
|
final RequestReport _self;
|
|
final $Res Function(RequestReport) _then;
|
|
|
|
/// Create a copy of RequestReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? version = null,
|
|
Object? outcome = null,
|
|
Object? elapsedUs = null,
|
|
Object? preparationUs = freezed,
|
|
Object? frames = null,
|
|
Object? runs = null,
|
|
Object? at = freezed,
|
|
Object? requestId = freezed,
|
|
Object? sessionId = freezed,
|
|
}) {
|
|
return _then(
|
|
RequestReport(
|
|
version: null == version
|
|
? _self.version
|
|
: version // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
outcome: null == outcome
|
|
? _self.outcome
|
|
: outcome // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
elapsedUs: null == elapsedUs
|
|
? _self.elapsedUs
|
|
: elapsedUs // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
preparationUs: freezed == preparationUs
|
|
? _self.preparationUs
|
|
: preparationUs // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
frames: null == frames
|
|
? _self.frames
|
|
: frames // ignore: cast_nullable_to_non_nullable
|
|
as RequestFrameReport,
|
|
runs: null == runs
|
|
? _self.runs
|
|
: runs // ignore: cast_nullable_to_non_nullable
|
|
as List<Map<String, Object?>>,
|
|
at: freezed == at
|
|
? _self.at
|
|
: at // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
requestId: freezed == requestId
|
|
? _self.requestId
|
|
: requestId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
sessionId: freezed == sessionId
|
|
? _self.sessionId
|
|
: sessionId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of RequestReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$RequestFrameReportCopyWith<$Res> get frames {
|
|
return $RequestFrameReportCopyWith<$Res>(_self.frames, (value) {
|
|
return _then(_self.copyWith(frames: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [RequestReport].
|
|
extension RequestReportPatterns on RequestReport {
|
|
/// A variant of `map` that fallback to returning `orElse`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_RequestReport value)? $default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestReport() when $default != null:
|
|
return $default(_that);
|
|
case _:
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// Callbacks receives the raw object, upcasted.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case final Subclass2 value:
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_RequestReport value) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestReport():
|
|
return $default(_that);
|
|
case _:
|
|
throw StateError('Unexpected subclass');
|
|
}
|
|
}
|
|
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_RequestReport value)? $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestReport() when $default != null:
|
|
return $default(_that);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// A variant of `when` that fallback to an `orElse` callback.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function(
|
|
int version,
|
|
String outcome,
|
|
int elapsedUs,
|
|
int? preparationUs,
|
|
RequestFrameReport frames,
|
|
List<Map<String, Object?>> runs,
|
|
@JsonKey(includeIfNull: false) DateTime? at,
|
|
@JsonKey(includeIfNull: false) String? requestId,
|
|
@JsonKey(includeIfNull: false) String? sessionId,
|
|
)?
|
|
$default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestReport() when $default != null:
|
|
return $default(
|
|
_that.version,
|
|
_that.outcome,
|
|
_that.elapsedUs,
|
|
_that.preparationUs,
|
|
_that.frames,
|
|
_that.runs,
|
|
_that.at,
|
|
_that.requestId,
|
|
_that.sessionId,
|
|
);
|
|
case _:
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// As opposed to `map`, this offers destructuring.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case Subclass2(:final field2):
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function(
|
|
int version,
|
|
String outcome,
|
|
int elapsedUs,
|
|
int? preparationUs,
|
|
RequestFrameReport frames,
|
|
List<Map<String, Object?>> runs,
|
|
@JsonKey(includeIfNull: false) DateTime? at,
|
|
@JsonKey(includeIfNull: false) String? requestId,
|
|
@JsonKey(includeIfNull: false) String? sessionId,
|
|
)
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestReport():
|
|
return $default(
|
|
_that.version,
|
|
_that.outcome,
|
|
_that.elapsedUs,
|
|
_that.preparationUs,
|
|
_that.frames,
|
|
_that.runs,
|
|
_that.at,
|
|
_that.requestId,
|
|
_that.sessionId,
|
|
);
|
|
case _:
|
|
throw StateError('Unexpected subclass');
|
|
}
|
|
}
|
|
|
|
/// A variant of `when` that fallback to returning `null`
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function(
|
|
int version,
|
|
String outcome,
|
|
int elapsedUs,
|
|
int? preparationUs,
|
|
RequestFrameReport frames,
|
|
List<Map<String, Object?>> runs,
|
|
@JsonKey(includeIfNull: false) DateTime? at,
|
|
@JsonKey(includeIfNull: false) String? requestId,
|
|
@JsonKey(includeIfNull: false) String? sessionId,
|
|
)?
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RequestReport() when $default != null:
|
|
return $default(
|
|
_that.version,
|
|
_that.outcome,
|
|
_that.elapsedUs,
|
|
_that.preparationUs,
|
|
_that.frames,
|
|
_that.runs,
|
|
_that.at,
|
|
_that.requestId,
|
|
_that.sessionId,
|
|
);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _RequestReport implements RequestReport {
|
|
const _RequestReport({
|
|
this.version = 1,
|
|
required this.outcome,
|
|
required this.elapsedUs,
|
|
this.preparationUs,
|
|
required this.frames,
|
|
required List<Map<String, Object?>> runs,
|
|
@JsonKey(includeIfNull: false) this.at,
|
|
@JsonKey(includeIfNull: false) this.requestId,
|
|
@JsonKey(includeIfNull: false) this.sessionId,
|
|
}) : _runs = runs;
|
|
factory _RequestReport.fromJson(Map<String, dynamic> json) =>
|
|
_$RequestReportFromJson(json);
|
|
|
|
@override
|
|
@JsonKey()
|
|
final int version;
|
|
@override
|
|
final String outcome;
|
|
@override
|
|
final int elapsedUs;
|
|
@override
|
|
final int? preparationUs;
|
|
@override
|
|
final RequestFrameReport frames;
|
|
final List<Map<String, Object?>> _runs;
|
|
@override
|
|
List<Map<String, Object?>> get runs {
|
|
if (_runs is EqualUnmodifiableListView) return _runs;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_runs);
|
|
}
|
|
|
|
@override
|
|
@JsonKey(includeIfNull: false)
|
|
final DateTime? at;
|
|
@override
|
|
@JsonKey(includeIfNull: false)
|
|
final String? requestId;
|
|
@override
|
|
@JsonKey(includeIfNull: false)
|
|
final String? sessionId;
|
|
|
|
/// Create a copy of RequestReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$RequestReportCopyWith<_RequestReport> get copyWith =>
|
|
__$RequestReportCopyWithImpl<_RequestReport>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$RequestReportToJson(this);
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _RequestReport &&
|
|
(identical(other.version, version) || other.version == version) &&
|
|
(identical(other.outcome, outcome) || other.outcome == outcome) &&
|
|
(identical(other.elapsedUs, elapsedUs) ||
|
|
other.elapsedUs == elapsedUs) &&
|
|
(identical(other.preparationUs, preparationUs) ||
|
|
other.preparationUs == preparationUs) &&
|
|
(identical(other.frames, frames) || other.frames == frames) &&
|
|
const DeepCollectionEquality().equals(other.runs, _runs) &&
|
|
(identical(other.at, at) || other.at == at) &&
|
|
(identical(other.requestId, requestId) ||
|
|
other.requestId == requestId) &&
|
|
(identical(other.sessionId, sessionId) ||
|
|
other.sessionId == sessionId));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(
|
|
runtimeType,
|
|
version,
|
|
outcome,
|
|
elapsedUs,
|
|
preparationUs,
|
|
frames,
|
|
const DeepCollectionEquality().hash(_runs),
|
|
at,
|
|
requestId,
|
|
sessionId,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'RequestReport(version: $version, outcome: $outcome, elapsedUs: $elapsedUs, preparationUs: $preparationUs, frames: $frames, runs: $runs, at: $at, requestId: $requestId, sessionId: $sessionId)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$RequestReportCopyWith<$Res>
|
|
implements $RequestReportCopyWith<$Res> {
|
|
factory _$RequestReportCopyWith(
|
|
_RequestReport value,
|
|
$Res Function(_RequestReport) _then,
|
|
) = __$RequestReportCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
int version,
|
|
String outcome,
|
|
int elapsedUs,
|
|
int? preparationUs,
|
|
RequestFrameReport frames,
|
|
List<Map<String, Object?>> runs,
|
|
@JsonKey(includeIfNull: false) DateTime? at,
|
|
@JsonKey(includeIfNull: false) String? requestId,
|
|
@JsonKey(includeIfNull: false) String? sessionId,
|
|
});
|
|
|
|
@override
|
|
$RequestFrameReportCopyWith<$Res> get frames;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$RequestReportCopyWithImpl<$Res>
|
|
implements _$RequestReportCopyWith<$Res> {
|
|
__$RequestReportCopyWithImpl(this._self, this._then);
|
|
|
|
final _RequestReport _self;
|
|
final $Res Function(_RequestReport) _then;
|
|
|
|
/// Create a copy of RequestReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? version = null,
|
|
Object? outcome = null,
|
|
Object? elapsedUs = null,
|
|
Object? preparationUs = freezed,
|
|
Object? frames = null,
|
|
Object? runs = null,
|
|
Object? at = freezed,
|
|
Object? requestId = freezed,
|
|
Object? sessionId = freezed,
|
|
}) {
|
|
return _then(
|
|
_RequestReport(
|
|
version: null == version
|
|
? _self.version
|
|
: version // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
outcome: null == outcome
|
|
? _self.outcome
|
|
: outcome // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
elapsedUs: null == elapsedUs
|
|
? _self.elapsedUs
|
|
: elapsedUs // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
preparationUs: freezed == preparationUs
|
|
? _self.preparationUs
|
|
: preparationUs // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
frames: null == frames
|
|
? _self.frames
|
|
: frames // ignore: cast_nullable_to_non_nullable
|
|
as RequestFrameReport,
|
|
runs: null == runs
|
|
? _self._runs
|
|
: runs // ignore: cast_nullable_to_non_nullable
|
|
as List<Map<String, Object?>>,
|
|
at: freezed == at
|
|
? _self.at
|
|
: at // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
requestId: freezed == requestId
|
|
? _self.requestId
|
|
: requestId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
sessionId: freezed == sessionId
|
|
? _self.sessionId
|
|
: sessionId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of RequestReport
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$RequestFrameReportCopyWith<$Res> get frames {
|
|
return $RequestFrameReportCopyWith<$Res>(_self.frames, (value) {
|
|
return _then(_self.copyWith(frames: value));
|
|
});
|
|
}
|
|
}
|