diff --git a/examples/counter_example/lib/counter/actions/counter_action.dart b/examples/counter_example/lib/counter/actions/counter_action.dart index 4b156caa..864b1b6a 100644 --- a/examples/counter_example/lib/counter/actions/counter_action.dart +++ b/examples/counter_example/lib/counter/actions/counter_action.dart @@ -9,7 +9,7 @@ enum CounterActionType { } @freezed -class CounterAction with _$CounterAction { +abstract class CounterAction with _$CounterAction { const factory CounterAction({ required CounterActionType counterActionType, @Default(1) int delta, diff --git a/examples/counter_example/lib/counter/actions/counter_action.freezed.dart b/examples/counter_example/lib/counter/actions/counter_action.freezed.dart index af76d308..e0263133 100644 --- a/examples/counter_example/lib/counter/actions/counter_action.freezed.dart +++ b/examples/counter_example/lib/counter/actions/counter_action.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,61 @@ part of 'counter_action.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -CounterAction _$CounterActionFromJson(Map json) { - return _CounterAction.fromJson(json); -} - /// @nodoc mixin _$CounterAction { - CounterActionType get counterActionType => throw _privateConstructorUsedError; - int get delta => throw _privateConstructorUsedError; - - /// Serializes this CounterAction to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + CounterActionType get counterActionType; + int get delta; /// Create a copy of CounterAction /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $CounterActionCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$CounterActionCopyWithImpl( + this as CounterAction, _$identity); -/// @nodoc -abstract class $CounterActionCopyWith<$Res> { - factory $CounterActionCopyWith( - CounterAction value, $Res Function(CounterAction) then) = - _$CounterActionCopyWithImpl<$Res, CounterAction>; - @useResult - $Res call({CounterActionType counterActionType, int delta}); -} + /// Serializes this CounterAction to a JSON map. + Map toJson(); -/// @nodoc -class _$CounterActionCopyWithImpl<$Res, $Val extends CounterAction> - implements $CounterActionCopyWith<$Res> { - _$CounterActionCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is CounterAction && + (identical(other.counterActionType, counterActionType) || + other.counterActionType == counterActionType) && + (identical(other.delta, delta) || other.delta == delta)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, counterActionType, delta); - /// Create a copy of CounterAction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? counterActionType = null, - Object? delta = null, - }) { - return _then(_value.copyWith( - counterActionType: null == counterActionType - ? _value.counterActionType - : counterActionType // ignore: cast_nullable_to_non_nullable - as CounterActionType, - delta: null == delta - ? _value.delta - : delta // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + String toString() { + return 'CounterAction(counterActionType: $counterActionType, delta: $delta)'; } } /// @nodoc -abstract class _$$CounterActionImplCopyWith<$Res> - implements $CounterActionCopyWith<$Res> { - factory _$$CounterActionImplCopyWith( - _$CounterActionImpl value, $Res Function(_$CounterActionImpl) then) = - __$$CounterActionImplCopyWithImpl<$Res>; - @override +abstract mixin class $CounterActionCopyWith<$Res> { + factory $CounterActionCopyWith( + CounterAction value, $Res Function(CounterAction) _then) = + _$CounterActionCopyWithImpl; @useResult $Res call({CounterActionType counterActionType, int delta}); } /// @nodoc -class __$$CounterActionImplCopyWithImpl<$Res> - extends _$CounterActionCopyWithImpl<$Res, _$CounterActionImpl> - implements _$$CounterActionImplCopyWith<$Res> { - __$$CounterActionImplCopyWithImpl( - _$CounterActionImpl _value, $Res Function(_$CounterActionImpl) _then) - : super(_value, _then); +class _$CounterActionCopyWithImpl<$Res> + implements $CounterActionCopyWith<$Res> { + _$CounterActionCopyWithImpl(this._self, this._then); + + final CounterAction _self; + final $Res Function(CounterAction) _then; /// Create a copy of CounterAction /// with the given fields replaced by the non-null parameter values. @@ -100,13 +74,13 @@ class __$$CounterActionImplCopyWithImpl<$Res> Object? counterActionType = null, Object? delta = null, }) { - return _then(_$CounterActionImpl( + return _then(_self.copyWith( counterActionType: null == counterActionType - ? _value.counterActionType + ? _self.counterActionType : counterActionType // ignore: cast_nullable_to_non_nullable as CounterActionType, delta: null == delta - ? _value.delta + ? _self.delta : delta // ignore: cast_nullable_to_non_nullable as int, )); @@ -115,11 +89,10 @@ class __$$CounterActionImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$CounterActionImpl implements _CounterAction { - const _$CounterActionImpl({required this.counterActionType, this.delta = 1}); - - factory _$CounterActionImpl.fromJson(Map json) => - _$$CounterActionImplFromJson(json); +class _CounterAction implements CounterAction { + const _CounterAction({required this.counterActionType, this.delta = 1}); + factory _CounterAction.fromJson(Map json) => + _$CounterActionFromJson(json); @override final CounterActionType counterActionType; @@ -127,16 +100,26 @@ class _$CounterActionImpl implements _CounterAction { @JsonKey() final int delta; + /// Create a copy of CounterAction + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'CounterAction(counterActionType: $counterActionType, delta: $delta)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$CounterActionCopyWith<_CounterAction> get copyWith => + __$CounterActionCopyWithImpl<_CounterAction>(this, _$identity); + + @override + Map toJson() { + return _$CounterActionToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$CounterActionImpl && + other is _CounterAction && (identical(other.counterActionType, counterActionType) || other.counterActionType == counterActionType) && (identical(other.delta, delta) || other.delta == delta)); @@ -146,39 +129,50 @@ class _$CounterActionImpl implements _CounterAction { @override int get hashCode => Object.hash(runtimeType, counterActionType, delta); - /// Create a copy of CounterAction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$CounterActionImplCopyWith<_$CounterActionImpl> get copyWith => - __$$CounterActionImplCopyWithImpl<_$CounterActionImpl>(this, _$identity); - @override - Map toJson() { - return _$$CounterActionImplToJson( - this, - ); + String toString() { + return 'CounterAction(counterActionType: $counterActionType, delta: $delta)'; } } -abstract class _CounterAction implements CounterAction { - const factory _CounterAction( - {required final CounterActionType counterActionType, - final int delta}) = _$CounterActionImpl; +/// @nodoc +abstract mixin class _$CounterActionCopyWith<$Res> + implements $CounterActionCopyWith<$Res> { + factory _$CounterActionCopyWith( + _CounterAction value, $Res Function(_CounterAction) _then) = + __$CounterActionCopyWithImpl; + @override + @useResult + $Res call({CounterActionType counterActionType, int delta}); +} - factory _CounterAction.fromJson(Map json) = - _$CounterActionImpl.fromJson; +/// @nodoc +class __$CounterActionCopyWithImpl<$Res> + implements _$CounterActionCopyWith<$Res> { + __$CounterActionCopyWithImpl(this._self, this._then); - @override - CounterActionType get counterActionType; - @override - int get delta; + final _CounterAction _self; + final $Res Function(_CounterAction) _then; /// Create a copy of CounterAction /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$CounterActionImplCopyWith<_$CounterActionImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? counterActionType = null, + Object? delta = null, + }) { + return _then(_CounterAction( + counterActionType: null == counterActionType + ? _self.counterActionType + : counterActionType // ignore: cast_nullable_to_non_nullable + as CounterActionType, + delta: null == delta + ? _self.delta + : delta // ignore: cast_nullable_to_non_nullable + as int, + )); + } } + +// dart format on diff --git a/examples/counter_example/lib/counter/actions/counter_action.g.dart b/examples/counter_example/lib/counter/actions/counter_action.g.dart index a1e44d48..5024854c 100644 --- a/examples/counter_example/lib/counter/actions/counter_action.g.dart +++ b/examples/counter_example/lib/counter/actions/counter_action.g.dart @@ -6,14 +6,14 @@ part of 'counter_action.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CounterActionImpl _$$CounterActionImplFromJson(Map json) => - _$CounterActionImpl( +_CounterAction _$CounterActionFromJson(Map json) => + _CounterAction( counterActionType: $enumDecode(_$CounterActionTypeEnumMap, json['counterActionType']), delta: (json['delta'] as num?)?.toInt() ?? 1, ); -Map _$$CounterActionImplToJson(_$CounterActionImpl instance) => +Map _$CounterActionToJson(_CounterAction instance) => { 'counterActionType': _$CounterActionTypeEnumMap[instance.counterActionType]!, diff --git a/examples/counter_example/lib/counter/actions/counter_action_parser.dart b/examples/counter_example/lib/counter/actions/counter_action_parser.dart index 571e2041..94cb9966 100644 --- a/examples/counter_example/lib/counter/actions/counter_action_parser.dart +++ b/examples/counter_example/lib/counter/actions/counter_action_parser.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:counter_example/counter/cubit/counter_cubit.dart'; -import 'package:flutter/src/widgets/framework.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:stac/stac.dart'; diff --git a/examples/counter_example/lib/counter/widgets/counter_screen.dart b/examples/counter_example/lib/counter/widgets/counter_screen.dart index 94b4868e..b09c29e9 100644 --- a/examples/counter_example/lib/counter/widgets/counter_screen.dart +++ b/examples/counter_example/lib/counter/widgets/counter_screen.dart @@ -4,7 +4,7 @@ part 'counter_screen.freezed.dart'; part 'counter_screen.g.dart'; @freezed -class CounterScreen with _$CounterScreen { +abstract class CounterScreen with _$CounterScreen { const factory CounterScreen({ required String title, required String description, diff --git a/examples/counter_example/lib/counter/widgets/counter_screen.freezed.dart b/examples/counter_example/lib/counter/widgets/counter_screen.freezed.dart index 9b8778a2..40336cb3 100644 --- a/examples/counter_example/lib/counter/widgets/counter_screen.freezed.dart +++ b/examples/counter_example/lib/counter/widgets/counter_screen.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,100 +10,65 @@ part of 'counter_screen.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -CounterScreen _$CounterScreenFromJson(Map json) { - return _CounterScreen.fromJson(json); -} - /// @nodoc mixin _$CounterScreen { - String get title => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - int get initialCount => throw _privateConstructorUsedError; - Map? get onIncrement => throw _privateConstructorUsedError; - Map? get onDecrement => throw _privateConstructorUsedError; - - /// Serializes this CounterScreen to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get title; + String get description; + int get initialCount; + Map? get onIncrement; + Map? get onDecrement; /// Create a copy of CounterScreen /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $CounterScreenCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$CounterScreenCopyWithImpl( + this as CounterScreen, _$identity); -/// @nodoc -abstract class $CounterScreenCopyWith<$Res> { - factory $CounterScreenCopyWith( - CounterScreen value, $Res Function(CounterScreen) then) = - _$CounterScreenCopyWithImpl<$Res, CounterScreen>; - @useResult - $Res call( - {String title, - String description, - int initialCount, - Map? onIncrement, - Map? onDecrement}); -} + /// Serializes this CounterScreen to a JSON map. + Map toJson(); -/// @nodoc -class _$CounterScreenCopyWithImpl<$Res, $Val extends CounterScreen> - implements $CounterScreenCopyWith<$Res> { - _$CounterScreenCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is CounterScreen && + (identical(other.title, title) || other.title == title) && + (identical(other.description, description) || + other.description == description) && + (identical(other.initialCount, initialCount) || + other.initialCount == initialCount) && + const DeepCollectionEquality() + .equals(other.onIncrement, onIncrement) && + const DeepCollectionEquality() + .equals(other.onDecrement, onDecrement)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + title, + description, + initialCount, + const DeepCollectionEquality().hash(onIncrement), + const DeepCollectionEquality().hash(onDecrement)); - /// Create a copy of CounterScreen - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? title = null, - Object? description = null, - Object? initialCount = null, - Object? onIncrement = freezed, - Object? onDecrement = freezed, - }) { - return _then(_value.copyWith( - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - initialCount: null == initialCount - ? _value.initialCount - : initialCount // ignore: cast_nullable_to_non_nullable - as int, - onIncrement: freezed == onIncrement - ? _value.onIncrement - : onIncrement // ignore: cast_nullable_to_non_nullable - as Map?, - onDecrement: freezed == onDecrement - ? _value.onDecrement - : onDecrement // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'CounterScreen(title: $title, description: $description, initialCount: $initialCount, onIncrement: $onIncrement, onDecrement: $onDecrement)'; } } /// @nodoc -abstract class _$$CounterScreenImplCopyWith<$Res> - implements $CounterScreenCopyWith<$Res> { - factory _$$CounterScreenImplCopyWith( - _$CounterScreenImpl value, $Res Function(_$CounterScreenImpl) then) = - __$$CounterScreenImplCopyWithImpl<$Res>; - @override +abstract mixin class $CounterScreenCopyWith<$Res> { + factory $CounterScreenCopyWith( + CounterScreen value, $Res Function(CounterScreen) _then) = + _$CounterScreenCopyWithImpl; @useResult $Res call( {String title, @@ -113,12 +79,12 @@ abstract class _$$CounterScreenImplCopyWith<$Res> } /// @nodoc -class __$$CounterScreenImplCopyWithImpl<$Res> - extends _$CounterScreenCopyWithImpl<$Res, _$CounterScreenImpl> - implements _$$CounterScreenImplCopyWith<$Res> { - __$$CounterScreenImplCopyWithImpl( - _$CounterScreenImpl _value, $Res Function(_$CounterScreenImpl) _then) - : super(_value, _then); +class _$CounterScreenCopyWithImpl<$Res> + implements $CounterScreenCopyWith<$Res> { + _$CounterScreenCopyWithImpl(this._self, this._then); + + final CounterScreen _self; + final $Res Function(CounterScreen) _then; /// Create a copy of CounterScreen /// with the given fields replaced by the non-null parameter values. @@ -131,25 +97,25 @@ class __$$CounterScreenImplCopyWithImpl<$Res> Object? onIncrement = freezed, Object? onDecrement = freezed, }) { - return _then(_$CounterScreenImpl( + return _then(_self.copyWith( title: null == title - ? _value.title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as String, description: null == description - ? _value.description + ? _self.description : description // ignore: cast_nullable_to_non_nullable as String, initialCount: null == initialCount - ? _value.initialCount + ? _self.initialCount : initialCount // ignore: cast_nullable_to_non_nullable as int, onIncrement: freezed == onIncrement - ? _value._onIncrement + ? _self.onIncrement : onIncrement // ignore: cast_nullable_to_non_nullable as Map?, onDecrement: freezed == onDecrement - ? _value._onDecrement + ? _self.onDecrement : onDecrement // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -158,8 +124,8 @@ class __$$CounterScreenImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$CounterScreenImpl implements _CounterScreen { - const _$CounterScreenImpl( +class _CounterScreen implements CounterScreen { + const _CounterScreen( {required this.title, required this.description, this.initialCount = 0, @@ -167,9 +133,8 @@ class _$CounterScreenImpl implements _CounterScreen { final Map? onDecrement}) : _onIncrement = onIncrement, _onDecrement = onDecrement; - - factory _$CounterScreenImpl.fromJson(Map json) => - _$$CounterScreenImplFromJson(json); + factory _CounterScreen.fromJson(Map json) => + _$CounterScreenFromJson(json); @override final String title; @@ -198,16 +163,26 @@ class _$CounterScreenImpl implements _CounterScreen { return EqualUnmodifiableMapView(value); } + /// Create a copy of CounterScreen + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'CounterScreen(title: $title, description: $description, initialCount: $initialCount, onIncrement: $onIncrement, onDecrement: $onDecrement)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$CounterScreenCopyWith<_CounterScreen> get copyWith => + __$CounterScreenCopyWithImpl<_CounterScreen>(this, _$identity); + + @override + Map toJson() { + return _$CounterScreenToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$CounterScreenImpl && + other is _CounterScreen && (identical(other.title, title) || other.title == title) && (identical(other.description, description) || other.description == description) && @@ -229,48 +204,70 @@ class _$CounterScreenImpl implements _CounterScreen { const DeepCollectionEquality().hash(_onIncrement), const DeepCollectionEquality().hash(_onDecrement)); - /// Create a copy of CounterScreen - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$CounterScreenImplCopyWith<_$CounterScreenImpl> get copyWith => - __$$CounterScreenImplCopyWithImpl<_$CounterScreenImpl>(this, _$identity); - @override - Map toJson() { - return _$$CounterScreenImplToJson( - this, - ); + String toString() { + return 'CounterScreen(title: $title, description: $description, initialCount: $initialCount, onIncrement: $onIncrement, onDecrement: $onDecrement)'; } } -abstract class _CounterScreen implements CounterScreen { - const factory _CounterScreen( - {required final String title, - required final String description, - final int initialCount, - final Map? onIncrement, - final Map? onDecrement}) = _$CounterScreenImpl; +/// @nodoc +abstract mixin class _$CounterScreenCopyWith<$Res> + implements $CounterScreenCopyWith<$Res> { + factory _$CounterScreenCopyWith( + _CounterScreen value, $Res Function(_CounterScreen) _then) = + __$CounterScreenCopyWithImpl; + @override + @useResult + $Res call( + {String title, + String description, + int initialCount, + Map? onIncrement, + Map? onDecrement}); +} - factory _CounterScreen.fromJson(Map json) = - _$CounterScreenImpl.fromJson; +/// @nodoc +class __$CounterScreenCopyWithImpl<$Res> + implements _$CounterScreenCopyWith<$Res> { + __$CounterScreenCopyWithImpl(this._self, this._then); - @override - String get title; - @override - String get description; - @override - int get initialCount; - @override - Map? get onIncrement; - @override - Map? get onDecrement; + final _CounterScreen _self; + final $Res Function(_CounterScreen) _then; /// Create a copy of CounterScreen /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$CounterScreenImplCopyWith<_$CounterScreenImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? title = null, + Object? description = null, + Object? initialCount = null, + Object? onIncrement = freezed, + Object? onDecrement = freezed, + }) { + return _then(_CounterScreen( + title: null == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + initialCount: null == initialCount + ? _self.initialCount + : initialCount // ignore: cast_nullable_to_non_nullable + as int, + onIncrement: freezed == onIncrement + ? _self._onIncrement + : onIncrement // ignore: cast_nullable_to_non_nullable + as Map?, + onDecrement: freezed == onDecrement + ? _self._onDecrement + : onDecrement // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/examples/counter_example/lib/counter/widgets/counter_screen.g.dart b/examples/counter_example/lib/counter/widgets/counter_screen.g.dart index e6907c47..48fcfe93 100644 --- a/examples/counter_example/lib/counter/widgets/counter_screen.g.dart +++ b/examples/counter_example/lib/counter/widgets/counter_screen.g.dart @@ -6,8 +6,8 @@ part of 'counter_screen.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CounterScreenImpl _$$CounterScreenImplFromJson(Map json) => - _$CounterScreenImpl( +_CounterScreen _$CounterScreenFromJson(Map json) => + _CounterScreen( title: json['title'] as String, description: json['description'] as String, initialCount: (json['initialCount'] as num?)?.toInt() ?? 0, @@ -15,7 +15,7 @@ _$CounterScreenImpl _$$CounterScreenImplFromJson(Map json) => onDecrement: json['onDecrement'] as Map?, ); -Map _$$CounterScreenImplToJson(_$CounterScreenImpl instance) => +Map _$CounterScreenToJson(_CounterScreen instance) => { 'title': instance.title, 'description': instance.description, diff --git a/examples/stac_gallery/lib/app/example/example_screen.dart b/examples/stac_gallery/lib/app/example/example_screen.dart index c4cd11e4..2d1f3d24 100644 --- a/examples/stac_gallery/lib/app/example/example_screen.dart +++ b/examples/stac_gallery/lib/app/example/example_screen.dart @@ -4,7 +4,7 @@ part 'example_screen.freezed.dart'; part 'example_screen.g.dart'; @freezed -class ExampleScreen with _$ExampleScreen { +abstract class ExampleScreen with _$ExampleScreen { const factory ExampleScreen({ required String assetPath, }) = _ExampleScreen; diff --git a/examples/stac_gallery/lib/app/example/example_screen.freezed.dart b/examples/stac_gallery/lib/app/example/example_screen.freezed.dart index ff4cc94d..66af1665 100644 --- a/examples/stac_gallery/lib/app/example/example_screen.freezed.dart +++ b/examples/stac_gallery/lib/app/example/example_screen.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,85 +10,70 @@ part of 'example_screen.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -ExampleScreen _$ExampleScreenFromJson(Map json) { - return _ExampleScreen.fromJson(json); -} - /// @nodoc mixin _$ExampleScreen { - String get assetPath => throw _privateConstructorUsedError; + String get assetPath; - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of ExampleScreen + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $ExampleScreenCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$ExampleScreenCopyWithImpl( + this as ExampleScreen, _$identity); -/// @nodoc -abstract class $ExampleScreenCopyWith<$Res> { - factory $ExampleScreenCopyWith( - ExampleScreen value, $Res Function(ExampleScreen) then) = - _$ExampleScreenCopyWithImpl<$Res, ExampleScreen>; - @useResult - $Res call({String assetPath}); -} + /// Serializes this ExampleScreen to a JSON map. + Map toJson(); -/// @nodoc -class _$ExampleScreenCopyWithImpl<$Res, $Val extends ExampleScreen> - implements $ExampleScreenCopyWith<$Res> { - _$ExampleScreenCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ExampleScreen && + (identical(other.assetPath, assetPath) || + other.assetPath == assetPath)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, assetPath); - @pragma('vm:prefer-inline') @override - $Res call({ - Object? assetPath = null, - }) { - return _then(_value.copyWith( - assetPath: null == assetPath - ? _value.assetPath - : assetPath // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + String toString() { + return 'ExampleScreen(assetPath: $assetPath)'; } } /// @nodoc -abstract class _$$ExampleScreenImplCopyWith<$Res> - implements $ExampleScreenCopyWith<$Res> { - factory _$$ExampleScreenImplCopyWith( - _$ExampleScreenImpl value, $Res Function(_$ExampleScreenImpl) then) = - __$$ExampleScreenImplCopyWithImpl<$Res>; - @override +abstract mixin class $ExampleScreenCopyWith<$Res> { + factory $ExampleScreenCopyWith( + ExampleScreen value, $Res Function(ExampleScreen) _then) = + _$ExampleScreenCopyWithImpl; @useResult $Res call({String assetPath}); } /// @nodoc -class __$$ExampleScreenImplCopyWithImpl<$Res> - extends _$ExampleScreenCopyWithImpl<$Res, _$ExampleScreenImpl> - implements _$$ExampleScreenImplCopyWith<$Res> { - __$$ExampleScreenImplCopyWithImpl( - _$ExampleScreenImpl _value, $Res Function(_$ExampleScreenImpl) _then) - : super(_value, _then); +class _$ExampleScreenCopyWithImpl<$Res> + implements $ExampleScreenCopyWith<$Res> { + _$ExampleScreenCopyWithImpl(this._self, this._then); + + final ExampleScreen _self; + final $Res Function(ExampleScreen) _then; + /// Create a copy of ExampleScreen + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? assetPath = null, }) { - return _then(_$ExampleScreenImpl( + return _then(_self.copyWith( assetPath: null == assetPath - ? _value.assetPath + ? _self.assetPath : assetPath // ignore: cast_nullable_to_non_nullable as String, )); @@ -96,58 +82,81 @@ class __$$ExampleScreenImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$ExampleScreenImpl implements _ExampleScreen { - const _$ExampleScreenImpl({required this.assetPath}); - - factory _$ExampleScreenImpl.fromJson(Map json) => - _$$ExampleScreenImplFromJson(json); +class _ExampleScreen implements ExampleScreen { + const _ExampleScreen({required this.assetPath}); + factory _ExampleScreen.fromJson(Map json) => + _$ExampleScreenFromJson(json); @override final String assetPath; + /// Create a copy of ExampleScreen + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'ExampleScreen(assetPath: $assetPath)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$ExampleScreenCopyWith<_ExampleScreen> get copyWith => + __$ExampleScreenCopyWithImpl<_ExampleScreen>(this, _$identity); + + @override + Map toJson() { + return _$ExampleScreenToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ExampleScreenImpl && + other is _ExampleScreen && (identical(other.assetPath, assetPath) || other.assetPath == assetPath)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, assetPath); - @JsonKey(ignore: true) @override - @pragma('vm:prefer-inline') - _$$ExampleScreenImplCopyWith<_$ExampleScreenImpl> get copyWith => - __$$ExampleScreenImplCopyWithImpl<_$ExampleScreenImpl>(this, _$identity); + String toString() { + return 'ExampleScreen(assetPath: $assetPath)'; + } +} +/// @nodoc +abstract mixin class _$ExampleScreenCopyWith<$Res> + implements $ExampleScreenCopyWith<$Res> { + factory _$ExampleScreenCopyWith( + _ExampleScreen value, $Res Function(_ExampleScreen) _then) = + __$ExampleScreenCopyWithImpl; @override - Map toJson() { - return _$$ExampleScreenImplToJson( - this, - ); - } + @useResult + $Res call({String assetPath}); } -abstract class _ExampleScreen implements ExampleScreen { - const factory _ExampleScreen({required final String assetPath}) = - _$ExampleScreenImpl; +/// @nodoc +class __$ExampleScreenCopyWithImpl<$Res> + implements _$ExampleScreenCopyWith<$Res> { + __$ExampleScreenCopyWithImpl(this._self, this._then); - factory _ExampleScreen.fromJson(Map json) = - _$ExampleScreenImpl.fromJson; + final _ExampleScreen _self; + final $Res Function(_ExampleScreen) _then; + /// Create a copy of ExampleScreen + /// with the given fields replaced by the non-null parameter values. @override - String get assetPath; - @override - @JsonKey(ignore: true) - _$$ExampleScreenImplCopyWith<_$ExampleScreenImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? assetPath = null, + }) { + return _then(_ExampleScreen( + assetPath: null == assetPath + ? _self.assetPath + : assetPath // ignore: cast_nullable_to_non_nullable + as String, + )); + } } + +// dart format on diff --git a/examples/stac_gallery/lib/app/example/example_screen.g.dart b/examples/stac_gallery/lib/app/example/example_screen.g.dart index 49fa1de9..a5e5e9c1 100644 --- a/examples/stac_gallery/lib/app/example/example_screen.g.dart +++ b/examples/stac_gallery/lib/app/example/example_screen.g.dart @@ -6,12 +6,12 @@ part of 'example_screen.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ExampleScreenImpl _$$ExampleScreenImplFromJson(Map json) => - _$ExampleScreenImpl( +_ExampleScreen _$ExampleScreenFromJson(Map json) => + _ExampleScreen( assetPath: json['assetPath'] as String, ); -Map _$$ExampleScreenImplToJson(_$ExampleScreenImpl instance) => +Map _$ExampleScreenToJson(_ExampleScreen instance) => { 'assetPath': instance.assetPath, }; diff --git a/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.dart b/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.dart index ab2798ca..30d8ae8b 100644 --- a/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.dart +++ b/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.dart @@ -8,7 +8,7 @@ part 'stac_dialog_action.freezed.dart'; part 'stac_dialog_action.g.dart'; @freezed -class StacDialogAction with _$StacDialogAction { +abstract class StacDialogAction with _$StacDialogAction { const factory StacDialogAction({ Map? widget, StacNetworkRequest? request, diff --git a/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.freezed.dart b/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.freezed.dart index 1493d364..142b9b51 100644 --- a/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.freezed.dart +++ b/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,42 +10,76 @@ part of 'stac_dialog_action.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacDialogAction _$StacDialogActionFromJson(Map json) { - return _StacDialogAction.fromJson(json); -} - /// @nodoc mixin _$StacDialogAction { - Map? get widget => throw _privateConstructorUsedError; - StacNetworkRequest? get request => throw _privateConstructorUsedError; - String? get assetPath => throw _privateConstructorUsedError; - bool get barrierDismissible => throw _privateConstructorUsedError; - String? get barrierColor => throw _privateConstructorUsedError; - String? get barrierLabel => throw _privateConstructorUsedError; - bool get useSafeArea => throw _privateConstructorUsedError; - TraversalEdgeBehavior? get traversalEdgeBehavior => - throw _privateConstructorUsedError; - - /// Serializes this StacDialogAction to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get widget; + StacNetworkRequest? get request; + String? get assetPath; + bool get barrierDismissible; + String? get barrierColor; + String? get barrierLabel; + bool get useSafeArea; + TraversalEdgeBehavior? get traversalEdgeBehavior; /// Create a copy of StacDialogAction /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacDialogActionCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacDialogActionCopyWithImpl( + this as StacDialogAction, _$identity); + + /// Serializes this StacDialogAction to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacDialogAction && + const DeepCollectionEquality().equals(other.widget, widget) && + (identical(other.request, request) || other.request == request) && + (identical(other.assetPath, assetPath) || + other.assetPath == assetPath) && + (identical(other.barrierDismissible, barrierDismissible) || + other.barrierDismissible == barrierDismissible) && + (identical(other.barrierColor, barrierColor) || + other.barrierColor == barrierColor) && + (identical(other.barrierLabel, barrierLabel) || + other.barrierLabel == barrierLabel) && + (identical(other.useSafeArea, useSafeArea) || + other.useSafeArea == useSafeArea) && + (identical(other.traversalEdgeBehavior, traversalEdgeBehavior) || + other.traversalEdgeBehavior == traversalEdgeBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(widget), + request, + assetPath, + barrierDismissible, + barrierColor, + barrierLabel, + useSafeArea, + traversalEdgeBehavior); + + @override + String toString() { + return 'StacDialogAction(widget: $widget, request: $request, assetPath: $assetPath, barrierDismissible: $barrierDismissible, barrierColor: $barrierColor, barrierLabel: $barrierLabel, useSafeArea: $useSafeArea, traversalEdgeBehavior: $traversalEdgeBehavior)'; + } } /// @nodoc -abstract class $StacDialogActionCopyWith<$Res> { +abstract mixin class $StacDialogActionCopyWith<$Res> { factory $StacDialogActionCopyWith( - StacDialogAction value, $Res Function(StacDialogAction) then) = - _$StacDialogActionCopyWithImpl<$Res, StacDialogAction>; + StacDialogAction value, $Res Function(StacDialogAction) _then) = + _$StacDialogActionCopyWithImpl; @useResult $Res call( {Map? widget, @@ -60,14 +95,12 @@ abstract class $StacDialogActionCopyWith<$Res> { } /// @nodoc -class _$StacDialogActionCopyWithImpl<$Res, $Val extends StacDialogAction> +class _$StacDialogActionCopyWithImpl<$Res> implements $StacDialogActionCopyWith<$Res> { - _$StacDialogActionCopyWithImpl(this._value, this._then); + _$StacDialogActionCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacDialogAction _self; + final $Res Function(StacDialogAction) _then; /// Create a copy of StacDialogAction /// with the given fields replaced by the non-null parameter values. @@ -83,40 +116,40 @@ class _$StacDialogActionCopyWithImpl<$Res, $Val extends StacDialogAction> Object? useSafeArea = null, Object? traversalEdgeBehavior = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( widget: freezed == widget - ? _value.widget + ? _self.widget : widget // ignore: cast_nullable_to_non_nullable as Map?, request: freezed == request - ? _value.request + ? _self.request : request // ignore: cast_nullable_to_non_nullable as StacNetworkRequest?, assetPath: freezed == assetPath - ? _value.assetPath + ? _self.assetPath : assetPath // ignore: cast_nullable_to_non_nullable as String?, barrierDismissible: null == barrierDismissible - ? _value.barrierDismissible + ? _self.barrierDismissible : barrierDismissible // ignore: cast_nullable_to_non_nullable as bool, barrierColor: freezed == barrierColor - ? _value.barrierColor + ? _self.barrierColor : barrierColor // ignore: cast_nullable_to_non_nullable as String?, barrierLabel: freezed == barrierLabel - ? _value.barrierLabel + ? _self.barrierLabel : barrierLabel // ignore: cast_nullable_to_non_nullable as String?, useSafeArea: null == useSafeArea - ? _value.useSafeArea + ? _self.useSafeArea : useSafeArea // ignore: cast_nullable_to_non_nullable as bool, traversalEdgeBehavior: freezed == traversalEdgeBehavior - ? _value.traversalEdgeBehavior + ? _self.traversalEdgeBehavior : traversalEdgeBehavior // ignore: cast_nullable_to_non_nullable as TraversalEdgeBehavior?, - ) as $Val); + )); } /// Create a copy of StacDialogAction @@ -124,101 +157,20 @@ class _$StacDialogActionCopyWithImpl<$Res, $Val extends StacDialogAction> @override @pragma('vm:prefer-inline') $StacNetworkRequestCopyWith<$Res>? get request { - if (_value.request == null) { + if (_self.request == null) { return null; } - return $StacNetworkRequestCopyWith<$Res>(_value.request!, (value) { - return _then(_value.copyWith(request: value) as $Val); + return $StacNetworkRequestCopyWith<$Res>(_self.request!, (value) { + return _then(_self.copyWith(request: value)); }); } } -/// @nodoc -abstract class _$$StacDialogActionImplCopyWith<$Res> - implements $StacDialogActionCopyWith<$Res> { - factory _$$StacDialogActionImplCopyWith(_$StacDialogActionImpl value, - $Res Function(_$StacDialogActionImpl) then) = - __$$StacDialogActionImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? widget, - StacNetworkRequest? request, - String? assetPath, - bool barrierDismissible, - String? barrierColor, - String? barrierLabel, - bool useSafeArea, - TraversalEdgeBehavior? traversalEdgeBehavior}); - - @override - $StacNetworkRequestCopyWith<$Res>? get request; -} - -/// @nodoc -class __$$StacDialogActionImplCopyWithImpl<$Res> - extends _$StacDialogActionCopyWithImpl<$Res, _$StacDialogActionImpl> - implements _$$StacDialogActionImplCopyWith<$Res> { - __$$StacDialogActionImplCopyWithImpl(_$StacDialogActionImpl _value, - $Res Function(_$StacDialogActionImpl) _then) - : super(_value, _then); - - /// Create a copy of StacDialogAction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? widget = freezed, - Object? request = freezed, - Object? assetPath = freezed, - Object? barrierDismissible = null, - Object? barrierColor = freezed, - Object? barrierLabel = freezed, - Object? useSafeArea = null, - Object? traversalEdgeBehavior = freezed, - }) { - return _then(_$StacDialogActionImpl( - widget: freezed == widget - ? _value._widget - : widget // ignore: cast_nullable_to_non_nullable - as Map?, - request: freezed == request - ? _value.request - : request // ignore: cast_nullable_to_non_nullable - as StacNetworkRequest?, - assetPath: freezed == assetPath - ? _value.assetPath - : assetPath // ignore: cast_nullable_to_non_nullable - as String?, - barrierDismissible: null == barrierDismissible - ? _value.barrierDismissible - : barrierDismissible // ignore: cast_nullable_to_non_nullable - as bool, - barrierColor: freezed == barrierColor - ? _value.barrierColor - : barrierColor // ignore: cast_nullable_to_non_nullable - as String?, - barrierLabel: freezed == barrierLabel - ? _value.barrierLabel - : barrierLabel // ignore: cast_nullable_to_non_nullable - as String?, - useSafeArea: null == useSafeArea - ? _value.useSafeArea - : useSafeArea // ignore: cast_nullable_to_non_nullable - as bool, - traversalEdgeBehavior: freezed == traversalEdgeBehavior - ? _value.traversalEdgeBehavior - : traversalEdgeBehavior // ignore: cast_nullable_to_non_nullable - as TraversalEdgeBehavior?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacDialogActionImpl implements _StacDialogAction { - const _$StacDialogActionImpl( +class _StacDialogAction implements StacDialogAction { + const _StacDialogAction( {final Map? widget, this.request, this.assetPath, @@ -228,9 +180,8 @@ class _$StacDialogActionImpl implements _StacDialogAction { this.useSafeArea = true, this.traversalEdgeBehavior}) : _widget = widget; - - factory _$StacDialogActionImpl.fromJson(Map json) => - _$$StacDialogActionImplFromJson(json); + factory _StacDialogAction.fromJson(Map json) => + _$StacDialogActionFromJson(json); final Map? _widget; @override @@ -259,16 +210,26 @@ class _$StacDialogActionImpl implements _StacDialogAction { @override final TraversalEdgeBehavior? traversalEdgeBehavior; + /// Create a copy of StacDialogAction + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacDialogActionCopyWith<_StacDialogAction> get copyWith => + __$StacDialogActionCopyWithImpl<_StacDialogAction>(this, _$identity); + @override - String toString() { - return 'StacDialogAction(widget: $widget, request: $request, assetPath: $assetPath, barrierDismissible: $barrierDismissible, barrierColor: $barrierColor, barrierLabel: $barrierLabel, useSafeArea: $useSafeArea, traversalEdgeBehavior: $traversalEdgeBehavior)'; + Map toJson() { + return _$StacDialogActionToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacDialogActionImpl && + other is _StacDialogAction && const DeepCollectionEquality().equals(other._widget, _widget) && (identical(other.request, request) || other.request == request) && (identical(other.assetPath, assetPath) || @@ -298,59 +259,105 @@ class _$StacDialogActionImpl implements _StacDialogAction { useSafeArea, traversalEdgeBehavior); - /// Create a copy of StacDialogAction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacDialogActionImplCopyWith<_$StacDialogActionImpl> get copyWith => - __$$StacDialogActionImplCopyWithImpl<_$StacDialogActionImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacDialogActionImplToJson( - this, - ); + String toString() { + return 'StacDialogAction(widget: $widget, request: $request, assetPath: $assetPath, barrierDismissible: $barrierDismissible, barrierColor: $barrierColor, barrierLabel: $barrierLabel, useSafeArea: $useSafeArea, traversalEdgeBehavior: $traversalEdgeBehavior)'; } } -abstract class _StacDialogAction implements StacDialogAction { - const factory _StacDialogAction( - {final Map? widget, - final StacNetworkRequest? request, - final String? assetPath, - final bool barrierDismissible, - final String? barrierColor, - final String? barrierLabel, - final bool useSafeArea, - final TraversalEdgeBehavior? traversalEdgeBehavior}) = - _$StacDialogActionImpl; - - factory _StacDialogAction.fromJson(Map json) = - _$StacDialogActionImpl.fromJson; - - @override - Map? get widget; - @override - StacNetworkRequest? get request; - @override - String? get assetPath; - @override - bool get barrierDismissible; - @override - String? get barrierColor; +/// @nodoc +abstract mixin class _$StacDialogActionCopyWith<$Res> + implements $StacDialogActionCopyWith<$Res> { + factory _$StacDialogActionCopyWith( + _StacDialogAction value, $Res Function(_StacDialogAction) _then) = + __$StacDialogActionCopyWithImpl; @override - String? get barrierLabel; + @useResult + $Res call( + {Map? widget, + StacNetworkRequest? request, + String? assetPath, + bool barrierDismissible, + String? barrierColor, + String? barrierLabel, + bool useSafeArea, + TraversalEdgeBehavior? traversalEdgeBehavior}); + @override - bool get useSafeArea; + $StacNetworkRequestCopyWith<$Res>? get request; +} + +/// @nodoc +class __$StacDialogActionCopyWithImpl<$Res> + implements _$StacDialogActionCopyWith<$Res> { + __$StacDialogActionCopyWithImpl(this._self, this._then); + + final _StacDialogAction _self; + final $Res Function(_StacDialogAction) _then; + + /// Create a copy of StacDialogAction + /// with the given fields replaced by the non-null parameter values. @override - TraversalEdgeBehavior? get traversalEdgeBehavior; + @pragma('vm:prefer-inline') + $Res call({ + Object? widget = freezed, + Object? request = freezed, + Object? assetPath = freezed, + Object? barrierDismissible = null, + Object? barrierColor = freezed, + Object? barrierLabel = freezed, + Object? useSafeArea = null, + Object? traversalEdgeBehavior = freezed, + }) { + return _then(_StacDialogAction( + widget: freezed == widget + ? _self._widget + : widget // ignore: cast_nullable_to_non_nullable + as Map?, + request: freezed == request + ? _self.request + : request // ignore: cast_nullable_to_non_nullable + as StacNetworkRequest?, + assetPath: freezed == assetPath + ? _self.assetPath + : assetPath // ignore: cast_nullable_to_non_nullable + as String?, + barrierDismissible: null == barrierDismissible + ? _self.barrierDismissible + : barrierDismissible // ignore: cast_nullable_to_non_nullable + as bool, + barrierColor: freezed == barrierColor + ? _self.barrierColor + : barrierColor // ignore: cast_nullable_to_non_nullable + as String?, + barrierLabel: freezed == barrierLabel + ? _self.barrierLabel + : barrierLabel // ignore: cast_nullable_to_non_nullable + as String?, + useSafeArea: null == useSafeArea + ? _self.useSafeArea + : useSafeArea // ignore: cast_nullable_to_non_nullable + as bool, + traversalEdgeBehavior: freezed == traversalEdgeBehavior + ? _self.traversalEdgeBehavior + : traversalEdgeBehavior // ignore: cast_nullable_to_non_nullable + as TraversalEdgeBehavior?, + )); + } /// Create a copy of StacDialogAction /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacDialogActionImplCopyWith<_$StacDialogActionImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacNetworkRequestCopyWith<$Res>? get request { + if (_self.request == null) { + return null; + } + + return $StacNetworkRequestCopyWith<$Res>(_self.request!, (value) { + return _then(_self.copyWith(request: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.g.dart b/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.g.dart index 4182e634..112a942b 100644 --- a/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.g.dart +++ b/packages/stac/lib/src/action_parsers/stac_dialog_action/stac_dialog_action.g.dart @@ -6,9 +6,8 @@ part of 'stac_dialog_action.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacDialogActionImpl _$$StacDialogActionImplFromJson( - Map json) => - _$StacDialogActionImpl( +_StacDialogAction _$StacDialogActionFromJson(Map json) => + _StacDialogAction( widget: json['widget'] as Map?, request: json['request'] == null ? null @@ -23,8 +22,7 @@ _$StacDialogActionImpl _$$StacDialogActionImplFromJson( _$TraversalEdgeBehaviorEnumMap, json['traversalEdgeBehavior']), ); -Map _$$StacDialogActionImplToJson( - _$StacDialogActionImpl instance) => +Map _$StacDialogActionToJson(_StacDialogAction instance) => { 'widget': instance.widget, 'request': instance.request, diff --git a/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.dart b/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.dart index 3587f581..4f17d01d 100644 --- a/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.dart +++ b/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.dart @@ -6,7 +6,7 @@ part 'stac_form_validate.freezed.dart'; part 'stac_form_validate.g.dart'; @freezed -class StacFormValidate with _$StacFormValidate { +abstract class StacFormValidate with _$StacFormValidate { const factory StacFormValidate({ Map? isValid, Map? isNotValid, diff --git a/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.freezed.dart b/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.freezed.dart index 267e83e1..2e2aea65 100644 --- a/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.freezed.dart +++ b/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,64 @@ part of 'stac_form_validate.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacFormValidate _$StacFormValidateFromJson(Map json) { - return _StacFormValidate.fromJson(json); -} - /// @nodoc mixin _$StacFormValidate { - Map? get isValid => throw _privateConstructorUsedError; - Map? get isNotValid => throw _privateConstructorUsedError; - - /// Serializes this StacFormValidate to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get isValid; + Map? get isNotValid; /// Create a copy of StacFormValidate /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFormValidateCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacFormValidateCopyWithImpl( + this as StacFormValidate, _$identity); -/// @nodoc -abstract class $StacFormValidateCopyWith<$Res> { - factory $StacFormValidateCopyWith( - StacFormValidate value, $Res Function(StacFormValidate) then) = - _$StacFormValidateCopyWithImpl<$Res, StacFormValidate>; - @useResult - $Res call({Map? isValid, Map? isNotValid}); -} + /// Serializes this StacFormValidate to a JSON map. + Map toJson(); -/// @nodoc -class _$StacFormValidateCopyWithImpl<$Res, $Val extends StacFormValidate> - implements $StacFormValidateCopyWith<$Res> { - _$StacFormValidateCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacFormValidate && + const DeepCollectionEquality().equals(other.isValid, isValid) && + const DeepCollectionEquality() + .equals(other.isNotValid, isNotValid)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(isValid), + const DeepCollectionEquality().hash(isNotValid)); - /// Create a copy of StacFormValidate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? isValid = freezed, - Object? isNotValid = freezed, - }) { - return _then(_value.copyWith( - isValid: freezed == isValid - ? _value.isValid - : isValid // ignore: cast_nullable_to_non_nullable - as Map?, - isNotValid: freezed == isNotValid - ? _value.isNotValid - : isNotValid // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacFormValidate(isValid: $isValid, isNotValid: $isNotValid)'; } } /// @nodoc -abstract class _$$StacFormValidateImplCopyWith<$Res> - implements $StacFormValidateCopyWith<$Res> { - factory _$$StacFormValidateImplCopyWith(_$StacFormValidateImpl value, - $Res Function(_$StacFormValidateImpl) then) = - __$$StacFormValidateImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacFormValidateCopyWith<$Res> { + factory $StacFormValidateCopyWith( + StacFormValidate value, $Res Function(StacFormValidate) _then) = + _$StacFormValidateCopyWithImpl; @useResult $Res call({Map? isValid, Map? isNotValid}); } /// @nodoc -class __$$StacFormValidateImplCopyWithImpl<$Res> - extends _$StacFormValidateCopyWithImpl<$Res, _$StacFormValidateImpl> - implements _$$StacFormValidateImplCopyWith<$Res> { - __$$StacFormValidateImplCopyWithImpl(_$StacFormValidateImpl _value, - $Res Function(_$StacFormValidateImpl) _then) - : super(_value, _then); +class _$StacFormValidateCopyWithImpl<$Res> + implements $StacFormValidateCopyWith<$Res> { + _$StacFormValidateCopyWithImpl(this._self, this._then); + + final StacFormValidate _self; + final $Res Function(StacFormValidate) _then; /// Create a copy of StacFormValidate /// with the given fields replaced by the non-null parameter values. @@ -100,13 +77,13 @@ class __$$StacFormValidateImplCopyWithImpl<$Res> Object? isValid = freezed, Object? isNotValid = freezed, }) { - return _then(_$StacFormValidateImpl( + return _then(_self.copyWith( isValid: freezed == isValid - ? _value._isValid + ? _self.isValid : isValid // ignore: cast_nullable_to_non_nullable as Map?, isNotValid: freezed == isNotValid - ? _value._isNotValid + ? _self.isNotValid : isNotValid // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -115,15 +92,14 @@ class __$$StacFormValidateImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacFormValidateImpl implements _StacFormValidate { - const _$StacFormValidateImpl( +class _StacFormValidate implements StacFormValidate { + const _StacFormValidate( {final Map? isValid, final Map? isNotValid}) : _isValid = isValid, _isNotValid = isNotValid; - - factory _$StacFormValidateImpl.fromJson(Map json) => - _$$StacFormValidateImplFromJson(json); + factory _StacFormValidate.fromJson(Map json) => + _$StacFormValidateFromJson(json); final Map? _isValid; @override @@ -145,16 +121,26 @@ class _$StacFormValidateImpl implements _StacFormValidate { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacFormValidate + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacFormValidate(isValid: $isValid, isNotValid: $isNotValid)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFormValidateCopyWith<_StacFormValidate> get copyWith => + __$StacFormValidateCopyWithImpl<_StacFormValidate>(this, _$identity); + + @override + Map toJson() { + return _$StacFormValidateToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFormValidateImpl && + other is _StacFormValidate && const DeepCollectionEquality().equals(other._isValid, _isValid) && const DeepCollectionEquality() .equals(other._isNotValid, _isNotValid)); @@ -167,40 +153,50 @@ class _$StacFormValidateImpl implements _StacFormValidate { const DeepCollectionEquality().hash(_isValid), const DeepCollectionEquality().hash(_isNotValid)); - /// Create a copy of StacFormValidate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacFormValidateImplCopyWith<_$StacFormValidateImpl> get copyWith => - __$$StacFormValidateImplCopyWithImpl<_$StacFormValidateImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacFormValidateImplToJson( - this, - ); + String toString() { + return 'StacFormValidate(isValid: $isValid, isNotValid: $isNotValid)'; } } -abstract class _StacFormValidate implements StacFormValidate { - const factory _StacFormValidate( - {final Map? isValid, - final Map? isNotValid}) = _$StacFormValidateImpl; +/// @nodoc +abstract mixin class _$StacFormValidateCopyWith<$Res> + implements $StacFormValidateCopyWith<$Res> { + factory _$StacFormValidateCopyWith( + _StacFormValidate value, $Res Function(_StacFormValidate) _then) = + __$StacFormValidateCopyWithImpl; + @override + @useResult + $Res call({Map? isValid, Map? isNotValid}); +} - factory _StacFormValidate.fromJson(Map json) = - _$StacFormValidateImpl.fromJson; +/// @nodoc +class __$StacFormValidateCopyWithImpl<$Res> + implements _$StacFormValidateCopyWith<$Res> { + __$StacFormValidateCopyWithImpl(this._self, this._then); - @override - Map? get isValid; - @override - Map? get isNotValid; + final _StacFormValidate _self; + final $Res Function(_StacFormValidate) _then; /// Create a copy of StacFormValidate /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFormValidateImplCopyWith<_$StacFormValidateImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? isValid = freezed, + Object? isNotValid = freezed, + }) { + return _then(_StacFormValidate( + isValid: freezed == isValid + ? _self._isValid + : isValid // ignore: cast_nullable_to_non_nullable + as Map?, + isNotValid: freezed == isNotValid + ? _self._isNotValid + : isNotValid // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.g.dart b/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.g.dart index 96aeff11..b9611ffe 100644 --- a/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.g.dart +++ b/packages/stac/lib/src/action_parsers/stac_form_validate/stac_form_validate.g.dart @@ -6,15 +6,13 @@ part of 'stac_form_validate.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFormValidateImpl _$$StacFormValidateImplFromJson( - Map json) => - _$StacFormValidateImpl( +_StacFormValidate _$StacFormValidateFromJson(Map json) => + _StacFormValidate( isValid: json['isValid'] as Map?, isNotValid: json['isNotValid'] as Map?, ); -Map _$$StacFormValidateImplToJson( - _$StacFormValidateImpl instance) => +Map _$StacFormValidateToJson(_StacFormValidate instance) => { 'isValid': instance.isValid, 'isNotValid': instance.isNotValid, diff --git a/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.dart b/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.dart index 6f550d61..8b5fc79c 100644 --- a/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.dart +++ b/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.dart @@ -6,7 +6,7 @@ part 'stac_get_form_value.freezed.dart'; part 'stac_get_form_value.g.dart'; @freezed -class StacGetFormValue with _$StacGetFormValue { +abstract class StacGetFormValue with _$StacGetFormValue { const factory StacGetFormValue({ required String id, }) = _StacGetFormValue; diff --git a/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.freezed.dart b/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.freezed.dart index b3fa7917..a7c53fcf 100644 --- a/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.freezed.dart +++ b/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,82 +10,58 @@ part of 'stac_get_form_value.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacGetFormValue _$StacGetFormValueFromJson(Map json) { - return _StacGetFormValue.fromJson(json); -} - /// @nodoc mixin _$StacGetFormValue { - String get id => throw _privateConstructorUsedError; - - /// Serializes this StacGetFormValue to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get id; /// Create a copy of StacGetFormValue /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacGetFormValueCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacGetFormValueCopyWithImpl( + this as StacGetFormValue, _$identity); -/// @nodoc -abstract class $StacGetFormValueCopyWith<$Res> { - factory $StacGetFormValueCopyWith( - StacGetFormValue value, $Res Function(StacGetFormValue) then) = - _$StacGetFormValueCopyWithImpl<$Res, StacGetFormValue>; - @useResult - $Res call({String id}); -} + /// Serializes this StacGetFormValue to a JSON map. + Map toJson(); -/// @nodoc -class _$StacGetFormValueCopyWithImpl<$Res, $Val extends StacGetFormValue> - implements $StacGetFormValueCopyWith<$Res> { - _$StacGetFormValueCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacGetFormValue && + (identical(other.id, id) || other.id == id)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id); - /// Create a copy of StacGetFormValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + String toString() { + return 'StacGetFormValue(id: $id)'; } } /// @nodoc -abstract class _$$StacGetFormValueImplCopyWith<$Res> - implements $StacGetFormValueCopyWith<$Res> { - factory _$$StacGetFormValueImplCopyWith(_$StacGetFormValueImpl value, - $Res Function(_$StacGetFormValueImpl) then) = - __$$StacGetFormValueImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacGetFormValueCopyWith<$Res> { + factory $StacGetFormValueCopyWith( + StacGetFormValue value, $Res Function(StacGetFormValue) _then) = + _$StacGetFormValueCopyWithImpl; @useResult $Res call({String id}); } /// @nodoc -class __$$StacGetFormValueImplCopyWithImpl<$Res> - extends _$StacGetFormValueCopyWithImpl<$Res, _$StacGetFormValueImpl> - implements _$$StacGetFormValueImplCopyWith<$Res> { - __$$StacGetFormValueImplCopyWithImpl(_$StacGetFormValueImpl _value, - $Res Function(_$StacGetFormValueImpl) _then) - : super(_value, _then); +class _$StacGetFormValueCopyWithImpl<$Res> + implements $StacGetFormValueCopyWith<$Res> { + _$StacGetFormValueCopyWithImpl(this._self, this._then); + + final StacGetFormValue _self; + final $Res Function(StacGetFormValue) _then; /// Create a copy of StacGetFormValue /// with the given fields replaced by the non-null parameter values. @@ -93,9 +70,9 @@ class __$$StacGetFormValueImplCopyWithImpl<$Res> $Res call({ Object? id = null, }) { - return _then(_$StacGetFormValueImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, )); @@ -104,25 +81,34 @@ class __$$StacGetFormValueImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacGetFormValueImpl implements _StacGetFormValue { - const _$StacGetFormValueImpl({required this.id}); - - factory _$StacGetFormValueImpl.fromJson(Map json) => - _$$StacGetFormValueImplFromJson(json); +class _StacGetFormValue implements StacGetFormValue { + const _StacGetFormValue({required this.id}); + factory _StacGetFormValue.fromJson(Map json) => + _$StacGetFormValueFromJson(json); @override final String id; + /// Create a copy of StacGetFormValue + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacGetFormValue(id: $id)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacGetFormValueCopyWith<_StacGetFormValue> get copyWith => + __$StacGetFormValueCopyWithImpl<_StacGetFormValue>(this, _$identity); + + @override + Map toJson() { + return _$StacGetFormValueToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacGetFormValueImpl && + other is _StacGetFormValue && (identical(other.id, id) || other.id == id)); } @@ -130,37 +116,45 @@ class _$StacGetFormValueImpl implements _StacGetFormValue { @override int get hashCode => Object.hash(runtimeType, id); - /// Create a copy of StacGetFormValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacGetFormValueImplCopyWith<_$StacGetFormValueImpl> get copyWith => - __$$StacGetFormValueImplCopyWithImpl<_$StacGetFormValueImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacGetFormValueImplToJson( - this, - ); + String toString() { + return 'StacGetFormValue(id: $id)'; } } -abstract class _StacGetFormValue implements StacGetFormValue { - const factory _StacGetFormValue({required final String id}) = - _$StacGetFormValueImpl; +/// @nodoc +abstract mixin class _$StacGetFormValueCopyWith<$Res> + implements $StacGetFormValueCopyWith<$Res> { + factory _$StacGetFormValueCopyWith( + _StacGetFormValue value, $Res Function(_StacGetFormValue) _then) = + __$StacGetFormValueCopyWithImpl; + @override + @useResult + $Res call({String id}); +} - factory _StacGetFormValue.fromJson(Map json) = - _$StacGetFormValueImpl.fromJson; +/// @nodoc +class __$StacGetFormValueCopyWithImpl<$Res> + implements _$StacGetFormValueCopyWith<$Res> { + __$StacGetFormValueCopyWithImpl(this._self, this._then); - @override - String get id; + final _StacGetFormValue _self; + final $Res Function(_StacGetFormValue) _then; /// Create a copy of StacGetFormValue /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacGetFormValueImplCopyWith<_$StacGetFormValueImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + }) { + return _then(_StacGetFormValue( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.g.dart b/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.g.dart index 12acd3ab..ad91c79a 100644 --- a/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.g.dart +++ b/packages/stac/lib/src/action_parsers/stac_get_form_value/stac_get_form_value.g.dart @@ -6,14 +6,12 @@ part of 'stac_get_form_value.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacGetFormValueImpl _$$StacGetFormValueImplFromJson( - Map json) => - _$StacGetFormValueImpl( +_StacGetFormValue _$StacGetFormValueFromJson(Map json) => + _StacGetFormValue( id: json['id'] as String, ); -Map _$$StacGetFormValueImplToJson( - _$StacGetFormValueImpl instance) => +Map _$StacGetFormValueToJson(_StacGetFormValue instance) => { 'id': instance.id, }; diff --git a/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.dart b/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.dart index bda50a0d..d6cb5470 100644 --- a/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.dart +++ b/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.dart @@ -7,7 +7,7 @@ part 'stac_modal_bottom_sheet_action.freezed.dart'; part 'stac_modal_bottom_sheet_action.g.dart'; @freezed -class StacModalBottomSheetAction with _$StacModalBottomSheetAction { +abstract class StacModalBottomSheetAction with _$StacModalBottomSheetAction { const factory StacModalBottomSheetAction({ Map? widget, StacNetworkRequest? request, diff --git a/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.freezed.dart b/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.freezed.dart index 5fc70933..327a5752 100644 --- a/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.freezed.dart +++ b/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,50 +10,104 @@ part of 'stac_modal_bottom_sheet_action.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacModalBottomSheetAction _$StacModalBottomSheetActionFromJson( - Map json) { - return _StacModalBottomSheetAction.fromJson(json); -} - /// @nodoc mixin _$StacModalBottomSheetAction { - Map? get widget => throw _privateConstructorUsedError; - StacNetworkRequest? get request => throw _privateConstructorUsedError; - String? get assetPath => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get barrierLabel => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - StacBorder? get shape => throw _privateConstructorUsedError; - StacBoxConstraints? get constraints => throw _privateConstructorUsedError; - String? get barrierColor => throw _privateConstructorUsedError; - bool get isScrollControlled => throw _privateConstructorUsedError; - bool get useRootNavigator => throw _privateConstructorUsedError; - bool get isDismissible => throw _privateConstructorUsedError; - bool get enableDrag => throw _privateConstructorUsedError; - bool? get showDragHandle => throw _privateConstructorUsedError; - bool get useSafeArea => throw _privateConstructorUsedError; - - /// Serializes this StacModalBottomSheetAction to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get widget; + StacNetworkRequest? get request; + String? get assetPath; + String? get backgroundColor; + String? get barrierLabel; + double? get elevation; + StacBorder? get shape; + StacBoxConstraints? get constraints; + String? get barrierColor; + bool get isScrollControlled; + bool get useRootNavigator; + bool get isDismissible; + bool get enableDrag; + bool? get showDragHandle; + bool get useSafeArea; /// Create a copy of StacModalBottomSheetAction /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacModalBottomSheetActionCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => + _$StacModalBottomSheetActionCopyWithImpl( + this as StacModalBottomSheetAction, _$identity); + + /// Serializes this StacModalBottomSheetAction to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacModalBottomSheetAction && + const DeepCollectionEquality().equals(other.widget, widget) && + (identical(other.request, request) || other.request == request) && + (identical(other.assetPath, assetPath) || + other.assetPath == assetPath) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.barrierLabel, barrierLabel) || + other.barrierLabel == barrierLabel) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.constraints, constraints) || + other.constraints == constraints) && + (identical(other.barrierColor, barrierColor) || + other.barrierColor == barrierColor) && + (identical(other.isScrollControlled, isScrollControlled) || + other.isScrollControlled == isScrollControlled) && + (identical(other.useRootNavigator, useRootNavigator) || + other.useRootNavigator == useRootNavigator) && + (identical(other.isDismissible, isDismissible) || + other.isDismissible == isDismissible) && + (identical(other.enableDrag, enableDrag) || + other.enableDrag == enableDrag) && + (identical(other.showDragHandle, showDragHandle) || + other.showDragHandle == showDragHandle) && + (identical(other.useSafeArea, useSafeArea) || + other.useSafeArea == useSafeArea)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(widget), + request, + assetPath, + backgroundColor, + barrierLabel, + elevation, + shape, + constraints, + barrierColor, + isScrollControlled, + useRootNavigator, + isDismissible, + enableDrag, + showDragHandle, + useSafeArea); + + @override + String toString() { + return 'StacModalBottomSheetAction(widget: $widget, request: $request, assetPath: $assetPath, backgroundColor: $backgroundColor, barrierLabel: $barrierLabel, elevation: $elevation, shape: $shape, constraints: $constraints, barrierColor: $barrierColor, isScrollControlled: $isScrollControlled, useRootNavigator: $useRootNavigator, isDismissible: $isDismissible, enableDrag: $enableDrag, showDragHandle: $showDragHandle, useSafeArea: $useSafeArea)'; + } } /// @nodoc -abstract class $StacModalBottomSheetActionCopyWith<$Res> { +abstract mixin class $StacModalBottomSheetActionCopyWith<$Res> { factory $StacModalBottomSheetActionCopyWith(StacModalBottomSheetAction value, - $Res Function(StacModalBottomSheetAction) then) = - _$StacModalBottomSheetActionCopyWithImpl<$Res, - StacModalBottomSheetAction>; + $Res Function(StacModalBottomSheetAction) _then) = + _$StacModalBottomSheetActionCopyWithImpl; @useResult $Res call( {Map? widget, @@ -77,15 +132,12 @@ abstract class $StacModalBottomSheetActionCopyWith<$Res> { } /// @nodoc -class _$StacModalBottomSheetActionCopyWithImpl<$Res, - $Val extends StacModalBottomSheetAction> +class _$StacModalBottomSheetActionCopyWithImpl<$Res> implements $StacModalBottomSheetActionCopyWith<$Res> { - _$StacModalBottomSheetActionCopyWithImpl(this._value, this._then); + _$StacModalBottomSheetActionCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacModalBottomSheetAction _self; + final $Res Function(StacModalBottomSheetAction) _then; /// Create a copy of StacModalBottomSheetAction /// with the given fields replaced by the non-null parameter values. @@ -108,68 +160,68 @@ class _$StacModalBottomSheetActionCopyWithImpl<$Res, Object? showDragHandle = freezed, Object? useSafeArea = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( widget: freezed == widget - ? _value.widget + ? _self.widget : widget // ignore: cast_nullable_to_non_nullable as Map?, request: freezed == request - ? _value.request + ? _self.request : request // ignore: cast_nullable_to_non_nullable as StacNetworkRequest?, assetPath: freezed == assetPath - ? _value.assetPath + ? _self.assetPath : assetPath // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, barrierLabel: freezed == barrierLabel - ? _value.barrierLabel + ? _self.barrierLabel : barrierLabel // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacBorder?, constraints: freezed == constraints - ? _value.constraints + ? _self.constraints : constraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, barrierColor: freezed == barrierColor - ? _value.barrierColor + ? _self.barrierColor : barrierColor // ignore: cast_nullable_to_non_nullable as String?, isScrollControlled: null == isScrollControlled - ? _value.isScrollControlled + ? _self.isScrollControlled : isScrollControlled // ignore: cast_nullable_to_non_nullable as bool, useRootNavigator: null == useRootNavigator - ? _value.useRootNavigator + ? _self.useRootNavigator : useRootNavigator // ignore: cast_nullable_to_non_nullable as bool, isDismissible: null == isDismissible - ? _value.isDismissible + ? _self.isDismissible : isDismissible // ignore: cast_nullable_to_non_nullable as bool, enableDrag: null == enableDrag - ? _value.enableDrag + ? _self.enableDrag : enableDrag // ignore: cast_nullable_to_non_nullable as bool, showDragHandle: freezed == showDragHandle - ? _value.showDragHandle + ? _self.showDragHandle : showDragHandle // ignore: cast_nullable_to_non_nullable as bool?, useSafeArea: null == useSafeArea - ? _value.useSafeArea + ? _self.useSafeArea : useSafeArea // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of StacModalBottomSheetAction @@ -177,12 +229,12 @@ class _$StacModalBottomSheetActionCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacNetworkRequestCopyWith<$Res>? get request { - if (_value.request == null) { + if (_self.request == null) { return null; } - return $StacNetworkRequestCopyWith<$Res>(_value.request!, (value) { - return _then(_value.copyWith(request: value) as $Val); + return $StacNetworkRequestCopyWith<$Res>(_self.request!, (value) { + return _then(_self.copyWith(request: value)); }); } @@ -191,12 +243,12 @@ class _$StacModalBottomSheetActionCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -205,150 +257,20 @@ class _$StacModalBottomSheetActionCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get constraints { - if (_value.constraints == null) { + if (_self.constraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.constraints!, (value) { - return _then(_value.copyWith(constraints: value) as $Val); + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); }); } } -/// @nodoc -abstract class _$$StacModalBottomSheetActionImplCopyWith<$Res> - implements $StacModalBottomSheetActionCopyWith<$Res> { - factory _$$StacModalBottomSheetActionImplCopyWith( - _$StacModalBottomSheetActionImpl value, - $Res Function(_$StacModalBottomSheetActionImpl) then) = - __$$StacModalBottomSheetActionImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? widget, - StacNetworkRequest? request, - String? assetPath, - String? backgroundColor, - String? barrierLabel, - double? elevation, - StacBorder? shape, - StacBoxConstraints? constraints, - String? barrierColor, - bool isScrollControlled, - bool useRootNavigator, - bool isDismissible, - bool enableDrag, - bool? showDragHandle, - bool useSafeArea}); - - @override - $StacNetworkRequestCopyWith<$Res>? get request; - @override - $StacBorderCopyWith<$Res>? get shape; - @override - $StacBoxConstraintsCopyWith<$Res>? get constraints; -} - -/// @nodoc -class __$$StacModalBottomSheetActionImplCopyWithImpl<$Res> - extends _$StacModalBottomSheetActionCopyWithImpl<$Res, - _$StacModalBottomSheetActionImpl> - implements _$$StacModalBottomSheetActionImplCopyWith<$Res> { - __$$StacModalBottomSheetActionImplCopyWithImpl( - _$StacModalBottomSheetActionImpl _value, - $Res Function(_$StacModalBottomSheetActionImpl) _then) - : super(_value, _then); - - /// Create a copy of StacModalBottomSheetAction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? widget = freezed, - Object? request = freezed, - Object? assetPath = freezed, - Object? backgroundColor = freezed, - Object? barrierLabel = freezed, - Object? elevation = freezed, - Object? shape = freezed, - Object? constraints = freezed, - Object? barrierColor = freezed, - Object? isScrollControlled = null, - Object? useRootNavigator = null, - Object? isDismissible = null, - Object? enableDrag = null, - Object? showDragHandle = freezed, - Object? useSafeArea = null, - }) { - return _then(_$StacModalBottomSheetActionImpl( - widget: freezed == widget - ? _value._widget - : widget // ignore: cast_nullable_to_non_nullable - as Map?, - request: freezed == request - ? _value.request - : request // ignore: cast_nullable_to_non_nullable - as StacNetworkRequest?, - assetPath: freezed == assetPath - ? _value.assetPath - : assetPath // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - barrierLabel: freezed == barrierLabel - ? _value.barrierLabel - : barrierLabel // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - shape: freezed == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as StacBorder?, - constraints: freezed == constraints - ? _value.constraints - : constraints // ignore: cast_nullable_to_non_nullable - as StacBoxConstraints?, - barrierColor: freezed == barrierColor - ? _value.barrierColor - : barrierColor // ignore: cast_nullable_to_non_nullable - as String?, - isScrollControlled: null == isScrollControlled - ? _value.isScrollControlled - : isScrollControlled // ignore: cast_nullable_to_non_nullable - as bool, - useRootNavigator: null == useRootNavigator - ? _value.useRootNavigator - : useRootNavigator // ignore: cast_nullable_to_non_nullable - as bool, - isDismissible: null == isDismissible - ? _value.isDismissible - : isDismissible // ignore: cast_nullable_to_non_nullable - as bool, - enableDrag: null == enableDrag - ? _value.enableDrag - : enableDrag // ignore: cast_nullable_to_non_nullable - as bool, - showDragHandle: freezed == showDragHandle - ? _value.showDragHandle - : showDragHandle // ignore: cast_nullable_to_non_nullable - as bool?, - useSafeArea: null == useSafeArea - ? _value.useSafeArea - : useSafeArea // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacModalBottomSheetActionImpl implements _StacModalBottomSheetAction { - const _$StacModalBottomSheetActionImpl( +class _StacModalBottomSheetAction implements StacModalBottomSheetAction { + const _StacModalBottomSheetAction( {final Map? widget, this.request, this.assetPath, @@ -365,10 +287,8 @@ class _$StacModalBottomSheetActionImpl implements _StacModalBottomSheetAction { this.showDragHandle, this.useSafeArea = false}) : _widget = widget; - - factory _$StacModalBottomSheetActionImpl.fromJson( - Map json) => - _$$StacModalBottomSheetActionImplFromJson(json); + factory _StacModalBottomSheetAction.fromJson(Map json) => + _$StacModalBottomSheetActionFromJson(json); final Map? _widget; @override @@ -414,16 +334,27 @@ class _$StacModalBottomSheetActionImpl implements _StacModalBottomSheetAction { @JsonKey() final bool useSafeArea; + /// Create a copy of StacModalBottomSheetAction + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacModalBottomSheetAction(widget: $widget, request: $request, assetPath: $assetPath, backgroundColor: $backgroundColor, barrierLabel: $barrierLabel, elevation: $elevation, shape: $shape, constraints: $constraints, barrierColor: $barrierColor, isScrollControlled: $isScrollControlled, useRootNavigator: $useRootNavigator, isDismissible: $isDismissible, enableDrag: $enableDrag, showDragHandle: $showDragHandle, useSafeArea: $useSafeArea)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacModalBottomSheetActionCopyWith<_StacModalBottomSheetAction> + get copyWith => __$StacModalBottomSheetActionCopyWithImpl< + _StacModalBottomSheetAction>(this, _$identity); + + @override + Map toJson() { + return _$StacModalBottomSheetActionToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacModalBottomSheetActionImpl && + other is _StacModalBottomSheetAction && const DeepCollectionEquality().equals(other._widget, _widget) && (identical(other.request, request) || other.request == request) && (identical(other.assetPath, assetPath) || @@ -473,80 +404,180 @@ class _$StacModalBottomSheetActionImpl implements _StacModalBottomSheetAction { showDragHandle, useSafeArea); - /// Create a copy of StacModalBottomSheetAction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacModalBottomSheetActionImplCopyWith<_$StacModalBottomSheetActionImpl> - get copyWith => __$$StacModalBottomSheetActionImplCopyWithImpl< - _$StacModalBottomSheetActionImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacModalBottomSheetActionImplToJson( - this, - ); + String toString() { + return 'StacModalBottomSheetAction(widget: $widget, request: $request, assetPath: $assetPath, backgroundColor: $backgroundColor, barrierLabel: $barrierLabel, elevation: $elevation, shape: $shape, constraints: $constraints, barrierColor: $barrierColor, isScrollControlled: $isScrollControlled, useRootNavigator: $useRootNavigator, isDismissible: $isDismissible, enableDrag: $enableDrag, showDragHandle: $showDragHandle, useSafeArea: $useSafeArea)'; } } -abstract class _StacModalBottomSheetAction - implements StacModalBottomSheetAction { - const factory _StacModalBottomSheetAction( - {final Map? widget, - final StacNetworkRequest? request, - final String? assetPath, - final String? backgroundColor, - final String? barrierLabel, - final double? elevation, - final StacBorder? shape, - final StacBoxConstraints? constraints, - final String? barrierColor, - final bool isScrollControlled, - final bool useRootNavigator, - final bool isDismissible, - final bool enableDrag, - final bool? showDragHandle, - final bool useSafeArea}) = _$StacModalBottomSheetActionImpl; - - factory _StacModalBottomSheetAction.fromJson(Map json) = - _$StacModalBottomSheetActionImpl.fromJson; - - @override - Map? get widget; - @override - StacNetworkRequest? get request; - @override - String? get assetPath; - @override - String? get backgroundColor; - @override - String? get barrierLabel; - @override - double? get elevation; - @override - StacBorder? get shape; - @override - StacBoxConstraints? get constraints; +/// @nodoc +abstract mixin class _$StacModalBottomSheetActionCopyWith<$Res> + implements $StacModalBottomSheetActionCopyWith<$Res> { + factory _$StacModalBottomSheetActionCopyWith( + _StacModalBottomSheetAction value, + $Res Function(_StacModalBottomSheetAction) _then) = + __$StacModalBottomSheetActionCopyWithImpl; @override - String? get barrierColor; + @useResult + $Res call( + {Map? widget, + StacNetworkRequest? request, + String? assetPath, + String? backgroundColor, + String? barrierLabel, + double? elevation, + StacBorder? shape, + StacBoxConstraints? constraints, + String? barrierColor, + bool isScrollControlled, + bool useRootNavigator, + bool isDismissible, + bool enableDrag, + bool? showDragHandle, + bool useSafeArea}); + @override - bool get isScrollControlled; + $StacNetworkRequestCopyWith<$Res>? get request; @override - bool get useRootNavigator; + $StacBorderCopyWith<$Res>? get shape; @override - bool get isDismissible; + $StacBoxConstraintsCopyWith<$Res>? get constraints; +} + +/// @nodoc +class __$StacModalBottomSheetActionCopyWithImpl<$Res> + implements _$StacModalBottomSheetActionCopyWith<$Res> { + __$StacModalBottomSheetActionCopyWithImpl(this._self, this._then); + + final _StacModalBottomSheetAction _self; + final $Res Function(_StacModalBottomSheetAction) _then; + + /// Create a copy of StacModalBottomSheetAction + /// with the given fields replaced by the non-null parameter values. @override - bool get enableDrag; + @pragma('vm:prefer-inline') + $Res call({ + Object? widget = freezed, + Object? request = freezed, + Object? assetPath = freezed, + Object? backgroundColor = freezed, + Object? barrierLabel = freezed, + Object? elevation = freezed, + Object? shape = freezed, + Object? constraints = freezed, + Object? barrierColor = freezed, + Object? isScrollControlled = null, + Object? useRootNavigator = null, + Object? isDismissible = null, + Object? enableDrag = null, + Object? showDragHandle = freezed, + Object? useSafeArea = null, + }) { + return _then(_StacModalBottomSheetAction( + widget: freezed == widget + ? _self._widget + : widget // ignore: cast_nullable_to_non_nullable + as Map?, + request: freezed == request + ? _self.request + : request // ignore: cast_nullable_to_non_nullable + as StacNetworkRequest?, + assetPath: freezed == assetPath + ? _self.assetPath + : assetPath // ignore: cast_nullable_to_non_nullable + as String?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + barrierLabel: freezed == barrierLabel + ? _self.barrierLabel + : barrierLabel // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + shape: freezed == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as StacBorder?, + constraints: freezed == constraints + ? _self.constraints + : constraints // ignore: cast_nullable_to_non_nullable + as StacBoxConstraints?, + barrierColor: freezed == barrierColor + ? _self.barrierColor + : barrierColor // ignore: cast_nullable_to_non_nullable + as String?, + isScrollControlled: null == isScrollControlled + ? _self.isScrollControlled + : isScrollControlled // ignore: cast_nullable_to_non_nullable + as bool, + useRootNavigator: null == useRootNavigator + ? _self.useRootNavigator + : useRootNavigator // ignore: cast_nullable_to_non_nullable + as bool, + isDismissible: null == isDismissible + ? _self.isDismissible + : isDismissible // ignore: cast_nullable_to_non_nullable + as bool, + enableDrag: null == enableDrag + ? _self.enableDrag + : enableDrag // ignore: cast_nullable_to_non_nullable + as bool, + showDragHandle: freezed == showDragHandle + ? _self.showDragHandle + : showDragHandle // ignore: cast_nullable_to_non_nullable + as bool?, + useSafeArea: null == useSafeArea + ? _self.useSafeArea + : useSafeArea // ignore: cast_nullable_to_non_nullable + as bool, + )); + } + + /// Create a copy of StacModalBottomSheetAction + /// with the given fields replaced by the non-null parameter values. @override - bool? get showDragHandle; + @pragma('vm:prefer-inline') + $StacNetworkRequestCopyWith<$Res>? get request { + if (_self.request == null) { + return null; + } + + return $StacNetworkRequestCopyWith<$Res>(_self.request!, (value) { + return _then(_self.copyWith(request: value)); + }); + } + + /// Create a copy of StacModalBottomSheetAction + /// with the given fields replaced by the non-null parameter values. @override - bool get useSafeArea; + @pragma('vm:prefer-inline') + $StacBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } + + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); + } /// Create a copy of StacModalBottomSheetAction /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacModalBottomSheetActionImplCopyWith<_$StacModalBottomSheetActionImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get constraints { + if (_self.constraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.g.dart b/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.g.dart index 8589ab15..5ee1400b 100644 --- a/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.g.dart +++ b/packages/stac/lib/src/action_parsers/stac_modal_bottom_sheet_action/stac_modal_bottom_sheet_action.g.dart @@ -6,9 +6,9 @@ part of 'stac_modal_bottom_sheet_action.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacModalBottomSheetActionImpl _$$StacModalBottomSheetActionImplFromJson( +_StacModalBottomSheetAction _$StacModalBottomSheetActionFromJson( Map json) => - _$StacModalBottomSheetActionImpl( + _StacModalBottomSheetAction( widget: json['widget'] as Map?, request: json['request'] == null ? null @@ -34,8 +34,8 @@ _$StacModalBottomSheetActionImpl _$$StacModalBottomSheetActionImplFromJson( useSafeArea: json['useSafeArea'] as bool? ?? false, ); -Map _$$StacModalBottomSheetActionImplToJson( - _$StacModalBottomSheetActionImpl instance) => +Map _$StacModalBottomSheetActionToJson( + _StacModalBottomSheetAction instance) => { 'widget': instance.widget, 'request': instance.request, diff --git a/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.dart b/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.dart index 0e02013c..bd983ca6 100644 --- a/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.dart +++ b/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.dart @@ -16,7 +16,7 @@ enum NavigationStyle { } @freezed -class StacNavigateAction with _$StacNavigateAction { +abstract class StacNavigateAction with _$StacNavigateAction { const StacNavigateAction._(); factory StacNavigateAction({ diff --git a/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.freezed.dart b/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.freezed.dart index 6982ffda..4ea474fa 100644 --- a/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.freezed.dart +++ b/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,40 +10,71 @@ part of 'stac_navigate_action.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacNavigateAction _$StacNavigateActionFromJson(Map json) { - return _StacNavigateAction.fromJson(json); -} - /// @nodoc mixin _$StacNavigateAction { - StacNetworkRequest? get request => throw _privateConstructorUsedError; - Map? get widgetJson => throw _privateConstructorUsedError; - String? get assetPath => throw _privateConstructorUsedError; - String? get routeName => throw _privateConstructorUsedError; - NavigationStyle? get navigationStyle => throw _privateConstructorUsedError; - Map? get result => throw _privateConstructorUsedError; - Map? get arguments => throw _privateConstructorUsedError; - - /// Serializes this StacNavigateAction to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacNetworkRequest? get request; + Map? get widgetJson; + String? get assetPath; + String? get routeName; + NavigationStyle? get navigationStyle; + Map? get result; + Map? get arguments; /// Create a copy of StacNavigateAction /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacNavigateActionCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacNavigateActionCopyWithImpl( + this as StacNavigateAction, _$identity); + + /// Serializes this StacNavigateAction to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacNavigateAction && + (identical(other.request, request) || other.request == request) && + const DeepCollectionEquality() + .equals(other.widgetJson, widgetJson) && + (identical(other.assetPath, assetPath) || + other.assetPath == assetPath) && + (identical(other.routeName, routeName) || + other.routeName == routeName) && + (identical(other.navigationStyle, navigationStyle) || + other.navigationStyle == navigationStyle) && + const DeepCollectionEquality().equals(other.result, result) && + const DeepCollectionEquality().equals(other.arguments, arguments)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + request, + const DeepCollectionEquality().hash(widgetJson), + assetPath, + routeName, + navigationStyle, + const DeepCollectionEquality().hash(result), + const DeepCollectionEquality().hash(arguments)); + + @override + String toString() { + return 'StacNavigateAction(request: $request, widgetJson: $widgetJson, assetPath: $assetPath, routeName: $routeName, navigationStyle: $navigationStyle, result: $result, arguments: $arguments)'; + } } /// @nodoc -abstract class $StacNavigateActionCopyWith<$Res> { +abstract mixin class $StacNavigateActionCopyWith<$Res> { factory $StacNavigateActionCopyWith( - StacNavigateAction value, $Res Function(StacNavigateAction) then) = - _$StacNavigateActionCopyWithImpl<$Res, StacNavigateAction>; + StacNavigateAction value, $Res Function(StacNavigateAction) _then) = + _$StacNavigateActionCopyWithImpl; @useResult $Res call( {StacNetworkRequest? request, @@ -57,14 +89,12 @@ abstract class $StacNavigateActionCopyWith<$Res> { } /// @nodoc -class _$StacNavigateActionCopyWithImpl<$Res, $Val extends StacNavigateAction> +class _$StacNavigateActionCopyWithImpl<$Res> implements $StacNavigateActionCopyWith<$Res> { - _$StacNavigateActionCopyWithImpl(this._value, this._then); + _$StacNavigateActionCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacNavigateAction _self; + final $Res Function(StacNavigateAction) _then; /// Create a copy of StacNavigateAction /// with the given fields replaced by the non-null parameter values. @@ -79,36 +109,36 @@ class _$StacNavigateActionCopyWithImpl<$Res, $Val extends StacNavigateAction> Object? result = freezed, Object? arguments = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( request: freezed == request - ? _value.request + ? _self.request : request // ignore: cast_nullable_to_non_nullable as StacNetworkRequest?, widgetJson: freezed == widgetJson - ? _value.widgetJson + ? _self.widgetJson : widgetJson // ignore: cast_nullable_to_non_nullable as Map?, assetPath: freezed == assetPath - ? _value.assetPath + ? _self.assetPath : assetPath // ignore: cast_nullable_to_non_nullable as String?, routeName: freezed == routeName - ? _value.routeName + ? _self.routeName : routeName // ignore: cast_nullable_to_non_nullable as String?, navigationStyle: freezed == navigationStyle - ? _value.navigationStyle + ? _self.navigationStyle : navigationStyle // ignore: cast_nullable_to_non_nullable as NavigationStyle?, result: freezed == result - ? _value.result + ? _self.result : result // ignore: cast_nullable_to_non_nullable as Map?, arguments: freezed == arguments - ? _value.arguments + ? _self.arguments : arguments // ignore: cast_nullable_to_non_nullable as Map?, - ) as $Val); + )); } /// Create a copy of StacNavigateAction @@ -116,95 +146,20 @@ class _$StacNavigateActionCopyWithImpl<$Res, $Val extends StacNavigateAction> @override @pragma('vm:prefer-inline') $StacNetworkRequestCopyWith<$Res>? get request { - if (_value.request == null) { + if (_self.request == null) { return null; } - return $StacNetworkRequestCopyWith<$Res>(_value.request!, (value) { - return _then(_value.copyWith(request: value) as $Val); + return $StacNetworkRequestCopyWith<$Res>(_self.request!, (value) { + return _then(_self.copyWith(request: value)); }); } } -/// @nodoc -abstract class _$$StacNavigateActionImplCopyWith<$Res> - implements $StacNavigateActionCopyWith<$Res> { - factory _$$StacNavigateActionImplCopyWith(_$StacNavigateActionImpl value, - $Res Function(_$StacNavigateActionImpl) then) = - __$$StacNavigateActionImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacNetworkRequest? request, - Map? widgetJson, - String? assetPath, - String? routeName, - NavigationStyle? navigationStyle, - Map? result, - Map? arguments}); - - @override - $StacNetworkRequestCopyWith<$Res>? get request; -} - -/// @nodoc -class __$$StacNavigateActionImplCopyWithImpl<$Res> - extends _$StacNavigateActionCopyWithImpl<$Res, _$StacNavigateActionImpl> - implements _$$StacNavigateActionImplCopyWith<$Res> { - __$$StacNavigateActionImplCopyWithImpl(_$StacNavigateActionImpl _value, - $Res Function(_$StacNavigateActionImpl) _then) - : super(_value, _then); - - /// Create a copy of StacNavigateAction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? request = freezed, - Object? widgetJson = freezed, - Object? assetPath = freezed, - Object? routeName = freezed, - Object? navigationStyle = freezed, - Object? result = freezed, - Object? arguments = freezed, - }) { - return _then(_$StacNavigateActionImpl( - request: freezed == request - ? _value.request - : request // ignore: cast_nullable_to_non_nullable - as StacNetworkRequest?, - widgetJson: freezed == widgetJson - ? _value._widgetJson - : widgetJson // ignore: cast_nullable_to_non_nullable - as Map?, - assetPath: freezed == assetPath - ? _value.assetPath - : assetPath // ignore: cast_nullable_to_non_nullable - as String?, - routeName: freezed == routeName - ? _value.routeName - : routeName // ignore: cast_nullable_to_non_nullable - as String?, - navigationStyle: freezed == navigationStyle - ? _value.navigationStyle - : navigationStyle // ignore: cast_nullable_to_non_nullable - as NavigationStyle?, - result: freezed == result - ? _value._result - : result // ignore: cast_nullable_to_non_nullable - as Map?, - arguments: freezed == arguments - ? _value._arguments - : arguments // ignore: cast_nullable_to_non_nullable - as Map?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacNavigateActionImpl extends _StacNavigateAction { - _$StacNavigateActionImpl( +class _StacNavigateAction extends StacNavigateAction { + _StacNavigateAction( {this.request, final Map? widgetJson, this.assetPath, @@ -216,9 +171,8 @@ class _$StacNavigateActionImpl extends _StacNavigateAction { _result = result, _arguments = arguments, super._(); - - factory _$StacNavigateActionImpl.fromJson(Map json) => - _$$StacNavigateActionImplFromJson(json); + factory _StacNavigateAction.fromJson(Map json) => + _$StacNavigateActionFromJson(json); @override final StacNetworkRequest? request; @@ -258,16 +212,26 @@ class _$StacNavigateActionImpl extends _StacNavigateAction { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacNavigateAction + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacNavigateAction(request: $request, widgetJson: $widgetJson, assetPath: $assetPath, routeName: $routeName, navigationStyle: $navigationStyle, result: $result, arguments: $arguments)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacNavigateActionCopyWith<_StacNavigateAction> get copyWith => + __$StacNavigateActionCopyWithImpl<_StacNavigateAction>(this, _$identity); + + @override + Map toJson() { + return _$StacNavigateActionToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacNavigateActionImpl && + other is _StacNavigateAction && (identical(other.request, request) || other.request == request) && const DeepCollectionEquality() .equals(other._widgetJson, _widgetJson) && @@ -294,56 +258,99 @@ class _$StacNavigateActionImpl extends _StacNavigateAction { const DeepCollectionEquality().hash(_result), const DeepCollectionEquality().hash(_arguments)); - /// Create a copy of StacNavigateAction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacNavigateActionImplCopyWith<_$StacNavigateActionImpl> get copyWith => - __$$StacNavigateActionImplCopyWithImpl<_$StacNavigateActionImpl>( - this, _$identity); + String toString() { + return 'StacNavigateAction(request: $request, widgetJson: $widgetJson, assetPath: $assetPath, routeName: $routeName, navigationStyle: $navigationStyle, result: $result, arguments: $arguments)'; + } +} +/// @nodoc +abstract mixin class _$StacNavigateActionCopyWith<$Res> + implements $StacNavigateActionCopyWith<$Res> { + factory _$StacNavigateActionCopyWith( + _StacNavigateAction value, $Res Function(_StacNavigateAction) _then) = + __$StacNavigateActionCopyWithImpl; @override - Map toJson() { - return _$$StacNavigateActionImplToJson( - this, - ); - } + @useResult + $Res call( + {StacNetworkRequest? request, + Map? widgetJson, + String? assetPath, + String? routeName, + NavigationStyle? navigationStyle, + Map? result, + Map? arguments}); + + @override + $StacNetworkRequestCopyWith<$Res>? get request; } -abstract class _StacNavigateAction extends StacNavigateAction { - factory _StacNavigateAction( - {final StacNetworkRequest? request, - final Map? widgetJson, - final String? assetPath, - final String? routeName, - final NavigationStyle? navigationStyle, - final Map? result, - final Map? arguments}) = _$StacNavigateActionImpl; - _StacNavigateAction._() : super._(); +/// @nodoc +class __$StacNavigateActionCopyWithImpl<$Res> + implements _$StacNavigateActionCopyWith<$Res> { + __$StacNavigateActionCopyWithImpl(this._self, this._then); - factory _StacNavigateAction.fromJson(Map json) = - _$StacNavigateActionImpl.fromJson; + final _StacNavigateAction _self; + final $Res Function(_StacNavigateAction) _then; + /// Create a copy of StacNavigateAction + /// with the given fields replaced by the non-null parameter values. @override - StacNetworkRequest? get request; - @override - Map? get widgetJson; - @override - String? get assetPath; - @override - String? get routeName; - @override - NavigationStyle? get navigationStyle; - @override - Map? get result; - @override - Map? get arguments; + @pragma('vm:prefer-inline') + $Res call({ + Object? request = freezed, + Object? widgetJson = freezed, + Object? assetPath = freezed, + Object? routeName = freezed, + Object? navigationStyle = freezed, + Object? result = freezed, + Object? arguments = freezed, + }) { + return _then(_StacNavigateAction( + request: freezed == request + ? _self.request + : request // ignore: cast_nullable_to_non_nullable + as StacNetworkRequest?, + widgetJson: freezed == widgetJson + ? _self._widgetJson + : widgetJson // ignore: cast_nullable_to_non_nullable + as Map?, + assetPath: freezed == assetPath + ? _self.assetPath + : assetPath // ignore: cast_nullable_to_non_nullable + as String?, + routeName: freezed == routeName + ? _self.routeName + : routeName // ignore: cast_nullable_to_non_nullable + as String?, + navigationStyle: freezed == navigationStyle + ? _self.navigationStyle + : navigationStyle // ignore: cast_nullable_to_non_nullable + as NavigationStyle?, + result: freezed == result + ? _self._result + : result // ignore: cast_nullable_to_non_nullable + as Map?, + arguments: freezed == arguments + ? _self._arguments + : arguments // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } /// Create a copy of StacNavigateAction /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacNavigateActionImplCopyWith<_$StacNavigateActionImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacNetworkRequestCopyWith<$Res>? get request { + if (_self.request == null) { + return null; + } + + return $StacNetworkRequestCopyWith<$Res>(_self.request!, (value) { + return _then(_self.copyWith(request: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.g.dart b/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.g.dart index 4fb6e9d9..603aa55e 100644 --- a/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.g.dart +++ b/packages/stac/lib/src/action_parsers/stac_navigate_action/stac_navigate_action.g.dart @@ -6,9 +6,8 @@ part of 'stac_navigate_action.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacNavigateActionImpl _$$StacNavigateActionImplFromJson( - Map json) => - _$StacNavigateActionImpl( +_StacNavigateAction _$StacNavigateActionFromJson(Map json) => + _StacNavigateAction( request: json['request'] == null ? null : StacNetworkRequest.fromJson( @@ -22,8 +21,7 @@ _$StacNavigateActionImpl _$$StacNavigateActionImplFromJson( arguments: json['arguments'] as Map?, ); -Map _$$StacNavigateActionImplToJson( - _$StacNavigateActionImpl instance) => +Map _$StacNavigateActionToJson(_StacNavigateAction instance) => { 'request': instance.request, 'widgetJson': instance.widgetJson, diff --git a/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.dart b/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.dart index d01f1182..884ca9e0 100644 --- a/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.dart +++ b/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.dart @@ -11,7 +11,7 @@ enum Method { } @freezed -class StacNetworkRequest with _$StacNetworkRequest { +abstract class StacNetworkRequest with _$StacNetworkRequest { const factory StacNetworkRequest({ required String url, @Default(Method.get) Method method, @@ -27,7 +27,7 @@ class StacNetworkRequest with _$StacNetworkRequest { } @freezed -class StacNetworkResult with _$StacNetworkResult { +abstract class StacNetworkResult with _$StacNetworkResult { const factory StacNetworkResult({ required int statusCode, required Map action, diff --git a/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.freezed.dart b/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.freezed.dart index 273c9550..77f4763f 100644 --- a/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.freezed.dart +++ b/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,115 +10,69 @@ part of 'stac_network_request.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacNetworkRequest _$StacNetworkRequestFromJson(Map json) { - return _StacNetworkRequest.fromJson(json); -} - /// @nodoc mixin _$StacNetworkRequest { - String get url => throw _privateConstructorUsedError; - Method get method => throw _privateConstructorUsedError; - Map? get queryParameters => - throw _privateConstructorUsedError; - Map? get headers => throw _privateConstructorUsedError; - String? get contentType => throw _privateConstructorUsedError; - dynamic get body => throw _privateConstructorUsedError; - List get results => throw _privateConstructorUsedError; - - /// Serializes this StacNetworkRequest to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get url; + Method get method; + Map? get queryParameters; + Map? get headers; + String? get contentType; + dynamic get body; + List get results; /// Create a copy of StacNetworkRequest /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacNetworkRequestCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacNetworkRequestCopyWithImpl( + this as StacNetworkRequest, _$identity); -/// @nodoc -abstract class $StacNetworkRequestCopyWith<$Res> { - factory $StacNetworkRequestCopyWith( - StacNetworkRequest value, $Res Function(StacNetworkRequest) then) = - _$StacNetworkRequestCopyWithImpl<$Res, StacNetworkRequest>; - @useResult - $Res call( - {String url, - Method method, - Map? queryParameters, - Map? headers, - String? contentType, - dynamic body, - List results}); -} + /// Serializes this StacNetworkRequest to a JSON map. + Map toJson(); -/// @nodoc -class _$StacNetworkRequestCopyWithImpl<$Res, $Val extends StacNetworkRequest> - implements $StacNetworkRequestCopyWith<$Res> { - _$StacNetworkRequestCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacNetworkRequest && + (identical(other.url, url) || other.url == url) && + (identical(other.method, method) || other.method == method) && + const DeepCollectionEquality() + .equals(other.queryParameters, queryParameters) && + const DeepCollectionEquality().equals(other.headers, headers) && + (identical(other.contentType, contentType) || + other.contentType == contentType) && + const DeepCollectionEquality().equals(other.body, body) && + const DeepCollectionEquality().equals(other.results, results)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + url, + method, + const DeepCollectionEquality().hash(queryParameters), + const DeepCollectionEquality().hash(headers), + contentType, + const DeepCollectionEquality().hash(body), + const DeepCollectionEquality().hash(results)); - /// Create a copy of StacNetworkRequest - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? url = null, - Object? method = null, - Object? queryParameters = freezed, - Object? headers = freezed, - Object? contentType = freezed, - Object? body = freezed, - Object? results = null, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - method: null == method - ? _value.method - : method // ignore: cast_nullable_to_non_nullable - as Method, - queryParameters: freezed == queryParameters - ? _value.queryParameters - : queryParameters // ignore: cast_nullable_to_non_nullable - as Map?, - headers: freezed == headers - ? _value.headers - : headers // ignore: cast_nullable_to_non_nullable - as Map?, - contentType: freezed == contentType - ? _value.contentType - : contentType // ignore: cast_nullable_to_non_nullable - as String?, - body: freezed == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as dynamic, - results: null == results - ? _value.results - : results // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + String toString() { + return 'StacNetworkRequest(url: $url, method: $method, queryParameters: $queryParameters, headers: $headers, contentType: $contentType, body: $body, results: $results)'; } } /// @nodoc -abstract class _$$StacNetworkRequestImplCopyWith<$Res> - implements $StacNetworkRequestCopyWith<$Res> { - factory _$$StacNetworkRequestImplCopyWith(_$StacNetworkRequestImpl value, - $Res Function(_$StacNetworkRequestImpl) then) = - __$$StacNetworkRequestImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacNetworkRequestCopyWith<$Res> { + factory $StacNetworkRequestCopyWith( + StacNetworkRequest value, $Res Function(StacNetworkRequest) _then) = + _$StacNetworkRequestCopyWithImpl; @useResult $Res call( {String url, @@ -130,12 +85,12 @@ abstract class _$$StacNetworkRequestImplCopyWith<$Res> } /// @nodoc -class __$$StacNetworkRequestImplCopyWithImpl<$Res> - extends _$StacNetworkRequestCopyWithImpl<$Res, _$StacNetworkRequestImpl> - implements _$$StacNetworkRequestImplCopyWith<$Res> { - __$$StacNetworkRequestImplCopyWithImpl(_$StacNetworkRequestImpl _value, - $Res Function(_$StacNetworkRequestImpl) _then) - : super(_value, _then); +class _$StacNetworkRequestCopyWithImpl<$Res> + implements $StacNetworkRequestCopyWith<$Res> { + _$StacNetworkRequestCopyWithImpl(this._self, this._then); + + final StacNetworkRequest _self; + final $Res Function(StacNetworkRequest) _then; /// Create a copy of StacNetworkRequest /// with the given fields replaced by the non-null parameter values. @@ -150,33 +105,33 @@ class __$$StacNetworkRequestImplCopyWithImpl<$Res> Object? body = freezed, Object? results = null, }) { - return _then(_$StacNetworkRequestImpl( + return _then(_self.copyWith( url: null == url - ? _value.url + ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, method: null == method - ? _value.method + ? _self.method : method // ignore: cast_nullable_to_non_nullable as Method, queryParameters: freezed == queryParameters - ? _value._queryParameters + ? _self.queryParameters : queryParameters // ignore: cast_nullable_to_non_nullable as Map?, headers: freezed == headers - ? _value._headers + ? _self.headers : headers // ignore: cast_nullable_to_non_nullable as Map?, contentType: freezed == contentType - ? _value.contentType + ? _self.contentType : contentType // ignore: cast_nullable_to_non_nullable as String?, body: freezed == body - ? _value.body + ? _self.body : body // ignore: cast_nullable_to_non_nullable as dynamic, results: null == results - ? _value._results + ? _self.results : results // ignore: cast_nullable_to_non_nullable as List, )); @@ -185,8 +140,8 @@ class __$$StacNetworkRequestImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacNetworkRequestImpl implements _StacNetworkRequest { - const _$StacNetworkRequestImpl( +class _StacNetworkRequest implements StacNetworkRequest { + const _StacNetworkRequest( {required this.url, this.method = Method.get, final Map? queryParameters, @@ -197,9 +152,8 @@ class _$StacNetworkRequestImpl implements _StacNetworkRequest { : _queryParameters = queryParameters, _headers = headers, _results = results; - - factory _$StacNetworkRequestImpl.fromJson(Map json) => - _$$StacNetworkRequestImplFromJson(json); + factory _StacNetworkRequest.fromJson(Map json) => + _$StacNetworkRequestFromJson(json); @override final String url; @@ -239,16 +193,26 @@ class _$StacNetworkRequestImpl implements _StacNetworkRequest { return EqualUnmodifiableListView(_results); } + /// Create a copy of StacNetworkRequest + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacNetworkRequest(url: $url, method: $method, queryParameters: $queryParameters, headers: $headers, contentType: $contentType, body: $body, results: $results)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacNetworkRequestCopyWith<_StacNetworkRequest> get copyWith => + __$StacNetworkRequestCopyWithImpl<_StacNetworkRequest>(this, _$identity); + + @override + Map toJson() { + return _$StacNetworkRequestToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacNetworkRequestImpl && + other is _StacNetworkRequest && (identical(other.url, url) || other.url == url) && (identical(other.method, method) || other.method == method) && const DeepCollectionEquality() @@ -272,136 +236,137 @@ class _$StacNetworkRequestImpl implements _StacNetworkRequest { const DeepCollectionEquality().hash(body), const DeepCollectionEquality().hash(_results)); - /// Create a copy of StacNetworkRequest - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacNetworkRequestImplCopyWith<_$StacNetworkRequestImpl> get copyWith => - __$$StacNetworkRequestImplCopyWithImpl<_$StacNetworkRequestImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$StacNetworkRequestImplToJson( - this, - ); + String toString() { + return 'StacNetworkRequest(url: $url, method: $method, queryParameters: $queryParameters, headers: $headers, contentType: $contentType, body: $body, results: $results)'; } } -abstract class _StacNetworkRequest implements StacNetworkRequest { - const factory _StacNetworkRequest( - {required final String url, - final Method method, - final Map? queryParameters, - final Map? headers, - final String? contentType, - final dynamic body, - final List results}) = _$StacNetworkRequestImpl; +/// @nodoc +abstract mixin class _$StacNetworkRequestCopyWith<$Res> + implements $StacNetworkRequestCopyWith<$Res> { + factory _$StacNetworkRequestCopyWith( + _StacNetworkRequest value, $Res Function(_StacNetworkRequest) _then) = + __$StacNetworkRequestCopyWithImpl; + @override + @useResult + $Res call( + {String url, + Method method, + Map? queryParameters, + Map? headers, + String? contentType, + dynamic body, + List results}); +} - factory _StacNetworkRequest.fromJson(Map json) = - _$StacNetworkRequestImpl.fromJson; +/// @nodoc +class __$StacNetworkRequestCopyWithImpl<$Res> + implements _$StacNetworkRequestCopyWith<$Res> { + __$StacNetworkRequestCopyWithImpl(this._self, this._then); - @override - String get url; - @override - Method get method; - @override - Map? get queryParameters; - @override - Map? get headers; - @override - String? get contentType; - @override - dynamic get body; - @override - List get results; + final _StacNetworkRequest _self; + final $Res Function(_StacNetworkRequest) _then; /// Create a copy of StacNetworkRequest /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacNetworkRequestImplCopyWith<_$StacNetworkRequestImpl> get copyWith => - throw _privateConstructorUsedError; -} - -StacNetworkResult _$StacNetworkResultFromJson(Map json) { - return _StacNetworkResult.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? url = null, + Object? method = null, + Object? queryParameters = freezed, + Object? headers = freezed, + Object? contentType = freezed, + Object? body = freezed, + Object? results = null, + }) { + return _then(_StacNetworkRequest( + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + method: null == method + ? _self.method + : method // ignore: cast_nullable_to_non_nullable + as Method, + queryParameters: freezed == queryParameters + ? _self._queryParameters + : queryParameters // ignore: cast_nullable_to_non_nullable + as Map?, + headers: freezed == headers + ? _self._headers + : headers // ignore: cast_nullable_to_non_nullable + as Map?, + contentType: freezed == contentType + ? _self.contentType + : contentType // ignore: cast_nullable_to_non_nullable + as String?, + body: freezed == body + ? _self.body + : body // ignore: cast_nullable_to_non_nullable + as dynamic, + results: null == results + ? _self._results + : results // ignore: cast_nullable_to_non_nullable + as List, + )); + } } /// @nodoc mixin _$StacNetworkResult { - int get statusCode => throw _privateConstructorUsedError; - Map get action => throw _privateConstructorUsedError; - - /// Serializes this StacNetworkResult to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get statusCode; + Map get action; /// Create a copy of StacNetworkResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacNetworkResultCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacNetworkResultCopyWithImpl( + this as StacNetworkResult, _$identity); -/// @nodoc -abstract class $StacNetworkResultCopyWith<$Res> { - factory $StacNetworkResultCopyWith( - StacNetworkResult value, $Res Function(StacNetworkResult) then) = - _$StacNetworkResultCopyWithImpl<$Res, StacNetworkResult>; - @useResult - $Res call({int statusCode, Map action}); -} + /// Serializes this StacNetworkResult to a JSON map. + Map toJson(); -/// @nodoc -class _$StacNetworkResultCopyWithImpl<$Res, $Val extends StacNetworkResult> - implements $StacNetworkResultCopyWith<$Res> { - _$StacNetworkResultCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacNetworkResult && + (identical(other.statusCode, statusCode) || + other.statusCode == statusCode) && + const DeepCollectionEquality().equals(other.action, action)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, statusCode, const DeepCollectionEquality().hash(action)); - /// Create a copy of StacNetworkResult - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? statusCode = null, - Object? action = null, - }) { - return _then(_value.copyWith( - statusCode: null == statusCode - ? _value.statusCode - : statusCode // ignore: cast_nullable_to_non_nullable - as int, - action: null == action - ? _value.action - : action // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + String toString() { + return 'StacNetworkResult(statusCode: $statusCode, action: $action)'; } } /// @nodoc -abstract class _$$StacNetworkResultImplCopyWith<$Res> - implements $StacNetworkResultCopyWith<$Res> { - factory _$$StacNetworkResultImplCopyWith(_$StacNetworkResultImpl value, - $Res Function(_$StacNetworkResultImpl) then) = - __$$StacNetworkResultImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacNetworkResultCopyWith<$Res> { + factory $StacNetworkResultCopyWith( + StacNetworkResult value, $Res Function(StacNetworkResult) _then) = + _$StacNetworkResultCopyWithImpl; @useResult $Res call({int statusCode, Map action}); } /// @nodoc -class __$$StacNetworkResultImplCopyWithImpl<$Res> - extends _$StacNetworkResultCopyWithImpl<$Res, _$StacNetworkResultImpl> - implements _$$StacNetworkResultImplCopyWith<$Res> { - __$$StacNetworkResultImplCopyWithImpl(_$StacNetworkResultImpl _value, - $Res Function(_$StacNetworkResultImpl) _then) - : super(_value, _then); +class _$StacNetworkResultCopyWithImpl<$Res> + implements $StacNetworkResultCopyWith<$Res> { + _$StacNetworkResultCopyWithImpl(this._self, this._then); + + final StacNetworkResult _self; + final $Res Function(StacNetworkResult) _then; /// Create a copy of StacNetworkResult /// with the given fields replaced by the non-null parameter values. @@ -411,13 +376,13 @@ class __$$StacNetworkResultImplCopyWithImpl<$Res> Object? statusCode = null, Object? action = null, }) { - return _then(_$StacNetworkResultImpl( + return _then(_self.copyWith( statusCode: null == statusCode - ? _value.statusCode + ? _self.statusCode : statusCode // ignore: cast_nullable_to_non_nullable as int, action: null == action - ? _value._action + ? _self.action : action // ignore: cast_nullable_to_non_nullable as Map, )); @@ -426,13 +391,12 @@ class __$$StacNetworkResultImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacNetworkResultImpl implements _StacNetworkResult { - const _$StacNetworkResultImpl( +class _StacNetworkResult implements StacNetworkResult { + const _StacNetworkResult( {required this.statusCode, required final Map action}) : _action = action; - - factory _$StacNetworkResultImpl.fromJson(Map json) => - _$$StacNetworkResultImplFromJson(json); + factory _StacNetworkResult.fromJson(Map json) => + _$StacNetworkResultFromJson(json); @override final int statusCode; @@ -444,16 +408,26 @@ class _$StacNetworkResultImpl implements _StacNetworkResult { return EqualUnmodifiableMapView(_action); } + /// Create a copy of StacNetworkResult + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacNetworkResult(statusCode: $statusCode, action: $action)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacNetworkResultCopyWith<_StacNetworkResult> get copyWith => + __$StacNetworkResultCopyWithImpl<_StacNetworkResult>(this, _$identity); + + @override + Map toJson() { + return _$StacNetworkResultToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacNetworkResultImpl && + other is _StacNetworkResult && (identical(other.statusCode, statusCode) || other.statusCode == statusCode) && const DeepCollectionEquality().equals(other._action, _action)); @@ -464,40 +438,50 @@ class _$StacNetworkResultImpl implements _StacNetworkResult { int get hashCode => Object.hash( runtimeType, statusCode, const DeepCollectionEquality().hash(_action)); - /// Create a copy of StacNetworkResult - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacNetworkResultImplCopyWith<_$StacNetworkResultImpl> get copyWith => - __$$StacNetworkResultImplCopyWithImpl<_$StacNetworkResultImpl>( - this, _$identity); + String toString() { + return 'StacNetworkResult(statusCode: $statusCode, action: $action)'; + } +} +/// @nodoc +abstract mixin class _$StacNetworkResultCopyWith<$Res> + implements $StacNetworkResultCopyWith<$Res> { + factory _$StacNetworkResultCopyWith( + _StacNetworkResult value, $Res Function(_StacNetworkResult) _then) = + __$StacNetworkResultCopyWithImpl; @override - Map toJson() { - return _$$StacNetworkResultImplToJson( - this, - ); - } + @useResult + $Res call({int statusCode, Map action}); } -abstract class _StacNetworkResult implements StacNetworkResult { - const factory _StacNetworkResult( - {required final int statusCode, - required final Map action}) = _$StacNetworkResultImpl; +/// @nodoc +class __$StacNetworkResultCopyWithImpl<$Res> + implements _$StacNetworkResultCopyWith<$Res> { + __$StacNetworkResultCopyWithImpl(this._self, this._then); - factory _StacNetworkResult.fromJson(Map json) = - _$StacNetworkResultImpl.fromJson; - - @override - int get statusCode; - @override - Map get action; + final _StacNetworkResult _self; + final $Res Function(_StacNetworkResult) _then; /// Create a copy of StacNetworkResult /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacNetworkResultImplCopyWith<_$StacNetworkResultImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? statusCode = null, + Object? action = null, + }) { + return _then(_StacNetworkResult( + statusCode: null == statusCode + ? _self.statusCode + : statusCode // ignore: cast_nullable_to_non_nullable + as int, + action: null == action + ? _self._action + : action // ignore: cast_nullable_to_non_nullable + as Map, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.g.dart b/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.g.dart index 5b644541..247666b2 100644 --- a/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.g.dart +++ b/packages/stac/lib/src/action_parsers/stac_network_request/stac_network_request.g.dart @@ -6,9 +6,8 @@ part of 'stac_network_request.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacNetworkRequestImpl _$$StacNetworkRequestImplFromJson( - Map json) => - _$StacNetworkRequestImpl( +_StacNetworkRequest _$StacNetworkRequestFromJson(Map json) => + _StacNetworkRequest( url: json['url'] as String, method: $enumDecodeNullable(_$MethodEnumMap, json['method']) ?? Method.get, @@ -23,8 +22,7 @@ _$StacNetworkRequestImpl _$$StacNetworkRequestImplFromJson( const [], ); -Map _$$StacNetworkRequestImplToJson( - _$StacNetworkRequestImpl instance) => +Map _$StacNetworkRequestToJson(_StacNetworkRequest instance) => { 'url': instance.url, 'method': _$MethodEnumMap[instance.method]!, @@ -42,15 +40,13 @@ const _$MethodEnumMap = { Method.delete: 'delete', }; -_$StacNetworkResultImpl _$$StacNetworkResultImplFromJson( - Map json) => - _$StacNetworkResultImpl( +_StacNetworkResult _$StacNetworkResultFromJson(Map json) => + _StacNetworkResult( statusCode: (json['statusCode'] as num).toInt(), action: json['action'] as Map, ); -Map _$$StacNetworkResultImplToJson( - _$StacNetworkResultImpl instance) => +Map _$StacNetworkResultToJson(_StacNetworkResult instance) => { 'statusCode': instance.statusCode, 'action': instance.action, diff --git a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.dart b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.dart index 5ec6a9e9..5c38ded2 100644 --- a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.dart +++ b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.dart @@ -11,7 +11,7 @@ part 'stac_snack_bar.freezed.dart'; part 'stac_snack_bar.g.dart'; @freezed -class StacSnackBar with _$StacSnackBar { +abstract class StacSnackBar with _$StacSnackBar { const factory StacSnackBar({ required Map content, String? backgroundColor, diff --git a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.freezed.dart b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.freezed.dart index 464c1631..a7888ba9 100644 --- a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.freezed.dart +++ b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,50 +10,108 @@ part of 'stac_snack_bar.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSnackBar _$StacSnackBarFromJson(Map json) { - return _StacSnackBar.fromJson(json); -} - /// @nodoc mixin _$StacSnackBar { - Map get content => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - StacEdgeInsets? get margin => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - double? get width => throw _privateConstructorUsedError; - StacShapeBorder? get shape => throw _privateConstructorUsedError; - HitTestBehavior? get hitTestBehavior => throw _privateConstructorUsedError; - SnackBarBehavior? get behavior => throw _privateConstructorUsedError; - StacSnackBarAction? get action => throw _privateConstructorUsedError; - double? get actionOverflowThreshold => throw _privateConstructorUsedError; - bool? get showCloseIcon => throw _privateConstructorUsedError; - String? get closeIconColor => throw _privateConstructorUsedError; - StacDuration get duration => throw _privateConstructorUsedError; - Map? get onVisible => throw _privateConstructorUsedError; - DismissDirection? get dismissDirection => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - - /// Serializes this StacSnackBar to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map get content; + String? get backgroundColor; + double? get elevation; + StacEdgeInsets? get margin; + StacEdgeInsets? get padding; + double? get width; + StacShapeBorder? get shape; + HitTestBehavior? get hitTestBehavior; + SnackBarBehavior? get behavior; + StacSnackBarAction? get action; + double? get actionOverflowThreshold; + bool? get showCloseIcon; + String? get closeIconColor; + StacDuration get duration; + Map? get onVisible; + DismissDirection? get dismissDirection; + Clip get clipBehavior; /// Create a copy of StacSnackBar /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSnackBarCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacSnackBarCopyWithImpl( + this as StacSnackBar, _$identity); + + /// Serializes this StacSnackBar to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSnackBar && + const DeepCollectionEquality().equals(other.content, content) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.margin, margin) || other.margin == margin) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.width, width) || other.width == width) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.hitTestBehavior, hitTestBehavior) || + other.hitTestBehavior == hitTestBehavior) && + (identical(other.behavior, behavior) || + other.behavior == behavior) && + (identical(other.action, action) || other.action == action) && + (identical( + other.actionOverflowThreshold, actionOverflowThreshold) || + other.actionOverflowThreshold == actionOverflowThreshold) && + (identical(other.showCloseIcon, showCloseIcon) || + other.showCloseIcon == showCloseIcon) && + (identical(other.closeIconColor, closeIconColor) || + other.closeIconColor == closeIconColor) && + (identical(other.duration, duration) || + other.duration == duration) && + const DeepCollectionEquality().equals(other.onVisible, onVisible) && + (identical(other.dismissDirection, dismissDirection) || + other.dismissDirection == dismissDirection) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(content), + backgroundColor, + elevation, + margin, + padding, + width, + shape, + hitTestBehavior, + behavior, + action, + actionOverflowThreshold, + showCloseIcon, + closeIconColor, + duration, + const DeepCollectionEquality().hash(onVisible), + dismissDirection, + clipBehavior); + + @override + String toString() { + return 'StacSnackBar(content: $content, backgroundColor: $backgroundColor, elevation: $elevation, margin: $margin, padding: $padding, width: $width, shape: $shape, hitTestBehavior: $hitTestBehavior, behavior: $behavior, action: $action, actionOverflowThreshold: $actionOverflowThreshold, showCloseIcon: $showCloseIcon, closeIconColor: $closeIconColor, duration: $duration, onVisible: $onVisible, dismissDirection: $dismissDirection, clipBehavior: $clipBehavior)'; + } } /// @nodoc -abstract class $StacSnackBarCopyWith<$Res> { +abstract mixin class $StacSnackBarCopyWith<$Res> { factory $StacSnackBarCopyWith( - StacSnackBar value, $Res Function(StacSnackBar) then) = - _$StacSnackBarCopyWithImpl<$Res, StacSnackBar>; + StacSnackBar value, $Res Function(StacSnackBar) _then) = + _$StacSnackBarCopyWithImpl; @useResult $Res call( {Map content, @@ -81,14 +140,11 @@ abstract class $StacSnackBarCopyWith<$Res> { } /// @nodoc -class _$StacSnackBarCopyWithImpl<$Res, $Val extends StacSnackBar> - implements $StacSnackBarCopyWith<$Res> { - _$StacSnackBarCopyWithImpl(this._value, this._then); +class _$StacSnackBarCopyWithImpl<$Res> implements $StacSnackBarCopyWith<$Res> { + _$StacSnackBarCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacSnackBar _self; + final $Res Function(StacSnackBar) _then; /// Create a copy of StacSnackBar /// with the given fields replaced by the non-null parameter values. @@ -113,76 +169,76 @@ class _$StacSnackBarCopyWithImpl<$Res, $Val extends StacSnackBar> Object? dismissDirection = freezed, Object? clipBehavior = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( content: null == content - ? _value.content + ? _self.content : content // ignore: cast_nullable_to_non_nullable as Map, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, margin: freezed == margin - ? _value.margin + ? _self.margin : margin // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, width: freezed == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacShapeBorder?, hitTestBehavior: freezed == hitTestBehavior - ? _value.hitTestBehavior + ? _self.hitTestBehavior : hitTestBehavior // ignore: cast_nullable_to_non_nullable as HitTestBehavior?, behavior: freezed == behavior - ? _value.behavior + ? _self.behavior : behavior // ignore: cast_nullable_to_non_nullable as SnackBarBehavior?, action: freezed == action - ? _value.action + ? _self.action : action // ignore: cast_nullable_to_non_nullable as StacSnackBarAction?, actionOverflowThreshold: freezed == actionOverflowThreshold - ? _value.actionOverflowThreshold + ? _self.actionOverflowThreshold : actionOverflowThreshold // ignore: cast_nullable_to_non_nullable as double?, showCloseIcon: freezed == showCloseIcon - ? _value.showCloseIcon + ? _self.showCloseIcon : showCloseIcon // ignore: cast_nullable_to_non_nullable as bool?, closeIconColor: freezed == closeIconColor - ? _value.closeIconColor + ? _self.closeIconColor : closeIconColor // ignore: cast_nullable_to_non_nullable as String?, duration: null == duration - ? _value.duration + ? _self.duration : duration // ignore: cast_nullable_to_non_nullable as StacDuration, onVisible: freezed == onVisible - ? _value.onVisible + ? _self.onVisible : onVisible // ignore: cast_nullable_to_non_nullable as Map?, dismissDirection: freezed == dismissDirection - ? _value.dismissDirection + ? _self.dismissDirection : dismissDirection // ignore: cast_nullable_to_non_nullable as DismissDirection?, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, - ) as $Val); + )); } /// Create a copy of StacSnackBar @@ -190,12 +246,12 @@ class _$StacSnackBarCopyWithImpl<$Res, $Val extends StacSnackBar> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get margin { - if (_value.margin == null) { + if (_self.margin == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.margin!, (value) { - return _then(_value.copyWith(margin: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.margin!, (value) { + return _then(_self.copyWith(margin: value)); }); } @@ -204,12 +260,12 @@ class _$StacSnackBarCopyWithImpl<$Res, $Val extends StacSnackBar> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } @@ -218,12 +274,12 @@ class _$StacSnackBarCopyWithImpl<$Res, $Val extends StacSnackBar> @override @pragma('vm:prefer-inline') $StacShapeBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacShapeBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacShapeBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -232,12 +288,12 @@ class _$StacSnackBarCopyWithImpl<$Res, $Val extends StacSnackBar> @override @pragma('vm:prefer-inline') $StacSnackBarActionCopyWith<$Res>? get action { - if (_value.action == null) { + if (_self.action == null) { return null; } - return $StacSnackBarActionCopyWith<$Res>(_value.action!, (value) { - return _then(_value.copyWith(action: value) as $Val); + return $StacSnackBarActionCopyWith<$Res>(_self.action!, (value) { + return _then(_self.copyWith(action: value)); }); } @@ -246,159 +302,16 @@ class _$StacSnackBarCopyWithImpl<$Res, $Val extends StacSnackBar> @override @pragma('vm:prefer-inline') $StacDurationCopyWith<$Res> get duration { - return $StacDurationCopyWith<$Res>(_value.duration, (value) { - return _then(_value.copyWith(duration: value) as $Val); + return $StacDurationCopyWith<$Res>(_self.duration, (value) { + return _then(_self.copyWith(duration: value)); }); } } -/// @nodoc -abstract class _$$StacSnackBarImplCopyWith<$Res> - implements $StacSnackBarCopyWith<$Res> { - factory _$$StacSnackBarImplCopyWith( - _$StacSnackBarImpl value, $Res Function(_$StacSnackBarImpl) then) = - __$$StacSnackBarImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map content, - String? backgroundColor, - double? elevation, - StacEdgeInsets? margin, - StacEdgeInsets? padding, - double? width, - StacShapeBorder? shape, - HitTestBehavior? hitTestBehavior, - SnackBarBehavior? behavior, - StacSnackBarAction? action, - double? actionOverflowThreshold, - bool? showCloseIcon, - String? closeIconColor, - StacDuration duration, - Map? onVisible, - DismissDirection? dismissDirection, - Clip clipBehavior}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get margin; - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; - @override - $StacShapeBorderCopyWith<$Res>? get shape; - @override - $StacSnackBarActionCopyWith<$Res>? get action; - @override - $StacDurationCopyWith<$Res> get duration; -} - -/// @nodoc -class __$$StacSnackBarImplCopyWithImpl<$Res> - extends _$StacSnackBarCopyWithImpl<$Res, _$StacSnackBarImpl> - implements _$$StacSnackBarImplCopyWith<$Res> { - __$$StacSnackBarImplCopyWithImpl( - _$StacSnackBarImpl _value, $Res Function(_$StacSnackBarImpl) _then) - : super(_value, _then); - - /// Create a copy of StacSnackBar - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? content = null, - Object? backgroundColor = freezed, - Object? elevation = freezed, - Object? margin = freezed, - Object? padding = freezed, - Object? width = freezed, - Object? shape = freezed, - Object? hitTestBehavior = freezed, - Object? behavior = freezed, - Object? action = freezed, - Object? actionOverflowThreshold = freezed, - Object? showCloseIcon = freezed, - Object? closeIconColor = freezed, - Object? duration = null, - Object? onVisible = freezed, - Object? dismissDirection = freezed, - Object? clipBehavior = null, - }) { - return _then(_$StacSnackBarImpl( - content: null == content - ? _value._content - : content // ignore: cast_nullable_to_non_nullable - as Map, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - margin: freezed == margin - ? _value.margin - : margin // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - width: freezed == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double?, - shape: freezed == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as StacShapeBorder?, - hitTestBehavior: freezed == hitTestBehavior - ? _value.hitTestBehavior - : hitTestBehavior // ignore: cast_nullable_to_non_nullable - as HitTestBehavior?, - behavior: freezed == behavior - ? _value.behavior - : behavior // ignore: cast_nullable_to_non_nullable - as SnackBarBehavior?, - action: freezed == action - ? _value.action - : action // ignore: cast_nullable_to_non_nullable - as StacSnackBarAction?, - actionOverflowThreshold: freezed == actionOverflowThreshold - ? _value.actionOverflowThreshold - : actionOverflowThreshold // ignore: cast_nullable_to_non_nullable - as double?, - showCloseIcon: freezed == showCloseIcon - ? _value.showCloseIcon - : showCloseIcon // ignore: cast_nullable_to_non_nullable - as bool?, - closeIconColor: freezed == closeIconColor - ? _value.closeIconColor - : closeIconColor // ignore: cast_nullable_to_non_nullable - as String?, - duration: null == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as StacDuration, - onVisible: freezed == onVisible - ? _value._onVisible - : onVisible // ignore: cast_nullable_to_non_nullable - as Map?, - dismissDirection: freezed == dismissDirection - ? _value.dismissDirection - : dismissDirection // ignore: cast_nullable_to_non_nullable - as DismissDirection?, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacSnackBarImpl implements _StacSnackBar { - const _$StacSnackBarImpl( +class _StacSnackBar implements StacSnackBar { + const _StacSnackBar( {required final Map content, this.backgroundColor, this.elevation, @@ -418,9 +331,8 @@ class _$StacSnackBarImpl implements _StacSnackBar { this.clipBehavior = Clip.hardEdge}) : _content = content, _onVisible = onVisible; - - factory _$StacSnackBarImpl.fromJson(Map json) => - _$$StacSnackBarImplFromJson(json); + factory _StacSnackBar.fromJson(Map json) => + _$StacSnackBarFromJson(json); final Map _content; @override @@ -473,16 +385,26 @@ class _$StacSnackBarImpl implements _StacSnackBar { @JsonKey() final Clip clipBehavior; + /// Create a copy of StacSnackBar + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSnackBarCopyWith<_StacSnackBar> get copyWith => + __$StacSnackBarCopyWithImpl<_StacSnackBar>(this, _$identity); + @override - String toString() { - return 'StacSnackBar(content: $content, backgroundColor: $backgroundColor, elevation: $elevation, margin: $margin, padding: $padding, width: $width, shape: $shape, hitTestBehavior: $hitTestBehavior, behavior: $behavior, action: $action, actionOverflowThreshold: $actionOverflowThreshold, showCloseIcon: $showCloseIcon, closeIconColor: $closeIconColor, duration: $duration, onVisible: $onVisible, dismissDirection: $dismissDirection, clipBehavior: $clipBehavior)'; + Map toJson() { + return _$StacSnackBarToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSnackBarImpl && + other is _StacSnackBar && const DeepCollectionEquality().equals(other._content, _content) && (identical(other.backgroundColor, backgroundColor) || other.backgroundColor == backgroundColor) && @@ -536,84 +458,219 @@ class _$StacSnackBarImpl implements _StacSnackBar { dismissDirection, clipBehavior); - /// Create a copy of StacSnackBar - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacSnackBarImplCopyWith<_$StacSnackBarImpl> get copyWith => - __$$StacSnackBarImplCopyWithImpl<_$StacSnackBarImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacSnackBarImplToJson( - this, - ); + String toString() { + return 'StacSnackBar(content: $content, backgroundColor: $backgroundColor, elevation: $elevation, margin: $margin, padding: $padding, width: $width, shape: $shape, hitTestBehavior: $hitTestBehavior, behavior: $behavior, action: $action, actionOverflowThreshold: $actionOverflowThreshold, showCloseIcon: $showCloseIcon, closeIconColor: $closeIconColor, duration: $duration, onVisible: $onVisible, dismissDirection: $dismissDirection, clipBehavior: $clipBehavior)'; } } -abstract class _StacSnackBar implements StacSnackBar { - const factory _StacSnackBar( - {required final Map content, - final String? backgroundColor, - final double? elevation, - final StacEdgeInsets? margin, - final StacEdgeInsets? padding, - final double? width, - final StacShapeBorder? shape, - final HitTestBehavior? hitTestBehavior, - final SnackBarBehavior? behavior, - final StacSnackBarAction? action, - final double? actionOverflowThreshold, - final bool? showCloseIcon, - final String? closeIconColor, - final StacDuration duration, - final Map? onVisible, - final DismissDirection? dismissDirection, - final Clip clipBehavior}) = _$StacSnackBarImpl; - - factory _StacSnackBar.fromJson(Map json) = - _$StacSnackBarImpl.fromJson; - - @override - Map get content; - @override - String? get backgroundColor; - @override - double? get elevation; - @override - StacEdgeInsets? get margin; - @override - StacEdgeInsets? get padding; - @override - double? get width; +/// @nodoc +abstract mixin class _$StacSnackBarCopyWith<$Res> + implements $StacSnackBarCopyWith<$Res> { + factory _$StacSnackBarCopyWith( + _StacSnackBar value, $Res Function(_StacSnackBar) _then) = + __$StacSnackBarCopyWithImpl; @override - StacShapeBorder? get shape; + @useResult + $Res call( + {Map content, + String? backgroundColor, + double? elevation, + StacEdgeInsets? margin, + StacEdgeInsets? padding, + double? width, + StacShapeBorder? shape, + HitTestBehavior? hitTestBehavior, + SnackBarBehavior? behavior, + StacSnackBarAction? action, + double? actionOverflowThreshold, + bool? showCloseIcon, + String? closeIconColor, + StacDuration duration, + Map? onVisible, + DismissDirection? dismissDirection, + Clip clipBehavior}); + @override - HitTestBehavior? get hitTestBehavior; + $StacEdgeInsetsCopyWith<$Res>? get margin; @override - SnackBarBehavior? get behavior; + $StacEdgeInsetsCopyWith<$Res>? get padding; @override - StacSnackBarAction? get action; + $StacShapeBorderCopyWith<$Res>? get shape; @override - double? get actionOverflowThreshold; + $StacSnackBarActionCopyWith<$Res>? get action; @override - bool? get showCloseIcon; + $StacDurationCopyWith<$Res> get duration; +} + +/// @nodoc +class __$StacSnackBarCopyWithImpl<$Res> + implements _$StacSnackBarCopyWith<$Res> { + __$StacSnackBarCopyWithImpl(this._self, this._then); + + final _StacSnackBar _self; + final $Res Function(_StacSnackBar) _then; + + /// Create a copy of StacSnackBar + /// with the given fields replaced by the non-null parameter values. @override - String? get closeIconColor; + @pragma('vm:prefer-inline') + $Res call({ + Object? content = null, + Object? backgroundColor = freezed, + Object? elevation = freezed, + Object? margin = freezed, + Object? padding = freezed, + Object? width = freezed, + Object? shape = freezed, + Object? hitTestBehavior = freezed, + Object? behavior = freezed, + Object? action = freezed, + Object? actionOverflowThreshold = freezed, + Object? showCloseIcon = freezed, + Object? closeIconColor = freezed, + Object? duration = null, + Object? onVisible = freezed, + Object? dismissDirection = freezed, + Object? clipBehavior = null, + }) { + return _then(_StacSnackBar( + content: null == content + ? _self._content + : content // ignore: cast_nullable_to_non_nullable + as Map, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + margin: freezed == margin + ? _self.margin + : margin // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + width: freezed == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as double?, + shape: freezed == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as StacShapeBorder?, + hitTestBehavior: freezed == hitTestBehavior + ? _self.hitTestBehavior + : hitTestBehavior // ignore: cast_nullable_to_non_nullable + as HitTestBehavior?, + behavior: freezed == behavior + ? _self.behavior + : behavior // ignore: cast_nullable_to_non_nullable + as SnackBarBehavior?, + action: freezed == action + ? _self.action + : action // ignore: cast_nullable_to_non_nullable + as StacSnackBarAction?, + actionOverflowThreshold: freezed == actionOverflowThreshold + ? _self.actionOverflowThreshold + : actionOverflowThreshold // ignore: cast_nullable_to_non_nullable + as double?, + showCloseIcon: freezed == showCloseIcon + ? _self.showCloseIcon + : showCloseIcon // ignore: cast_nullable_to_non_nullable + as bool?, + closeIconColor: freezed == closeIconColor + ? _self.closeIconColor + : closeIconColor // ignore: cast_nullable_to_non_nullable + as String?, + duration: null == duration + ? _self.duration + : duration // ignore: cast_nullable_to_non_nullable + as StacDuration, + onVisible: freezed == onVisible + ? _self._onVisible + : onVisible // ignore: cast_nullable_to_non_nullable + as Map?, + dismissDirection: freezed == dismissDirection + ? _self.dismissDirection + : dismissDirection // ignore: cast_nullable_to_non_nullable + as DismissDirection?, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + )); + } + + /// Create a copy of StacSnackBar + /// with the given fields replaced by the non-null parameter values. @override - StacDuration get duration; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get margin { + if (_self.margin == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.margin!, (value) { + return _then(_self.copyWith(margin: value)); + }); + } + + /// Create a copy of StacSnackBar + /// with the given fields replaced by the non-null parameter values. @override - Map? get onVisible; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } + + /// Create a copy of StacSnackBar + /// with the given fields replaced by the non-null parameter values. @override - DismissDirection? get dismissDirection; + @pragma('vm:prefer-inline') + $StacShapeBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } + + return $StacShapeBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); + } + + /// Create a copy of StacSnackBar + /// with the given fields replaced by the non-null parameter values. @override - Clip get clipBehavior; + @pragma('vm:prefer-inline') + $StacSnackBarActionCopyWith<$Res>? get action { + if (_self.action == null) { + return null; + } + + return $StacSnackBarActionCopyWith<$Res>(_self.action!, (value) { + return _then(_self.copyWith(action: value)); + }); + } /// Create a copy of StacSnackBar /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSnackBarImplCopyWith<_$StacSnackBarImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacDurationCopyWith<$Res> get duration { + return $StacDurationCopyWith<$Res>(_self.duration, (value) { + return _then(_self.copyWith(duration: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.g.dart b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.g.dart index 99a4ca8e..b59e2f61 100644 --- a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.g.dart +++ b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar.g.dart @@ -6,8 +6,8 @@ part of 'stac_snack_bar.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSnackBarImpl _$$StacSnackBarImplFromJson(Map json) => - _$StacSnackBarImpl( +_StacSnackBar _$StacSnackBarFromJson(Map json) => + _StacSnackBar( content: json['content'] as Map, backgroundColor: json['backgroundColor'] as String?, elevation: (json['elevation'] as num?)?.toDouble(), @@ -42,7 +42,7 @@ _$StacSnackBarImpl _$$StacSnackBarImplFromJson(Map json) => Clip.hardEdge, ); -Map _$$StacSnackBarImplToJson(_$StacSnackBarImpl instance) => +Map _$StacSnackBarToJson(_StacSnackBar instance) => { 'content': instance.content, 'backgroundColor': instance.backgroundColor, diff --git a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.dart b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.dart index ad08f32b..c4fff6ca 100644 --- a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.dart +++ b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.dart @@ -7,7 +7,7 @@ part 'stac_snack_bar_action.freezed.dart'; part 'stac_snack_bar_action.g.dart'; @freezed -class StacSnackBarAction with _$StacSnackBarAction { +abstract class StacSnackBarAction with _$StacSnackBarAction { const factory StacSnackBarAction({ String? textColor, String? disabledTextColor, diff --git a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.freezed.dart b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.freezed.dart index 990bd414..9ee872ae 100644 --- a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.freezed.dart +++ b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,107 +10,69 @@ part of 'stac_snack_bar_action.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSnackBarAction _$StacSnackBarActionFromJson(Map json) { - return _StacSnackBarAction.fromJson(json); -} - /// @nodoc mixin _$StacSnackBarAction { - String? get textColor => throw _privateConstructorUsedError; - String? get disabledTextColor => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get disabledBackgroundColor => throw _privateConstructorUsedError; - String get label => throw _privateConstructorUsedError; - Map get onPressed => throw _privateConstructorUsedError; - - /// Serializes this StacSnackBarAction to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get textColor; + String? get disabledTextColor; + String? get backgroundColor; + String? get disabledBackgroundColor; + String get label; + Map get onPressed; /// Create a copy of StacSnackBarAction /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSnackBarActionCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacSnackBarActionCopyWithImpl( + this as StacSnackBarAction, _$identity); -/// @nodoc -abstract class $StacSnackBarActionCopyWith<$Res> { - factory $StacSnackBarActionCopyWith( - StacSnackBarAction value, $Res Function(StacSnackBarAction) then) = - _$StacSnackBarActionCopyWithImpl<$Res, StacSnackBarAction>; - @useResult - $Res call( - {String? textColor, - String? disabledTextColor, - String? backgroundColor, - String? disabledBackgroundColor, - String label, - Map onPressed}); -} + /// Serializes this StacSnackBarAction to a JSON map. + Map toJson(); -/// @nodoc -class _$StacSnackBarActionCopyWithImpl<$Res, $Val extends StacSnackBarAction> - implements $StacSnackBarActionCopyWith<$Res> { - _$StacSnackBarActionCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSnackBarAction && + (identical(other.textColor, textColor) || + other.textColor == textColor) && + (identical(other.disabledTextColor, disabledTextColor) || + other.disabledTextColor == disabledTextColor) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical( + other.disabledBackgroundColor, disabledBackgroundColor) || + other.disabledBackgroundColor == disabledBackgroundColor) && + (identical(other.label, label) || other.label == label) && + const DeepCollectionEquality().equals(other.onPressed, onPressed)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + textColor, + disabledTextColor, + backgroundColor, + disabledBackgroundColor, + label, + const DeepCollectionEquality().hash(onPressed)); - /// Create a copy of StacSnackBarAction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? textColor = freezed, - Object? disabledTextColor = freezed, - Object? backgroundColor = freezed, - Object? disabledBackgroundColor = freezed, - Object? label = null, - Object? onPressed = null, - }) { - return _then(_value.copyWith( - textColor: freezed == textColor - ? _value.textColor - : textColor // ignore: cast_nullable_to_non_nullable - as String?, - disabledTextColor: freezed == disabledTextColor - ? _value.disabledTextColor - : disabledTextColor // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - disabledBackgroundColor: freezed == disabledBackgroundColor - ? _value.disabledBackgroundColor - : disabledBackgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String, - onPressed: null == onPressed - ? _value.onPressed - : onPressed // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + String toString() { + return 'StacSnackBarAction(textColor: $textColor, disabledTextColor: $disabledTextColor, backgroundColor: $backgroundColor, disabledBackgroundColor: $disabledBackgroundColor, label: $label, onPressed: $onPressed)'; } } /// @nodoc -abstract class _$$StacSnackBarActionImplCopyWith<$Res> - implements $StacSnackBarActionCopyWith<$Res> { - factory _$$StacSnackBarActionImplCopyWith(_$StacSnackBarActionImpl value, - $Res Function(_$StacSnackBarActionImpl) then) = - __$$StacSnackBarActionImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacSnackBarActionCopyWith<$Res> { + factory $StacSnackBarActionCopyWith( + StacSnackBarAction value, $Res Function(StacSnackBarAction) _then) = + _$StacSnackBarActionCopyWithImpl; @useResult $Res call( {String? textColor, @@ -121,12 +84,12 @@ abstract class _$$StacSnackBarActionImplCopyWith<$Res> } /// @nodoc -class __$$StacSnackBarActionImplCopyWithImpl<$Res> - extends _$StacSnackBarActionCopyWithImpl<$Res, _$StacSnackBarActionImpl> - implements _$$StacSnackBarActionImplCopyWith<$Res> { - __$$StacSnackBarActionImplCopyWithImpl(_$StacSnackBarActionImpl _value, - $Res Function(_$StacSnackBarActionImpl) _then) - : super(_value, _then); +class _$StacSnackBarActionCopyWithImpl<$Res> + implements $StacSnackBarActionCopyWith<$Res> { + _$StacSnackBarActionCopyWithImpl(this._self, this._then); + + final StacSnackBarAction _self; + final $Res Function(StacSnackBarAction) _then; /// Create a copy of StacSnackBarAction /// with the given fields replaced by the non-null parameter values. @@ -140,29 +103,29 @@ class __$$StacSnackBarActionImplCopyWithImpl<$Res> Object? label = null, Object? onPressed = null, }) { - return _then(_$StacSnackBarActionImpl( + return _then(_self.copyWith( textColor: freezed == textColor - ? _value.textColor + ? _self.textColor : textColor // ignore: cast_nullable_to_non_nullable as String?, disabledTextColor: freezed == disabledTextColor - ? _value.disabledTextColor + ? _self.disabledTextColor : disabledTextColor // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, disabledBackgroundColor: freezed == disabledBackgroundColor - ? _value.disabledBackgroundColor + ? _self.disabledBackgroundColor : disabledBackgroundColor // ignore: cast_nullable_to_non_nullable as String?, label: null == label - ? _value.label + ? _self.label : label // ignore: cast_nullable_to_non_nullable as String, onPressed: null == onPressed - ? _value._onPressed + ? _self.onPressed : onPressed // ignore: cast_nullable_to_non_nullable as Map, )); @@ -171,8 +134,8 @@ class __$$StacSnackBarActionImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacSnackBarActionImpl implements _StacSnackBarAction { - const _$StacSnackBarActionImpl( +class _StacSnackBarAction implements StacSnackBarAction { + const _StacSnackBarAction( {this.textColor, this.disabledTextColor, this.backgroundColor, @@ -180,9 +143,8 @@ class _$StacSnackBarActionImpl implements _StacSnackBarAction { required this.label, required final Map onPressed}) : _onPressed = onPressed; - - factory _$StacSnackBarActionImpl.fromJson(Map json) => - _$$StacSnackBarActionImplFromJson(json); + factory _StacSnackBarAction.fromJson(Map json) => + _$StacSnackBarActionFromJson(json); @override final String? textColor; @@ -202,16 +164,26 @@ class _$StacSnackBarActionImpl implements _StacSnackBarAction { return EqualUnmodifiableMapView(_onPressed); } + /// Create a copy of StacSnackBarAction + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacSnackBarAction(textColor: $textColor, disabledTextColor: $disabledTextColor, backgroundColor: $backgroundColor, disabledBackgroundColor: $disabledBackgroundColor, label: $label, onPressed: $onPressed)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSnackBarActionCopyWith<_StacSnackBarAction> get copyWith => + __$StacSnackBarActionCopyWithImpl<_StacSnackBarAction>(this, _$identity); + + @override + Map toJson() { + return _$StacSnackBarActionToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSnackBarActionImpl && + other is _StacSnackBarAction && (identical(other.textColor, textColor) || other.textColor == textColor) && (identical(other.disabledTextColor, disabledTextColor) || @@ -237,53 +209,76 @@ class _$StacSnackBarActionImpl implements _StacSnackBarAction { label, const DeepCollectionEquality().hash(_onPressed)); - /// Create a copy of StacSnackBarAction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacSnackBarActionImplCopyWith<_$StacSnackBarActionImpl> get copyWith => - __$$StacSnackBarActionImplCopyWithImpl<_$StacSnackBarActionImpl>( - this, _$identity); + String toString() { + return 'StacSnackBarAction(textColor: $textColor, disabledTextColor: $disabledTextColor, backgroundColor: $backgroundColor, disabledBackgroundColor: $disabledBackgroundColor, label: $label, onPressed: $onPressed)'; + } +} +/// @nodoc +abstract mixin class _$StacSnackBarActionCopyWith<$Res> + implements $StacSnackBarActionCopyWith<$Res> { + factory _$StacSnackBarActionCopyWith( + _StacSnackBarAction value, $Res Function(_StacSnackBarAction) _then) = + __$StacSnackBarActionCopyWithImpl; @override - Map toJson() { - return _$$StacSnackBarActionImplToJson( - this, - ); - } + @useResult + $Res call( + {String? textColor, + String? disabledTextColor, + String? backgroundColor, + String? disabledBackgroundColor, + String label, + Map onPressed}); } -abstract class _StacSnackBarAction implements StacSnackBarAction { - const factory _StacSnackBarAction( - {final String? textColor, - final String? disabledTextColor, - final String? backgroundColor, - final String? disabledBackgroundColor, - required final String label, - required final Map onPressed}) = - _$StacSnackBarActionImpl; +/// @nodoc +class __$StacSnackBarActionCopyWithImpl<$Res> + implements _$StacSnackBarActionCopyWith<$Res> { + __$StacSnackBarActionCopyWithImpl(this._self, this._then); - factory _StacSnackBarAction.fromJson(Map json) = - _$StacSnackBarActionImpl.fromJson; - - @override - String? get textColor; - @override - String? get disabledTextColor; - @override - String? get backgroundColor; - @override - String? get disabledBackgroundColor; - @override - String get label; - @override - Map get onPressed; + final _StacSnackBarAction _self; + final $Res Function(_StacSnackBarAction) _then; /// Create a copy of StacSnackBarAction /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSnackBarActionImplCopyWith<_$StacSnackBarActionImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? textColor = freezed, + Object? disabledTextColor = freezed, + Object? backgroundColor = freezed, + Object? disabledBackgroundColor = freezed, + Object? label = null, + Object? onPressed = null, + }) { + return _then(_StacSnackBarAction( + textColor: freezed == textColor + ? _self.textColor + : textColor // ignore: cast_nullable_to_non_nullable + as String?, + disabledTextColor: freezed == disabledTextColor + ? _self.disabledTextColor + : disabledTextColor // ignore: cast_nullable_to_non_nullable + as String?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + disabledBackgroundColor: freezed == disabledBackgroundColor + ? _self.disabledBackgroundColor + : disabledBackgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + label: null == label + ? _self.label + : label // ignore: cast_nullable_to_non_nullable + as String, + onPressed: null == onPressed + ? _self._onPressed + : onPressed // ignore: cast_nullable_to_non_nullable + as Map, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.g.dart b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.g.dart index 03ace466..7db97adf 100644 --- a/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.g.dart +++ b/packages/stac/lib/src/action_parsers/stac_snack_bar/stac_snack_bar_action.g.dart @@ -6,9 +6,8 @@ part of 'stac_snack_bar_action.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSnackBarActionImpl _$$StacSnackBarActionImplFromJson( - Map json) => - _$StacSnackBarActionImpl( +_StacSnackBarAction _$StacSnackBarActionFromJson(Map json) => + _StacSnackBarAction( textColor: json['textColor'] as String?, disabledTextColor: json['disabledTextColor'] as String?, backgroundColor: json['backgroundColor'] as String?, @@ -17,8 +16,7 @@ _$StacSnackBarActionImpl _$$StacSnackBarActionImplFromJson( onPressed: json['onPressed'] as Map, ); -Map _$$StacSnackBarActionImplToJson( - _$StacSnackBarActionImpl instance) => +Map _$StacSnackBarActionToJson(_StacSnackBarAction instance) => { 'textColor': instance.textColor, 'disabledTextColor': instance.disabledTextColor, diff --git a/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.dart b/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.dart index 3ddccb93..abc21f2b 100644 --- a/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.dart +++ b/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.dart @@ -9,7 +9,7 @@ part 'stac_alert_dialog.freezed.dart'; part 'stac_alert_dialog.g.dart'; @freezed -class StacAlertDialog with _$StacAlertDialog { +abstract class StacAlertDialog with _$StacAlertDialog { const factory StacAlertDialog({ Map? icon, StacEdgeInsets? iconPadding, diff --git a/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.freezed.dart b/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.freezed.dart index 1077be42..fdbf07f9 100644 --- a/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,62 +10,150 @@ part of 'stac_alert_dialog.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacAlertDialog _$StacAlertDialogFromJson(Map json) { - return _StacAlertDialog.fromJson(json); -} - /// @nodoc mixin _$StacAlertDialog { - Map? get icon => throw _privateConstructorUsedError; - StacEdgeInsets? get iconPadding => throw _privateConstructorUsedError; - String? get iconColor => throw _privateConstructorUsedError; - Map? get title => throw _privateConstructorUsedError; - StacEdgeInsets? get titlePadding => throw _privateConstructorUsedError; - StacTextStyle? get titleTextStyle => throw _privateConstructorUsedError; - Map? get content => throw _privateConstructorUsedError; - StacEdgeInsets? get contentPadding => throw _privateConstructorUsedError; - StacTextStyle? get contentTextStyle => throw _privateConstructorUsedError; - List>? get actions => throw _privateConstructorUsedError; - StacEdgeInsets? get actionsPadding => throw _privateConstructorUsedError; - MainAxisAlignment? get actionsAlignment => throw _privateConstructorUsedError; - OverflowBarAlignment? get actionsOverflowAlignment => - throw _privateConstructorUsedError; - VerticalDirection? get actionsOverflowDirection => - throw _privateConstructorUsedError; - double? get actionsOverflowButtonSpacing => - throw _privateConstructorUsedError; - StacEdgeInsets? get buttonPadding => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - String? get semanticLabel => throw _privateConstructorUsedError; - StacEdgeInsets get insetPadding => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - StacShapeBorder? get shape => throw _privateConstructorUsedError; - StacAlignmentGeometry? get alignment => throw _privateConstructorUsedError; - bool get scrollable => throw _privateConstructorUsedError; - - /// Serializes this StacAlertDialog to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get icon; + StacEdgeInsets? get iconPadding; + String? get iconColor; + Map? get title; + StacEdgeInsets? get titlePadding; + StacTextStyle? get titleTextStyle; + Map? get content; + StacEdgeInsets? get contentPadding; + StacTextStyle? get contentTextStyle; + List>? get actions; + StacEdgeInsets? get actionsPadding; + MainAxisAlignment? get actionsAlignment; + OverflowBarAlignment? get actionsOverflowAlignment; + VerticalDirection? get actionsOverflowDirection; + double? get actionsOverflowButtonSpacing; + StacEdgeInsets? get buttonPadding; + String? get backgroundColor; + double? get elevation; + String? get shadowColor; + String? get surfaceTintColor; + String? get semanticLabel; + StacEdgeInsets get insetPadding; + Clip get clipBehavior; + StacShapeBorder? get shape; + StacAlignmentGeometry? get alignment; + bool get scrollable; /// Create a copy of StacAlertDialog /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacAlertDialogCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacAlertDialogCopyWithImpl( + this as StacAlertDialog, _$identity); + + /// Serializes this StacAlertDialog to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacAlertDialog && + const DeepCollectionEquality().equals(other.icon, icon) && + (identical(other.iconPadding, iconPadding) || + other.iconPadding == iconPadding) && + (identical(other.iconColor, iconColor) || + other.iconColor == iconColor) && + const DeepCollectionEquality().equals(other.title, title) && + (identical(other.titlePadding, titlePadding) || + other.titlePadding == titlePadding) && + (identical(other.titleTextStyle, titleTextStyle) || + other.titleTextStyle == titleTextStyle) && + const DeepCollectionEquality().equals(other.content, content) && + (identical(other.contentPadding, contentPadding) || + other.contentPadding == contentPadding) && + (identical(other.contentTextStyle, contentTextStyle) || + other.contentTextStyle == contentTextStyle) && + const DeepCollectionEquality().equals(other.actions, actions) && + (identical(other.actionsPadding, actionsPadding) || + other.actionsPadding == actionsPadding) && + (identical(other.actionsAlignment, actionsAlignment) || + other.actionsAlignment == actionsAlignment) && + (identical( + other.actionsOverflowAlignment, actionsOverflowAlignment) || + other.actionsOverflowAlignment == actionsOverflowAlignment) && + (identical( + other.actionsOverflowDirection, actionsOverflowDirection) || + other.actionsOverflowDirection == actionsOverflowDirection) && + (identical(other.actionsOverflowButtonSpacing, + actionsOverflowButtonSpacing) || + other.actionsOverflowButtonSpacing == + actionsOverflowButtonSpacing) && + (identical(other.buttonPadding, buttonPadding) || + other.buttonPadding == buttonPadding) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.semanticLabel, semanticLabel) || + other.semanticLabel == semanticLabel) && + (identical(other.insetPadding, insetPadding) || + other.insetPadding == insetPadding) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.scrollable, scrollable) || + other.scrollable == scrollable)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(icon), + iconPadding, + iconColor, + const DeepCollectionEquality().hash(title), + titlePadding, + titleTextStyle, + const DeepCollectionEquality().hash(content), + contentPadding, + contentTextStyle, + const DeepCollectionEquality().hash(actions), + actionsPadding, + actionsAlignment, + actionsOverflowAlignment, + actionsOverflowDirection, + actionsOverflowButtonSpacing, + buttonPadding, + backgroundColor, + elevation, + shadowColor, + surfaceTintColor, + semanticLabel, + insetPadding, + clipBehavior, + shape, + alignment, + scrollable + ]); + + @override + String toString() { + return 'StacAlertDialog(icon: $icon, iconPadding: $iconPadding, iconColor: $iconColor, title: $title, titlePadding: $titlePadding, titleTextStyle: $titleTextStyle, content: $content, contentPadding: $contentPadding, contentTextStyle: $contentTextStyle, actions: $actions, actionsPadding: $actionsPadding, actionsAlignment: $actionsAlignment, actionsOverflowAlignment: $actionsOverflowAlignment, actionsOverflowDirection: $actionsOverflowDirection, actionsOverflowButtonSpacing: $actionsOverflowButtonSpacing, buttonPadding: $buttonPadding, backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, semanticLabel: $semanticLabel, insetPadding: $insetPadding, clipBehavior: $clipBehavior, shape: $shape, alignment: $alignment, scrollable: $scrollable)'; + } } /// @nodoc -abstract class $StacAlertDialogCopyWith<$Res> { +abstract mixin class $StacAlertDialogCopyWith<$Res> { factory $StacAlertDialogCopyWith( - StacAlertDialog value, $Res Function(StacAlertDialog) then) = - _$StacAlertDialogCopyWithImpl<$Res, StacAlertDialog>; + StacAlertDialog value, $Res Function(StacAlertDialog) _then) = + _$StacAlertDialogCopyWithImpl; @useResult $Res call( {Map? icon, @@ -107,14 +196,12 @@ abstract class $StacAlertDialogCopyWith<$Res> { } /// @nodoc -class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> +class _$StacAlertDialogCopyWithImpl<$Res> implements $StacAlertDialogCopyWith<$Res> { - _$StacAlertDialogCopyWithImpl(this._value, this._then); + _$StacAlertDialogCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacAlertDialog _self; + final $Res Function(StacAlertDialog) _then; /// Create a copy of StacAlertDialog /// with the given fields replaced by the non-null parameter values. @@ -148,112 +235,112 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> Object? alignment = freezed, Object? scrollable = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( icon: freezed == icon - ? _value.icon + ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as Map?, iconPadding: freezed == iconPadding - ? _value.iconPadding + ? _self.iconPadding : iconPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, iconColor: freezed == iconColor - ? _value.iconColor + ? _self.iconColor : iconColor // ignore: cast_nullable_to_non_nullable as String?, title: freezed == title - ? _value.title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as Map?, titlePadding: freezed == titlePadding - ? _value.titlePadding + ? _self.titlePadding : titlePadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle + ? _self.titleTextStyle : titleTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, content: freezed == content - ? _value.content + ? _self.content : content // ignore: cast_nullable_to_non_nullable as Map?, contentPadding: freezed == contentPadding - ? _value.contentPadding + ? _self.contentPadding : contentPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, contentTextStyle: freezed == contentTextStyle - ? _value.contentTextStyle + ? _self.contentTextStyle : contentTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, actions: freezed == actions - ? _value.actions + ? _self.actions : actions // ignore: cast_nullable_to_non_nullable as List>?, actionsPadding: freezed == actionsPadding - ? _value.actionsPadding + ? _self.actionsPadding : actionsPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, actionsAlignment: freezed == actionsAlignment - ? _value.actionsAlignment + ? _self.actionsAlignment : actionsAlignment // ignore: cast_nullable_to_non_nullable as MainAxisAlignment?, actionsOverflowAlignment: freezed == actionsOverflowAlignment - ? _value.actionsOverflowAlignment + ? _self.actionsOverflowAlignment : actionsOverflowAlignment // ignore: cast_nullable_to_non_nullable as OverflowBarAlignment?, actionsOverflowDirection: freezed == actionsOverflowDirection - ? _value.actionsOverflowDirection + ? _self.actionsOverflowDirection : actionsOverflowDirection // ignore: cast_nullable_to_non_nullable as VerticalDirection?, actionsOverflowButtonSpacing: freezed == actionsOverflowButtonSpacing - ? _value.actionsOverflowButtonSpacing + ? _self.actionsOverflowButtonSpacing : actionsOverflowButtonSpacing // ignore: cast_nullable_to_non_nullable as double?, buttonPadding: freezed == buttonPadding - ? _value.buttonPadding + ? _self.buttonPadding : buttonPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, semanticLabel: freezed == semanticLabel - ? _value.semanticLabel + ? _self.semanticLabel : semanticLabel // ignore: cast_nullable_to_non_nullable as String?, insetPadding: null == insetPadding - ? _value.insetPadding + ? _self.insetPadding : insetPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacShapeBorder?, alignment: freezed == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignmentGeometry?, scrollable: null == scrollable - ? _value.scrollable + ? _self.scrollable : scrollable // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of StacAlertDialog @@ -261,12 +348,12 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get iconPadding { - if (_value.iconPadding == null) { + if (_self.iconPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.iconPadding!, (value) { - return _then(_value.copyWith(iconPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.iconPadding!, (value) { + return _then(_self.copyWith(iconPadding: value)); }); } @@ -275,12 +362,12 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get titlePadding { - if (_value.titlePadding == null) { + if (_self.titlePadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.titlePadding!, (value) { - return _then(_value.copyWith(titlePadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.titlePadding!, (value) { + return _then(_self.copyWith(titlePadding: value)); }); } @@ -289,12 +376,12 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get titleTextStyle { - if (_value.titleTextStyle == null) { + if (_self.titleTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.titleTextStyle!, (value) { - return _then(_value.copyWith(titleTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); }); } @@ -303,12 +390,12 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get contentPadding { - if (_value.contentPadding == null) { + if (_self.contentPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.contentPadding!, (value) { - return _then(_value.copyWith(contentPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); }); } @@ -317,12 +404,12 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get contentTextStyle { - if (_value.contentTextStyle == null) { + if (_self.contentTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.contentTextStyle!, (value) { - return _then(_value.copyWith(contentTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.contentTextStyle!, (value) { + return _then(_self.copyWith(contentTextStyle: value)); }); } @@ -331,12 +418,12 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get actionsPadding { - if (_value.actionsPadding == null) { + if (_self.actionsPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.actionsPadding!, (value) { - return _then(_value.copyWith(actionsPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.actionsPadding!, (value) { + return _then(_self.copyWith(actionsPadding: value)); }); } @@ -345,12 +432,12 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get buttonPadding { - if (_value.buttonPadding == null) { + if (_self.buttonPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.buttonPadding!, (value) { - return _then(_value.copyWith(buttonPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.buttonPadding!, (value) { + return _then(_self.copyWith(buttonPadding: value)); }); } @@ -359,8 +446,8 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res> get insetPadding { - return $StacEdgeInsetsCopyWith<$Res>(_value.insetPadding, (value) { - return _then(_value.copyWith(insetPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.insetPadding, (value) { + return _then(_self.copyWith(insetPadding: value)); }); } @@ -369,12 +456,12 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacShapeBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacShapeBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacShapeBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -383,313 +470,105 @@ class _$StacAlertDialogCopyWithImpl<$Res, $Val extends StacAlertDialog> @override @pragma('vm:prefer-inline') $StacAlignmentGeometryCopyWith<$Res>? get alignment { - if (_value.alignment == null) { + if (_self.alignment == null) { return null; } - return $StacAlignmentGeometryCopyWith<$Res>(_value.alignment!, (value) { - return _then(_value.copyWith(alignment: value) as $Val); + return $StacAlignmentGeometryCopyWith<$Res>(_self.alignment!, (value) { + return _then(_self.copyWith(alignment: value)); }); } } /// @nodoc -abstract class _$$StacAlertDialogImplCopyWith<$Res> - implements $StacAlertDialogCopyWith<$Res> { - factory _$$StacAlertDialogImplCopyWith(_$StacAlertDialogImpl value, - $Res Function(_$StacAlertDialogImpl) then) = - __$$StacAlertDialogImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? icon, - StacEdgeInsets? iconPadding, - String? iconColor, - Map? title, - StacEdgeInsets? titlePadding, - StacTextStyle? titleTextStyle, - Map? content, - StacEdgeInsets? contentPadding, - StacTextStyle? contentTextStyle, - List>? actions, - StacEdgeInsets? actionsPadding, - MainAxisAlignment? actionsAlignment, - OverflowBarAlignment? actionsOverflowAlignment, - VerticalDirection? actionsOverflowDirection, - double? actionsOverflowButtonSpacing, - StacEdgeInsets? buttonPadding, - String? backgroundColor, - double? elevation, - String? shadowColor, - String? surfaceTintColor, - String? semanticLabel, - StacEdgeInsets insetPadding, - Clip clipBehavior, - StacShapeBorder? shape, - StacAlignmentGeometry? alignment, - bool scrollable}); +@JsonSerializable() +class _StacAlertDialog implements StacAlertDialog { + const _StacAlertDialog( + {final Map? icon, + this.iconPadding, + this.iconColor, + final Map? title, + this.titlePadding, + this.titleTextStyle, + final Map? content, + this.contentPadding, + this.contentTextStyle, + final List>? actions, + this.actionsPadding, + this.actionsAlignment, + this.actionsOverflowAlignment, + this.actionsOverflowDirection, + this.actionsOverflowButtonSpacing, + this.buttonPadding, + this.backgroundColor, + this.elevation, + this.shadowColor, + this.surfaceTintColor, + this.semanticLabel, + this.insetPadding = + const StacEdgeInsets(left: 40, right: 40, top: 24, bottom: 24), + this.clipBehavior = Clip.none, + this.shape, + this.alignment, + this.scrollable = false}) + : _icon = icon, + _title = title, + _content = content, + _actions = actions; + factory _StacAlertDialog.fromJson(Map json) => + _$StacAlertDialogFromJson(json); + final Map? _icon; @override - $StacEdgeInsetsCopyWith<$Res>? get iconPadding; + Map? get icon { + final value = _icon; + if (value == null) return null; + if (_icon is EqualUnmodifiableMapView) return _icon; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + @override - $StacEdgeInsetsCopyWith<$Res>? get titlePadding; + final StacEdgeInsets? iconPadding; @override - $StacTextStyleCopyWith<$Res>? get titleTextStyle; + final String? iconColor; + final Map? _title; @override - $StacEdgeInsetsCopyWith<$Res>? get contentPadding; + Map? get title { + final value = _title; + if (value == null) return null; + if (_title is EqualUnmodifiableMapView) return _title; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + @override - $StacTextStyleCopyWith<$Res>? get contentTextStyle; + final StacEdgeInsets? titlePadding; @override - $StacEdgeInsetsCopyWith<$Res>? get actionsPadding; + final StacTextStyle? titleTextStyle; + final Map? _content; @override - $StacEdgeInsetsCopyWith<$Res>? get buttonPadding; + Map? get content { + final value = _content; + if (value == null) return null; + if (_content is EqualUnmodifiableMapView) return _content; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + @override - $StacEdgeInsetsCopyWith<$Res> get insetPadding; + final StacEdgeInsets? contentPadding; @override - $StacShapeBorderCopyWith<$Res>? get shape; + final StacTextStyle? contentTextStyle; + final List>? _actions; @override - $StacAlignmentGeometryCopyWith<$Res>? get alignment; -} - -/// @nodoc -class __$$StacAlertDialogImplCopyWithImpl<$Res> - extends _$StacAlertDialogCopyWithImpl<$Res, _$StacAlertDialogImpl> - implements _$$StacAlertDialogImplCopyWith<$Res> { - __$$StacAlertDialogImplCopyWithImpl( - _$StacAlertDialogImpl _value, $Res Function(_$StacAlertDialogImpl) _then) - : super(_value, _then); - - /// Create a copy of StacAlertDialog - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? icon = freezed, - Object? iconPadding = freezed, - Object? iconColor = freezed, - Object? title = freezed, - Object? titlePadding = freezed, - Object? titleTextStyle = freezed, - Object? content = freezed, - Object? contentPadding = freezed, - Object? contentTextStyle = freezed, - Object? actions = freezed, - Object? actionsPadding = freezed, - Object? actionsAlignment = freezed, - Object? actionsOverflowAlignment = freezed, - Object? actionsOverflowDirection = freezed, - Object? actionsOverflowButtonSpacing = freezed, - Object? buttonPadding = freezed, - Object? backgroundColor = freezed, - Object? elevation = freezed, - Object? shadowColor = freezed, - Object? surfaceTintColor = freezed, - Object? semanticLabel = freezed, - Object? insetPadding = null, - Object? clipBehavior = null, - Object? shape = freezed, - Object? alignment = freezed, - Object? scrollable = null, - }) { - return _then(_$StacAlertDialogImpl( - icon: freezed == icon - ? _value._icon - : icon // ignore: cast_nullable_to_non_nullable - as Map?, - iconPadding: freezed == iconPadding - ? _value.iconPadding - : iconPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - iconColor: freezed == iconColor - ? _value.iconColor - : iconColor // ignore: cast_nullable_to_non_nullable - as String?, - title: freezed == title - ? _value._title - : title // ignore: cast_nullable_to_non_nullable - as Map?, - titlePadding: freezed == titlePadding - ? _value.titlePadding - : titlePadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle - : titleTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - content: freezed == content - ? _value._content - : content // ignore: cast_nullable_to_non_nullable - as Map?, - contentPadding: freezed == contentPadding - ? _value.contentPadding - : contentPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - contentTextStyle: freezed == contentTextStyle - ? _value.contentTextStyle - : contentTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - actions: freezed == actions - ? _value._actions - : actions // ignore: cast_nullable_to_non_nullable - as List>?, - actionsPadding: freezed == actionsPadding - ? _value.actionsPadding - : actionsPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - actionsAlignment: freezed == actionsAlignment - ? _value.actionsAlignment - : actionsAlignment // ignore: cast_nullable_to_non_nullable - as MainAxisAlignment?, - actionsOverflowAlignment: freezed == actionsOverflowAlignment - ? _value.actionsOverflowAlignment - : actionsOverflowAlignment // ignore: cast_nullable_to_non_nullable - as OverflowBarAlignment?, - actionsOverflowDirection: freezed == actionsOverflowDirection - ? _value.actionsOverflowDirection - : actionsOverflowDirection // ignore: cast_nullable_to_non_nullable - as VerticalDirection?, - actionsOverflowButtonSpacing: freezed == actionsOverflowButtonSpacing - ? _value.actionsOverflowButtonSpacing - : actionsOverflowButtonSpacing // ignore: cast_nullable_to_non_nullable - as double?, - buttonPadding: freezed == buttonPadding - ? _value.buttonPadding - : buttonPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - semanticLabel: freezed == semanticLabel - ? _value.semanticLabel - : semanticLabel // ignore: cast_nullable_to_non_nullable - as String?, - insetPadding: null == insetPadding - ? _value.insetPadding - : insetPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - shape: freezed == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as StacShapeBorder?, - alignment: freezed == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignmentGeometry?, - scrollable: null == scrollable - ? _value.scrollable - : scrollable // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$StacAlertDialogImpl implements _StacAlertDialog { - const _$StacAlertDialogImpl( - {final Map? icon, - this.iconPadding, - this.iconColor, - final Map? title, - this.titlePadding, - this.titleTextStyle, - final Map? content, - this.contentPadding, - this.contentTextStyle, - final List>? actions, - this.actionsPadding, - this.actionsAlignment, - this.actionsOverflowAlignment, - this.actionsOverflowDirection, - this.actionsOverflowButtonSpacing, - this.buttonPadding, - this.backgroundColor, - this.elevation, - this.shadowColor, - this.surfaceTintColor, - this.semanticLabel, - this.insetPadding = - const StacEdgeInsets(left: 40, right: 40, top: 24, bottom: 24), - this.clipBehavior = Clip.none, - this.shape, - this.alignment, - this.scrollable = false}) - : _icon = icon, - _title = title, - _content = content, - _actions = actions; - - factory _$StacAlertDialogImpl.fromJson(Map json) => - _$$StacAlertDialogImplFromJson(json); - - final Map? _icon; - @override - Map? get icon { - final value = _icon; - if (value == null) return null; - if (_icon is EqualUnmodifiableMapView) return _icon; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - final StacEdgeInsets? iconPadding; - @override - final String? iconColor; - final Map? _title; - @override - Map? get title { - final value = _title; - if (value == null) return null; - if (_title is EqualUnmodifiableMapView) return _title; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - final StacEdgeInsets? titlePadding; - @override - final StacTextStyle? titleTextStyle; - final Map? _content; - @override - Map? get content { - final value = _content; - if (value == null) return null; - if (_content is EqualUnmodifiableMapView) return _content; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - final StacEdgeInsets? contentPadding; - @override - final StacTextStyle? contentTextStyle; - final List>? _actions; - @override - List>? get actions { - final value = _actions; - if (value == null) return null; - if (_actions is EqualUnmodifiableListView) return _actions; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } + List>? get actions { + final value = _actions; + if (value == null) return null; + if (_actions is EqualUnmodifiableListView) return _actions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } @override final StacEdgeInsets? actionsPadding; @@ -727,16 +606,26 @@ class _$StacAlertDialogImpl implements _StacAlertDialog { @JsonKey() final bool scrollable; + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacAlertDialog(icon: $icon, iconPadding: $iconPadding, iconColor: $iconColor, title: $title, titlePadding: $titlePadding, titleTextStyle: $titleTextStyle, content: $content, contentPadding: $contentPadding, contentTextStyle: $contentTextStyle, actions: $actions, actionsPadding: $actionsPadding, actionsAlignment: $actionsAlignment, actionsOverflowAlignment: $actionsOverflowAlignment, actionsOverflowDirection: $actionsOverflowDirection, actionsOverflowButtonSpacing: $actionsOverflowButtonSpacing, buttonPadding: $buttonPadding, backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, semanticLabel: $semanticLabel, insetPadding: $insetPadding, clipBehavior: $clipBehavior, shape: $shape, alignment: $alignment, scrollable: $scrollable)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacAlertDialogCopyWith<_StacAlertDialog> get copyWith => + __$StacAlertDialogCopyWithImpl<_StacAlertDialog>(this, _$identity); + + @override + Map toJson() { + return _$StacAlertDialogToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacAlertDialogImpl && + other is _StacAlertDialog && const DeepCollectionEquality().equals(other._icon, _icon) && (identical(other.iconPadding, iconPadding) || other.iconPadding == iconPadding) && @@ -822,112 +711,353 @@ class _$StacAlertDialogImpl implements _StacAlertDialog { scrollable ]); - /// Create a copy of StacAlertDialog - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacAlertDialogImplCopyWith<_$StacAlertDialogImpl> get copyWith => - __$$StacAlertDialogImplCopyWithImpl<_$StacAlertDialogImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacAlertDialogImplToJson( - this, - ); + String toString() { + return 'StacAlertDialog(icon: $icon, iconPadding: $iconPadding, iconColor: $iconColor, title: $title, titlePadding: $titlePadding, titleTextStyle: $titleTextStyle, content: $content, contentPadding: $contentPadding, contentTextStyle: $contentTextStyle, actions: $actions, actionsPadding: $actionsPadding, actionsAlignment: $actionsAlignment, actionsOverflowAlignment: $actionsOverflowAlignment, actionsOverflowDirection: $actionsOverflowDirection, actionsOverflowButtonSpacing: $actionsOverflowButtonSpacing, buttonPadding: $buttonPadding, backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, semanticLabel: $semanticLabel, insetPadding: $insetPadding, clipBehavior: $clipBehavior, shape: $shape, alignment: $alignment, scrollable: $scrollable)'; } } -abstract class _StacAlertDialog implements StacAlertDialog { - const factory _StacAlertDialog( - {final Map? icon, - final StacEdgeInsets? iconPadding, - final String? iconColor, - final Map? title, - final StacEdgeInsets? titlePadding, - final StacTextStyle? titleTextStyle, - final Map? content, - final StacEdgeInsets? contentPadding, - final StacTextStyle? contentTextStyle, - final List>? actions, - final StacEdgeInsets? actionsPadding, - final MainAxisAlignment? actionsAlignment, - final OverflowBarAlignment? actionsOverflowAlignment, - final VerticalDirection? actionsOverflowDirection, - final double? actionsOverflowButtonSpacing, - final StacEdgeInsets? buttonPadding, - final String? backgroundColor, - final double? elevation, - final String? shadowColor, - final String? surfaceTintColor, - final String? semanticLabel, - final StacEdgeInsets insetPadding, - final Clip clipBehavior, - final StacShapeBorder? shape, - final StacAlignmentGeometry? alignment, - final bool scrollable}) = _$StacAlertDialogImpl; - - factory _StacAlertDialog.fromJson(Map json) = - _$StacAlertDialogImpl.fromJson; - - @override - Map? get icon; - @override - StacEdgeInsets? get iconPadding; - @override - String? get iconColor; - @override - Map? get title; - @override - StacEdgeInsets? get titlePadding; +/// @nodoc +abstract mixin class _$StacAlertDialogCopyWith<$Res> + implements $StacAlertDialogCopyWith<$Res> { + factory _$StacAlertDialogCopyWith( + _StacAlertDialog value, $Res Function(_StacAlertDialog) _then) = + __$StacAlertDialogCopyWithImpl; @override - StacTextStyle? get titleTextStyle; + @useResult + $Res call( + {Map? icon, + StacEdgeInsets? iconPadding, + String? iconColor, + Map? title, + StacEdgeInsets? titlePadding, + StacTextStyle? titleTextStyle, + Map? content, + StacEdgeInsets? contentPadding, + StacTextStyle? contentTextStyle, + List>? actions, + StacEdgeInsets? actionsPadding, + MainAxisAlignment? actionsAlignment, + OverflowBarAlignment? actionsOverflowAlignment, + VerticalDirection? actionsOverflowDirection, + double? actionsOverflowButtonSpacing, + StacEdgeInsets? buttonPadding, + String? backgroundColor, + double? elevation, + String? shadowColor, + String? surfaceTintColor, + String? semanticLabel, + StacEdgeInsets insetPadding, + Clip clipBehavior, + StacShapeBorder? shape, + StacAlignmentGeometry? alignment, + bool scrollable}); + @override - Map? get content; + $StacEdgeInsetsCopyWith<$Res>? get iconPadding; @override - StacEdgeInsets? get contentPadding; + $StacEdgeInsetsCopyWith<$Res>? get titlePadding; @override - StacTextStyle? get contentTextStyle; + $StacTextStyleCopyWith<$Res>? get titleTextStyle; @override - List>? get actions; + $StacEdgeInsetsCopyWith<$Res>? get contentPadding; @override - StacEdgeInsets? get actionsPadding; + $StacTextStyleCopyWith<$Res>? get contentTextStyle; @override - MainAxisAlignment? get actionsAlignment; + $StacEdgeInsetsCopyWith<$Res>? get actionsPadding; @override - OverflowBarAlignment? get actionsOverflowAlignment; + $StacEdgeInsetsCopyWith<$Res>? get buttonPadding; @override - VerticalDirection? get actionsOverflowDirection; + $StacEdgeInsetsCopyWith<$Res> get insetPadding; @override - double? get actionsOverflowButtonSpacing; + $StacShapeBorderCopyWith<$Res>? get shape; @override - StacEdgeInsets? get buttonPadding; + $StacAlignmentGeometryCopyWith<$Res>? get alignment; +} + +/// @nodoc +class __$StacAlertDialogCopyWithImpl<$Res> + implements _$StacAlertDialogCopyWith<$Res> { + __$StacAlertDialogCopyWithImpl(this._self, this._then); + + final _StacAlertDialog _self; + final $Res Function(_StacAlertDialog) _then; + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - String? get backgroundColor; + @pragma('vm:prefer-inline') + $Res call({ + Object? icon = freezed, + Object? iconPadding = freezed, + Object? iconColor = freezed, + Object? title = freezed, + Object? titlePadding = freezed, + Object? titleTextStyle = freezed, + Object? content = freezed, + Object? contentPadding = freezed, + Object? contentTextStyle = freezed, + Object? actions = freezed, + Object? actionsPadding = freezed, + Object? actionsAlignment = freezed, + Object? actionsOverflowAlignment = freezed, + Object? actionsOverflowDirection = freezed, + Object? actionsOverflowButtonSpacing = freezed, + Object? buttonPadding = freezed, + Object? backgroundColor = freezed, + Object? elevation = freezed, + Object? shadowColor = freezed, + Object? surfaceTintColor = freezed, + Object? semanticLabel = freezed, + Object? insetPadding = null, + Object? clipBehavior = null, + Object? shape = freezed, + Object? alignment = freezed, + Object? scrollable = null, + }) { + return _then(_StacAlertDialog( + icon: freezed == icon + ? _self._icon + : icon // ignore: cast_nullable_to_non_nullable + as Map?, + iconPadding: freezed == iconPadding + ? _self.iconPadding + : iconPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + iconColor: freezed == iconColor + ? _self.iconColor + : iconColor // ignore: cast_nullable_to_non_nullable + as String?, + title: freezed == title + ? _self._title + : title // ignore: cast_nullable_to_non_nullable + as Map?, + titlePadding: freezed == titlePadding + ? _self.titlePadding + : titlePadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + titleTextStyle: freezed == titleTextStyle + ? _self.titleTextStyle + : titleTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + content: freezed == content + ? _self._content + : content // ignore: cast_nullable_to_non_nullable + as Map?, + contentPadding: freezed == contentPadding + ? _self.contentPadding + : contentPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + contentTextStyle: freezed == contentTextStyle + ? _self.contentTextStyle + : contentTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + actions: freezed == actions + ? _self._actions + : actions // ignore: cast_nullable_to_non_nullable + as List>?, + actionsPadding: freezed == actionsPadding + ? _self.actionsPadding + : actionsPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + actionsAlignment: freezed == actionsAlignment + ? _self.actionsAlignment + : actionsAlignment // ignore: cast_nullable_to_non_nullable + as MainAxisAlignment?, + actionsOverflowAlignment: freezed == actionsOverflowAlignment + ? _self.actionsOverflowAlignment + : actionsOverflowAlignment // ignore: cast_nullable_to_non_nullable + as OverflowBarAlignment?, + actionsOverflowDirection: freezed == actionsOverflowDirection + ? _self.actionsOverflowDirection + : actionsOverflowDirection // ignore: cast_nullable_to_non_nullable + as VerticalDirection?, + actionsOverflowButtonSpacing: freezed == actionsOverflowButtonSpacing + ? _self.actionsOverflowButtonSpacing + : actionsOverflowButtonSpacing // ignore: cast_nullable_to_non_nullable + as double?, + buttonPadding: freezed == buttonPadding + ? _self.buttonPadding + : buttonPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + semanticLabel: freezed == semanticLabel + ? _self.semanticLabel + : semanticLabel // ignore: cast_nullable_to_non_nullable + as String?, + insetPadding: null == insetPadding + ? _self.insetPadding + : insetPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + shape: freezed == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as StacShapeBorder?, + alignment: freezed == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignmentGeometry?, + scrollable: null == scrollable + ? _self.scrollable + : scrollable // ignore: cast_nullable_to_non_nullable + as bool, + )); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - double? get elevation; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get iconPadding { + if (_self.iconPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.iconPadding!, (value) { + return _then(_self.copyWith(iconPadding: value)); + }); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - String? get shadowColor; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get titlePadding { + if (_self.titlePadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.titlePadding!, (value) { + return _then(_self.copyWith(titlePadding: value)); + }); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - String? get surfaceTintColor; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get titleTextStyle { + if (_self.titleTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); + }); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - String? get semanticLabel; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get contentPadding { + if (_self.contentPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); + }); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - StacEdgeInsets get insetPadding; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get contentTextStyle { + if (_self.contentTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.contentTextStyle!, (value) { + return _then(_self.copyWith(contentTextStyle: value)); + }); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - Clip get clipBehavior; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get actionsPadding { + if (_self.actionsPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.actionsPadding!, (value) { + return _then(_self.copyWith(actionsPadding: value)); + }); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - StacShapeBorder? get shape; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get buttonPadding { + if (_self.buttonPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.buttonPadding!, (value) { + return _then(_self.copyWith(buttonPadding: value)); + }); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - StacAlignmentGeometry? get alignment; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res> get insetPadding { + return $StacEdgeInsetsCopyWith<$Res>(_self.insetPadding, (value) { + return _then(_self.copyWith(insetPadding: value)); + }); + } + + /// Create a copy of StacAlertDialog + /// with the given fields replaced by the non-null parameter values. @override - bool get scrollable; + @pragma('vm:prefer-inline') + $StacShapeBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } + + return $StacShapeBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); + } /// Create a copy of StacAlertDialog /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacAlertDialogImplCopyWith<_$StacAlertDialogImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacAlignmentGeometryCopyWith<$Res>? get alignment { + if (_self.alignment == null) { + return null; + } + + return $StacAlignmentGeometryCopyWith<$Res>(_self.alignment!, (value) { + return _then(_self.copyWith(alignment: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.g.dart b/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.g.dart index b6d160bd..9d2d8808 100644 --- a/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.g.dart +++ b/packages/stac/lib/src/parsers/stac_alert_dialog/stac_alert_dialog.g.dart @@ -6,9 +6,8 @@ part of 'stac_alert_dialog.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacAlertDialogImpl _$$StacAlertDialogImplFromJson( - Map json) => - _$StacAlertDialogImpl( +_StacAlertDialog _$StacAlertDialogFromJson(Map json) => + _StacAlertDialog( icon: json['icon'] as Map?, iconPadding: json['iconPadding'] == null ? null @@ -65,8 +64,7 @@ _$StacAlertDialogImpl _$$StacAlertDialogImplFromJson( scrollable: json['scrollable'] as bool? ?? false, ); -Map _$$StacAlertDialogImplToJson( - _$StacAlertDialogImpl instance) => +Map _$StacAlertDialogToJson(_StacAlertDialog instance) => { 'icon': instance.icon, 'iconPadding': instance.iconPadding, diff --git a/packages/stac/lib/src/parsers/stac_align/stac_align.dart b/packages/stac/lib/src/parsers/stac_align/stac_align.dart index 756cae6b..15b0ea18 100644 --- a/packages/stac/lib/src/parsers/stac_align/stac_align.dart +++ b/packages/stac/lib/src/parsers/stac_align/stac_align.dart @@ -7,7 +7,7 @@ part 'stac_align.freezed.dart'; part 'stac_align.g.dart'; @freezed -class StacAlign with _$StacAlign { +abstract class StacAlign with _$StacAlign { const factory StacAlign({ @Default(StacAlignmentDirectional.center) StacAlignmentDirectional alignment, diff --git a/packages/stac/lib/src/parsers/stac_align/stac_align.freezed.dart b/packages/stac/lib/src/parsers/stac_align/stac_align.freezed.dart index 04aa2b0a..1a6f1e9a 100644 --- a/packages/stac/lib/src/parsers/stac_align/stac_align.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_align/stac_align.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,92 +10,55 @@ part of 'stac_align.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacAlign _$StacAlignFromJson(Map json) { - return _StacAlign.fromJson(json); -} - /// @nodoc mixin _$StacAlign { - StacAlignmentDirectional get alignment => throw _privateConstructorUsedError; - double? get widthFactor => throw _privateConstructorUsedError; - double? get heightFactor => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacAlign to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacAlignmentDirectional get alignment; + double? get widthFactor; + double? get heightFactor; + Map? get child; /// Create a copy of StacAlign /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacAlignCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacAlignCopyWithImpl(this as StacAlign, _$identity); -/// @nodoc -abstract class $StacAlignCopyWith<$Res> { - factory $StacAlignCopyWith(StacAlign value, $Res Function(StacAlign) then) = - _$StacAlignCopyWithImpl<$Res, StacAlign>; - @useResult - $Res call( - {StacAlignmentDirectional alignment, - double? widthFactor, - double? heightFactor, - Map? child}); -} + /// Serializes this StacAlign to a JSON map. + Map toJson(); -/// @nodoc -class _$StacAlignCopyWithImpl<$Res, $Val extends StacAlign> - implements $StacAlignCopyWith<$Res> { - _$StacAlignCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacAlign && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.widthFactor, widthFactor) || + other.widthFactor == widthFactor) && + (identical(other.heightFactor, heightFactor) || + other.heightFactor == heightFactor) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, alignment, widthFactor, + heightFactor, const DeepCollectionEquality().hash(child)); - /// Create a copy of StacAlign - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? alignment = null, - Object? widthFactor = freezed, - Object? heightFactor = freezed, - Object? child = freezed, - }) { - return _then(_value.copyWith( - alignment: null == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignmentDirectional, - widthFactor: freezed == widthFactor - ? _value.widthFactor - : widthFactor // ignore: cast_nullable_to_non_nullable - as double?, - heightFactor: freezed == heightFactor - ? _value.heightFactor - : heightFactor // ignore: cast_nullable_to_non_nullable - as double?, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacAlign(alignment: $alignment, widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; } } /// @nodoc -abstract class _$$StacAlignImplCopyWith<$Res> - implements $StacAlignCopyWith<$Res> { - factory _$$StacAlignImplCopyWith( - _$StacAlignImpl value, $Res Function(_$StacAlignImpl) then) = - __$$StacAlignImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacAlignCopyWith<$Res> { + factory $StacAlignCopyWith(StacAlign value, $Res Function(StacAlign) _then) = + _$StacAlignCopyWithImpl; @useResult $Res call( {StacAlignmentDirectional alignment, @@ -104,12 +68,11 @@ abstract class _$$StacAlignImplCopyWith<$Res> } /// @nodoc -class __$$StacAlignImplCopyWithImpl<$Res> - extends _$StacAlignCopyWithImpl<$Res, _$StacAlignImpl> - implements _$$StacAlignImplCopyWith<$Res> { - __$$StacAlignImplCopyWithImpl( - _$StacAlignImpl _value, $Res Function(_$StacAlignImpl) _then) - : super(_value, _then); +class _$StacAlignCopyWithImpl<$Res> implements $StacAlignCopyWith<$Res> { + _$StacAlignCopyWithImpl(this._self, this._then); + + final StacAlign _self; + final $Res Function(StacAlign) _then; /// Create a copy of StacAlign /// with the given fields replaced by the non-null parameter values. @@ -121,21 +84,21 @@ class __$$StacAlignImplCopyWithImpl<$Res> Object? heightFactor = freezed, Object? child = freezed, }) { - return _then(_$StacAlignImpl( + return _then(_self.copyWith( alignment: null == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignmentDirectional, widthFactor: freezed == widthFactor - ? _value.widthFactor + ? _self.widthFactor : widthFactor // ignore: cast_nullable_to_non_nullable as double?, heightFactor: freezed == heightFactor - ? _value.heightFactor + ? _self.heightFactor : heightFactor // ignore: cast_nullable_to_non_nullable as double?, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -144,16 +107,15 @@ class __$$StacAlignImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacAlignImpl implements _StacAlign { - const _$StacAlignImpl( +class _StacAlign implements StacAlign { + const _StacAlign( {this.alignment = StacAlignmentDirectional.center, this.widthFactor, this.heightFactor, final Map? child}) : _child = child; - - factory _$StacAlignImpl.fromJson(Map json) => - _$$StacAlignImplFromJson(json); + factory _StacAlign.fromJson(Map json) => + _$StacAlignFromJson(json); @override @JsonKey() @@ -172,16 +134,26 @@ class _$StacAlignImpl implements _StacAlign { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacAlign + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacAlign(alignment: $alignment, widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacAlignCopyWith<_StacAlign> get copyWith => + __$StacAlignCopyWithImpl<_StacAlign>(this, _$identity); + + @override + Map toJson() { + return _$StacAlignToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacAlignImpl && + other is _StacAlign && (identical(other.alignment, alignment) || other.alignment == alignment) && (identical(other.widthFactor, widthFactor) || @@ -196,45 +168,63 @@ class _$StacAlignImpl implements _StacAlign { int get hashCode => Object.hash(runtimeType, alignment, widthFactor, heightFactor, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacAlign - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacAlignImplCopyWith<_$StacAlignImpl> get copyWith => - __$$StacAlignImplCopyWithImpl<_$StacAlignImpl>(this, _$identity); + String toString() { + return 'StacAlign(alignment: $alignment, widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; + } +} +/// @nodoc +abstract mixin class _$StacAlignCopyWith<$Res> + implements $StacAlignCopyWith<$Res> { + factory _$StacAlignCopyWith( + _StacAlign value, $Res Function(_StacAlign) _then) = + __$StacAlignCopyWithImpl; @override - Map toJson() { - return _$$StacAlignImplToJson( - this, - ); - } + @useResult + $Res call( + {StacAlignmentDirectional alignment, + double? widthFactor, + double? heightFactor, + Map? child}); } -abstract class _StacAlign implements StacAlign { - const factory _StacAlign( - {final StacAlignmentDirectional alignment, - final double? widthFactor, - final double? heightFactor, - final Map? child}) = _$StacAlignImpl; +/// @nodoc +class __$StacAlignCopyWithImpl<$Res> implements _$StacAlignCopyWith<$Res> { + __$StacAlignCopyWithImpl(this._self, this._then); - factory _StacAlign.fromJson(Map json) = - _$StacAlignImpl.fromJson; - - @override - StacAlignmentDirectional get alignment; - @override - double? get widthFactor; - @override - double? get heightFactor; - @override - Map? get child; + final _StacAlign _self; + final $Res Function(_StacAlign) _then; /// Create a copy of StacAlign /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacAlignImplCopyWith<_$StacAlignImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? alignment = null, + Object? widthFactor = freezed, + Object? heightFactor = freezed, + Object? child = freezed, + }) { + return _then(_StacAlign( + alignment: null == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignmentDirectional, + widthFactor: freezed == widthFactor + ? _self.widthFactor + : widthFactor // ignore: cast_nullable_to_non_nullable + as double?, + heightFactor: freezed == heightFactor + ? _self.heightFactor + : heightFactor // ignore: cast_nullable_to_non_nullable + as double?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_align/stac_align.g.dart b/packages/stac/lib/src/parsers/stac_align/stac_align.g.dart index 1e6c588c..32848373 100644 --- a/packages/stac/lib/src/parsers/stac_align/stac_align.g.dart +++ b/packages/stac/lib/src/parsers/stac_align/stac_align.g.dart @@ -6,8 +6,7 @@ part of 'stac_align.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacAlignImpl _$$StacAlignImplFromJson(Map json) => - _$StacAlignImpl( +_StacAlign _$StacAlignFromJson(Map json) => _StacAlign( alignment: $enumDecodeNullable( _$StacAlignmentDirectionalEnumMap, json['alignment']) ?? StacAlignmentDirectional.center, @@ -16,7 +15,7 @@ _$StacAlignImpl _$$StacAlignImplFromJson(Map json) => child: json['child'] as Map?, ); -Map _$$StacAlignImplToJson(_$StacAlignImpl instance) => +Map _$StacAlignToJson(_StacAlign instance) => { 'alignment': _$StacAlignmentDirectionalEnumMap[instance.alignment]!, 'widthFactor': instance.widthFactor, diff --git a/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.dart b/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.dart index 6d56889d..3c440e70 100644 --- a/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.dart +++ b/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.dart @@ -5,7 +5,7 @@ part 'stac_alignment_geometry.freezed.dart'; part 'stac_alignment_geometry.g.dart'; @freezed -class StacAlignmentGeometry with _$StacAlignmentGeometry { +abstract class StacAlignmentGeometry with _$StacAlignmentGeometry { const factory StacAlignmentGeometry({ required double dx, required double dy, diff --git a/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.freezed.dart b/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.freezed.dart index 91e0ee02..d83856ea 100644 --- a/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,92 +10,60 @@ part of 'stac_alignment_geometry.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacAlignmentGeometry _$StacAlignmentGeometryFromJson( - Map json) { - return _StacAlignmentGeometry.fromJson(json); -} - /// @nodoc mixin _$StacAlignmentGeometry { - double get dx => throw _privateConstructorUsedError; - double get dy => throw _privateConstructorUsedError; - - /// Serializes this StacAlignmentGeometry to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get dx; + double get dy; /// Create a copy of StacAlignmentGeometry /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacAlignmentGeometryCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacAlignmentGeometryCopyWithImpl( + this as StacAlignmentGeometry, _$identity); -/// @nodoc -abstract class $StacAlignmentGeometryCopyWith<$Res> { - factory $StacAlignmentGeometryCopyWith(StacAlignmentGeometry value, - $Res Function(StacAlignmentGeometry) then) = - _$StacAlignmentGeometryCopyWithImpl<$Res, StacAlignmentGeometry>; - @useResult - $Res call({double dx, double dy}); -} + /// Serializes this StacAlignmentGeometry to a JSON map. + Map toJson(); -/// @nodoc -class _$StacAlignmentGeometryCopyWithImpl<$Res, - $Val extends StacAlignmentGeometry> - implements $StacAlignmentGeometryCopyWith<$Res> { - _$StacAlignmentGeometryCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacAlignmentGeometry && + (identical(other.dx, dx) || other.dx == dx) && + (identical(other.dy, dy) || other.dy == dy)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, dx, dy); - /// Create a copy of StacAlignmentGeometry - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? dx = null, - Object? dy = null, - }) { - return _then(_value.copyWith( - dx: null == dx - ? _value.dx - : dx // ignore: cast_nullable_to_non_nullable - as double, - dy: null == dy - ? _value.dy - : dy // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + String toString() { + return 'StacAlignmentGeometry(dx: $dx, dy: $dy)'; } } /// @nodoc -abstract class _$$StacAlignmentGeometryImplCopyWith<$Res> - implements $StacAlignmentGeometryCopyWith<$Res> { - factory _$$StacAlignmentGeometryImplCopyWith( - _$StacAlignmentGeometryImpl value, - $Res Function(_$StacAlignmentGeometryImpl) then) = - __$$StacAlignmentGeometryImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacAlignmentGeometryCopyWith<$Res> { + factory $StacAlignmentGeometryCopyWith(StacAlignmentGeometry value, + $Res Function(StacAlignmentGeometry) _then) = + _$StacAlignmentGeometryCopyWithImpl; @useResult $Res call({double dx, double dy}); } /// @nodoc -class __$$StacAlignmentGeometryImplCopyWithImpl<$Res> - extends _$StacAlignmentGeometryCopyWithImpl<$Res, - _$StacAlignmentGeometryImpl> - implements _$$StacAlignmentGeometryImplCopyWith<$Res> { - __$$StacAlignmentGeometryImplCopyWithImpl(_$StacAlignmentGeometryImpl _value, - $Res Function(_$StacAlignmentGeometryImpl) _then) - : super(_value, _then); +class _$StacAlignmentGeometryCopyWithImpl<$Res> + implements $StacAlignmentGeometryCopyWith<$Res> { + _$StacAlignmentGeometryCopyWithImpl(this._self, this._then); + + final StacAlignmentGeometry _self; + final $Res Function(StacAlignmentGeometry) _then; /// Create a copy of StacAlignmentGeometry /// with the given fields replaced by the non-null parameter values. @@ -104,13 +73,13 @@ class __$$StacAlignmentGeometryImplCopyWithImpl<$Res> Object? dx = null, Object? dy = null, }) { - return _then(_$StacAlignmentGeometryImpl( + return _then(_self.copyWith( dx: null == dx - ? _value.dx + ? _self.dx : dx // ignore: cast_nullable_to_non_nullable as double, dy: null == dy - ? _value.dy + ? _self.dy : dy // ignore: cast_nullable_to_non_nullable as double, )); @@ -119,27 +88,37 @@ class __$$StacAlignmentGeometryImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacAlignmentGeometryImpl implements _StacAlignmentGeometry { - const _$StacAlignmentGeometryImpl({required this.dx, required this.dy}); - - factory _$StacAlignmentGeometryImpl.fromJson(Map json) => - _$$StacAlignmentGeometryImplFromJson(json); +class _StacAlignmentGeometry implements StacAlignmentGeometry { + const _StacAlignmentGeometry({required this.dx, required this.dy}); + factory _StacAlignmentGeometry.fromJson(Map json) => + _$StacAlignmentGeometryFromJson(json); @override final double dx; @override final double dy; + /// Create a copy of StacAlignmentGeometry + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacAlignmentGeometry(dx: $dx, dy: $dy)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacAlignmentGeometryCopyWith<_StacAlignmentGeometry> get copyWith => + __$StacAlignmentGeometryCopyWithImpl<_StacAlignmentGeometry>( + this, _$identity); + + @override + Map toJson() { + return _$StacAlignmentGeometryToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacAlignmentGeometryImpl && + other is _StacAlignmentGeometry && (identical(other.dx, dx) || other.dx == dx) && (identical(other.dy, dy) || other.dy == dy)); } @@ -148,40 +127,50 @@ class _$StacAlignmentGeometryImpl implements _StacAlignmentGeometry { @override int get hashCode => Object.hash(runtimeType, dx, dy); - /// Create a copy of StacAlignmentGeometry - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacAlignmentGeometryImplCopyWith<_$StacAlignmentGeometryImpl> - get copyWith => __$$StacAlignmentGeometryImplCopyWithImpl< - _$StacAlignmentGeometryImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacAlignmentGeometryImplToJson( - this, - ); + String toString() { + return 'StacAlignmentGeometry(dx: $dx, dy: $dy)'; } } -abstract class _StacAlignmentGeometry implements StacAlignmentGeometry { - const factory _StacAlignmentGeometry( - {required final double dx, - required final double dy}) = _$StacAlignmentGeometryImpl; +/// @nodoc +abstract mixin class _$StacAlignmentGeometryCopyWith<$Res> + implements $StacAlignmentGeometryCopyWith<$Res> { + factory _$StacAlignmentGeometryCopyWith(_StacAlignmentGeometry value, + $Res Function(_StacAlignmentGeometry) _then) = + __$StacAlignmentGeometryCopyWithImpl; + @override + @useResult + $Res call({double dx, double dy}); +} - factory _StacAlignmentGeometry.fromJson(Map json) = - _$StacAlignmentGeometryImpl.fromJson; +/// @nodoc +class __$StacAlignmentGeometryCopyWithImpl<$Res> + implements _$StacAlignmentGeometryCopyWith<$Res> { + __$StacAlignmentGeometryCopyWithImpl(this._self, this._then); - @override - double get dx; - @override - double get dy; + final _StacAlignmentGeometry _self; + final $Res Function(_StacAlignmentGeometry) _then; /// Create a copy of StacAlignmentGeometry /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacAlignmentGeometryImplCopyWith<_$StacAlignmentGeometryImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? dx = null, + Object? dy = null, + }) { + return _then(_StacAlignmentGeometry( + dx: null == dx + ? _self.dx + : dx // ignore: cast_nullable_to_non_nullable + as double, + dy: null == dy + ? _self.dy + : dy // ignore: cast_nullable_to_non_nullable + as double, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.g.dart b/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.g.dart index 03e9d8e9..bb0e0157 100644 --- a/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.g.dart +++ b/packages/stac/lib/src/parsers/stac_alignment_geometry/stac_alignment_geometry.g.dart @@ -6,15 +6,15 @@ part of 'stac_alignment_geometry.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacAlignmentGeometryImpl _$$StacAlignmentGeometryImplFromJson( +_StacAlignmentGeometry _$StacAlignmentGeometryFromJson( Map json) => - _$StacAlignmentGeometryImpl( + _StacAlignmentGeometry( dx: (json['dx'] as num).toDouble(), dy: (json['dy'] as num).toDouble(), ); -Map _$$StacAlignmentGeometryImplToJson( - _$StacAlignmentGeometryImpl instance) => +Map _$StacAlignmentGeometryToJson( + _StacAlignmentGeometry instance) => { 'dx': instance.dx, 'dy': instance.dy, diff --git a/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.dart b/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.dart index 6c382fb5..d8b6764d 100644 --- a/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.dart +++ b/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.dart @@ -7,7 +7,7 @@ part 'stac_app_bar.freezed.dart'; part 'stac_app_bar.g.dart'; @freezed -class StacAppBar with _$StacAppBar { +abstract class StacAppBar with _$StacAppBar { const factory StacAppBar({ Map? leading, Map? title, diff --git a/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.freezed.dart b/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.freezed.dart index bbf228a2..9e7c99b7 100644 --- a/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,52 +10,117 @@ part of 'stac_app_bar.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacAppBar _$StacAppBarFromJson(Map json) { - return _StacAppBar.fromJson(json); -} - /// @nodoc mixin _$StacAppBar { - Map? get leading => throw _privateConstructorUsedError; - Map? get title => throw _privateConstructorUsedError; - StacTextStyle? get titleTextStyle => throw _privateConstructorUsedError; - StacTextStyle? get toolbarTextStyle => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get foregroundColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - List> get actions => throw _privateConstructorUsedError; - Map? get bottom => throw _privateConstructorUsedError; - double? get titleSpacing => throw _privateConstructorUsedError; - double get toolbarOpacity => throw _privateConstructorUsedError; - double get bottomOpacity => throw _privateConstructorUsedError; - double? get toolbarHeight => throw _privateConstructorUsedError; - double? get leadingWidth => throw _privateConstructorUsedError; - bool get primary => throw _privateConstructorUsedError; - bool? get centerTitle => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - double? get scrolledUnderElevation => throw _privateConstructorUsedError; - - /// Serializes this StacAppBar to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get leading; + Map? get title; + StacTextStyle? get titleTextStyle; + StacTextStyle? get toolbarTextStyle; + String? get shadowColor; + String? get backgroundColor; + String? get foregroundColor; + String? get surfaceTintColor; + List> get actions; + Map? get bottom; + double? get titleSpacing; + double get toolbarOpacity; + double get bottomOpacity; + double? get toolbarHeight; + double? get leadingWidth; + bool get primary; + bool? get centerTitle; + double? get elevation; + double? get scrolledUnderElevation; /// Create a copy of StacAppBar /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacAppBarCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacAppBarCopyWithImpl(this as StacAppBar, _$identity); + + /// Serializes this StacAppBar to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacAppBar && + const DeepCollectionEquality().equals(other.leading, leading) && + const DeepCollectionEquality().equals(other.title, title) && + (identical(other.titleTextStyle, titleTextStyle) || + other.titleTextStyle == titleTextStyle) && + (identical(other.toolbarTextStyle, toolbarTextStyle) || + other.toolbarTextStyle == toolbarTextStyle) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.foregroundColor, foregroundColor) || + other.foregroundColor == foregroundColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + const DeepCollectionEquality().equals(other.actions, actions) && + const DeepCollectionEquality().equals(other.bottom, bottom) && + (identical(other.titleSpacing, titleSpacing) || + other.titleSpacing == titleSpacing) && + (identical(other.toolbarOpacity, toolbarOpacity) || + other.toolbarOpacity == toolbarOpacity) && + (identical(other.bottomOpacity, bottomOpacity) || + other.bottomOpacity == bottomOpacity) && + (identical(other.toolbarHeight, toolbarHeight) || + other.toolbarHeight == toolbarHeight) && + (identical(other.leadingWidth, leadingWidth) || + other.leadingWidth == leadingWidth) && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.centerTitle, centerTitle) || + other.centerTitle == centerTitle) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.scrolledUnderElevation, scrolledUnderElevation) || + other.scrolledUnderElevation == scrolledUnderElevation)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(leading), + const DeepCollectionEquality().hash(title), + titleTextStyle, + toolbarTextStyle, + shadowColor, + backgroundColor, + foregroundColor, + surfaceTintColor, + const DeepCollectionEquality().hash(actions), + const DeepCollectionEquality().hash(bottom), + titleSpacing, + toolbarOpacity, + bottomOpacity, + toolbarHeight, + leadingWidth, + primary, + centerTitle, + elevation, + scrolledUnderElevation + ]); + + @override + String toString() { + return 'StacAppBar(leading: $leading, title: $title, titleTextStyle: $titleTextStyle, toolbarTextStyle: $toolbarTextStyle, shadowColor: $shadowColor, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, surfaceTintColor: $surfaceTintColor, actions: $actions, bottom: $bottom, titleSpacing: $titleSpacing, toolbarOpacity: $toolbarOpacity, bottomOpacity: $bottomOpacity, toolbarHeight: $toolbarHeight, leadingWidth: $leadingWidth, primary: $primary, centerTitle: $centerTitle, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation)'; + } } /// @nodoc -abstract class $StacAppBarCopyWith<$Res> { +abstract mixin class $StacAppBarCopyWith<$Res> { factory $StacAppBarCopyWith( - StacAppBar value, $Res Function(StacAppBar) then) = - _$StacAppBarCopyWithImpl<$Res, StacAppBar>; + StacAppBar value, $Res Function(StacAppBar) _then) = + _$StacAppBarCopyWithImpl; @useResult $Res call( {Map? leading, @@ -82,14 +148,11 @@ abstract class $StacAppBarCopyWith<$Res> { } /// @nodoc -class _$StacAppBarCopyWithImpl<$Res, $Val extends StacAppBar> - implements $StacAppBarCopyWith<$Res> { - _$StacAppBarCopyWithImpl(this._value, this._then); +class _$StacAppBarCopyWithImpl<$Res> implements $StacAppBarCopyWith<$Res> { + _$StacAppBarCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacAppBar _self; + final $Res Function(StacAppBar) _then; /// Create a copy of StacAppBar /// with the given fields replaced by the non-null parameter values. @@ -116,84 +179,84 @@ class _$StacAppBarCopyWithImpl<$Res, $Val extends StacAppBar> Object? elevation = freezed, Object? scrolledUnderElevation = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( leading: freezed == leading - ? _value.leading + ? _self.leading : leading // ignore: cast_nullable_to_non_nullable as Map?, title: freezed == title - ? _value.title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as Map?, titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle + ? _self.titleTextStyle : titleTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, toolbarTextStyle: freezed == toolbarTextStyle - ? _value.toolbarTextStyle + ? _self.toolbarTextStyle : toolbarTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, foregroundColor: freezed == foregroundColor - ? _value.foregroundColor + ? _self.foregroundColor : foregroundColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, actions: null == actions - ? _value.actions + ? _self.actions : actions // ignore: cast_nullable_to_non_nullable as List>, bottom: freezed == bottom - ? _value.bottom + ? _self.bottom : bottom // ignore: cast_nullable_to_non_nullable as Map?, titleSpacing: freezed == titleSpacing - ? _value.titleSpacing + ? _self.titleSpacing : titleSpacing // ignore: cast_nullable_to_non_nullable as double?, toolbarOpacity: null == toolbarOpacity - ? _value.toolbarOpacity + ? _self.toolbarOpacity : toolbarOpacity // ignore: cast_nullable_to_non_nullable as double, bottomOpacity: null == bottomOpacity - ? _value.bottomOpacity + ? _self.bottomOpacity : bottomOpacity // ignore: cast_nullable_to_non_nullable as double, toolbarHeight: freezed == toolbarHeight - ? _value.toolbarHeight + ? _self.toolbarHeight : toolbarHeight // ignore: cast_nullable_to_non_nullable as double?, leadingWidth: freezed == leadingWidth - ? _value.leadingWidth + ? _self.leadingWidth : leadingWidth // ignore: cast_nullable_to_non_nullable as double?, primary: null == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as bool, centerTitle: freezed == centerTitle - ? _value.centerTitle + ? _self.centerTitle : centerTitle // ignore: cast_nullable_to_non_nullable as bool?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, scrolledUnderElevation: freezed == scrolledUnderElevation - ? _value.scrolledUnderElevation + ? _self.scrolledUnderElevation : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable as double?, - ) as $Val); + )); } /// Create a copy of StacAppBar @@ -201,12 +264,12 @@ class _$StacAppBarCopyWithImpl<$Res, $Val extends StacAppBar> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get titleTextStyle { - if (_value.titleTextStyle == null) { + if (_self.titleTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.titleTextStyle!, (value) { - return _then(_value.copyWith(titleTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); }); } @@ -215,169 +278,20 @@ class _$StacAppBarCopyWithImpl<$Res, $Val extends StacAppBar> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get toolbarTextStyle { - if (_value.toolbarTextStyle == null) { + if (_self.toolbarTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.toolbarTextStyle!, (value) { - return _then(_value.copyWith(toolbarTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.toolbarTextStyle!, (value) { + return _then(_self.copyWith(toolbarTextStyle: value)); }); } } -/// @nodoc -abstract class _$$StacAppBarImplCopyWith<$Res> - implements $StacAppBarCopyWith<$Res> { - factory _$$StacAppBarImplCopyWith( - _$StacAppBarImpl value, $Res Function(_$StacAppBarImpl) then) = - __$$StacAppBarImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? leading, - Map? title, - StacTextStyle? titleTextStyle, - StacTextStyle? toolbarTextStyle, - String? shadowColor, - String? backgroundColor, - String? foregroundColor, - String? surfaceTintColor, - List> actions, - Map? bottom, - double? titleSpacing, - double toolbarOpacity, - double bottomOpacity, - double? toolbarHeight, - double? leadingWidth, - bool primary, - bool? centerTitle, - double? elevation, - double? scrolledUnderElevation}); - - @override - $StacTextStyleCopyWith<$Res>? get titleTextStyle; - @override - $StacTextStyleCopyWith<$Res>? get toolbarTextStyle; -} - -/// @nodoc -class __$$StacAppBarImplCopyWithImpl<$Res> - extends _$StacAppBarCopyWithImpl<$Res, _$StacAppBarImpl> - implements _$$StacAppBarImplCopyWith<$Res> { - __$$StacAppBarImplCopyWithImpl( - _$StacAppBarImpl _value, $Res Function(_$StacAppBarImpl) _then) - : super(_value, _then); - - /// Create a copy of StacAppBar - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? leading = freezed, - Object? title = freezed, - Object? titleTextStyle = freezed, - Object? toolbarTextStyle = freezed, - Object? shadowColor = freezed, - Object? backgroundColor = freezed, - Object? foregroundColor = freezed, - Object? surfaceTintColor = freezed, - Object? actions = null, - Object? bottom = freezed, - Object? titleSpacing = freezed, - Object? toolbarOpacity = null, - Object? bottomOpacity = null, - Object? toolbarHeight = freezed, - Object? leadingWidth = freezed, - Object? primary = null, - Object? centerTitle = freezed, - Object? elevation = freezed, - Object? scrolledUnderElevation = freezed, - }) { - return _then(_$StacAppBarImpl( - leading: freezed == leading - ? _value._leading - : leading // ignore: cast_nullable_to_non_nullable - as Map?, - title: freezed == title - ? _value._title - : title // ignore: cast_nullable_to_non_nullable - as Map?, - titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle - : titleTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - toolbarTextStyle: freezed == toolbarTextStyle - ? _value.toolbarTextStyle - : toolbarTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - foregroundColor: freezed == foregroundColor - ? _value.foregroundColor - : foregroundColor // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - actions: null == actions - ? _value._actions - : actions // ignore: cast_nullable_to_non_nullable - as List>, - bottom: freezed == bottom - ? _value._bottom - : bottom // ignore: cast_nullable_to_non_nullable - as Map?, - titleSpacing: freezed == titleSpacing - ? _value.titleSpacing - : titleSpacing // ignore: cast_nullable_to_non_nullable - as double?, - toolbarOpacity: null == toolbarOpacity - ? _value.toolbarOpacity - : toolbarOpacity // ignore: cast_nullable_to_non_nullable - as double, - bottomOpacity: null == bottomOpacity - ? _value.bottomOpacity - : bottomOpacity // ignore: cast_nullable_to_non_nullable - as double, - toolbarHeight: freezed == toolbarHeight - ? _value.toolbarHeight - : toolbarHeight // ignore: cast_nullable_to_non_nullable - as double?, - leadingWidth: freezed == leadingWidth - ? _value.leadingWidth - : leadingWidth // ignore: cast_nullable_to_non_nullable - as double?, - primary: null == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as bool, - centerTitle: freezed == centerTitle - ? _value.centerTitle - : centerTitle // ignore: cast_nullable_to_non_nullable - as bool?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - scrolledUnderElevation: freezed == scrolledUnderElevation - ? _value.scrolledUnderElevation - : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable - as double?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacAppBarImpl implements _StacAppBar { - const _$StacAppBarImpl( +class _StacAppBar implements StacAppBar { + const _StacAppBar( {final Map? leading, final Map? title, this.titleTextStyle, @@ -401,9 +315,8 @@ class _$StacAppBarImpl implements _StacAppBar { _title = title, _actions = actions, _bottom = bottom; - - factory _$StacAppBarImpl.fromJson(Map json) => - _$$StacAppBarImplFromJson(json); + factory _StacAppBar.fromJson(Map json) => + _$StacAppBarFromJson(json); final Map? _leading; @override @@ -478,16 +391,26 @@ class _$StacAppBarImpl implements _StacAppBar { @override final double? scrolledUnderElevation; + /// Create a copy of StacAppBar + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacAppBar(leading: $leading, title: $title, titleTextStyle: $titleTextStyle, toolbarTextStyle: $toolbarTextStyle, shadowColor: $shadowColor, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, surfaceTintColor: $surfaceTintColor, actions: $actions, bottom: $bottom, titleSpacing: $titleSpacing, toolbarOpacity: $toolbarOpacity, bottomOpacity: $bottomOpacity, toolbarHeight: $toolbarHeight, leadingWidth: $leadingWidth, primary: $primary, centerTitle: $centerTitle, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacAppBarCopyWith<_StacAppBar> get copyWith => + __$StacAppBarCopyWithImpl<_StacAppBar>(this, _$identity); + + @override + Map toJson() { + return _$StacAppBarToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacAppBarImpl && + other is _StacAppBar && const DeepCollectionEquality().equals(other._leading, _leading) && const DeepCollectionEquality().equals(other._title, _title) && (identical(other.titleTextStyle, titleTextStyle) || @@ -548,90 +471,186 @@ class _$StacAppBarImpl implements _StacAppBar { scrolledUnderElevation ]); - /// Create a copy of StacAppBar - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacAppBarImplCopyWith<_$StacAppBarImpl> get copyWith => - __$$StacAppBarImplCopyWithImpl<_$StacAppBarImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacAppBarImplToJson( - this, - ); + String toString() { + return 'StacAppBar(leading: $leading, title: $title, titleTextStyle: $titleTextStyle, toolbarTextStyle: $toolbarTextStyle, shadowColor: $shadowColor, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, surfaceTintColor: $surfaceTintColor, actions: $actions, bottom: $bottom, titleSpacing: $titleSpacing, toolbarOpacity: $toolbarOpacity, bottomOpacity: $bottomOpacity, toolbarHeight: $toolbarHeight, leadingWidth: $leadingWidth, primary: $primary, centerTitle: $centerTitle, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation)'; } } -abstract class _StacAppBar implements StacAppBar { - const factory _StacAppBar( - {final Map? leading, - final Map? title, - final StacTextStyle? titleTextStyle, - final StacTextStyle? toolbarTextStyle, - final String? shadowColor, - final String? backgroundColor, - final String? foregroundColor, - final String? surfaceTintColor, - final List> actions, - final Map? bottom, - final double? titleSpacing, - final double toolbarOpacity, - final double bottomOpacity, - final double? toolbarHeight, - final double? leadingWidth, - final bool primary, - final bool? centerTitle, - final double? elevation, - final double? scrolledUnderElevation}) = _$StacAppBarImpl; - - factory _StacAppBar.fromJson(Map json) = - _$StacAppBarImpl.fromJson; - - @override - Map? get leading; - @override - Map? get title; - @override - StacTextStyle? get titleTextStyle; - @override - StacTextStyle? get toolbarTextStyle; - @override - String? get shadowColor; - @override - String? get backgroundColor; - @override - String? get foregroundColor; - @override - String? get surfaceTintColor; - @override - List> get actions; - @override - Map? get bottom; - @override - double? get titleSpacing; - @override - double get toolbarOpacity; - @override - double get bottomOpacity; - @override - double? get toolbarHeight; +/// @nodoc +abstract mixin class _$StacAppBarCopyWith<$Res> + implements $StacAppBarCopyWith<$Res> { + factory _$StacAppBarCopyWith( + _StacAppBar value, $Res Function(_StacAppBar) _then) = + __$StacAppBarCopyWithImpl; @override - double? get leadingWidth; + @useResult + $Res call( + {Map? leading, + Map? title, + StacTextStyle? titleTextStyle, + StacTextStyle? toolbarTextStyle, + String? shadowColor, + String? backgroundColor, + String? foregroundColor, + String? surfaceTintColor, + List> actions, + Map? bottom, + double? titleSpacing, + double toolbarOpacity, + double bottomOpacity, + double? toolbarHeight, + double? leadingWidth, + bool primary, + bool? centerTitle, + double? elevation, + double? scrolledUnderElevation}); + @override - bool get primary; + $StacTextStyleCopyWith<$Res>? get titleTextStyle; @override - bool? get centerTitle; + $StacTextStyleCopyWith<$Res>? get toolbarTextStyle; +} + +/// @nodoc +class __$StacAppBarCopyWithImpl<$Res> implements _$StacAppBarCopyWith<$Res> { + __$StacAppBarCopyWithImpl(this._self, this._then); + + final _StacAppBar _self; + final $Res Function(_StacAppBar) _then; + + /// Create a copy of StacAppBar + /// with the given fields replaced by the non-null parameter values. @override - double? get elevation; + @pragma('vm:prefer-inline') + $Res call({ + Object? leading = freezed, + Object? title = freezed, + Object? titleTextStyle = freezed, + Object? toolbarTextStyle = freezed, + Object? shadowColor = freezed, + Object? backgroundColor = freezed, + Object? foregroundColor = freezed, + Object? surfaceTintColor = freezed, + Object? actions = null, + Object? bottom = freezed, + Object? titleSpacing = freezed, + Object? toolbarOpacity = null, + Object? bottomOpacity = null, + Object? toolbarHeight = freezed, + Object? leadingWidth = freezed, + Object? primary = null, + Object? centerTitle = freezed, + Object? elevation = freezed, + Object? scrolledUnderElevation = freezed, + }) { + return _then(_StacAppBar( + leading: freezed == leading + ? _self._leading + : leading // ignore: cast_nullable_to_non_nullable + as Map?, + title: freezed == title + ? _self._title + : title // ignore: cast_nullable_to_non_nullable + as Map?, + titleTextStyle: freezed == titleTextStyle + ? _self.titleTextStyle + : titleTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + toolbarTextStyle: freezed == toolbarTextStyle + ? _self.toolbarTextStyle + : toolbarTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + foregroundColor: freezed == foregroundColor + ? _self.foregroundColor + : foregroundColor // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + actions: null == actions + ? _self._actions + : actions // ignore: cast_nullable_to_non_nullable + as List>, + bottom: freezed == bottom + ? _self._bottom + : bottom // ignore: cast_nullable_to_non_nullable + as Map?, + titleSpacing: freezed == titleSpacing + ? _self.titleSpacing + : titleSpacing // ignore: cast_nullable_to_non_nullable + as double?, + toolbarOpacity: null == toolbarOpacity + ? _self.toolbarOpacity + : toolbarOpacity // ignore: cast_nullable_to_non_nullable + as double, + bottomOpacity: null == bottomOpacity + ? _self.bottomOpacity + : bottomOpacity // ignore: cast_nullable_to_non_nullable + as double, + toolbarHeight: freezed == toolbarHeight + ? _self.toolbarHeight + : toolbarHeight // ignore: cast_nullable_to_non_nullable + as double?, + leadingWidth: freezed == leadingWidth + ? _self.leadingWidth + : leadingWidth // ignore: cast_nullable_to_non_nullable + as double?, + primary: null == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as bool, + centerTitle: freezed == centerTitle + ? _self.centerTitle + : centerTitle // ignore: cast_nullable_to_non_nullable + as bool?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + scrolledUnderElevation: freezed == scrolledUnderElevation + ? _self.scrolledUnderElevation + : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable + as double?, + )); + } + + /// Create a copy of StacAppBar + /// with the given fields replaced by the non-null parameter values. @override - double? get scrolledUnderElevation; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get titleTextStyle { + if (_self.titleTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); + }); + } /// Create a copy of StacAppBar /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacAppBarImplCopyWith<_$StacAppBarImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get toolbarTextStyle { + if (_self.toolbarTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.toolbarTextStyle!, (value) { + return _then(_self.copyWith(toolbarTextStyle: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.g.dart b/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.g.dart index e1671b82..2b0d9709 100644 --- a/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.g.dart +++ b/packages/stac/lib/src/parsers/stac_app_bar/stac_app_bar.g.dart @@ -6,8 +6,7 @@ part of 'stac_app_bar.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacAppBarImpl _$$StacAppBarImplFromJson(Map json) => - _$StacAppBarImpl( +_StacAppBar _$StacAppBarFromJson(Map json) => _StacAppBar( leading: json['leading'] as Map?, title: json['title'] as Map?, titleTextStyle: json['titleTextStyle'] == null @@ -37,7 +36,7 @@ _$StacAppBarImpl _$$StacAppBarImplFromJson(Map json) => (json['scrolledUnderElevation'] as num?)?.toDouble(), ); -Map _$$StacAppBarImplToJson(_$StacAppBarImpl instance) => +Map _$StacAppBarToJson(_StacAppBar instance) => { 'leading': instance.leading, 'title': instance.title, diff --git a/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.dart b/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.dart index 1b3fb3da..110e6074 100644 --- a/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.dart +++ b/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.dart @@ -9,7 +9,7 @@ part 'stac_app_bar_theme.freezed.dart'; part 'stac_app_bar_theme.g.dart'; @freezed -class StacAppBarTheme with _$StacAppBarTheme { +abstract class StacAppBarTheme with _$StacAppBarTheme { const factory StacAppBarTheme({ String? backgroundColor, String? foregroundColor, diff --git a/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.freezed.dart b/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.freezed.dart index 18bf45ce..5f692128 100644 --- a/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,48 +10,102 @@ part of 'stac_app_bar_theme.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacAppBarTheme _$StacAppBarThemeFromJson(Map json) { - return _StacAppBarTheme.fromJson(json); -} - /// @nodoc mixin _$StacAppBarTheme { - String? get backgroundColor => throw _privateConstructorUsedError; - String? get foregroundColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - double? get scrolledUnderElevation => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - StacIconThemeData? get iconTheme => throw _privateConstructorUsedError; - StacIconThemeData? get actionsIconTheme => throw _privateConstructorUsedError; - bool? get centerTitle => throw _privateConstructorUsedError; - double? get titleSpacing => throw _privateConstructorUsedError; - double? get toolbarHeight => throw _privateConstructorUsedError; - StacTextStyle? get toolbarTextStyle => throw _privateConstructorUsedError; - StacTextStyle? get titleTextStyle => throw _privateConstructorUsedError; - StacSystemUIOverlayStyle? get systemOverlayStyle => - throw _privateConstructorUsedError; - - /// Serializes this StacAppBarTheme to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get backgroundColor; + String? get foregroundColor; + double? get elevation; + double? get scrolledUnderElevation; + String? get shadowColor; + String? get surfaceTintColor; + StacIconThemeData? get iconTheme; + StacIconThemeData? get actionsIconTheme; + bool? get centerTitle; + double? get titleSpacing; + double? get toolbarHeight; + StacTextStyle? get toolbarTextStyle; + StacTextStyle? get titleTextStyle; + StacSystemUIOverlayStyle? get systemOverlayStyle; /// Create a copy of StacAppBarTheme /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacAppBarThemeCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacAppBarThemeCopyWithImpl( + this as StacAppBarTheme, _$identity); + + /// Serializes this StacAppBarTheme to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacAppBarTheme && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.foregroundColor, foregroundColor) || + other.foregroundColor == foregroundColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.scrolledUnderElevation, scrolledUnderElevation) || + other.scrolledUnderElevation == scrolledUnderElevation) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.iconTheme, iconTheme) || + other.iconTheme == iconTheme) && + (identical(other.actionsIconTheme, actionsIconTheme) || + other.actionsIconTheme == actionsIconTheme) && + (identical(other.centerTitle, centerTitle) || + other.centerTitle == centerTitle) && + (identical(other.titleSpacing, titleSpacing) || + other.titleSpacing == titleSpacing) && + (identical(other.toolbarHeight, toolbarHeight) || + other.toolbarHeight == toolbarHeight) && + (identical(other.toolbarTextStyle, toolbarTextStyle) || + other.toolbarTextStyle == toolbarTextStyle) && + (identical(other.titleTextStyle, titleTextStyle) || + other.titleTextStyle == titleTextStyle) && + (identical(other.systemOverlayStyle, systemOverlayStyle) || + other.systemOverlayStyle == systemOverlayStyle)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + backgroundColor, + foregroundColor, + elevation, + scrolledUnderElevation, + shadowColor, + surfaceTintColor, + iconTheme, + actionsIconTheme, + centerTitle, + titleSpacing, + toolbarHeight, + toolbarTextStyle, + titleTextStyle, + systemOverlayStyle); + + @override + String toString() { + return 'StacAppBarTheme(backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconTheme: $iconTheme, actionsIconTheme: $actionsIconTheme, centerTitle: $centerTitle, titleSpacing: $titleSpacing, toolbarHeight: $toolbarHeight, toolbarTextStyle: $toolbarTextStyle, titleTextStyle: $titleTextStyle, systemOverlayStyle: $systemOverlayStyle)'; + } } /// @nodoc -abstract class $StacAppBarThemeCopyWith<$Res> { +abstract mixin class $StacAppBarThemeCopyWith<$Res> { factory $StacAppBarThemeCopyWith( - StacAppBarTheme value, $Res Function(StacAppBarTheme) then) = - _$StacAppBarThemeCopyWithImpl<$Res, StacAppBarTheme>; + StacAppBarTheme value, $Res Function(StacAppBarTheme) _then) = + _$StacAppBarThemeCopyWithImpl; @useResult $Res call( {String? backgroundColor, @@ -76,14 +131,12 @@ abstract class $StacAppBarThemeCopyWith<$Res> { } /// @nodoc -class _$StacAppBarThemeCopyWithImpl<$Res, $Val extends StacAppBarTheme> +class _$StacAppBarThemeCopyWithImpl<$Res> implements $StacAppBarThemeCopyWith<$Res> { - _$StacAppBarThemeCopyWithImpl(this._value, this._then); + _$StacAppBarThemeCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacAppBarTheme _self; + final $Res Function(StacAppBarTheme) _then; /// Create a copy of StacAppBarTheme /// with the given fields replaced by the non-null parameter values. @@ -105,64 +158,64 @@ class _$StacAppBarThemeCopyWithImpl<$Res, $Val extends StacAppBarTheme> Object? titleTextStyle = freezed, Object? systemOverlayStyle = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, foregroundColor: freezed == foregroundColor - ? _value.foregroundColor + ? _self.foregroundColor : foregroundColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, scrolledUnderElevation: freezed == scrolledUnderElevation - ? _value.scrolledUnderElevation + ? _self.scrolledUnderElevation : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable as double?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, iconTheme: freezed == iconTheme - ? _value.iconTheme + ? _self.iconTheme : iconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, actionsIconTheme: freezed == actionsIconTheme - ? _value.actionsIconTheme + ? _self.actionsIconTheme : actionsIconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, centerTitle: freezed == centerTitle - ? _value.centerTitle + ? _self.centerTitle : centerTitle // ignore: cast_nullable_to_non_nullable as bool?, titleSpacing: freezed == titleSpacing - ? _value.titleSpacing + ? _self.titleSpacing : titleSpacing // ignore: cast_nullable_to_non_nullable as double?, toolbarHeight: freezed == toolbarHeight - ? _value.toolbarHeight + ? _self.toolbarHeight : toolbarHeight // ignore: cast_nullable_to_non_nullable as double?, toolbarTextStyle: freezed == toolbarTextStyle - ? _value.toolbarTextStyle + ? _self.toolbarTextStyle : toolbarTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle + ? _self.titleTextStyle : titleTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, systemOverlayStyle: freezed == systemOverlayStyle - ? _value.systemOverlayStyle + ? _self.systemOverlayStyle : systemOverlayStyle // ignore: cast_nullable_to_non_nullable as StacSystemUIOverlayStyle?, - ) as $Val); + )); } /// Create a copy of StacAppBarTheme @@ -170,12 +223,12 @@ class _$StacAppBarThemeCopyWithImpl<$Res, $Val extends StacAppBarTheme> @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get iconTheme { - if (_value.iconTheme == null) { + if (_self.iconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.iconTheme!, (value) { - return _then(_value.copyWith(iconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); }); } @@ -184,12 +237,12 @@ class _$StacAppBarThemeCopyWithImpl<$Res, $Val extends StacAppBarTheme> @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get actionsIconTheme { - if (_value.actionsIconTheme == null) { + if (_self.actionsIconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.actionsIconTheme!, (value) { - return _then(_value.copyWith(actionsIconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.actionsIconTheme!, (value) { + return _then(_self.copyWith(actionsIconTheme: value)); }); } @@ -198,12 +251,12 @@ class _$StacAppBarThemeCopyWithImpl<$Res, $Val extends StacAppBarTheme> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get toolbarTextStyle { - if (_value.toolbarTextStyle == null) { + if (_self.toolbarTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.toolbarTextStyle!, (value) { - return _then(_value.copyWith(toolbarTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.toolbarTextStyle!, (value) { + return _then(_self.copyWith(toolbarTextStyle: value)); }); } @@ -212,12 +265,12 @@ class _$StacAppBarThemeCopyWithImpl<$Res, $Val extends StacAppBarTheme> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get titleTextStyle { - if (_value.titleTextStyle == null) { + if (_self.titleTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.titleTextStyle!, (value) { - return _then(_value.copyWith(titleTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); }); } @@ -226,146 +279,21 @@ class _$StacAppBarThemeCopyWithImpl<$Res, $Val extends StacAppBarTheme> @override @pragma('vm:prefer-inline') $StacSystemUIOverlayStyleCopyWith<$Res>? get systemOverlayStyle { - if (_value.systemOverlayStyle == null) { + if (_self.systemOverlayStyle == null) { return null; } - return $StacSystemUIOverlayStyleCopyWith<$Res>(_value.systemOverlayStyle!, + return $StacSystemUIOverlayStyleCopyWith<$Res>(_self.systemOverlayStyle!, (value) { - return _then(_value.copyWith(systemOverlayStyle: value) as $Val); + return _then(_self.copyWith(systemOverlayStyle: value)); }); } } -/// @nodoc -abstract class _$$StacAppBarThemeImplCopyWith<$Res> - implements $StacAppBarThemeCopyWith<$Res> { - factory _$$StacAppBarThemeImplCopyWith(_$StacAppBarThemeImpl value, - $Res Function(_$StacAppBarThemeImpl) then) = - __$$StacAppBarThemeImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? backgroundColor, - String? foregroundColor, - double? elevation, - double? scrolledUnderElevation, - String? shadowColor, - String? surfaceTintColor, - StacIconThemeData? iconTheme, - StacIconThemeData? actionsIconTheme, - bool? centerTitle, - double? titleSpacing, - double? toolbarHeight, - StacTextStyle? toolbarTextStyle, - StacTextStyle? titleTextStyle, - StacSystemUIOverlayStyle? systemOverlayStyle}); - - @override - $StacIconThemeDataCopyWith<$Res>? get iconTheme; - @override - $StacIconThemeDataCopyWith<$Res>? get actionsIconTheme; - @override - $StacTextStyleCopyWith<$Res>? get toolbarTextStyle; - @override - $StacTextStyleCopyWith<$Res>? get titleTextStyle; - @override - $StacSystemUIOverlayStyleCopyWith<$Res>? get systemOverlayStyle; -} - -/// @nodoc -class __$$StacAppBarThemeImplCopyWithImpl<$Res> - extends _$StacAppBarThemeCopyWithImpl<$Res, _$StacAppBarThemeImpl> - implements _$$StacAppBarThemeImplCopyWith<$Res> { - __$$StacAppBarThemeImplCopyWithImpl( - _$StacAppBarThemeImpl _value, $Res Function(_$StacAppBarThemeImpl) _then) - : super(_value, _then); - - /// Create a copy of StacAppBarTheme - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? backgroundColor = freezed, - Object? foregroundColor = freezed, - Object? elevation = freezed, - Object? scrolledUnderElevation = freezed, - Object? shadowColor = freezed, - Object? surfaceTintColor = freezed, - Object? iconTheme = freezed, - Object? actionsIconTheme = freezed, - Object? centerTitle = freezed, - Object? titleSpacing = freezed, - Object? toolbarHeight = freezed, - Object? toolbarTextStyle = freezed, - Object? titleTextStyle = freezed, - Object? systemOverlayStyle = freezed, - }) { - return _then(_$StacAppBarThemeImpl( - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - foregroundColor: freezed == foregroundColor - ? _value.foregroundColor - : foregroundColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - scrolledUnderElevation: freezed == scrolledUnderElevation - ? _value.scrolledUnderElevation - : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable - as double?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - iconTheme: freezed == iconTheme - ? _value.iconTheme - : iconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - actionsIconTheme: freezed == actionsIconTheme - ? _value.actionsIconTheme - : actionsIconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - centerTitle: freezed == centerTitle - ? _value.centerTitle - : centerTitle // ignore: cast_nullable_to_non_nullable - as bool?, - titleSpacing: freezed == titleSpacing - ? _value.titleSpacing - : titleSpacing // ignore: cast_nullable_to_non_nullable - as double?, - toolbarHeight: freezed == toolbarHeight - ? _value.toolbarHeight - : toolbarHeight // ignore: cast_nullable_to_non_nullable - as double?, - toolbarTextStyle: freezed == toolbarTextStyle - ? _value.toolbarTextStyle - : toolbarTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle - : titleTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - systemOverlayStyle: freezed == systemOverlayStyle - ? _value.systemOverlayStyle - : systemOverlayStyle // ignore: cast_nullable_to_non_nullable - as StacSystemUIOverlayStyle?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacAppBarThemeImpl implements _StacAppBarTheme { - const _$StacAppBarThemeImpl( +class _StacAppBarTheme implements StacAppBarTheme { + const _StacAppBarTheme( {this.backgroundColor, this.foregroundColor, this.elevation, @@ -380,9 +308,8 @@ class _$StacAppBarThemeImpl implements _StacAppBarTheme { this.toolbarTextStyle, this.titleTextStyle, this.systemOverlayStyle}); - - factory _$StacAppBarThemeImpl.fromJson(Map json) => - _$$StacAppBarThemeImplFromJson(json); + factory _StacAppBarTheme.fromJson(Map json) => + _$StacAppBarThemeFromJson(json); @override final String? backgroundColor; @@ -413,16 +340,26 @@ class _$StacAppBarThemeImpl implements _StacAppBarTheme { @override final StacSystemUIOverlayStyle? systemOverlayStyle; + /// Create a copy of StacAppBarTheme + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacAppBarTheme(backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconTheme: $iconTheme, actionsIconTheme: $actionsIconTheme, centerTitle: $centerTitle, titleSpacing: $titleSpacing, toolbarHeight: $toolbarHeight, toolbarTextStyle: $toolbarTextStyle, titleTextStyle: $titleTextStyle, systemOverlayStyle: $systemOverlayStyle)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacAppBarThemeCopyWith<_StacAppBarTheme> get copyWith => + __$StacAppBarThemeCopyWithImpl<_StacAppBarTheme>(this, _$identity); + + @override + Map toJson() { + return _$StacAppBarThemeToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacAppBarThemeImpl && + other is _StacAppBarTheme && (identical(other.backgroundColor, backgroundColor) || other.backgroundColor == backgroundColor) && (identical(other.foregroundColor, foregroundColor) || @@ -472,77 +409,206 @@ class _$StacAppBarThemeImpl implements _StacAppBarTheme { titleTextStyle, systemOverlayStyle); - /// Create a copy of StacAppBarTheme - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacAppBarThemeImplCopyWith<_$StacAppBarThemeImpl> get copyWith => - __$$StacAppBarThemeImplCopyWithImpl<_$StacAppBarThemeImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacAppBarThemeImplToJson( - this, - ); + String toString() { + return 'StacAppBarTheme(backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconTheme: $iconTheme, actionsIconTheme: $actionsIconTheme, centerTitle: $centerTitle, titleSpacing: $titleSpacing, toolbarHeight: $toolbarHeight, toolbarTextStyle: $toolbarTextStyle, titleTextStyle: $titleTextStyle, systemOverlayStyle: $systemOverlayStyle)'; } } -abstract class _StacAppBarTheme implements StacAppBarTheme { - const factory _StacAppBarTheme( - {final String? backgroundColor, - final String? foregroundColor, - final double? elevation, - final double? scrolledUnderElevation, - final String? shadowColor, - final String? surfaceTintColor, - final StacIconThemeData? iconTheme, - final StacIconThemeData? actionsIconTheme, - final bool? centerTitle, - final double? titleSpacing, - final double? toolbarHeight, - final StacTextStyle? toolbarTextStyle, - final StacTextStyle? titleTextStyle, - final StacSystemUIOverlayStyle? systemOverlayStyle}) = - _$StacAppBarThemeImpl; - - factory _StacAppBarTheme.fromJson(Map json) = - _$StacAppBarThemeImpl.fromJson; - - @override - String? get backgroundColor; - @override - String? get foregroundColor; - @override - double? get elevation; +/// @nodoc +abstract mixin class _$StacAppBarThemeCopyWith<$Res> + implements $StacAppBarThemeCopyWith<$Res> { + factory _$StacAppBarThemeCopyWith( + _StacAppBarTheme value, $Res Function(_StacAppBarTheme) _then) = + __$StacAppBarThemeCopyWithImpl; @override - double? get scrolledUnderElevation; + @useResult + $Res call( + {String? backgroundColor, + String? foregroundColor, + double? elevation, + double? scrolledUnderElevation, + String? shadowColor, + String? surfaceTintColor, + StacIconThemeData? iconTheme, + StacIconThemeData? actionsIconTheme, + bool? centerTitle, + double? titleSpacing, + double? toolbarHeight, + StacTextStyle? toolbarTextStyle, + StacTextStyle? titleTextStyle, + StacSystemUIOverlayStyle? systemOverlayStyle}); + @override - String? get shadowColor; + $StacIconThemeDataCopyWith<$Res>? get iconTheme; @override - String? get surfaceTintColor; + $StacIconThemeDataCopyWith<$Res>? get actionsIconTheme; @override - StacIconThemeData? get iconTheme; + $StacTextStyleCopyWith<$Res>? get toolbarTextStyle; @override - StacIconThemeData? get actionsIconTheme; + $StacTextStyleCopyWith<$Res>? get titleTextStyle; @override - bool? get centerTitle; + $StacSystemUIOverlayStyleCopyWith<$Res>? get systemOverlayStyle; +} + +/// @nodoc +class __$StacAppBarThemeCopyWithImpl<$Res> + implements _$StacAppBarThemeCopyWith<$Res> { + __$StacAppBarThemeCopyWithImpl(this._self, this._then); + + final _StacAppBarTheme _self; + final $Res Function(_StacAppBarTheme) _then; + + /// Create a copy of StacAppBarTheme + /// with the given fields replaced by the non-null parameter values. @override - double? get titleSpacing; + @pragma('vm:prefer-inline') + $Res call({ + Object? backgroundColor = freezed, + Object? foregroundColor = freezed, + Object? elevation = freezed, + Object? scrolledUnderElevation = freezed, + Object? shadowColor = freezed, + Object? surfaceTintColor = freezed, + Object? iconTheme = freezed, + Object? actionsIconTheme = freezed, + Object? centerTitle = freezed, + Object? titleSpacing = freezed, + Object? toolbarHeight = freezed, + Object? toolbarTextStyle = freezed, + Object? titleTextStyle = freezed, + Object? systemOverlayStyle = freezed, + }) { + return _then(_StacAppBarTheme( + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + foregroundColor: freezed == foregroundColor + ? _self.foregroundColor + : foregroundColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + scrolledUnderElevation: freezed == scrolledUnderElevation + ? _self.scrolledUnderElevation + : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable + as double?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + iconTheme: freezed == iconTheme + ? _self.iconTheme + : iconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + actionsIconTheme: freezed == actionsIconTheme + ? _self.actionsIconTheme + : actionsIconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + centerTitle: freezed == centerTitle + ? _self.centerTitle + : centerTitle // ignore: cast_nullable_to_non_nullable + as bool?, + titleSpacing: freezed == titleSpacing + ? _self.titleSpacing + : titleSpacing // ignore: cast_nullable_to_non_nullable + as double?, + toolbarHeight: freezed == toolbarHeight + ? _self.toolbarHeight + : toolbarHeight // ignore: cast_nullable_to_non_nullable + as double?, + toolbarTextStyle: freezed == toolbarTextStyle + ? _self.toolbarTextStyle + : toolbarTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + titleTextStyle: freezed == titleTextStyle + ? _self.titleTextStyle + : titleTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + systemOverlayStyle: freezed == systemOverlayStyle + ? _self.systemOverlayStyle + : systemOverlayStyle // ignore: cast_nullable_to_non_nullable + as StacSystemUIOverlayStyle?, + )); + } + + /// Create a copy of StacAppBarTheme + /// with the given fields replaced by the non-null parameter values. @override - double? get toolbarHeight; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get iconTheme { + if (_self.iconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); + }); + } + + /// Create a copy of StacAppBarTheme + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get toolbarTextStyle; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get actionsIconTheme { + if (_self.actionsIconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.actionsIconTheme!, (value) { + return _then(_self.copyWith(actionsIconTheme: value)); + }); + } + + /// Create a copy of StacAppBarTheme + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get titleTextStyle; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get toolbarTextStyle { + if (_self.toolbarTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.toolbarTextStyle!, (value) { + return _then(_self.copyWith(toolbarTextStyle: value)); + }); + } + + /// Create a copy of StacAppBarTheme + /// with the given fields replaced by the non-null parameter values. @override - StacSystemUIOverlayStyle? get systemOverlayStyle; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get titleTextStyle { + if (_self.titleTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); + }); + } /// Create a copy of StacAppBarTheme /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacAppBarThemeImplCopyWith<_$StacAppBarThemeImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacSystemUIOverlayStyleCopyWith<$Res>? get systemOverlayStyle { + if (_self.systemOverlayStyle == null) { + return null; + } + + return $StacSystemUIOverlayStyleCopyWith<$Res>(_self.systemOverlayStyle!, + (value) { + return _then(_self.copyWith(systemOverlayStyle: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.g.dart b/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.g.dart index 69cdeff2..25ba4274 100644 --- a/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.g.dart +++ b/packages/stac/lib/src/parsers/stac_app_bar_theme/stac_app_bar_theme.g.dart @@ -6,9 +6,8 @@ part of 'stac_app_bar_theme.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacAppBarThemeImpl _$$StacAppBarThemeImplFromJson( - Map json) => - _$StacAppBarThemeImpl( +_StacAppBarTheme _$StacAppBarThemeFromJson(Map json) => + _StacAppBarTheme( backgroundColor: json['backgroundColor'] as String?, foregroundColor: json['foregroundColor'] as String?, elevation: (json['elevation'] as num?)?.toDouble(), @@ -39,8 +38,7 @@ _$StacAppBarThemeImpl _$$StacAppBarThemeImplFromJson( json['systemOverlayStyle'] as Map), ); -Map _$$StacAppBarThemeImplToJson( - _$StacAppBarThemeImpl instance) => +Map _$StacAppBarThemeToJson(_StacAppBarTheme instance) => { 'backgroundColor': instance.backgroundColor, 'foregroundColor': instance.foregroundColor, diff --git a/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.dart b/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.dart index d465f30c..ad4b8fdf 100644 --- a/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.dart +++ b/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.dart @@ -6,7 +6,7 @@ part 'stac_aspect_ratio.freezed.dart'; part 'stac_aspect_ratio.g.dart'; @freezed -class StacAspectRatio with _$StacAspectRatio { +abstract class StacAspectRatio with _$StacAspectRatio { const factory StacAspectRatio({ @Default(1) double aspectRatio, Map? child, diff --git a/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.freezed.dart b/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.freezed.dart index e0e53852..72a5d959 100644 --- a/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,62 @@ part of 'stac_aspect_ratio.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacAspectRatio _$StacAspectRatioFromJson(Map json) { - return _StacAspectRatio.fromJson(json); -} - /// @nodoc mixin _$StacAspectRatio { - double get aspectRatio => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacAspectRatio to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get aspectRatio; + Map? get child; /// Create a copy of StacAspectRatio /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacAspectRatioCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacAspectRatioCopyWithImpl( + this as StacAspectRatio, _$identity); -/// @nodoc -abstract class $StacAspectRatioCopyWith<$Res> { - factory $StacAspectRatioCopyWith( - StacAspectRatio value, $Res Function(StacAspectRatio) then) = - _$StacAspectRatioCopyWithImpl<$Res, StacAspectRatio>; - @useResult - $Res call({double aspectRatio, Map? child}); -} + /// Serializes this StacAspectRatio to a JSON map. + Map toJson(); -/// @nodoc -class _$StacAspectRatioCopyWithImpl<$Res, $Val extends StacAspectRatio> - implements $StacAspectRatioCopyWith<$Res> { - _$StacAspectRatioCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacAspectRatio && + (identical(other.aspectRatio, aspectRatio) || + other.aspectRatio == aspectRatio) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, aspectRatio, const DeepCollectionEquality().hash(child)); - /// Create a copy of StacAspectRatio - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? aspectRatio = null, - Object? child = freezed, - }) { - return _then(_value.copyWith( - aspectRatio: null == aspectRatio - ? _value.aspectRatio - : aspectRatio // ignore: cast_nullable_to_non_nullable - as double, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacAspectRatio(aspectRatio: $aspectRatio, child: $child)'; } } /// @nodoc -abstract class _$$StacAspectRatioImplCopyWith<$Res> - implements $StacAspectRatioCopyWith<$Res> { - factory _$$StacAspectRatioImplCopyWith(_$StacAspectRatioImpl value, - $Res Function(_$StacAspectRatioImpl) then) = - __$$StacAspectRatioImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacAspectRatioCopyWith<$Res> { + factory $StacAspectRatioCopyWith( + StacAspectRatio value, $Res Function(StacAspectRatio) _then) = + _$StacAspectRatioCopyWithImpl; @useResult $Res call({double aspectRatio, Map? child}); } /// @nodoc -class __$$StacAspectRatioImplCopyWithImpl<$Res> - extends _$StacAspectRatioCopyWithImpl<$Res, _$StacAspectRatioImpl> - implements _$$StacAspectRatioImplCopyWith<$Res> { - __$$StacAspectRatioImplCopyWithImpl( - _$StacAspectRatioImpl _value, $Res Function(_$StacAspectRatioImpl) _then) - : super(_value, _then); +class _$StacAspectRatioCopyWithImpl<$Res> + implements $StacAspectRatioCopyWith<$Res> { + _$StacAspectRatioCopyWithImpl(this._self, this._then); + + final StacAspectRatio _self; + final $Res Function(StacAspectRatio) _then; /// Create a copy of StacAspectRatio /// with the given fields replaced by the non-null parameter values. @@ -100,13 +75,13 @@ class __$$StacAspectRatioImplCopyWithImpl<$Res> Object? aspectRatio = null, Object? child = freezed, }) { - return _then(_$StacAspectRatioImpl( + return _then(_self.copyWith( aspectRatio: null == aspectRatio - ? _value.aspectRatio + ? _self.aspectRatio : aspectRatio // ignore: cast_nullable_to_non_nullable as double, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -115,13 +90,12 @@ class __$$StacAspectRatioImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacAspectRatioImpl implements _StacAspectRatio { - const _$StacAspectRatioImpl( +class _StacAspectRatio implements StacAspectRatio { + const _StacAspectRatio( {this.aspectRatio = 1, final Map? child}) : _child = child; - - factory _$StacAspectRatioImpl.fromJson(Map json) => - _$$StacAspectRatioImplFromJson(json); + factory _StacAspectRatio.fromJson(Map json) => + _$StacAspectRatioFromJson(json); @override @JsonKey() @@ -136,16 +110,26 @@ class _$StacAspectRatioImpl implements _StacAspectRatio { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacAspectRatio + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacAspectRatio(aspectRatio: $aspectRatio, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacAspectRatioCopyWith<_StacAspectRatio> get copyWith => + __$StacAspectRatioCopyWithImpl<_StacAspectRatio>(this, _$identity); + + @override + Map toJson() { + return _$StacAspectRatioToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacAspectRatioImpl && + other is _StacAspectRatio && (identical(other.aspectRatio, aspectRatio) || other.aspectRatio == aspectRatio) && const DeepCollectionEquality().equals(other._child, _child)); @@ -156,40 +140,50 @@ class _$StacAspectRatioImpl implements _StacAspectRatio { int get hashCode => Object.hash( runtimeType, aspectRatio, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacAspectRatio - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacAspectRatioImplCopyWith<_$StacAspectRatioImpl> get copyWith => - __$$StacAspectRatioImplCopyWithImpl<_$StacAspectRatioImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacAspectRatioImplToJson( - this, - ); + String toString() { + return 'StacAspectRatio(aspectRatio: $aspectRatio, child: $child)'; } } -abstract class _StacAspectRatio implements StacAspectRatio { - const factory _StacAspectRatio( - {final double aspectRatio, - final Map? child}) = _$StacAspectRatioImpl; +/// @nodoc +abstract mixin class _$StacAspectRatioCopyWith<$Res> + implements $StacAspectRatioCopyWith<$Res> { + factory _$StacAspectRatioCopyWith( + _StacAspectRatio value, $Res Function(_StacAspectRatio) _then) = + __$StacAspectRatioCopyWithImpl; + @override + @useResult + $Res call({double aspectRatio, Map? child}); +} - factory _StacAspectRatio.fromJson(Map json) = - _$StacAspectRatioImpl.fromJson; +/// @nodoc +class __$StacAspectRatioCopyWithImpl<$Res> + implements _$StacAspectRatioCopyWith<$Res> { + __$StacAspectRatioCopyWithImpl(this._self, this._then); - @override - double get aspectRatio; - @override - Map? get child; + final _StacAspectRatio _self; + final $Res Function(_StacAspectRatio) _then; /// Create a copy of StacAspectRatio /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacAspectRatioImplCopyWith<_$StacAspectRatioImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? aspectRatio = null, + Object? child = freezed, + }) { + return _then(_StacAspectRatio( + aspectRatio: null == aspectRatio + ? _self.aspectRatio + : aspectRatio // ignore: cast_nullable_to_non_nullable + as double, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.g.dart b/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.g.dart index 76e2b9d8..cb736d09 100644 --- a/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.g.dart +++ b/packages/stac/lib/src/parsers/stac_aspect_ratio/stac_aspect_ratio.g.dart @@ -6,15 +6,13 @@ part of 'stac_aspect_ratio.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacAspectRatioImpl _$$StacAspectRatioImplFromJson( - Map json) => - _$StacAspectRatioImpl( +_StacAspectRatio _$StacAspectRatioFromJson(Map json) => + _StacAspectRatio( aspectRatio: (json['aspectRatio'] as num?)?.toDouble() ?? 1, child: json['child'] as Map?, ); -Map _$$StacAspectRatioImplToJson( - _$StacAspectRatioImpl instance) => +Map _$StacAspectRatioToJson(_StacAspectRatio instance) => { 'aspectRatio': instance.aspectRatio, 'child': instance.child, diff --git a/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.dart b/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.dart index ef2743a7..2115d3a4 100644 --- a/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.dart +++ b/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.dart @@ -7,7 +7,7 @@ part 'stac_auto_complete.freezed.dart'; part 'stac_auto_complete.g.dart'; @freezed -class StacAutoComplete with _$StacAutoComplete { +abstract class StacAutoComplete with _$StacAutoComplete { const factory StacAutoComplete({ required List options, Map? onSelected, diff --git a/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.freezed.dart b/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.freezed.dart index f3d66ec4..01696564 100644 --- a/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,101 +10,66 @@ part of 'stac_auto_complete.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacAutoComplete _$StacAutoCompleteFromJson(Map json) { - return _StacAutoComplete.fromJson(json); -} - /// @nodoc mixin _$StacAutoComplete { - List get options => throw _privateConstructorUsedError; - Map? get onSelected => throw _privateConstructorUsedError; - double get optionsMaxHeight => throw _privateConstructorUsedError; - OptionsViewOpenDirection get optionsViewOpenDirection => - throw _privateConstructorUsedError; - String? get initialValue => throw _privateConstructorUsedError; - - /// Serializes this StacAutoComplete to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List get options; + Map? get onSelected; + double get optionsMaxHeight; + OptionsViewOpenDirection get optionsViewOpenDirection; + String? get initialValue; /// Create a copy of StacAutoComplete /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacAutoCompleteCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacAutoCompleteCopyWithImpl( + this as StacAutoComplete, _$identity); -/// @nodoc -abstract class $StacAutoCompleteCopyWith<$Res> { - factory $StacAutoCompleteCopyWith( - StacAutoComplete value, $Res Function(StacAutoComplete) then) = - _$StacAutoCompleteCopyWithImpl<$Res, StacAutoComplete>; - @useResult - $Res call( - {List options, - Map? onSelected, - double optionsMaxHeight, - OptionsViewOpenDirection optionsViewOpenDirection, - String? initialValue}); -} + /// Serializes this StacAutoComplete to a JSON map. + Map toJson(); -/// @nodoc -class _$StacAutoCompleteCopyWithImpl<$Res, $Val extends StacAutoComplete> - implements $StacAutoCompleteCopyWith<$Res> { - _$StacAutoCompleteCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacAutoComplete && + const DeepCollectionEquality().equals(other.options, options) && + const DeepCollectionEquality() + .equals(other.onSelected, onSelected) && + (identical(other.optionsMaxHeight, optionsMaxHeight) || + other.optionsMaxHeight == optionsMaxHeight) && + (identical( + other.optionsViewOpenDirection, optionsViewOpenDirection) || + other.optionsViewOpenDirection == optionsViewOpenDirection) && + (identical(other.initialValue, initialValue) || + other.initialValue == initialValue)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(options), + const DeepCollectionEquality().hash(onSelected), + optionsMaxHeight, + optionsViewOpenDirection, + initialValue); - /// Create a copy of StacAutoComplete - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? options = null, - Object? onSelected = freezed, - Object? optionsMaxHeight = null, - Object? optionsViewOpenDirection = null, - Object? initialValue = freezed, - }) { - return _then(_value.copyWith( - options: null == options - ? _value.options - : options // ignore: cast_nullable_to_non_nullable - as List, - onSelected: freezed == onSelected - ? _value.onSelected - : onSelected // ignore: cast_nullable_to_non_nullable - as Map?, - optionsMaxHeight: null == optionsMaxHeight - ? _value.optionsMaxHeight - : optionsMaxHeight // ignore: cast_nullable_to_non_nullable - as double, - optionsViewOpenDirection: null == optionsViewOpenDirection - ? _value.optionsViewOpenDirection - : optionsViewOpenDirection // ignore: cast_nullable_to_non_nullable - as OptionsViewOpenDirection, - initialValue: freezed == initialValue - ? _value.initialValue - : initialValue // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + String toString() { + return 'StacAutoComplete(options: $options, onSelected: $onSelected, optionsMaxHeight: $optionsMaxHeight, optionsViewOpenDirection: $optionsViewOpenDirection, initialValue: $initialValue)'; } } /// @nodoc -abstract class _$$StacAutoCompleteImplCopyWith<$Res> - implements $StacAutoCompleteCopyWith<$Res> { - factory _$$StacAutoCompleteImplCopyWith(_$StacAutoCompleteImpl value, - $Res Function(_$StacAutoCompleteImpl) then) = - __$$StacAutoCompleteImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacAutoCompleteCopyWith<$Res> { + factory $StacAutoCompleteCopyWith( + StacAutoComplete value, $Res Function(StacAutoComplete) _then) = + _$StacAutoCompleteCopyWithImpl; @useResult $Res call( {List options, @@ -114,12 +80,12 @@ abstract class _$$StacAutoCompleteImplCopyWith<$Res> } /// @nodoc -class __$$StacAutoCompleteImplCopyWithImpl<$Res> - extends _$StacAutoCompleteCopyWithImpl<$Res, _$StacAutoCompleteImpl> - implements _$$StacAutoCompleteImplCopyWith<$Res> { - __$$StacAutoCompleteImplCopyWithImpl(_$StacAutoCompleteImpl _value, - $Res Function(_$StacAutoCompleteImpl) _then) - : super(_value, _then); +class _$StacAutoCompleteCopyWithImpl<$Res> + implements $StacAutoCompleteCopyWith<$Res> { + _$StacAutoCompleteCopyWithImpl(this._self, this._then); + + final StacAutoComplete _self; + final $Res Function(StacAutoComplete) _then; /// Create a copy of StacAutoComplete /// with the given fields replaced by the non-null parameter values. @@ -132,25 +98,25 @@ class __$$StacAutoCompleteImplCopyWithImpl<$Res> Object? optionsViewOpenDirection = null, Object? initialValue = freezed, }) { - return _then(_$StacAutoCompleteImpl( + return _then(_self.copyWith( options: null == options - ? _value._options + ? _self.options : options // ignore: cast_nullable_to_non_nullable as List, onSelected: freezed == onSelected - ? _value._onSelected + ? _self.onSelected : onSelected // ignore: cast_nullable_to_non_nullable as Map?, optionsMaxHeight: null == optionsMaxHeight - ? _value.optionsMaxHeight + ? _self.optionsMaxHeight : optionsMaxHeight // ignore: cast_nullable_to_non_nullable as double, optionsViewOpenDirection: null == optionsViewOpenDirection - ? _value.optionsViewOpenDirection + ? _self.optionsViewOpenDirection : optionsViewOpenDirection // ignore: cast_nullable_to_non_nullable as OptionsViewOpenDirection, initialValue: freezed == initialValue - ? _value.initialValue + ? _self.initialValue : initialValue // ignore: cast_nullable_to_non_nullable as String?, )); @@ -159,8 +125,8 @@ class __$$StacAutoCompleteImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacAutoCompleteImpl implements _StacAutoComplete { - const _$StacAutoCompleteImpl( +class _StacAutoComplete implements StacAutoComplete { + const _StacAutoComplete( {required final List options, final Map? onSelected, this.optionsMaxHeight = 200, @@ -168,9 +134,8 @@ class _$StacAutoCompleteImpl implements _StacAutoComplete { this.initialValue}) : _options = options, _onSelected = onSelected; - - factory _$StacAutoCompleteImpl.fromJson(Map json) => - _$$StacAutoCompleteImplFromJson(json); + factory _StacAutoComplete.fromJson(Map json) => + _$StacAutoCompleteFromJson(json); final List _options; @override @@ -199,16 +164,26 @@ class _$StacAutoCompleteImpl implements _StacAutoComplete { @override final String? initialValue; + /// Create a copy of StacAutoComplete + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacAutoComplete(options: $options, onSelected: $onSelected, optionsMaxHeight: $optionsMaxHeight, optionsViewOpenDirection: $optionsViewOpenDirection, initialValue: $initialValue)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacAutoCompleteCopyWith<_StacAutoComplete> get copyWith => + __$StacAutoCompleteCopyWithImpl<_StacAutoComplete>(this, _$identity); + + @override + Map toJson() { + return _$StacAutoCompleteToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacAutoCompleteImpl && + other is _StacAutoComplete && const DeepCollectionEquality().equals(other._options, _options) && const DeepCollectionEquality() .equals(other._onSelected, _onSelected) && @@ -231,49 +206,70 @@ class _$StacAutoCompleteImpl implements _StacAutoComplete { optionsViewOpenDirection, initialValue); - /// Create a copy of StacAutoComplete - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacAutoCompleteImplCopyWith<_$StacAutoCompleteImpl> get copyWith => - __$$StacAutoCompleteImplCopyWithImpl<_$StacAutoCompleteImpl>( - this, _$identity); + String toString() { + return 'StacAutoComplete(options: $options, onSelected: $onSelected, optionsMaxHeight: $optionsMaxHeight, optionsViewOpenDirection: $optionsViewOpenDirection, initialValue: $initialValue)'; + } +} +/// @nodoc +abstract mixin class _$StacAutoCompleteCopyWith<$Res> + implements $StacAutoCompleteCopyWith<$Res> { + factory _$StacAutoCompleteCopyWith( + _StacAutoComplete value, $Res Function(_StacAutoComplete) _then) = + __$StacAutoCompleteCopyWithImpl; @override - Map toJson() { - return _$$StacAutoCompleteImplToJson( - this, - ); - } + @useResult + $Res call( + {List options, + Map? onSelected, + double optionsMaxHeight, + OptionsViewOpenDirection optionsViewOpenDirection, + String? initialValue}); } -abstract class _StacAutoComplete implements StacAutoComplete { - const factory _StacAutoComplete( - {required final List options, - final Map? onSelected, - final double optionsMaxHeight, - final OptionsViewOpenDirection optionsViewOpenDirection, - final String? initialValue}) = _$StacAutoCompleteImpl; +/// @nodoc +class __$StacAutoCompleteCopyWithImpl<$Res> + implements _$StacAutoCompleteCopyWith<$Res> { + __$StacAutoCompleteCopyWithImpl(this._self, this._then); - factory _StacAutoComplete.fromJson(Map json) = - _$StacAutoCompleteImpl.fromJson; - - @override - List get options; - @override - Map? get onSelected; - @override - double get optionsMaxHeight; - @override - OptionsViewOpenDirection get optionsViewOpenDirection; - @override - String? get initialValue; + final _StacAutoComplete _self; + final $Res Function(_StacAutoComplete) _then; /// Create a copy of StacAutoComplete /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacAutoCompleteImplCopyWith<_$StacAutoCompleteImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? options = null, + Object? onSelected = freezed, + Object? optionsMaxHeight = null, + Object? optionsViewOpenDirection = null, + Object? initialValue = freezed, + }) { + return _then(_StacAutoComplete( + options: null == options + ? _self._options + : options // ignore: cast_nullable_to_non_nullable + as List, + onSelected: freezed == onSelected + ? _self._onSelected + : onSelected // ignore: cast_nullable_to_non_nullable + as Map?, + optionsMaxHeight: null == optionsMaxHeight + ? _self.optionsMaxHeight + : optionsMaxHeight // ignore: cast_nullable_to_non_nullable + as double, + optionsViewOpenDirection: null == optionsViewOpenDirection + ? _self.optionsViewOpenDirection + : optionsViewOpenDirection // ignore: cast_nullable_to_non_nullable + as OptionsViewOpenDirection, + initialValue: freezed == initialValue + ? _self.initialValue + : initialValue // ignore: cast_nullable_to_non_nullable + as String?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.g.dart b/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.g.dart index 7d308532..d342049c 100644 --- a/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.g.dart +++ b/packages/stac/lib/src/parsers/stac_auto_complete/stac_auto_complete.g.dart @@ -6,9 +6,8 @@ part of 'stac_auto_complete.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacAutoCompleteImpl _$$StacAutoCompleteImplFromJson( - Map json) => - _$StacAutoCompleteImpl( +_StacAutoComplete _$StacAutoCompleteFromJson(Map json) => + _StacAutoComplete( options: (json['options'] as List).map((e) => e as String).toList(), onSelected: json['onSelected'] as Map?, @@ -20,8 +19,7 @@ _$StacAutoCompleteImpl _$$StacAutoCompleteImplFromJson( initialValue: json['initialValue'] as String?, ); -Map _$$StacAutoCompleteImplToJson( - _$StacAutoCompleteImpl instance) => +Map _$StacAutoCompleteToJson(_StacAutoComplete instance) => { 'options': instance.options, 'onSelected': instance.onSelected, diff --git a/packages/stac/lib/src/parsers/stac_border/stac_border.dart b/packages/stac/lib/src/parsers/stac_border/stac_border.dart index e476acc5..c0748ad3 100644 --- a/packages/stac/lib/src/parsers/stac_border/stac_border.dart +++ b/packages/stac/lib/src/parsers/stac_border/stac_border.dart @@ -6,7 +6,7 @@ part 'stac_border.freezed.dart'; part 'stac_border.g.dart'; @freezed -class StacBorder with _$StacBorder { +abstract class StacBorder with _$StacBorder { const factory StacBorder({ String? color, @Default(BorderStyle.solid) BorderStyle borderStyle, diff --git a/packages/stac/lib/src/parsers/stac_border/stac_border.freezed.dart b/packages/stac/lib/src/parsers/stac_border/stac_border.freezed.dart index 573c0b58..ecd1636d 100644 --- a/packages/stac/lib/src/parsers/stac_border/stac_border.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_border/stac_border.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,93 +10,55 @@ part of 'stac_border.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBorder _$StacBorderFromJson(Map json) { - return _StacBorder.fromJson(json); -} - /// @nodoc mixin _$StacBorder { - String? get color => throw _privateConstructorUsedError; - BorderStyle get borderStyle => throw _privateConstructorUsedError; - double get width => throw _privateConstructorUsedError; - double get strokeAlign => throw _privateConstructorUsedError; - - /// Serializes this StacBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get color; + BorderStyle get borderStyle; + double get width; + double get strokeAlign; /// Create a copy of StacBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBorderCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacBorderCopyWithImpl(this as StacBorder, _$identity); -/// @nodoc -abstract class $StacBorderCopyWith<$Res> { - factory $StacBorderCopyWith( - StacBorder value, $Res Function(StacBorder) then) = - _$StacBorderCopyWithImpl<$Res, StacBorder>; - @useResult - $Res call( - {String? color, - BorderStyle borderStyle, - double width, - double strokeAlign}); -} + /// Serializes this StacBorder to a JSON map. + Map toJson(); -/// @nodoc -class _$StacBorderCopyWithImpl<$Res, $Val extends StacBorder> - implements $StacBorderCopyWith<$Res> { - _$StacBorderCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBorder && + (identical(other.color, color) || other.color == color) && + (identical(other.borderStyle, borderStyle) || + other.borderStyle == borderStyle) && + (identical(other.width, width) || other.width == width) && + (identical(other.strokeAlign, strokeAlign) || + other.strokeAlign == strokeAlign)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, color, borderStyle, width, strokeAlign); - /// Create a copy of StacBorder - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? color = freezed, - Object? borderStyle = null, - Object? width = null, - Object? strokeAlign = null, - }) { - return _then(_value.copyWith( - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - borderStyle: null == borderStyle - ? _value.borderStyle - : borderStyle // ignore: cast_nullable_to_non_nullable - as BorderStyle, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double, - strokeAlign: null == strokeAlign - ? _value.strokeAlign - : strokeAlign // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + String toString() { + return 'StacBorder(color: $color, borderStyle: $borderStyle, width: $width, strokeAlign: $strokeAlign)'; } } /// @nodoc -abstract class _$$StacBorderImplCopyWith<$Res> - implements $StacBorderCopyWith<$Res> { - factory _$$StacBorderImplCopyWith( - _$StacBorderImpl value, $Res Function(_$StacBorderImpl) then) = - __$$StacBorderImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacBorderCopyWith<$Res> { + factory $StacBorderCopyWith( + StacBorder value, $Res Function(StacBorder) _then) = + _$StacBorderCopyWithImpl; @useResult $Res call( {String? color, @@ -105,12 +68,11 @@ abstract class _$$StacBorderImplCopyWith<$Res> } /// @nodoc -class __$$StacBorderImplCopyWithImpl<$Res> - extends _$StacBorderCopyWithImpl<$Res, _$StacBorderImpl> - implements _$$StacBorderImplCopyWith<$Res> { - __$$StacBorderImplCopyWithImpl( - _$StacBorderImpl _value, $Res Function(_$StacBorderImpl) _then) - : super(_value, _then); +class _$StacBorderCopyWithImpl<$Res> implements $StacBorderCopyWith<$Res> { + _$StacBorderCopyWithImpl(this._self, this._then); + + final StacBorder _self; + final $Res Function(StacBorder) _then; /// Create a copy of StacBorder /// with the given fields replaced by the non-null parameter values. @@ -122,21 +84,21 @@ class __$$StacBorderImplCopyWithImpl<$Res> Object? width = null, Object? strokeAlign = null, }) { - return _then(_$StacBorderImpl( + return _then(_self.copyWith( color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, borderStyle: null == borderStyle - ? _value.borderStyle + ? _self.borderStyle : borderStyle // ignore: cast_nullable_to_non_nullable as BorderStyle, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double, strokeAlign: null == strokeAlign - ? _value.strokeAlign + ? _self.strokeAlign : strokeAlign // ignore: cast_nullable_to_non_nullable as double, )); @@ -145,15 +107,14 @@ class __$$StacBorderImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacBorderImpl implements _StacBorder { - const _$StacBorderImpl( +class _StacBorder implements StacBorder { + const _StacBorder( {this.color, this.borderStyle = BorderStyle.solid, this.width = 1.0, this.strokeAlign = BorderSide.strokeAlignInside}); - - factory _$StacBorderImpl.fromJson(Map json) => - _$$StacBorderImplFromJson(json); + factory _StacBorder.fromJson(Map json) => + _$StacBorderFromJson(json); @override final String? color; @@ -167,16 +128,26 @@ class _$StacBorderImpl implements _StacBorder { @JsonKey() final double strokeAlign; + /// Create a copy of StacBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBorder(color: $color, borderStyle: $borderStyle, width: $width, strokeAlign: $strokeAlign)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBorderCopyWith<_StacBorder> get copyWith => + __$StacBorderCopyWithImpl<_StacBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacBorderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBorderImpl && + other is _StacBorder && (identical(other.color, color) || other.color == color) && (identical(other.borderStyle, borderStyle) || other.borderStyle == borderStyle) && @@ -190,45 +161,63 @@ class _$StacBorderImpl implements _StacBorder { int get hashCode => Object.hash(runtimeType, color, borderStyle, width, strokeAlign); - /// Create a copy of StacBorder - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacBorderImplCopyWith<_$StacBorderImpl> get copyWith => - __$$StacBorderImplCopyWithImpl<_$StacBorderImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacBorderImplToJson( - this, - ); + String toString() { + return 'StacBorder(color: $color, borderStyle: $borderStyle, width: $width, strokeAlign: $strokeAlign)'; } } -abstract class _StacBorder implements StacBorder { - const factory _StacBorder( - {final String? color, - final BorderStyle borderStyle, - final double width, - final double strokeAlign}) = _$StacBorderImpl; +/// @nodoc +abstract mixin class _$StacBorderCopyWith<$Res> + implements $StacBorderCopyWith<$Res> { + factory _$StacBorderCopyWith( + _StacBorder value, $Res Function(_StacBorder) _then) = + __$StacBorderCopyWithImpl; + @override + @useResult + $Res call( + {String? color, + BorderStyle borderStyle, + double width, + double strokeAlign}); +} - factory _StacBorder.fromJson(Map json) = - _$StacBorderImpl.fromJson; +/// @nodoc +class __$StacBorderCopyWithImpl<$Res> implements _$StacBorderCopyWith<$Res> { + __$StacBorderCopyWithImpl(this._self, this._then); - @override - String? get color; - @override - BorderStyle get borderStyle; - @override - double get width; - @override - double get strokeAlign; + final _StacBorder _self; + final $Res Function(_StacBorder) _then; /// Create a copy of StacBorder /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBorderImplCopyWith<_$StacBorderImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? color = freezed, + Object? borderStyle = null, + Object? width = null, + Object? strokeAlign = null, + }) { + return _then(_StacBorder( + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + borderStyle: null == borderStyle + ? _self.borderStyle + : borderStyle // ignore: cast_nullable_to_non_nullable + as BorderStyle, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as double, + strokeAlign: null == strokeAlign + ? _self.strokeAlign + : strokeAlign // ignore: cast_nullable_to_non_nullable + as double, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_border/stac_border.g.dart b/packages/stac/lib/src/parsers/stac_border/stac_border.g.dart index d9e2c875..1fd19e3f 100644 --- a/packages/stac/lib/src/parsers/stac_border/stac_border.g.dart +++ b/packages/stac/lib/src/parsers/stac_border/stac_border.g.dart @@ -6,8 +6,7 @@ part of 'stac_border.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBorderImpl _$$StacBorderImplFromJson(Map json) => - _$StacBorderImpl( +_StacBorder _$StacBorderFromJson(Map json) => _StacBorder( color: json['color'] as String?, borderStyle: $enumDecodeNullable(_$BorderStyleEnumMap, json['borderStyle']) ?? @@ -17,7 +16,7 @@ _$StacBorderImpl _$$StacBorderImplFromJson(Map json) => BorderSide.strokeAlignInside, ); -Map _$$StacBorderImplToJson(_$StacBorderImpl instance) => +Map _$StacBorderToJson(_StacBorder instance) => { 'color': instance.color, 'borderStyle': _$BorderStyleEnumMap[instance.borderStyle]!, diff --git a/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.dart b/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.dart index 4caa92e4..c9f27963 100644 --- a/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.dart +++ b/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.dart @@ -5,7 +5,7 @@ part 'stac_border_radius.freezed.dart'; part 'stac_border_radius.g.dart'; @freezed -class StacBorderRadius with _$StacBorderRadius { +abstract class StacBorderRadius with _$StacBorderRadius { const factory StacBorderRadius({ @Default(0.0) double topLeft, @Default(0.0) double topRight, diff --git a/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.freezed.dart b/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.freezed.dart index c6aa77a9..c4ecf342 100644 --- a/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,102 +10,72 @@ part of 'stac_border_radius.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - StacBorderRadius _$StacBorderRadiusFromJson(Map json) { return _StacBorder.fromJson(json); } /// @nodoc mixin _$StacBorderRadius { - double get topLeft => throw _privateConstructorUsedError; - double get topRight => throw _privateConstructorUsedError; - double get bottomLeft => throw _privateConstructorUsedError; - double get bottomRight => throw _privateConstructorUsedError; - - /// Serializes this StacBorderRadius to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get topLeft; + double get topRight; + double get bottomLeft; + double get bottomRight; /// Create a copy of StacBorderRadius /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacBorderRadiusCopyWithImpl( + this as StacBorderRadius, _$identity); -/// @nodoc -abstract class $StacBorderRadiusCopyWith<$Res> { - factory $StacBorderRadiusCopyWith( - StacBorderRadius value, $Res Function(StacBorderRadius) then) = - _$StacBorderRadiusCopyWithImpl<$Res, StacBorderRadius>; - @useResult - $Res call( - {double topLeft, double topRight, double bottomLeft, double bottomRight}); -} + /// Serializes this StacBorderRadius to a JSON map. + Map toJson(); -/// @nodoc -class _$StacBorderRadiusCopyWithImpl<$Res, $Val extends StacBorderRadius> - implements $StacBorderRadiusCopyWith<$Res> { - _$StacBorderRadiusCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBorderRadius && + (identical(other.topLeft, topLeft) || other.topLeft == topLeft) && + (identical(other.topRight, topRight) || + other.topRight == topRight) && + (identical(other.bottomLeft, bottomLeft) || + other.bottomLeft == bottomLeft) && + (identical(other.bottomRight, bottomRight) || + other.bottomRight == bottomRight)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, topLeft, topRight, bottomLeft, bottomRight); - /// Create a copy of StacBorderRadius - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? topLeft = null, - Object? topRight = null, - Object? bottomLeft = null, - Object? bottomRight = null, - }) { - return _then(_value.copyWith( - topLeft: null == topLeft - ? _value.topLeft - : topLeft // ignore: cast_nullable_to_non_nullable - as double, - topRight: null == topRight - ? _value.topRight - : topRight // ignore: cast_nullable_to_non_nullable - as double, - bottomLeft: null == bottomLeft - ? _value.bottomLeft - : bottomLeft // ignore: cast_nullable_to_non_nullable - as double, - bottomRight: null == bottomRight - ? _value.bottomRight - : bottomRight // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + String toString() { + return 'StacBorderRadius(topLeft: $topLeft, topRight: $topRight, bottomLeft: $bottomLeft, bottomRight: $bottomRight)'; } } /// @nodoc -abstract class _$$StacBorderImplCopyWith<$Res> - implements $StacBorderRadiusCopyWith<$Res> { - factory _$$StacBorderImplCopyWith( - _$StacBorderImpl value, $Res Function(_$StacBorderImpl) then) = - __$$StacBorderImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacBorderRadiusCopyWith<$Res> { + factory $StacBorderRadiusCopyWith( + StacBorderRadius value, $Res Function(StacBorderRadius) _then) = + _$StacBorderRadiusCopyWithImpl; @useResult $Res call( {double topLeft, double topRight, double bottomLeft, double bottomRight}); } /// @nodoc -class __$$StacBorderImplCopyWithImpl<$Res> - extends _$StacBorderRadiusCopyWithImpl<$Res, _$StacBorderImpl> - implements _$$StacBorderImplCopyWith<$Res> { - __$$StacBorderImplCopyWithImpl( - _$StacBorderImpl _value, $Res Function(_$StacBorderImpl) _then) - : super(_value, _then); +class _$StacBorderRadiusCopyWithImpl<$Res> + implements $StacBorderRadiusCopyWith<$Res> { + _$StacBorderRadiusCopyWithImpl(this._self, this._then); + + final StacBorderRadius _self; + final $Res Function(StacBorderRadius) _then; /// Create a copy of StacBorderRadius /// with the given fields replaced by the non-null parameter values. @@ -116,21 +87,21 @@ class __$$StacBorderImplCopyWithImpl<$Res> Object? bottomLeft = null, Object? bottomRight = null, }) { - return _then(_$StacBorderImpl( + return _then(_self.copyWith( topLeft: null == topLeft - ? _value.topLeft + ? _self.topLeft : topLeft // ignore: cast_nullable_to_non_nullable as double, topRight: null == topRight - ? _value.topRight + ? _self.topRight : topRight // ignore: cast_nullable_to_non_nullable as double, bottomLeft: null == bottomLeft - ? _value.bottomLeft + ? _self.bottomLeft : bottomLeft // ignore: cast_nullable_to_non_nullable as double, bottomRight: null == bottomRight - ? _value.bottomRight + ? _self.bottomRight : bottomRight // ignore: cast_nullable_to_non_nullable as double, )); @@ -139,15 +110,14 @@ class __$$StacBorderImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacBorderImpl implements _StacBorder { - const _$StacBorderImpl( +class _StacBorder implements StacBorderRadius { + const _StacBorder( {this.topLeft = 0.0, this.topRight = 0.0, this.bottomLeft = 0.0, this.bottomRight = 0.0}); - - factory _$StacBorderImpl.fromJson(Map json) => - _$$StacBorderImplFromJson(json); + factory _StacBorder.fromJson(Map json) => + _$StacBorderFromJson(json); @override @JsonKey() @@ -162,16 +132,26 @@ class _$StacBorderImpl implements _StacBorder { @JsonKey() final double bottomRight; + /// Create a copy of StacBorderRadius + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBorderRadius(topLeft: $topLeft, topRight: $topRight, bottomLeft: $bottomLeft, bottomRight: $bottomRight)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBorderCopyWith<_StacBorder> get copyWith => + __$StacBorderCopyWithImpl<_StacBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacBorderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBorderImpl && + other is _StacBorder && (identical(other.topLeft, topLeft) || other.topLeft == topLeft) && (identical(other.topRight, topRight) || other.topRight == topRight) && @@ -186,45 +166,60 @@ class _$StacBorderImpl implements _StacBorder { int get hashCode => Object.hash(runtimeType, topLeft, topRight, bottomLeft, bottomRight); - /// Create a copy of StacBorderRadius - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacBorderImplCopyWith<_$StacBorderImpl> get copyWith => - __$$StacBorderImplCopyWithImpl<_$StacBorderImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacBorderImplToJson( - this, - ); + String toString() { + return 'StacBorderRadius(topLeft: $topLeft, topRight: $topRight, bottomLeft: $bottomLeft, bottomRight: $bottomRight)'; } } -abstract class _StacBorder implements StacBorderRadius { - const factory _StacBorder( - {final double topLeft, - final double topRight, - final double bottomLeft, - final double bottomRight}) = _$StacBorderImpl; +/// @nodoc +abstract mixin class _$StacBorderCopyWith<$Res> + implements $StacBorderRadiusCopyWith<$Res> { + factory _$StacBorderCopyWith( + _StacBorder value, $Res Function(_StacBorder) _then) = + __$StacBorderCopyWithImpl; + @override + @useResult + $Res call( + {double topLeft, double topRight, double bottomLeft, double bottomRight}); +} - factory _StacBorder.fromJson(Map json) = - _$StacBorderImpl.fromJson; +/// @nodoc +class __$StacBorderCopyWithImpl<$Res> implements _$StacBorderCopyWith<$Res> { + __$StacBorderCopyWithImpl(this._self, this._then); - @override - double get topLeft; - @override - double get topRight; - @override - double get bottomLeft; - @override - double get bottomRight; + final _StacBorder _self; + final $Res Function(_StacBorder) _then; /// Create a copy of StacBorderRadius /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBorderImplCopyWith<_$StacBorderImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? topLeft = null, + Object? topRight = null, + Object? bottomLeft = null, + Object? bottomRight = null, + }) { + return _then(_StacBorder( + topLeft: null == topLeft + ? _self.topLeft + : topLeft // ignore: cast_nullable_to_non_nullable + as double, + topRight: null == topRight + ? _self.topRight + : topRight // ignore: cast_nullable_to_non_nullable + as double, + bottomLeft: null == bottomLeft + ? _self.bottomLeft + : bottomLeft // ignore: cast_nullable_to_non_nullable + as double, + bottomRight: null == bottomRight + ? _self.bottomRight + : bottomRight // ignore: cast_nullable_to_non_nullable + as double, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.g.dart b/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.g.dart index 8498bb0a..52b0babd 100644 --- a/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.g.dart +++ b/packages/stac/lib/src/parsers/stac_border_radius/stac_border_radius.g.dart @@ -6,15 +6,14 @@ part of 'stac_border_radius.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBorderImpl _$$StacBorderImplFromJson(Map json) => - _$StacBorderImpl( +_StacBorder _$StacBorderFromJson(Map json) => _StacBorder( topLeft: (json['topLeft'] as num?)?.toDouble() ?? 0.0, topRight: (json['topRight'] as num?)?.toDouble() ?? 0.0, bottomLeft: (json['bottomLeft'] as num?)?.toDouble() ?? 0.0, bottomRight: (json['bottomRight'] as num?)?.toDouble() ?? 0.0, ); -Map _$$StacBorderImplToJson(_$StacBorderImpl instance) => +Map _$StacBorderToJson(_StacBorder instance) => { 'topLeft': instance.topLeft, 'topRight': instance.topRight, diff --git a/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.dart b/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.dart index 21298945..d0de0a2f 100644 --- a/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.dart +++ b/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.dart @@ -6,7 +6,7 @@ part 'stac_border_side.freezed.dart'; part 'stac_border_side.g.dart'; @freezed -class StacBorderSide with _$StacBorderSide { +abstract class StacBorderSide with _$StacBorderSide { const factory StacBorderSide({ String? color, @Default(0.0) double width, @@ -14,15 +14,15 @@ class StacBorderSide with _$StacBorderSide { @Default(BorderStyle.solid) BorderStyle borderStyle, }) = _StacBorderSide; + static const none = StacBorderSide( + color: '000000', + width: 0.0, + strokeAlign: -1.0, + borderStyle: BorderStyle.none, + ); + factory StacBorderSide.fromJson(Map json) => _$StacBorderSideFromJson(json); - - const factory StacBorderSide.none({ - @Default("000000") String color, - @Default(0.0) double width, - @Default(-1.0) double strokeAlign, - @Default(BorderStyle.none) BorderStyle borderStyle, - }) = _StacBorderSideNone; } extension StacBorderSideParser on StacBorderSide? { diff --git a/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.freezed.dart b/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.freezed.dart index 8ea4d2c7..a3994c8e 100644 --- a/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,152 +10,56 @@ part of 'stac_border_side.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBorderSide _$StacBorderSideFromJson(Map json) { - switch (json['runtimeType']) { - case 'default': - return _StacBorderSide.fromJson(json); - case 'none': - return _StacBorderSideNone.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'runtimeType', 'StacBorderSide', - 'Invalid union type "${json['runtimeType']}"!'); - } -} - /// @nodoc mixin _$StacBorderSide { - String? get color => throw _privateConstructorUsedError; - double get width => throw _privateConstructorUsedError; - double get strokeAlign => throw _privateConstructorUsedError; - BorderStyle get borderStyle => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when( - TResult Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle) - $default, { - required TResult Function(String color, double width, double strokeAlign, - BorderStyle borderStyle) - none, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull( - TResult? Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle)? - $default, { - TResult? Function(String color, double width, double strokeAlign, - BorderStyle borderStyle)? - none, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen( - TResult Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle)? - $default, { - TResult Function(String color, double width, double strokeAlign, - BorderStyle borderStyle)? - none, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map( - TResult Function(_StacBorderSide value) $default, { - required TResult Function(_StacBorderSideNone value) none, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull( - TResult? Function(_StacBorderSide value)? $default, { - TResult? Function(_StacBorderSideNone value)? none, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap( - TResult Function(_StacBorderSide value)? $default, { - TResult Function(_StacBorderSideNone value)? none, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - /// Serializes this StacBorderSide to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get color; + double get width; + double get strokeAlign; + BorderStyle get borderStyle; /// Create a copy of StacBorderSide /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBorderSideCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacBorderSideCopyWithImpl( + this as StacBorderSide, _$identity); -/// @nodoc -abstract class $StacBorderSideCopyWith<$Res> { - factory $StacBorderSideCopyWith( - StacBorderSide value, $Res Function(StacBorderSide) then) = - _$StacBorderSideCopyWithImpl<$Res, StacBorderSide>; - @useResult - $Res call( - {String color, - double width, - double strokeAlign, - BorderStyle borderStyle}); -} + /// Serializes this StacBorderSide to a JSON map. + Map toJson(); -/// @nodoc -class _$StacBorderSideCopyWithImpl<$Res, $Val extends StacBorderSide> - implements $StacBorderSideCopyWith<$Res> { - _$StacBorderSideCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBorderSide && + (identical(other.color, color) || other.color == color) && + (identical(other.width, width) || other.width == width) && + (identical(other.strokeAlign, strokeAlign) || + other.strokeAlign == strokeAlign) && + (identical(other.borderStyle, borderStyle) || + other.borderStyle == borderStyle)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, color, width, strokeAlign, borderStyle); - /// Create a copy of StacBorderSide - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? color = null, - Object? width = null, - Object? strokeAlign = null, - Object? borderStyle = null, - }) { - return _then(_value.copyWith( - color: null == color - ? _value.color! - : color // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double, - strokeAlign: null == strokeAlign - ? _value.strokeAlign - : strokeAlign // ignore: cast_nullable_to_non_nullable - as double, - borderStyle: null == borderStyle - ? _value.borderStyle - : borderStyle // ignore: cast_nullable_to_non_nullable - as BorderStyle, - ) as $Val); + String toString() { + return 'StacBorderSide(color: $color, width: $width, strokeAlign: $strokeAlign, borderStyle: $borderStyle)'; } } /// @nodoc -abstract class _$$StacBorderSideImplCopyWith<$Res> - implements $StacBorderSideCopyWith<$Res> { - factory _$$StacBorderSideImplCopyWith(_$StacBorderSideImpl value, - $Res Function(_$StacBorderSideImpl) then) = - __$$StacBorderSideImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacBorderSideCopyWith<$Res> { + factory $StacBorderSideCopyWith( + StacBorderSide value, $Res Function(StacBorderSide) _then) = + _$StacBorderSideCopyWithImpl; @useResult $Res call( {String? color, @@ -164,12 +69,12 @@ abstract class _$$StacBorderSideImplCopyWith<$Res> } /// @nodoc -class __$$StacBorderSideImplCopyWithImpl<$Res> - extends _$StacBorderSideCopyWithImpl<$Res, _$StacBorderSideImpl> - implements _$$StacBorderSideImplCopyWith<$Res> { - __$$StacBorderSideImplCopyWithImpl( - _$StacBorderSideImpl _value, $Res Function(_$StacBorderSideImpl) _then) - : super(_value, _then); +class _$StacBorderSideCopyWithImpl<$Res> + implements $StacBorderSideCopyWith<$Res> { + _$StacBorderSideCopyWithImpl(this._self, this._then); + + final StacBorderSide _self; + final $Res Function(StacBorderSide) _then; /// Create a copy of StacBorderSide /// with the given fields replaced by the non-null parameter values. @@ -181,21 +86,21 @@ class __$$StacBorderSideImplCopyWithImpl<$Res> Object? strokeAlign = null, Object? borderStyle = null, }) { - return _then(_$StacBorderSideImpl( + return _then(_self.copyWith( color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double, strokeAlign: null == strokeAlign - ? _value.strokeAlign + ? _self.strokeAlign : strokeAlign // ignore: cast_nullable_to_non_nullable as double, borderStyle: null == borderStyle - ? _value.borderStyle + ? _self.borderStyle : borderStyle // ignore: cast_nullable_to_non_nullable as BorderStyle, )); @@ -204,17 +109,14 @@ class __$$StacBorderSideImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacBorderSideImpl implements _StacBorderSide { - const _$StacBorderSideImpl( +class _StacBorderSide implements StacBorderSide { + const _StacBorderSide( {this.color, this.width = 0.0, this.strokeAlign = 0.0, - this.borderStyle = BorderStyle.solid, - final String? $type}) - : $type = $type ?? 'default'; - - factory _$StacBorderSideImpl.fromJson(Map json) => - _$$StacBorderSideImplFromJson(json); + this.borderStyle = BorderStyle.solid}); + factory _StacBorderSide.fromJson(Map json) => + _$StacBorderSideFromJson(json); @override final String? color; @@ -228,19 +130,26 @@ class _$StacBorderSideImpl implements _StacBorderSide { @JsonKey() final BorderStyle borderStyle; - @JsonKey(name: 'runtimeType') - final String $type; + /// Create a copy of StacBorderSide + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBorderSideCopyWith<_StacBorderSide> get copyWith => + __$StacBorderSideCopyWithImpl<_StacBorderSide>(this, _$identity); @override - String toString() { - return 'StacBorderSide(color: $color, width: $width, strokeAlign: $strokeAlign, borderStyle: $borderStyle)'; + Map toJson() { + return _$StacBorderSideToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBorderSideImpl && + other is _StacBorderSide && (identical(other.color, color) || other.color == color) && (identical(other.width, width) || other.width == width) && (identical(other.strokeAlign, strokeAlign) || @@ -254,345 +163,64 @@ class _$StacBorderSideImpl implements _StacBorderSide { int get hashCode => Object.hash(runtimeType, color, width, strokeAlign, borderStyle); - /// Create a copy of StacBorderSide - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacBorderSideImplCopyWith<_$StacBorderSideImpl> get copyWith => - __$$StacBorderSideImplCopyWithImpl<_$StacBorderSideImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when( - TResult Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle) - $default, { - required TResult Function(String color, double width, double strokeAlign, - BorderStyle borderStyle) - none, - }) { - return $default(color, width, strokeAlign, borderStyle); - } - @override - @optionalTypeArgs - TResult? whenOrNull( - TResult? Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle)? - $default, { - TResult? Function(String color, double width, double strokeAlign, - BorderStyle borderStyle)? - none, - }) { - return $default?.call(color, width, strokeAlign, borderStyle); - } - - @override - @optionalTypeArgs - TResult maybeWhen( - TResult Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle)? - $default, { - TResult Function(String color, double width, double strokeAlign, - BorderStyle borderStyle)? - none, - required TResult orElse(), - }) { - if ($default != null) { - return $default(color, width, strokeAlign, borderStyle); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map( - TResult Function(_StacBorderSide value) $default, { - required TResult Function(_StacBorderSideNone value) none, - }) { - return $default(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull( - TResult? Function(_StacBorderSide value)? $default, { - TResult? Function(_StacBorderSideNone value)? none, - }) { - return $default?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap( - TResult Function(_StacBorderSide value)? $default, { - TResult Function(_StacBorderSideNone value)? none, - required TResult orElse(), - }) { - if ($default != null) { - return $default(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$StacBorderSideImplToJson( - this, - ); + String toString() { + return 'StacBorderSide(color: $color, width: $width, strokeAlign: $strokeAlign, borderStyle: $borderStyle)'; } } -abstract class _StacBorderSide implements StacBorderSide { - const factory _StacBorderSide( - {final String? color, - final double width, - final double strokeAlign, - final BorderStyle borderStyle}) = _$StacBorderSideImpl; - - factory _StacBorderSide.fromJson(Map json) = - _$StacBorderSideImpl.fromJson; - - @override - String? get color; - @override - double get width; - @override - double get strokeAlign; - @override - BorderStyle get borderStyle; - - /// Create a copy of StacBorderSide - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBorderSideImplCopyWith<_$StacBorderSideImpl> get copyWith => - throw _privateConstructorUsedError; -} - /// @nodoc -abstract class _$$StacBorderSideNoneImplCopyWith<$Res> +abstract mixin class _$StacBorderSideCopyWith<$Res> implements $StacBorderSideCopyWith<$Res> { - factory _$$StacBorderSideNoneImplCopyWith(_$StacBorderSideNoneImpl value, - $Res Function(_$StacBorderSideNoneImpl) then) = - __$$StacBorderSideNoneImplCopyWithImpl<$Res>; + factory _$StacBorderSideCopyWith( + _StacBorderSide value, $Res Function(_StacBorderSide) _then) = + __$StacBorderSideCopyWithImpl; @override @useResult $Res call( - {String color, + {String? color, double width, double strokeAlign, BorderStyle borderStyle}); } /// @nodoc -class __$$StacBorderSideNoneImplCopyWithImpl<$Res> - extends _$StacBorderSideCopyWithImpl<$Res, _$StacBorderSideNoneImpl> - implements _$$StacBorderSideNoneImplCopyWith<$Res> { - __$$StacBorderSideNoneImplCopyWithImpl(_$StacBorderSideNoneImpl _value, - $Res Function(_$StacBorderSideNoneImpl) _then) - : super(_value, _then); +class __$StacBorderSideCopyWithImpl<$Res> + implements _$StacBorderSideCopyWith<$Res> { + __$StacBorderSideCopyWithImpl(this._self, this._then); + + final _StacBorderSide _self; + final $Res Function(_StacBorderSide) _then; /// Create a copy of StacBorderSide /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ - Object? color = null, + Object? color = freezed, Object? width = null, Object? strokeAlign = null, Object? borderStyle = null, }) { - return _then(_$StacBorderSideNoneImpl( - color: null == color - ? _value.color + return _then(_StacBorderSide( + color: freezed == color + ? _self.color : color // ignore: cast_nullable_to_non_nullable - as String, + as String?, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double, strokeAlign: null == strokeAlign - ? _value.strokeAlign + ? _self.strokeAlign : strokeAlign // ignore: cast_nullable_to_non_nullable as double, borderStyle: null == borderStyle - ? _value.borderStyle + ? _self.borderStyle : borderStyle // ignore: cast_nullable_to_non_nullable as BorderStyle, )); } } -/// @nodoc -@JsonSerializable() -class _$StacBorderSideNoneImpl implements _StacBorderSideNone { - const _$StacBorderSideNoneImpl( - {this.color = "000000", - this.width = 0.0, - this.strokeAlign = -1.0, - this.borderStyle = BorderStyle.none, - final String? $type}) - : $type = $type ?? 'none'; - - factory _$StacBorderSideNoneImpl.fromJson(Map json) => - _$$StacBorderSideNoneImplFromJson(json); - - @override - @JsonKey() - final String color; - @override - @JsonKey() - final double width; - @override - @JsonKey() - final double strokeAlign; - @override - @JsonKey() - final BorderStyle borderStyle; - - @JsonKey(name: 'runtimeType') - final String $type; - - @override - String toString() { - return 'StacBorderSide.none(color: $color, width: $width, strokeAlign: $strokeAlign, borderStyle: $borderStyle)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacBorderSideNoneImpl && - (identical(other.color, color) || other.color == color) && - (identical(other.width, width) || other.width == width) && - (identical(other.strokeAlign, strokeAlign) || - other.strokeAlign == strokeAlign) && - (identical(other.borderStyle, borderStyle) || - other.borderStyle == borderStyle)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, color, width, strokeAlign, borderStyle); - - /// Create a copy of StacBorderSide - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacBorderSideNoneImplCopyWith<_$StacBorderSideNoneImpl> get copyWith => - __$$StacBorderSideNoneImplCopyWithImpl<_$StacBorderSideNoneImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when( - TResult Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle) - $default, { - required TResult Function(String color, double width, double strokeAlign, - BorderStyle borderStyle) - none, - }) { - return none(color, width, strokeAlign, borderStyle); - } - - @override - @optionalTypeArgs - TResult? whenOrNull( - TResult? Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle)? - $default, { - TResult? Function(String color, double width, double strokeAlign, - BorderStyle borderStyle)? - none, - }) { - return none?.call(color, width, strokeAlign, borderStyle); - } - - @override - @optionalTypeArgs - TResult maybeWhen( - TResult Function(String? color, double width, double strokeAlign, - BorderStyle borderStyle)? - $default, { - TResult Function(String color, double width, double strokeAlign, - BorderStyle borderStyle)? - none, - required TResult orElse(), - }) { - if (none != null) { - return none(color, width, strokeAlign, borderStyle); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map( - TResult Function(_StacBorderSide value) $default, { - required TResult Function(_StacBorderSideNone value) none, - }) { - return none(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull( - TResult? Function(_StacBorderSide value)? $default, { - TResult? Function(_StacBorderSideNone value)? none, - }) { - return none?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap( - TResult Function(_StacBorderSide value)? $default, { - TResult Function(_StacBorderSideNone value)? none, - required TResult orElse(), - }) { - if (none != null) { - return none(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$StacBorderSideNoneImplToJson( - this, - ); - } -} - -abstract class _StacBorderSideNone implements StacBorderSide { - const factory _StacBorderSideNone( - {final String color, - final double width, - final double strokeAlign, - final BorderStyle borderStyle}) = _$StacBorderSideNoneImpl; - - factory _StacBorderSideNone.fromJson(Map json) = - _$StacBorderSideNoneImpl.fromJson; - - @override - String get color; - @override - double get width; - @override - double get strokeAlign; - @override - BorderStyle get borderStyle; - - /// Create a copy of StacBorderSide - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBorderSideNoneImplCopyWith<_$StacBorderSideNoneImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.g.dart b/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.g.dart index 2155bd68..8d5742e6 100644 --- a/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.g.dart +++ b/packages/stac/lib/src/parsers/stac_border_side/stac_border_side.g.dart @@ -6,50 +6,25 @@ part of 'stac_border_side.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBorderSideImpl _$$StacBorderSideImplFromJson(Map json) => - _$StacBorderSideImpl( +_StacBorderSide _$StacBorderSideFromJson(Map json) => + _StacBorderSide( color: json['color'] as String?, width: (json['width'] as num?)?.toDouble() ?? 0.0, strokeAlign: (json['strokeAlign'] as num?)?.toDouble() ?? 0.0, borderStyle: $enumDecodeNullable(_$BorderStyleEnumMap, json['borderStyle']) ?? BorderStyle.solid, - $type: json['runtimeType'] as String?, ); -Map _$$StacBorderSideImplToJson( - _$StacBorderSideImpl instance) => +Map _$StacBorderSideToJson(_StacBorderSide instance) => { 'color': instance.color, 'width': instance.width, 'strokeAlign': instance.strokeAlign, 'borderStyle': _$BorderStyleEnumMap[instance.borderStyle]!, - 'runtimeType': instance.$type, }; const _$BorderStyleEnumMap = { BorderStyle.none: 'none', BorderStyle.solid: 'solid', }; - -_$StacBorderSideNoneImpl _$$StacBorderSideNoneImplFromJson( - Map json) => - _$StacBorderSideNoneImpl( - color: json['color'] as String? ?? "000000", - width: (json['width'] as num?)?.toDouble() ?? 0.0, - strokeAlign: (json['strokeAlign'] as num?)?.toDouble() ?? -1.0, - borderStyle: - $enumDecodeNullable(_$BorderStyleEnumMap, json['borderStyle']) ?? - BorderStyle.none, - $type: json['runtimeType'] as String?, - ); - -Map _$$StacBorderSideNoneImplToJson( - _$StacBorderSideNoneImpl instance) => - { - 'color': instance.color, - 'width': instance.width, - 'strokeAlign': instance.strokeAlign, - 'borderStyle': _$BorderStyleEnumMap[instance.borderStyle]!, - 'runtimeType': instance.$type, - }; diff --git a/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.dart b/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.dart index 1322b229..2a877d0a 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.dart @@ -7,7 +7,7 @@ part 'stac_bottom_app_bar_theme.freezed.dart'; part 'stac_bottom_app_bar_theme.g.dart'; @freezed -class StacBottomAppBarTheme with _$StacBottomAppBarTheme { +abstract class StacBottomAppBarTheme with _$StacBottomAppBarTheme { const factory StacBottomAppBarTheme({ String? color, double? elevation, diff --git a/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.freezed.dart b/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.freezed.dart index f17b2134..2881dba6 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,40 +10,61 @@ part of 'stac_bottom_app_bar_theme.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBottomAppBarTheme _$StacBottomAppBarThemeFromJson( - Map json) { - return _StacBottomAppBarTheme.fromJson(json); -} - /// @nodoc mixin _$StacBottomAppBarTheme { - String? get color => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - - /// Serializes this StacBottomAppBarTheme to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get color; + double? get elevation; + double? get height; + String? get surfaceTintColor; + String? get shadowColor; + StacEdgeInsets? get padding; /// Create a copy of StacBottomAppBarTheme /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBottomAppBarThemeCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacBottomAppBarThemeCopyWithImpl( + this as StacBottomAppBarTheme, _$identity); + + /// Serializes this StacBottomAppBarTheme to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBottomAppBarTheme && + (identical(other.color, color) || other.color == color) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.height, height) || other.height == height) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.padding, padding) || other.padding == padding)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, color, elevation, height, + surfaceTintColor, shadowColor, padding); + + @override + String toString() { + return 'StacBottomAppBarTheme(color: $color, elevation: $elevation, height: $height, surfaceTintColor: $surfaceTintColor, shadowColor: $shadowColor, padding: $padding)'; + } } /// @nodoc -abstract class $StacBottomAppBarThemeCopyWith<$Res> { +abstract mixin class $StacBottomAppBarThemeCopyWith<$Res> { factory $StacBottomAppBarThemeCopyWith(StacBottomAppBarTheme value, - $Res Function(StacBottomAppBarTheme) then) = - _$StacBottomAppBarThemeCopyWithImpl<$Res, StacBottomAppBarTheme>; + $Res Function(StacBottomAppBarTheme) _then) = + _$StacBottomAppBarThemeCopyWithImpl; @useResult $Res call( {String? color, @@ -56,15 +78,12 @@ abstract class $StacBottomAppBarThemeCopyWith<$Res> { } /// @nodoc -class _$StacBottomAppBarThemeCopyWithImpl<$Res, - $Val extends StacBottomAppBarTheme> +class _$StacBottomAppBarThemeCopyWithImpl<$Res> implements $StacBottomAppBarThemeCopyWith<$Res> { - _$StacBottomAppBarThemeCopyWithImpl(this._value, this._then); + _$StacBottomAppBarThemeCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacBottomAppBarTheme _self; + final $Res Function(StacBottomAppBarTheme) _then; /// Create a copy of StacBottomAppBarTheme /// with the given fields replaced by the non-null parameter values. @@ -78,32 +97,32 @@ class _$StacBottomAppBarThemeCopyWithImpl<$Res, Object? shadowColor = freezed, Object? padding = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, - ) as $Val); + )); } /// Create a copy of StacBottomAppBarTheme @@ -111,100 +130,28 @@ class _$StacBottomAppBarThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } } -/// @nodoc -abstract class _$$StacBottomAppBarThemeImplCopyWith<$Res> - implements $StacBottomAppBarThemeCopyWith<$Res> { - factory _$$StacBottomAppBarThemeImplCopyWith( - _$StacBottomAppBarThemeImpl value, - $Res Function(_$StacBottomAppBarThemeImpl) then) = - __$$StacBottomAppBarThemeImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? color, - double? elevation, - double? height, - String? surfaceTintColor, - String? shadowColor, - StacEdgeInsets? padding}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; -} - -/// @nodoc -class __$$StacBottomAppBarThemeImplCopyWithImpl<$Res> - extends _$StacBottomAppBarThemeCopyWithImpl<$Res, - _$StacBottomAppBarThemeImpl> - implements _$$StacBottomAppBarThemeImplCopyWith<$Res> { - __$$StacBottomAppBarThemeImplCopyWithImpl(_$StacBottomAppBarThemeImpl _value, - $Res Function(_$StacBottomAppBarThemeImpl) _then) - : super(_value, _then); - - /// Create a copy of StacBottomAppBarTheme - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? color = freezed, - Object? elevation = freezed, - Object? height = freezed, - Object? surfaceTintColor = freezed, - Object? shadowColor = freezed, - Object? padding = freezed, - }) { - return _then(_$StacBottomAppBarThemeImpl( - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacBottomAppBarThemeImpl implements _StacBottomAppBarTheme { - const _$StacBottomAppBarThemeImpl( +class _StacBottomAppBarTheme implements StacBottomAppBarTheme { + const _StacBottomAppBarTheme( {this.color, this.elevation, this.height, this.surfaceTintColor, this.shadowColor, this.padding}); - - factory _$StacBottomAppBarThemeImpl.fromJson(Map json) => - _$$StacBottomAppBarThemeImplFromJson(json); + factory _StacBottomAppBarTheme.fromJson(Map json) => + _$StacBottomAppBarThemeFromJson(json); @override final String? color; @@ -219,16 +166,27 @@ class _$StacBottomAppBarThemeImpl implements _StacBottomAppBarTheme { @override final StacEdgeInsets? padding; + /// Create a copy of StacBottomAppBarTheme + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBottomAppBarTheme(color: $color, elevation: $elevation, height: $height, surfaceTintColor: $surfaceTintColor, shadowColor: $shadowColor, padding: $padding)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBottomAppBarThemeCopyWith<_StacBottomAppBarTheme> get copyWith => + __$StacBottomAppBarThemeCopyWithImpl<_StacBottomAppBarTheme>( + this, _$identity); + + @override + Map toJson() { + return _$StacBottomAppBarThemeToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBottomAppBarThemeImpl && + other is _StacBottomAppBarTheme && (identical(other.color, color) || other.color == color) && (identical(other.elevation, elevation) || other.elevation == elevation) && @@ -245,52 +203,93 @@ class _$StacBottomAppBarThemeImpl implements _StacBottomAppBarTheme { int get hashCode => Object.hash(runtimeType, color, elevation, height, surfaceTintColor, shadowColor, padding); - /// Create a copy of StacBottomAppBarTheme - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacBottomAppBarThemeImplCopyWith<_$StacBottomAppBarThemeImpl> - get copyWith => __$$StacBottomAppBarThemeImplCopyWithImpl< - _$StacBottomAppBarThemeImpl>(this, _$identity); + String toString() { + return 'StacBottomAppBarTheme(color: $color, elevation: $elevation, height: $height, surfaceTintColor: $surfaceTintColor, shadowColor: $shadowColor, padding: $padding)'; + } +} +/// @nodoc +abstract mixin class _$StacBottomAppBarThemeCopyWith<$Res> + implements $StacBottomAppBarThemeCopyWith<$Res> { + factory _$StacBottomAppBarThemeCopyWith(_StacBottomAppBarTheme value, + $Res Function(_StacBottomAppBarTheme) _then) = + __$StacBottomAppBarThemeCopyWithImpl; @override - Map toJson() { - return _$$StacBottomAppBarThemeImplToJson( - this, - ); - } + @useResult + $Res call( + {String? color, + double? elevation, + double? height, + String? surfaceTintColor, + String? shadowColor, + StacEdgeInsets? padding}); + + @override + $StacEdgeInsetsCopyWith<$Res>? get padding; } -abstract class _StacBottomAppBarTheme implements StacBottomAppBarTheme { - const factory _StacBottomAppBarTheme( - {final String? color, - final double? elevation, - final double? height, - final String? surfaceTintColor, - final String? shadowColor, - final StacEdgeInsets? padding}) = _$StacBottomAppBarThemeImpl; +/// @nodoc +class __$StacBottomAppBarThemeCopyWithImpl<$Res> + implements _$StacBottomAppBarThemeCopyWith<$Res> { + __$StacBottomAppBarThemeCopyWithImpl(this._self, this._then); - factory _StacBottomAppBarTheme.fromJson(Map json) = - _$StacBottomAppBarThemeImpl.fromJson; + final _StacBottomAppBarTheme _self; + final $Res Function(_StacBottomAppBarTheme) _then; + /// Create a copy of StacBottomAppBarTheme + /// with the given fields replaced by the non-null parameter values. @override - String? get color; - @override - double? get elevation; - @override - double? get height; - @override - String? get surfaceTintColor; - @override - String? get shadowColor; - @override - StacEdgeInsets? get padding; + @pragma('vm:prefer-inline') + $Res call({ + Object? color = freezed, + Object? elevation = freezed, + Object? height = freezed, + Object? surfaceTintColor = freezed, + Object? shadowColor = freezed, + Object? padding = freezed, + }) { + return _then(_StacBottomAppBarTheme( + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + )); + } /// Create a copy of StacBottomAppBarTheme /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBottomAppBarThemeImplCopyWith<_$StacBottomAppBarThemeImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.g.dart b/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.g.dart index 1d848e6f..2330a8c1 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.g.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_app_bar_theme/stac_bottom_app_bar_theme.g.dart @@ -6,9 +6,9 @@ part of 'stac_bottom_app_bar_theme.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBottomAppBarThemeImpl _$$StacBottomAppBarThemeImplFromJson( +_StacBottomAppBarTheme _$StacBottomAppBarThemeFromJson( Map json) => - _$StacBottomAppBarThemeImpl( + _StacBottomAppBarTheme( color: json['color'] as String?, elevation: (json['elevation'] as num?)?.toDouble(), height: (json['height'] as num?)?.toDouble(), @@ -19,8 +19,8 @@ _$StacBottomAppBarThemeImpl _$$StacBottomAppBarThemeImplFromJson( : StacEdgeInsets.fromJson(json['padding']), ); -Map _$$StacBottomAppBarThemeImplToJson( - _$StacBottomAppBarThemeImpl instance) => +Map _$StacBottomAppBarThemeToJson( + _StacBottomAppBarTheme instance) => { 'color': instance.color, 'elevation': instance.elevation, diff --git a/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.dart b/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.dart index 09cbfd8e..deab523e 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.dart @@ -8,7 +8,7 @@ part 'stac_bottom_nav_bar_theme.freezed.dart'; part 'stac_bottom_nav_bar_theme.g.dart'; @freezed -class StacBottomNavBarThemeData with _$StacBottomNavBarThemeData { +abstract class StacBottomNavBarThemeData with _$StacBottomNavBarThemeData { const factory StacBottomNavBarThemeData({ String? backgroundColor, double? elevation, diff --git a/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.freezed.dart b/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.freezed.dart index 94b8b335..cff1e21f 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,50 +10,97 @@ part of 'stac_bottom_nav_bar_theme.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBottomNavBarThemeData _$StacBottomNavBarThemeDataFromJson( - Map json) { - return _StacBottomNavBarThemeData.fromJson(json); -} - /// @nodoc mixin _$StacBottomNavBarThemeData { - String? get backgroundColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - StacIconThemeData? get selectedIconTheme => - throw _privateConstructorUsedError; - StacIconThemeData? get unselectedIconTheme => - throw _privateConstructorUsedError; - String? get selectedItemColor => throw _privateConstructorUsedError; - String? get unselectedItemColor => throw _privateConstructorUsedError; - StacTextStyle? get selectedLabelStyle => throw _privateConstructorUsedError; - StacTextStyle? get unselectedLabelStyle => throw _privateConstructorUsedError; - bool? get showSelectedLabels => throw _privateConstructorUsedError; - bool? get showUnselectedLabels => throw _privateConstructorUsedError; - BottomNavigationBarType? get type => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - BottomNavigationBarLandscapeLayout? get landscapeLayout => - throw _privateConstructorUsedError; - - /// Serializes this StacBottomNavBarThemeData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get backgroundColor; + double? get elevation; + StacIconThemeData? get selectedIconTheme; + StacIconThemeData? get unselectedIconTheme; + String? get selectedItemColor; + String? get unselectedItemColor; + StacTextStyle? get selectedLabelStyle; + StacTextStyle? get unselectedLabelStyle; + bool? get showSelectedLabels; + bool? get showUnselectedLabels; + BottomNavigationBarType? get type; + bool? get enableFeedback; + BottomNavigationBarLandscapeLayout? get landscapeLayout; /// Create a copy of StacBottomNavBarThemeData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBottomNavBarThemeDataCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacBottomNavBarThemeDataCopyWithImpl( + this as StacBottomNavBarThemeData, _$identity); + + /// Serializes this StacBottomNavBarThemeData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBottomNavBarThemeData && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.selectedIconTheme, selectedIconTheme) || + other.selectedIconTheme == selectedIconTheme) && + (identical(other.unselectedIconTheme, unselectedIconTheme) || + other.unselectedIconTheme == unselectedIconTheme) && + (identical(other.selectedItemColor, selectedItemColor) || + other.selectedItemColor == selectedItemColor) && + (identical(other.unselectedItemColor, unselectedItemColor) || + other.unselectedItemColor == unselectedItemColor) && + (identical(other.selectedLabelStyle, selectedLabelStyle) || + other.selectedLabelStyle == selectedLabelStyle) && + (identical(other.unselectedLabelStyle, unselectedLabelStyle) || + other.unselectedLabelStyle == unselectedLabelStyle) && + (identical(other.showSelectedLabels, showSelectedLabels) || + other.showSelectedLabels == showSelectedLabels) && + (identical(other.showUnselectedLabels, showUnselectedLabels) || + other.showUnselectedLabels == showUnselectedLabels) && + (identical(other.type, type) || other.type == type) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.landscapeLayout, landscapeLayout) || + other.landscapeLayout == landscapeLayout)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + backgroundColor, + elevation, + selectedIconTheme, + unselectedIconTheme, + selectedItemColor, + unselectedItemColor, + selectedLabelStyle, + unselectedLabelStyle, + showSelectedLabels, + showUnselectedLabels, + type, + enableFeedback, + landscapeLayout); + + @override + String toString() { + return 'StacBottomNavBarThemeData(backgroundColor: $backgroundColor, elevation: $elevation, selectedIconTheme: $selectedIconTheme, unselectedIconTheme: $unselectedIconTheme, selectedItemColor: $selectedItemColor, unselectedItemColor: $unselectedItemColor, selectedLabelStyle: $selectedLabelStyle, unselectedLabelStyle: $unselectedLabelStyle, showSelectedLabels: $showSelectedLabels, showUnselectedLabels: $showUnselectedLabels, type: $type, enableFeedback: $enableFeedback, landscapeLayout: $landscapeLayout)'; + } } /// @nodoc -abstract class $StacBottomNavBarThemeDataCopyWith<$Res> { +abstract mixin class $StacBottomNavBarThemeDataCopyWith<$Res> { factory $StacBottomNavBarThemeDataCopyWith(StacBottomNavBarThemeData value, - $Res Function(StacBottomNavBarThemeData) then) = - _$StacBottomNavBarThemeDataCopyWithImpl<$Res, StacBottomNavBarThemeData>; + $Res Function(StacBottomNavBarThemeData) _then) = + _$StacBottomNavBarThemeDataCopyWithImpl; @useResult $Res call( {String? backgroundColor, @@ -76,15 +124,12 @@ abstract class $StacBottomNavBarThemeDataCopyWith<$Res> { } /// @nodoc -class _$StacBottomNavBarThemeDataCopyWithImpl<$Res, - $Val extends StacBottomNavBarThemeData> +class _$StacBottomNavBarThemeDataCopyWithImpl<$Res> implements $StacBottomNavBarThemeDataCopyWith<$Res> { - _$StacBottomNavBarThemeDataCopyWithImpl(this._value, this._then); + _$StacBottomNavBarThemeDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacBottomNavBarThemeData _self; + final $Res Function(StacBottomNavBarThemeData) _then; /// Create a copy of StacBottomNavBarThemeData /// with the given fields replaced by the non-null parameter values. @@ -105,60 +150,60 @@ class _$StacBottomNavBarThemeDataCopyWithImpl<$Res, Object? enableFeedback = freezed, Object? landscapeLayout = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, selectedIconTheme: freezed == selectedIconTheme - ? _value.selectedIconTheme + ? _self.selectedIconTheme : selectedIconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, unselectedIconTheme: freezed == unselectedIconTheme - ? _value.unselectedIconTheme + ? _self.unselectedIconTheme : unselectedIconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, selectedItemColor: freezed == selectedItemColor - ? _value.selectedItemColor + ? _self.selectedItemColor : selectedItemColor // ignore: cast_nullable_to_non_nullable as String?, unselectedItemColor: freezed == unselectedItemColor - ? _value.unselectedItemColor + ? _self.unselectedItemColor : unselectedItemColor // ignore: cast_nullable_to_non_nullable as String?, selectedLabelStyle: freezed == selectedLabelStyle - ? _value.selectedLabelStyle + ? _self.selectedLabelStyle : selectedLabelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, unselectedLabelStyle: freezed == unselectedLabelStyle - ? _value.unselectedLabelStyle + ? _self.unselectedLabelStyle : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, showSelectedLabels: freezed == showSelectedLabels - ? _value.showSelectedLabels + ? _self.showSelectedLabels : showSelectedLabels // ignore: cast_nullable_to_non_nullable as bool?, showUnselectedLabels: freezed == showUnselectedLabels - ? _value.showUnselectedLabels + ? _self.showUnselectedLabels : showUnselectedLabels // ignore: cast_nullable_to_non_nullable as bool?, type: freezed == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as BottomNavigationBarType?, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, landscapeLayout: freezed == landscapeLayout - ? _value.landscapeLayout + ? _self.landscapeLayout : landscapeLayout // ignore: cast_nullable_to_non_nullable as BottomNavigationBarLandscapeLayout?, - ) as $Val); + )); } /// Create a copy of StacBottomNavBarThemeData @@ -166,12 +211,12 @@ class _$StacBottomNavBarThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get selectedIconTheme { - if (_value.selectedIconTheme == null) { + if (_self.selectedIconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.selectedIconTheme!, (value) { - return _then(_value.copyWith(selectedIconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.selectedIconTheme!, (value) { + return _then(_self.copyWith(selectedIconTheme: value)); }); } @@ -180,13 +225,13 @@ class _$StacBottomNavBarThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get unselectedIconTheme { - if (_value.unselectedIconTheme == null) { + if (_self.unselectedIconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.unselectedIconTheme!, + return $StacIconThemeDataCopyWith<$Res>(_self.unselectedIconTheme!, (value) { - return _then(_value.copyWith(unselectedIconTheme: value) as $Val); + return _then(_self.copyWith(unselectedIconTheme: value)); }); } @@ -195,12 +240,12 @@ class _$StacBottomNavBarThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get selectedLabelStyle { - if (_value.selectedLabelStyle == null) { + if (_self.selectedLabelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.selectedLabelStyle!, (value) { - return _then(_value.copyWith(selectedLabelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.selectedLabelStyle!, (value) { + return _then(_self.copyWith(selectedLabelStyle: value)); }); } @@ -209,140 +254,20 @@ class _$StacBottomNavBarThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle { - if (_value.unselectedLabelStyle == null) { + if (_self.unselectedLabelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.unselectedLabelStyle!, (value) { - return _then(_value.copyWith(unselectedLabelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.unselectedLabelStyle!, (value) { + return _then(_self.copyWith(unselectedLabelStyle: value)); }); } } -/// @nodoc -abstract class _$$StacBottomNavBarThemeDataImplCopyWith<$Res> - implements $StacBottomNavBarThemeDataCopyWith<$Res> { - factory _$$StacBottomNavBarThemeDataImplCopyWith( - _$StacBottomNavBarThemeDataImpl value, - $Res Function(_$StacBottomNavBarThemeDataImpl) then) = - __$$StacBottomNavBarThemeDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? backgroundColor, - double? elevation, - StacIconThemeData? selectedIconTheme, - StacIconThemeData? unselectedIconTheme, - String? selectedItemColor, - String? unselectedItemColor, - StacTextStyle? selectedLabelStyle, - StacTextStyle? unselectedLabelStyle, - bool? showSelectedLabels, - bool? showUnselectedLabels, - BottomNavigationBarType? type, - bool? enableFeedback, - BottomNavigationBarLandscapeLayout? landscapeLayout}); - - @override - $StacIconThemeDataCopyWith<$Res>? get selectedIconTheme; - @override - $StacIconThemeDataCopyWith<$Res>? get unselectedIconTheme; - @override - $StacTextStyleCopyWith<$Res>? get selectedLabelStyle; - @override - $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle; -} - -/// @nodoc -class __$$StacBottomNavBarThemeDataImplCopyWithImpl<$Res> - extends _$StacBottomNavBarThemeDataCopyWithImpl<$Res, - _$StacBottomNavBarThemeDataImpl> - implements _$$StacBottomNavBarThemeDataImplCopyWith<$Res> { - __$$StacBottomNavBarThemeDataImplCopyWithImpl( - _$StacBottomNavBarThemeDataImpl _value, - $Res Function(_$StacBottomNavBarThemeDataImpl) _then) - : super(_value, _then); - - /// Create a copy of StacBottomNavBarThemeData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? backgroundColor = freezed, - Object? elevation = freezed, - Object? selectedIconTheme = freezed, - Object? unselectedIconTheme = freezed, - Object? selectedItemColor = freezed, - Object? unselectedItemColor = freezed, - Object? selectedLabelStyle = freezed, - Object? unselectedLabelStyle = freezed, - Object? showSelectedLabels = freezed, - Object? showUnselectedLabels = freezed, - Object? type = freezed, - Object? enableFeedback = freezed, - Object? landscapeLayout = freezed, - }) { - return _then(_$StacBottomNavBarThemeDataImpl( - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - selectedIconTheme: freezed == selectedIconTheme - ? _value.selectedIconTheme - : selectedIconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - unselectedIconTheme: freezed == unselectedIconTheme - ? _value.unselectedIconTheme - : unselectedIconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - selectedItemColor: freezed == selectedItemColor - ? _value.selectedItemColor - : selectedItemColor // ignore: cast_nullable_to_non_nullable - as String?, - unselectedItemColor: freezed == unselectedItemColor - ? _value.unselectedItemColor - : unselectedItemColor // ignore: cast_nullable_to_non_nullable - as String?, - selectedLabelStyle: freezed == selectedLabelStyle - ? _value.selectedLabelStyle - : selectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - unselectedLabelStyle: freezed == unselectedLabelStyle - ? _value.unselectedLabelStyle - : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - showSelectedLabels: freezed == showSelectedLabels - ? _value.showSelectedLabels - : showSelectedLabels // ignore: cast_nullable_to_non_nullable - as bool?, - showUnselectedLabels: freezed == showUnselectedLabels - ? _value.showUnselectedLabels - : showUnselectedLabels // ignore: cast_nullable_to_non_nullable - as bool?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as BottomNavigationBarType?, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - landscapeLayout: freezed == landscapeLayout - ? _value.landscapeLayout - : landscapeLayout // ignore: cast_nullable_to_non_nullable - as BottomNavigationBarLandscapeLayout?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacBottomNavBarThemeDataImpl implements _StacBottomNavBarThemeData { - const _$StacBottomNavBarThemeDataImpl( +class _StacBottomNavBarThemeData implements StacBottomNavBarThemeData { + const _StacBottomNavBarThemeData( {this.backgroundColor, this.elevation, this.selectedIconTheme, @@ -356,9 +281,8 @@ class _$StacBottomNavBarThemeDataImpl implements _StacBottomNavBarThemeData { this.type, this.enableFeedback, this.landscapeLayout}); - - factory _$StacBottomNavBarThemeDataImpl.fromJson(Map json) => - _$$StacBottomNavBarThemeDataImplFromJson(json); + factory _StacBottomNavBarThemeData.fromJson(Map json) => + _$StacBottomNavBarThemeDataFromJson(json); @override final String? backgroundColor; @@ -387,16 +311,28 @@ class _$StacBottomNavBarThemeDataImpl implements _StacBottomNavBarThemeData { @override final BottomNavigationBarLandscapeLayout? landscapeLayout; + /// Create a copy of StacBottomNavBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBottomNavBarThemeData(backgroundColor: $backgroundColor, elevation: $elevation, selectedIconTheme: $selectedIconTheme, unselectedIconTheme: $unselectedIconTheme, selectedItemColor: $selectedItemColor, unselectedItemColor: $unselectedItemColor, selectedLabelStyle: $selectedLabelStyle, unselectedLabelStyle: $unselectedLabelStyle, showSelectedLabels: $showSelectedLabels, showUnselectedLabels: $showUnselectedLabels, type: $type, enableFeedback: $enableFeedback, landscapeLayout: $landscapeLayout)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBottomNavBarThemeDataCopyWith<_StacBottomNavBarThemeData> + get copyWith => + __$StacBottomNavBarThemeDataCopyWithImpl<_StacBottomNavBarThemeData>( + this, _$identity); + + @override + Map toJson() { + return _$StacBottomNavBarThemeDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBottomNavBarThemeDataImpl && + other is _StacBottomNavBarThemeData && (identical(other.backgroundColor, backgroundColor) || other.backgroundColor == backgroundColor) && (identical(other.elevation, elevation) || @@ -442,74 +378,184 @@ class _$StacBottomNavBarThemeDataImpl implements _StacBottomNavBarThemeData { enableFeedback, landscapeLayout); - /// Create a copy of StacBottomNavBarThemeData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacBottomNavBarThemeDataImplCopyWith<_$StacBottomNavBarThemeDataImpl> - get copyWith => __$$StacBottomNavBarThemeDataImplCopyWithImpl< - _$StacBottomNavBarThemeDataImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacBottomNavBarThemeDataImplToJson( - this, - ); + String toString() { + return 'StacBottomNavBarThemeData(backgroundColor: $backgroundColor, elevation: $elevation, selectedIconTheme: $selectedIconTheme, unselectedIconTheme: $unselectedIconTheme, selectedItemColor: $selectedItemColor, unselectedItemColor: $unselectedItemColor, selectedLabelStyle: $selectedLabelStyle, unselectedLabelStyle: $unselectedLabelStyle, showSelectedLabels: $showSelectedLabels, showUnselectedLabels: $showUnselectedLabels, type: $type, enableFeedback: $enableFeedback, landscapeLayout: $landscapeLayout)'; } } -abstract class _StacBottomNavBarThemeData implements StacBottomNavBarThemeData { - const factory _StacBottomNavBarThemeData( - {final String? backgroundColor, - final double? elevation, - final StacIconThemeData? selectedIconTheme, - final StacIconThemeData? unselectedIconTheme, - final String? selectedItemColor, - final String? unselectedItemColor, - final StacTextStyle? selectedLabelStyle, - final StacTextStyle? unselectedLabelStyle, - final bool? showSelectedLabels, - final bool? showUnselectedLabels, - final BottomNavigationBarType? type, - final bool? enableFeedback, - final BottomNavigationBarLandscapeLayout? landscapeLayout}) = - _$StacBottomNavBarThemeDataImpl; - - factory _StacBottomNavBarThemeData.fromJson(Map json) = - _$StacBottomNavBarThemeDataImpl.fromJson; - - @override - String? get backgroundColor; - @override - double? get elevation; - @override - StacIconThemeData? get selectedIconTheme; - @override - StacIconThemeData? get unselectedIconTheme; +/// @nodoc +abstract mixin class _$StacBottomNavBarThemeDataCopyWith<$Res> + implements $StacBottomNavBarThemeDataCopyWith<$Res> { + factory _$StacBottomNavBarThemeDataCopyWith(_StacBottomNavBarThemeData value, + $Res Function(_StacBottomNavBarThemeData) _then) = + __$StacBottomNavBarThemeDataCopyWithImpl; @override - String? get selectedItemColor; + @useResult + $Res call( + {String? backgroundColor, + double? elevation, + StacIconThemeData? selectedIconTheme, + StacIconThemeData? unselectedIconTheme, + String? selectedItemColor, + String? unselectedItemColor, + StacTextStyle? selectedLabelStyle, + StacTextStyle? unselectedLabelStyle, + bool? showSelectedLabels, + bool? showUnselectedLabels, + BottomNavigationBarType? type, + bool? enableFeedback, + BottomNavigationBarLandscapeLayout? landscapeLayout}); + @override - String? get unselectedItemColor; + $StacIconThemeDataCopyWith<$Res>? get selectedIconTheme; @override - StacTextStyle? get selectedLabelStyle; + $StacIconThemeDataCopyWith<$Res>? get unselectedIconTheme; @override - StacTextStyle? get unselectedLabelStyle; + $StacTextStyleCopyWith<$Res>? get selectedLabelStyle; @override - bool? get showSelectedLabels; + $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle; +} + +/// @nodoc +class __$StacBottomNavBarThemeDataCopyWithImpl<$Res> + implements _$StacBottomNavBarThemeDataCopyWith<$Res> { + __$StacBottomNavBarThemeDataCopyWithImpl(this._self, this._then); + + final _StacBottomNavBarThemeData _self; + final $Res Function(_StacBottomNavBarThemeData) _then; + + /// Create a copy of StacBottomNavBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - bool? get showUnselectedLabels; + @pragma('vm:prefer-inline') + $Res call({ + Object? backgroundColor = freezed, + Object? elevation = freezed, + Object? selectedIconTheme = freezed, + Object? unselectedIconTheme = freezed, + Object? selectedItemColor = freezed, + Object? unselectedItemColor = freezed, + Object? selectedLabelStyle = freezed, + Object? unselectedLabelStyle = freezed, + Object? showSelectedLabels = freezed, + Object? showUnselectedLabels = freezed, + Object? type = freezed, + Object? enableFeedback = freezed, + Object? landscapeLayout = freezed, + }) { + return _then(_StacBottomNavBarThemeData( + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + selectedIconTheme: freezed == selectedIconTheme + ? _self.selectedIconTheme + : selectedIconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + unselectedIconTheme: freezed == unselectedIconTheme + ? _self.unselectedIconTheme + : unselectedIconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + selectedItemColor: freezed == selectedItemColor + ? _self.selectedItemColor + : selectedItemColor // ignore: cast_nullable_to_non_nullable + as String?, + unselectedItemColor: freezed == unselectedItemColor + ? _self.unselectedItemColor + : unselectedItemColor // ignore: cast_nullable_to_non_nullable + as String?, + selectedLabelStyle: freezed == selectedLabelStyle + ? _self.selectedLabelStyle + : selectedLabelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + unselectedLabelStyle: freezed == unselectedLabelStyle + ? _self.unselectedLabelStyle + : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + showSelectedLabels: freezed == showSelectedLabels + ? _self.showSelectedLabels + : showSelectedLabels // ignore: cast_nullable_to_non_nullable + as bool?, + showUnselectedLabels: freezed == showUnselectedLabels + ? _self.showUnselectedLabels + : showUnselectedLabels // ignore: cast_nullable_to_non_nullable + as bool?, + type: freezed == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as BottomNavigationBarType?, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + landscapeLayout: freezed == landscapeLayout + ? _self.landscapeLayout + : landscapeLayout // ignore: cast_nullable_to_non_nullable + as BottomNavigationBarLandscapeLayout?, + )); + } + + /// Create a copy of StacBottomNavBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - BottomNavigationBarType? get type; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get selectedIconTheme { + if (_self.selectedIconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.selectedIconTheme!, (value) { + return _then(_self.copyWith(selectedIconTheme: value)); + }); + } + + /// Create a copy of StacBottomNavBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - bool? get enableFeedback; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get unselectedIconTheme { + if (_self.unselectedIconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.unselectedIconTheme!, + (value) { + return _then(_self.copyWith(unselectedIconTheme: value)); + }); + } + + /// Create a copy of StacBottomNavBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - BottomNavigationBarLandscapeLayout? get landscapeLayout; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get selectedLabelStyle { + if (_self.selectedLabelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.selectedLabelStyle!, (value) { + return _then(_self.copyWith(selectedLabelStyle: value)); + }); + } /// Create a copy of StacBottomNavBarThemeData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBottomNavBarThemeDataImplCopyWith<_$StacBottomNavBarThemeDataImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle { + if (_self.unselectedLabelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.unselectedLabelStyle!, (value) { + return _then(_self.copyWith(unselectedLabelStyle: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.g.dart b/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.g.dart index d3b04043..6b0ef88d 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.g.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_nav_bar_theme/stac_bottom_nav_bar_theme.g.dart @@ -6,9 +6,9 @@ part of 'stac_bottom_nav_bar_theme.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBottomNavBarThemeDataImpl _$$StacBottomNavBarThemeDataImplFromJson( +_StacBottomNavBarThemeData _$StacBottomNavBarThemeDataFromJson( Map json) => - _$StacBottomNavBarThemeDataImpl( + _StacBottomNavBarThemeData( backgroundColor: json['backgroundColor'] as String?, elevation: (json['elevation'] as num?)?.toDouble(), selectedIconTheme: json['selectedIconTheme'] == null @@ -35,8 +35,8 @@ _$StacBottomNavBarThemeDataImpl _$$StacBottomNavBarThemeDataImplFromJson( _$BottomNavigationBarLandscapeLayoutEnumMap, json['landscapeLayout']), ); -Map _$$StacBottomNavBarThemeDataImplToJson( - _$StacBottomNavBarThemeDataImpl instance) => +Map _$StacBottomNavBarThemeDataToJson( + _StacBottomNavBarThemeData instance) => { 'backgroundColor': instance.backgroundColor, 'elevation': instance.elevation, diff --git a/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.dart b/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.dart index 70d59a82..def175fc 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.dart @@ -9,7 +9,7 @@ part 'stac_bottom_navigation_bar.freezed.dart'; part 'stac_bottom_navigation_bar.g.dart'; @freezed -class StacBottomNavigationBar with _$StacBottomNavigationBar { +abstract class StacBottomNavigationBar with _$StacBottomNavigationBar { const factory StacBottomNavigationBar({ required List items, double? elevation, diff --git a/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.freezed.dart b/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.freezed.dart index cdfae2ca..afc7fea3 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,53 +10,110 @@ part of 'stac_bottom_navigation_bar.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBottomNavigationBar _$StacBottomNavigationBarFromJson( - Map json) { - return _StacBottomNavigationBar.fromJson(json); -} - /// @nodoc mixin _$StacBottomNavigationBar { - List get items => - throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - BottomNavigationBarType? get bottomNavigationBarType => - throw _privateConstructorUsedError; - String? get fixedColor => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - double get iconSize => throw _privateConstructorUsedError; - String? get selectedItemColor => throw _privateConstructorUsedError; - String? get unselectedItemColor => throw _privateConstructorUsedError; - double get selectedFontSize => throw _privateConstructorUsedError; - double get unselectedFontSize => throw _privateConstructorUsedError; - StacTextStyle? get selectedLabelStyle => throw _privateConstructorUsedError; - StacTextStyle? get unselectedLabelStyle => throw _privateConstructorUsedError; - bool? get showSelectedLabels => throw _privateConstructorUsedError; - bool? get showUnselectedLabels => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - BottomNavigationBarLandscapeLayout? get landscapeLayout => - throw _privateConstructorUsedError; - - /// Serializes this StacBottomNavigationBar to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List get items; + double? get elevation; + BottomNavigationBarType? get bottomNavigationBarType; + String? get fixedColor; + String? get backgroundColor; + double get iconSize; + String? get selectedItemColor; + String? get unselectedItemColor; + double get selectedFontSize; + double get unselectedFontSize; + StacTextStyle? get selectedLabelStyle; + StacTextStyle? get unselectedLabelStyle; + bool? get showSelectedLabels; + bool? get showUnselectedLabels; + bool? get enableFeedback; + BottomNavigationBarLandscapeLayout? get landscapeLayout; /// Create a copy of StacBottomNavigationBar /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBottomNavigationBarCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacBottomNavigationBarCopyWithImpl( + this as StacBottomNavigationBar, _$identity); + + /// Serializes this StacBottomNavigationBar to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBottomNavigationBar && + const DeepCollectionEquality().equals(other.items, items) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical( + other.bottomNavigationBarType, bottomNavigationBarType) || + other.bottomNavigationBarType == bottomNavigationBarType) && + (identical(other.fixedColor, fixedColor) || + other.fixedColor == fixedColor) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.iconSize, iconSize) || + other.iconSize == iconSize) && + (identical(other.selectedItemColor, selectedItemColor) || + other.selectedItemColor == selectedItemColor) && + (identical(other.unselectedItemColor, unselectedItemColor) || + other.unselectedItemColor == unselectedItemColor) && + (identical(other.selectedFontSize, selectedFontSize) || + other.selectedFontSize == selectedFontSize) && + (identical(other.unselectedFontSize, unselectedFontSize) || + other.unselectedFontSize == unselectedFontSize) && + (identical(other.selectedLabelStyle, selectedLabelStyle) || + other.selectedLabelStyle == selectedLabelStyle) && + (identical(other.unselectedLabelStyle, unselectedLabelStyle) || + other.unselectedLabelStyle == unselectedLabelStyle) && + (identical(other.showSelectedLabels, showSelectedLabels) || + other.showSelectedLabels == showSelectedLabels) && + (identical(other.showUnselectedLabels, showUnselectedLabels) || + other.showUnselectedLabels == showUnselectedLabels) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.landscapeLayout, landscapeLayout) || + other.landscapeLayout == landscapeLayout)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(items), + elevation, + bottomNavigationBarType, + fixedColor, + backgroundColor, + iconSize, + selectedItemColor, + unselectedItemColor, + selectedFontSize, + unselectedFontSize, + selectedLabelStyle, + unselectedLabelStyle, + showSelectedLabels, + showUnselectedLabels, + enableFeedback, + landscapeLayout); + + @override + String toString() { + return 'StacBottomNavigationBar(items: $items, elevation: $elevation, bottomNavigationBarType: $bottomNavigationBarType, fixedColor: $fixedColor, backgroundColor: $backgroundColor, iconSize: $iconSize, selectedItemColor: $selectedItemColor, unselectedItemColor: $unselectedItemColor, selectedFontSize: $selectedFontSize, unselectedFontSize: $unselectedFontSize, selectedLabelStyle: $selectedLabelStyle, unselectedLabelStyle: $unselectedLabelStyle, showSelectedLabels: $showSelectedLabels, showUnselectedLabels: $showUnselectedLabels, enableFeedback: $enableFeedback, landscapeLayout: $landscapeLayout)'; + } } /// @nodoc -abstract class $StacBottomNavigationBarCopyWith<$Res> { +abstract mixin class $StacBottomNavigationBarCopyWith<$Res> { factory $StacBottomNavigationBarCopyWith(StacBottomNavigationBar value, - $Res Function(StacBottomNavigationBar) then) = - _$StacBottomNavigationBarCopyWithImpl<$Res, StacBottomNavigationBar>; + $Res Function(StacBottomNavigationBar) _then) = + _$StacBottomNavigationBarCopyWithImpl; @useResult $Res call( {List items, @@ -80,15 +138,12 @@ abstract class $StacBottomNavigationBarCopyWith<$Res> { } /// @nodoc -class _$StacBottomNavigationBarCopyWithImpl<$Res, - $Val extends StacBottomNavigationBar> +class _$StacBottomNavigationBarCopyWithImpl<$Res> implements $StacBottomNavigationBarCopyWith<$Res> { - _$StacBottomNavigationBarCopyWithImpl(this._value, this._then); + _$StacBottomNavigationBarCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacBottomNavigationBar _self; + final $Res Function(StacBottomNavigationBar) _then; /// Create a copy of StacBottomNavigationBar /// with the given fields replaced by the non-null parameter values. @@ -112,72 +167,72 @@ class _$StacBottomNavigationBarCopyWithImpl<$Res, Object? enableFeedback = freezed, Object? landscapeLayout = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( items: null == items - ? _value.items + ? _self.items : items // ignore: cast_nullable_to_non_nullable as List, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, bottomNavigationBarType: freezed == bottomNavigationBarType - ? _value.bottomNavigationBarType + ? _self.bottomNavigationBarType : bottomNavigationBarType // ignore: cast_nullable_to_non_nullable as BottomNavigationBarType?, fixedColor: freezed == fixedColor - ? _value.fixedColor + ? _self.fixedColor : fixedColor // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, iconSize: null == iconSize - ? _value.iconSize + ? _self.iconSize : iconSize // ignore: cast_nullable_to_non_nullable as double, selectedItemColor: freezed == selectedItemColor - ? _value.selectedItemColor + ? _self.selectedItemColor : selectedItemColor // ignore: cast_nullable_to_non_nullable as String?, unselectedItemColor: freezed == unselectedItemColor - ? _value.unselectedItemColor + ? _self.unselectedItemColor : unselectedItemColor // ignore: cast_nullable_to_non_nullable as String?, selectedFontSize: null == selectedFontSize - ? _value.selectedFontSize + ? _self.selectedFontSize : selectedFontSize // ignore: cast_nullable_to_non_nullable as double, unselectedFontSize: null == unselectedFontSize - ? _value.unselectedFontSize + ? _self.unselectedFontSize : unselectedFontSize // ignore: cast_nullable_to_non_nullable as double, selectedLabelStyle: freezed == selectedLabelStyle - ? _value.selectedLabelStyle + ? _self.selectedLabelStyle : selectedLabelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, unselectedLabelStyle: freezed == unselectedLabelStyle - ? _value.unselectedLabelStyle + ? _self.unselectedLabelStyle : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, showSelectedLabels: freezed == showSelectedLabels - ? _value.showSelectedLabels + ? _self.showSelectedLabels : showSelectedLabels // ignore: cast_nullable_to_non_nullable as bool?, showUnselectedLabels: freezed == showUnselectedLabels - ? _value.showUnselectedLabels + ? _self.showUnselectedLabels : showUnselectedLabels // ignore: cast_nullable_to_non_nullable as bool?, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, landscapeLayout: freezed == landscapeLayout - ? _value.landscapeLayout + ? _self.landscapeLayout : landscapeLayout // ignore: cast_nullable_to_non_nullable as BottomNavigationBarLandscapeLayout?, - ) as $Val); + )); } /// Create a copy of StacBottomNavigationBar @@ -185,12 +240,12 @@ class _$StacBottomNavigationBarCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get selectedLabelStyle { - if (_value.selectedLabelStyle == null) { + if (_self.selectedLabelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.selectedLabelStyle!, (value) { - return _then(_value.copyWith(selectedLabelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.selectedLabelStyle!, (value) { + return _then(_self.copyWith(selectedLabelStyle: value)); }); } @@ -199,154 +254,20 @@ class _$StacBottomNavigationBarCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle { - if (_value.unselectedLabelStyle == null) { + if (_self.unselectedLabelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.unselectedLabelStyle!, (value) { - return _then(_value.copyWith(unselectedLabelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.unselectedLabelStyle!, (value) { + return _then(_self.copyWith(unselectedLabelStyle: value)); }); } } -/// @nodoc -abstract class _$$StacBottomNavigationBarImplCopyWith<$Res> - implements $StacBottomNavigationBarCopyWith<$Res> { - factory _$$StacBottomNavigationBarImplCopyWith( - _$StacBottomNavigationBarImpl value, - $Res Function(_$StacBottomNavigationBarImpl) then) = - __$$StacBottomNavigationBarImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {List items, - double? elevation, - BottomNavigationBarType? bottomNavigationBarType, - String? fixedColor, - String? backgroundColor, - double iconSize, - String? selectedItemColor, - String? unselectedItemColor, - double selectedFontSize, - double unselectedFontSize, - StacTextStyle? selectedLabelStyle, - StacTextStyle? unselectedLabelStyle, - bool? showSelectedLabels, - bool? showUnselectedLabels, - bool? enableFeedback, - BottomNavigationBarLandscapeLayout? landscapeLayout}); - - @override - $StacTextStyleCopyWith<$Res>? get selectedLabelStyle; - @override - $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle; -} - -/// @nodoc -class __$$StacBottomNavigationBarImplCopyWithImpl<$Res> - extends _$StacBottomNavigationBarCopyWithImpl<$Res, - _$StacBottomNavigationBarImpl> - implements _$$StacBottomNavigationBarImplCopyWith<$Res> { - __$$StacBottomNavigationBarImplCopyWithImpl( - _$StacBottomNavigationBarImpl _value, - $Res Function(_$StacBottomNavigationBarImpl) _then) - : super(_value, _then); - - /// Create a copy of StacBottomNavigationBar - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? items = null, - Object? elevation = freezed, - Object? bottomNavigationBarType = freezed, - Object? fixedColor = freezed, - Object? backgroundColor = freezed, - Object? iconSize = null, - Object? selectedItemColor = freezed, - Object? unselectedItemColor = freezed, - Object? selectedFontSize = null, - Object? unselectedFontSize = null, - Object? selectedLabelStyle = freezed, - Object? unselectedLabelStyle = freezed, - Object? showSelectedLabels = freezed, - Object? showUnselectedLabels = freezed, - Object? enableFeedback = freezed, - Object? landscapeLayout = freezed, - }) { - return _then(_$StacBottomNavigationBarImpl( - items: null == items - ? _value._items - : items // ignore: cast_nullable_to_non_nullable - as List, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - bottomNavigationBarType: freezed == bottomNavigationBarType - ? _value.bottomNavigationBarType - : bottomNavigationBarType // ignore: cast_nullable_to_non_nullable - as BottomNavigationBarType?, - fixedColor: freezed == fixedColor - ? _value.fixedColor - : fixedColor // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - iconSize: null == iconSize - ? _value.iconSize - : iconSize // ignore: cast_nullable_to_non_nullable - as double, - selectedItemColor: freezed == selectedItemColor - ? _value.selectedItemColor - : selectedItemColor // ignore: cast_nullable_to_non_nullable - as String?, - unselectedItemColor: freezed == unselectedItemColor - ? _value.unselectedItemColor - : unselectedItemColor // ignore: cast_nullable_to_non_nullable - as String?, - selectedFontSize: null == selectedFontSize - ? _value.selectedFontSize - : selectedFontSize // ignore: cast_nullable_to_non_nullable - as double, - unselectedFontSize: null == unselectedFontSize - ? _value.unselectedFontSize - : unselectedFontSize // ignore: cast_nullable_to_non_nullable - as double, - selectedLabelStyle: freezed == selectedLabelStyle - ? _value.selectedLabelStyle - : selectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - unselectedLabelStyle: freezed == unselectedLabelStyle - ? _value.unselectedLabelStyle - : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - showSelectedLabels: freezed == showSelectedLabels - ? _value.showSelectedLabels - : showSelectedLabels // ignore: cast_nullable_to_non_nullable - as bool?, - showUnselectedLabels: freezed == showUnselectedLabels - ? _value.showUnselectedLabels - : showUnselectedLabels // ignore: cast_nullable_to_non_nullable - as bool?, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - landscapeLayout: freezed == landscapeLayout - ? _value.landscapeLayout - : landscapeLayout // ignore: cast_nullable_to_non_nullable - as BottomNavigationBarLandscapeLayout?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacBottomNavigationBarImpl implements _StacBottomNavigationBar { - const _$StacBottomNavigationBarImpl( +class _StacBottomNavigationBar implements StacBottomNavigationBar { + const _StacBottomNavigationBar( {required final List items, this.elevation, this.bottomNavigationBarType, @@ -364,9 +285,8 @@ class _$StacBottomNavigationBarImpl implements _StacBottomNavigationBar { this.enableFeedback, this.landscapeLayout}) : _items = items; - - factory _$StacBottomNavigationBarImpl.fromJson(Map json) => - _$$StacBottomNavigationBarImplFromJson(json); + factory _StacBottomNavigationBar.fromJson(Map json) => + _$StacBottomNavigationBarFromJson(json); final List _items; @override @@ -410,16 +330,27 @@ class _$StacBottomNavigationBarImpl implements _StacBottomNavigationBar { @override final BottomNavigationBarLandscapeLayout? landscapeLayout; + /// Create a copy of StacBottomNavigationBar + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBottomNavigationBar(items: $items, elevation: $elevation, bottomNavigationBarType: $bottomNavigationBarType, fixedColor: $fixedColor, backgroundColor: $backgroundColor, iconSize: $iconSize, selectedItemColor: $selectedItemColor, unselectedItemColor: $unselectedItemColor, selectedFontSize: $selectedFontSize, unselectedFontSize: $unselectedFontSize, selectedLabelStyle: $selectedLabelStyle, unselectedLabelStyle: $unselectedLabelStyle, showSelectedLabels: $showSelectedLabels, showUnselectedLabels: $showUnselectedLabels, enableFeedback: $enableFeedback, landscapeLayout: $landscapeLayout)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBottomNavigationBarCopyWith<_StacBottomNavigationBar> get copyWith => + __$StacBottomNavigationBarCopyWithImpl<_StacBottomNavigationBar>( + this, _$identity); + + @override + Map toJson() { + return _$StacBottomNavigationBarToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBottomNavigationBarImpl && + other is _StacBottomNavigationBar && const DeepCollectionEquality().equals(other._items, _items) && (identical(other.elevation, elevation) || other.elevation == elevation) && @@ -475,83 +406,169 @@ class _$StacBottomNavigationBarImpl implements _StacBottomNavigationBar { enableFeedback, landscapeLayout); - /// Create a copy of StacBottomNavigationBar - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacBottomNavigationBarImplCopyWith<_$StacBottomNavigationBarImpl> - get copyWith => __$$StacBottomNavigationBarImplCopyWithImpl< - _$StacBottomNavigationBarImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacBottomNavigationBarImplToJson( - this, - ); + String toString() { + return 'StacBottomNavigationBar(items: $items, elevation: $elevation, bottomNavigationBarType: $bottomNavigationBarType, fixedColor: $fixedColor, backgroundColor: $backgroundColor, iconSize: $iconSize, selectedItemColor: $selectedItemColor, unselectedItemColor: $unselectedItemColor, selectedFontSize: $selectedFontSize, unselectedFontSize: $unselectedFontSize, selectedLabelStyle: $selectedLabelStyle, unselectedLabelStyle: $unselectedLabelStyle, showSelectedLabels: $showSelectedLabels, showUnselectedLabels: $showUnselectedLabels, enableFeedback: $enableFeedback, landscapeLayout: $landscapeLayout)'; } } -abstract class _StacBottomNavigationBar implements StacBottomNavigationBar { - const factory _StacBottomNavigationBar( - {required final List items, - final double? elevation, - final BottomNavigationBarType? bottomNavigationBarType, - final String? fixedColor, - final String? backgroundColor, - final double iconSize, - final String? selectedItemColor, - final String? unselectedItemColor, - final double selectedFontSize, - final double unselectedFontSize, - final StacTextStyle? selectedLabelStyle, - final StacTextStyle? unselectedLabelStyle, - final bool? showSelectedLabels, - final bool? showUnselectedLabels, - final bool? enableFeedback, - final BottomNavigationBarLandscapeLayout? landscapeLayout}) = - _$StacBottomNavigationBarImpl; - - factory _StacBottomNavigationBar.fromJson(Map json) = - _$StacBottomNavigationBarImpl.fromJson; - - @override - List get items; - @override - double? get elevation; - @override - BottomNavigationBarType? get bottomNavigationBarType; - @override - String? get fixedColor; - @override - String? get backgroundColor; - @override - double get iconSize; - @override - String? get selectedItemColor; - @override - String? get unselectedItemColor; - @override - double get selectedFontSize; - @override - double get unselectedFontSize; - @override - StacTextStyle? get selectedLabelStyle; +/// @nodoc +abstract mixin class _$StacBottomNavigationBarCopyWith<$Res> + implements $StacBottomNavigationBarCopyWith<$Res> { + factory _$StacBottomNavigationBarCopyWith(_StacBottomNavigationBar value, + $Res Function(_StacBottomNavigationBar) _then) = + __$StacBottomNavigationBarCopyWithImpl; @override - StacTextStyle? get unselectedLabelStyle; + @useResult + $Res call( + {List items, + double? elevation, + BottomNavigationBarType? bottomNavigationBarType, + String? fixedColor, + String? backgroundColor, + double iconSize, + String? selectedItemColor, + String? unselectedItemColor, + double selectedFontSize, + double unselectedFontSize, + StacTextStyle? selectedLabelStyle, + StacTextStyle? unselectedLabelStyle, + bool? showSelectedLabels, + bool? showUnselectedLabels, + bool? enableFeedback, + BottomNavigationBarLandscapeLayout? landscapeLayout}); + @override - bool? get showSelectedLabels; + $StacTextStyleCopyWith<$Res>? get selectedLabelStyle; @override - bool? get showUnselectedLabels; + $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle; +} + +/// @nodoc +class __$StacBottomNavigationBarCopyWithImpl<$Res> + implements _$StacBottomNavigationBarCopyWith<$Res> { + __$StacBottomNavigationBarCopyWithImpl(this._self, this._then); + + final _StacBottomNavigationBar _self; + final $Res Function(_StacBottomNavigationBar) _then; + + /// Create a copy of StacBottomNavigationBar + /// with the given fields replaced by the non-null parameter values. @override - bool? get enableFeedback; + @pragma('vm:prefer-inline') + $Res call({ + Object? items = null, + Object? elevation = freezed, + Object? bottomNavigationBarType = freezed, + Object? fixedColor = freezed, + Object? backgroundColor = freezed, + Object? iconSize = null, + Object? selectedItemColor = freezed, + Object? unselectedItemColor = freezed, + Object? selectedFontSize = null, + Object? unselectedFontSize = null, + Object? selectedLabelStyle = freezed, + Object? unselectedLabelStyle = freezed, + Object? showSelectedLabels = freezed, + Object? showUnselectedLabels = freezed, + Object? enableFeedback = freezed, + Object? landscapeLayout = freezed, + }) { + return _then(_StacBottomNavigationBar( + items: null == items + ? _self._items + : items // ignore: cast_nullable_to_non_nullable + as List, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + bottomNavigationBarType: freezed == bottomNavigationBarType + ? _self.bottomNavigationBarType + : bottomNavigationBarType // ignore: cast_nullable_to_non_nullable + as BottomNavigationBarType?, + fixedColor: freezed == fixedColor + ? _self.fixedColor + : fixedColor // ignore: cast_nullable_to_non_nullable + as String?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + iconSize: null == iconSize + ? _self.iconSize + : iconSize // ignore: cast_nullable_to_non_nullable + as double, + selectedItemColor: freezed == selectedItemColor + ? _self.selectedItemColor + : selectedItemColor // ignore: cast_nullable_to_non_nullable + as String?, + unselectedItemColor: freezed == unselectedItemColor + ? _self.unselectedItemColor + : unselectedItemColor // ignore: cast_nullable_to_non_nullable + as String?, + selectedFontSize: null == selectedFontSize + ? _self.selectedFontSize + : selectedFontSize // ignore: cast_nullable_to_non_nullable + as double, + unselectedFontSize: null == unselectedFontSize + ? _self.unselectedFontSize + : unselectedFontSize // ignore: cast_nullable_to_non_nullable + as double, + selectedLabelStyle: freezed == selectedLabelStyle + ? _self.selectedLabelStyle + : selectedLabelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + unselectedLabelStyle: freezed == unselectedLabelStyle + ? _self.unselectedLabelStyle + : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + showSelectedLabels: freezed == showSelectedLabels + ? _self.showSelectedLabels + : showSelectedLabels // ignore: cast_nullable_to_non_nullable + as bool?, + showUnselectedLabels: freezed == showUnselectedLabels + ? _self.showUnselectedLabels + : showUnselectedLabels // ignore: cast_nullable_to_non_nullable + as bool?, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + landscapeLayout: freezed == landscapeLayout + ? _self.landscapeLayout + : landscapeLayout // ignore: cast_nullable_to_non_nullable + as BottomNavigationBarLandscapeLayout?, + )); + } + + /// Create a copy of StacBottomNavigationBar + /// with the given fields replaced by the non-null parameter values. @override - BottomNavigationBarLandscapeLayout? get landscapeLayout; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get selectedLabelStyle { + if (_self.selectedLabelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.selectedLabelStyle!, (value) { + return _then(_self.copyWith(selectedLabelStyle: value)); + }); + } /// Create a copy of StacBottomNavigationBar /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBottomNavigationBarImplCopyWith<_$StacBottomNavigationBarImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle { + if (_self.unselectedLabelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.unselectedLabelStyle!, (value) { + return _then(_self.copyWith(unselectedLabelStyle: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.g.dart b/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.g.dart index e6169a10..2dea0dcb 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.g.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_navigation_bar/stac_bottom_navigation_bar.g.dart @@ -6,9 +6,9 @@ part of 'stac_bottom_navigation_bar.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBottomNavigationBarImpl _$$StacBottomNavigationBarImplFromJson( +_StacBottomNavigationBar _$StacBottomNavigationBarFromJson( Map json) => - _$StacBottomNavigationBarImpl( + _StacBottomNavigationBar( items: (json['items'] as List) .map((e) => StacBottomNavigationBarItem.fromJson(e as Map)) @@ -37,8 +37,8 @@ _$StacBottomNavigationBarImpl _$$StacBottomNavigationBarImplFromJson( _$BottomNavigationBarLandscapeLayoutEnumMap, json['landscapeLayout']), ); -Map _$$StacBottomNavigationBarImplToJson( - _$StacBottomNavigationBarImpl instance) => +Map _$StacBottomNavigationBarToJson( + _StacBottomNavigationBar instance) => { 'items': instance.items, 'elevation': instance.elevation, diff --git a/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.dart b/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.dart index 7ce1da3f..4809dc2e 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.dart @@ -6,7 +6,7 @@ part 'stac_bottom_navigation_view.freezed.dart'; part 'stac_bottom_navigation_view.g.dart'; @freezed -class StacBottomNavigationView with _$StacBottomNavigationView { +abstract class StacBottomNavigationView with _$StacBottomNavigationView { const factory StacBottomNavigationView({ @Default([]) List> children, }) = _StacBottomNavigationView; diff --git a/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.freezed.dart b/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.freezed.dart index 48e309c6..aadb9f37 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,87 +10,59 @@ part of 'stac_bottom_navigation_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBottomNavigationView _$StacBottomNavigationViewFromJson( - Map json) { - return _StacBottomNavigationView.fromJson(json); -} - /// @nodoc mixin _$StacBottomNavigationView { - List> get children => throw _privateConstructorUsedError; - - /// Serializes this StacBottomNavigationView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List> get children; /// Create a copy of StacBottomNavigationView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBottomNavigationViewCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacBottomNavigationViewCopyWithImpl( + this as StacBottomNavigationView, _$identity); -/// @nodoc -abstract class $StacBottomNavigationViewCopyWith<$Res> { - factory $StacBottomNavigationViewCopyWith(StacBottomNavigationView value, - $Res Function(StacBottomNavigationView) then) = - _$StacBottomNavigationViewCopyWithImpl<$Res, StacBottomNavigationView>; - @useResult - $Res call({List> children}); -} + /// Serializes this StacBottomNavigationView to a JSON map. + Map toJson(); -/// @nodoc -class _$StacBottomNavigationViewCopyWithImpl<$Res, - $Val extends StacBottomNavigationView> - implements $StacBottomNavigationViewCopyWith<$Res> { - _$StacBottomNavigationViewCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBottomNavigationView && + const DeepCollectionEquality().equals(other.children, children)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(children)); - /// Create a copy of StacBottomNavigationView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? children = null, - }) { - return _then(_value.copyWith( - children: null == children - ? _value.children - : children // ignore: cast_nullable_to_non_nullable - as List>, - ) as $Val); + String toString() { + return 'StacBottomNavigationView(children: $children)'; } } /// @nodoc -abstract class _$$StacBottomNavigationViewImplCopyWith<$Res> - implements $StacBottomNavigationViewCopyWith<$Res> { - factory _$$StacBottomNavigationViewImplCopyWith( - _$StacBottomNavigationViewImpl value, - $Res Function(_$StacBottomNavigationViewImpl) then) = - __$$StacBottomNavigationViewImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacBottomNavigationViewCopyWith<$Res> { + factory $StacBottomNavigationViewCopyWith(StacBottomNavigationView value, + $Res Function(StacBottomNavigationView) _then) = + _$StacBottomNavigationViewCopyWithImpl; @useResult $Res call({List> children}); } /// @nodoc -class __$$StacBottomNavigationViewImplCopyWithImpl<$Res> - extends _$StacBottomNavigationViewCopyWithImpl<$Res, - _$StacBottomNavigationViewImpl> - implements _$$StacBottomNavigationViewImplCopyWith<$Res> { - __$$StacBottomNavigationViewImplCopyWithImpl( - _$StacBottomNavigationViewImpl _value, - $Res Function(_$StacBottomNavigationViewImpl) _then) - : super(_value, _then); +class _$StacBottomNavigationViewCopyWithImpl<$Res> + implements $StacBottomNavigationViewCopyWith<$Res> { + _$StacBottomNavigationViewCopyWithImpl(this._self, this._then); + + final StacBottomNavigationView _self; + final $Res Function(StacBottomNavigationView) _then; /// Create a copy of StacBottomNavigationView /// with the given fields replaced by the non-null parameter values. @@ -98,9 +71,9 @@ class __$$StacBottomNavigationViewImplCopyWithImpl<$Res> $Res call({ Object? children = null, }) { - return _then(_$StacBottomNavigationViewImpl( + return _then(_self.copyWith( children: null == children - ? _value._children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, )); @@ -109,13 +82,12 @@ class __$$StacBottomNavigationViewImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacBottomNavigationViewImpl implements _StacBottomNavigationView { - const _$StacBottomNavigationViewImpl( +class _StacBottomNavigationView implements StacBottomNavigationView { + const _StacBottomNavigationView( {final List> children = const []}) : _children = children; - - factory _$StacBottomNavigationViewImpl.fromJson(Map json) => - _$$StacBottomNavigationViewImplFromJson(json); + factory _StacBottomNavigationView.fromJson(Map json) => + _$StacBottomNavigationViewFromJson(json); final List> _children; @override @@ -126,16 +98,27 @@ class _$StacBottomNavigationViewImpl implements _StacBottomNavigationView { return EqualUnmodifiableListView(_children); } + /// Create a copy of StacBottomNavigationView + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBottomNavigationView(children: $children)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBottomNavigationViewCopyWith<_StacBottomNavigationView> get copyWith => + __$StacBottomNavigationViewCopyWithImpl<_StacBottomNavigationView>( + this, _$identity); + + @override + Map toJson() { + return _$StacBottomNavigationViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBottomNavigationViewImpl && + other is _StacBottomNavigationView && const DeepCollectionEquality().equals(other._children, _children)); } @@ -144,38 +127,45 @@ class _$StacBottomNavigationViewImpl implements _StacBottomNavigationView { int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_children)); - /// Create a copy of StacBottomNavigationView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacBottomNavigationViewImplCopyWith<_$StacBottomNavigationViewImpl> - get copyWith => __$$StacBottomNavigationViewImplCopyWithImpl< - _$StacBottomNavigationViewImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacBottomNavigationViewImplToJson( - this, - ); + String toString() { + return 'StacBottomNavigationView(children: $children)'; } } -abstract class _StacBottomNavigationView implements StacBottomNavigationView { - const factory _StacBottomNavigationView( - {final List> children}) = - _$StacBottomNavigationViewImpl; +/// @nodoc +abstract mixin class _$StacBottomNavigationViewCopyWith<$Res> + implements $StacBottomNavigationViewCopyWith<$Res> { + factory _$StacBottomNavigationViewCopyWith(_StacBottomNavigationView value, + $Res Function(_StacBottomNavigationView) _then) = + __$StacBottomNavigationViewCopyWithImpl; + @override + @useResult + $Res call({List> children}); +} - factory _StacBottomNavigationView.fromJson(Map json) = - _$StacBottomNavigationViewImpl.fromJson; +/// @nodoc +class __$StacBottomNavigationViewCopyWithImpl<$Res> + implements _$StacBottomNavigationViewCopyWith<$Res> { + __$StacBottomNavigationViewCopyWithImpl(this._self, this._then); - @override - List> get children; + final _StacBottomNavigationView _self; + final $Res Function(_StacBottomNavigationView) _then; /// Create a copy of StacBottomNavigationView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBottomNavigationViewImplCopyWith<_$StacBottomNavigationViewImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? children = null, + }) { + return _then(_StacBottomNavigationView( + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.g.dart b/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.g.dart index fd247cc4..fd9aefa8 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_navigation_view/stac_bottom_navigation_view.g.dart @@ -6,17 +6,17 @@ part of 'stac_bottom_navigation_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBottomNavigationViewImpl _$$StacBottomNavigationViewImplFromJson( +_StacBottomNavigationView _$StacBottomNavigationViewFromJson( Map json) => - _$StacBottomNavigationViewImpl( + _StacBottomNavigationView( children: (json['children'] as List?) ?.map((e) => e as Map) .toList() ?? const [], ); -Map _$$StacBottomNavigationViewImplToJson( - _$StacBottomNavigationViewImpl instance) => +Map _$StacBottomNavigationViewToJson( + _StacBottomNavigationView instance) => { 'children': instance.children, }; diff --git a/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.dart b/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.dart index 25a6c44e..95508d7f 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.dart @@ -9,7 +9,7 @@ part 'stac_bottom_sheet_theme.freezed.dart'; part 'stac_bottom_sheet_theme.g.dart'; @freezed -class StacBottomSheetThemeData with _$StacBottomSheetThemeData { +abstract class StacBottomSheetThemeData with _$StacBottomSheetThemeData { const factory StacBottomSheetThemeData({ String? backgroundColor, String? surfaceTintColor, diff --git a/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.freezed.dart b/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.freezed.dart index dcf982ba..93964784 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,47 +10,97 @@ part of 'stac_bottom_sheet_theme.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBottomSheetThemeData _$StacBottomSheetThemeDataFromJson( - Map json) { - return _StacBottomSheetThemeData.fromJson(json); -} - /// @nodoc mixin _$StacBottomSheetThemeData { - String? get backgroundColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - String? get modalBackgroundColor => throw _privateConstructorUsedError; - String? get modalBarrierColor => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - double? get modalElevation => throw _privateConstructorUsedError; - StacBorder? get shape => throw _privateConstructorUsedError; - bool? get showDragHandle => throw _privateConstructorUsedError; - String? get dragHandleColor => throw _privateConstructorUsedError; - StacSize? get dragHandleSize => throw _privateConstructorUsedError; - Clip? get clipBehavior => throw _privateConstructorUsedError; - StacBoxConstraints? get constraints => throw _privateConstructorUsedError; - - /// Serializes this StacBottomSheetThemeData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get backgroundColor; + String? get surfaceTintColor; + double? get elevation; + String? get modalBackgroundColor; + String? get modalBarrierColor; + String? get shadowColor; + double? get modalElevation; + StacBorder? get shape; + bool? get showDragHandle; + String? get dragHandleColor; + StacSize? get dragHandleSize; + Clip? get clipBehavior; + StacBoxConstraints? get constraints; /// Create a copy of StacBottomSheetThemeData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBottomSheetThemeDataCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacBottomSheetThemeDataCopyWithImpl( + this as StacBottomSheetThemeData, _$identity); + + /// Serializes this StacBottomSheetThemeData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBottomSheetThemeData && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.modalBackgroundColor, modalBackgroundColor) || + other.modalBackgroundColor == modalBackgroundColor) && + (identical(other.modalBarrierColor, modalBarrierColor) || + other.modalBarrierColor == modalBarrierColor) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.modalElevation, modalElevation) || + other.modalElevation == modalElevation) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.showDragHandle, showDragHandle) || + other.showDragHandle == showDragHandle) && + (identical(other.dragHandleColor, dragHandleColor) || + other.dragHandleColor == dragHandleColor) && + (identical(other.dragHandleSize, dragHandleSize) || + other.dragHandleSize == dragHandleSize) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.constraints, constraints) || + other.constraints == constraints)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + backgroundColor, + surfaceTintColor, + elevation, + modalBackgroundColor, + modalBarrierColor, + shadowColor, + modalElevation, + shape, + showDragHandle, + dragHandleColor, + dragHandleSize, + clipBehavior, + constraints); + + @override + String toString() { + return 'StacBottomSheetThemeData(backgroundColor: $backgroundColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, modalBackgroundColor: $modalBackgroundColor, modalBarrierColor: $modalBarrierColor, shadowColor: $shadowColor, modalElevation: $modalElevation, shape: $shape, showDragHandle: $showDragHandle, dragHandleColor: $dragHandleColor, dragHandleSize: $dragHandleSize, clipBehavior: $clipBehavior, constraints: $constraints)'; + } } /// @nodoc -abstract class $StacBottomSheetThemeDataCopyWith<$Res> { +abstract mixin class $StacBottomSheetThemeDataCopyWith<$Res> { factory $StacBottomSheetThemeDataCopyWith(StacBottomSheetThemeData value, - $Res Function(StacBottomSheetThemeData) then) = - _$StacBottomSheetThemeDataCopyWithImpl<$Res, StacBottomSheetThemeData>; + $Res Function(StacBottomSheetThemeData) _then) = + _$StacBottomSheetThemeDataCopyWithImpl; @useResult $Res call( {String? backgroundColor, @@ -72,15 +123,12 @@ abstract class $StacBottomSheetThemeDataCopyWith<$Res> { } /// @nodoc -class _$StacBottomSheetThemeDataCopyWithImpl<$Res, - $Val extends StacBottomSheetThemeData> +class _$StacBottomSheetThemeDataCopyWithImpl<$Res> implements $StacBottomSheetThemeDataCopyWith<$Res> { - _$StacBottomSheetThemeDataCopyWithImpl(this._value, this._then); + _$StacBottomSheetThemeDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacBottomSheetThemeData _self; + final $Res Function(StacBottomSheetThemeData) _then; /// Create a copy of StacBottomSheetThemeData /// with the given fields replaced by the non-null parameter values. @@ -101,60 +149,60 @@ class _$StacBottomSheetThemeDataCopyWithImpl<$Res, Object? clipBehavior = freezed, Object? constraints = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, modalBackgroundColor: freezed == modalBackgroundColor - ? _value.modalBackgroundColor + ? _self.modalBackgroundColor : modalBackgroundColor // ignore: cast_nullable_to_non_nullable as String?, modalBarrierColor: freezed == modalBarrierColor - ? _value.modalBarrierColor + ? _self.modalBarrierColor : modalBarrierColor // ignore: cast_nullable_to_non_nullable as String?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, modalElevation: freezed == modalElevation - ? _value.modalElevation + ? _self.modalElevation : modalElevation // ignore: cast_nullable_to_non_nullable as double?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacBorder?, showDragHandle: freezed == showDragHandle - ? _value.showDragHandle + ? _self.showDragHandle : showDragHandle // ignore: cast_nullable_to_non_nullable as bool?, dragHandleColor: freezed == dragHandleColor - ? _value.dragHandleColor + ? _self.dragHandleColor : dragHandleColor // ignore: cast_nullable_to_non_nullable as String?, dragHandleSize: freezed == dragHandleSize - ? _value.dragHandleSize + ? _self.dragHandleSize : dragHandleSize // ignore: cast_nullable_to_non_nullable as StacSize?, clipBehavior: freezed == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip?, constraints: freezed == constraints - ? _value.constraints + ? _self.constraints : constraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, - ) as $Val); + )); } /// Create a copy of StacBottomSheetThemeData @@ -162,12 +210,12 @@ class _$StacBottomSheetThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -176,12 +224,12 @@ class _$StacBottomSheetThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacSizeCopyWith<$Res>? get dragHandleSize { - if (_value.dragHandleSize == null) { + if (_self.dragHandleSize == null) { return null; } - return $StacSizeCopyWith<$Res>(_value.dragHandleSize!, (value) { - return _then(_value.copyWith(dragHandleSize: value) as $Val); + return $StacSizeCopyWith<$Res>(_self.dragHandleSize!, (value) { + return _then(_self.copyWith(dragHandleSize: value)); }); } @@ -190,138 +238,20 @@ class _$StacBottomSheetThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get constraints { - if (_value.constraints == null) { + if (_self.constraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.constraints!, (value) { - return _then(_value.copyWith(constraints: value) as $Val); + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); }); } } -/// @nodoc -abstract class _$$StacBottomSheetThemeDataImplCopyWith<$Res> - implements $StacBottomSheetThemeDataCopyWith<$Res> { - factory _$$StacBottomSheetThemeDataImplCopyWith( - _$StacBottomSheetThemeDataImpl value, - $Res Function(_$StacBottomSheetThemeDataImpl) then) = - __$$StacBottomSheetThemeDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? backgroundColor, - String? surfaceTintColor, - double? elevation, - String? modalBackgroundColor, - String? modalBarrierColor, - String? shadowColor, - double? modalElevation, - StacBorder? shape, - bool? showDragHandle, - String? dragHandleColor, - StacSize? dragHandleSize, - Clip? clipBehavior, - StacBoxConstraints? constraints}); - - @override - $StacBorderCopyWith<$Res>? get shape; - @override - $StacSizeCopyWith<$Res>? get dragHandleSize; - @override - $StacBoxConstraintsCopyWith<$Res>? get constraints; -} - -/// @nodoc -class __$$StacBottomSheetThemeDataImplCopyWithImpl<$Res> - extends _$StacBottomSheetThemeDataCopyWithImpl<$Res, - _$StacBottomSheetThemeDataImpl> - implements _$$StacBottomSheetThemeDataImplCopyWith<$Res> { - __$$StacBottomSheetThemeDataImplCopyWithImpl( - _$StacBottomSheetThemeDataImpl _value, - $Res Function(_$StacBottomSheetThemeDataImpl) _then) - : super(_value, _then); - - /// Create a copy of StacBottomSheetThemeData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? backgroundColor = freezed, - Object? surfaceTintColor = freezed, - Object? elevation = freezed, - Object? modalBackgroundColor = freezed, - Object? modalBarrierColor = freezed, - Object? shadowColor = freezed, - Object? modalElevation = freezed, - Object? shape = freezed, - Object? showDragHandle = freezed, - Object? dragHandleColor = freezed, - Object? dragHandleSize = freezed, - Object? clipBehavior = freezed, - Object? constraints = freezed, - }) { - return _then(_$StacBottomSheetThemeDataImpl( - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - modalBackgroundColor: freezed == modalBackgroundColor - ? _value.modalBackgroundColor - : modalBackgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - modalBarrierColor: freezed == modalBarrierColor - ? _value.modalBarrierColor - : modalBarrierColor // ignore: cast_nullable_to_non_nullable - as String?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - modalElevation: freezed == modalElevation - ? _value.modalElevation - : modalElevation // ignore: cast_nullable_to_non_nullable - as double?, - shape: freezed == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as StacBorder?, - showDragHandle: freezed == showDragHandle - ? _value.showDragHandle - : showDragHandle // ignore: cast_nullable_to_non_nullable - as bool?, - dragHandleColor: freezed == dragHandleColor - ? _value.dragHandleColor - : dragHandleColor // ignore: cast_nullable_to_non_nullable - as String?, - dragHandleSize: freezed == dragHandleSize - ? _value.dragHandleSize - : dragHandleSize // ignore: cast_nullable_to_non_nullable - as StacSize?, - clipBehavior: freezed == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip?, - constraints: freezed == constraints - ? _value.constraints - : constraints // ignore: cast_nullable_to_non_nullable - as StacBoxConstraints?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacBottomSheetThemeDataImpl implements _StacBottomSheetThemeData { - const _$StacBottomSheetThemeDataImpl( +class _StacBottomSheetThemeData implements StacBottomSheetThemeData { + const _StacBottomSheetThemeData( {this.backgroundColor, this.surfaceTintColor, this.elevation, @@ -335,9 +265,8 @@ class _$StacBottomSheetThemeDataImpl implements _StacBottomSheetThemeData { this.dragHandleSize, this.clipBehavior, this.constraints}); - - factory _$StacBottomSheetThemeDataImpl.fromJson(Map json) => - _$$StacBottomSheetThemeDataImplFromJson(json); + factory _StacBottomSheetThemeData.fromJson(Map json) => + _$StacBottomSheetThemeDataFromJson(json); @override final String? backgroundColor; @@ -366,16 +295,27 @@ class _$StacBottomSheetThemeDataImpl implements _StacBottomSheetThemeData { @override final StacBoxConstraints? constraints; + /// Create a copy of StacBottomSheetThemeData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBottomSheetThemeData(backgroundColor: $backgroundColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, modalBackgroundColor: $modalBackgroundColor, modalBarrierColor: $modalBarrierColor, shadowColor: $shadowColor, modalElevation: $modalElevation, shape: $shape, showDragHandle: $showDragHandle, dragHandleColor: $dragHandleColor, dragHandleSize: $dragHandleSize, clipBehavior: $clipBehavior, constraints: $constraints)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBottomSheetThemeDataCopyWith<_StacBottomSheetThemeData> get copyWith => + __$StacBottomSheetThemeDataCopyWithImpl<_StacBottomSheetThemeData>( + this, _$identity); + + @override + Map toJson() { + return _$StacBottomSheetThemeDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBottomSheetThemeDataImpl && + other is _StacBottomSheetThemeData && (identical(other.backgroundColor, backgroundColor) || other.backgroundColor == backgroundColor) && (identical(other.surfaceTintColor, surfaceTintColor) || @@ -421,73 +361,167 @@ class _$StacBottomSheetThemeDataImpl implements _StacBottomSheetThemeData { clipBehavior, constraints); - /// Create a copy of StacBottomSheetThemeData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacBottomSheetThemeDataImplCopyWith<_$StacBottomSheetThemeDataImpl> - get copyWith => __$$StacBottomSheetThemeDataImplCopyWithImpl< - _$StacBottomSheetThemeDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacBottomSheetThemeDataImplToJson( - this, - ); + String toString() { + return 'StacBottomSheetThemeData(backgroundColor: $backgroundColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, modalBackgroundColor: $modalBackgroundColor, modalBarrierColor: $modalBarrierColor, shadowColor: $shadowColor, modalElevation: $modalElevation, shape: $shape, showDragHandle: $showDragHandle, dragHandleColor: $dragHandleColor, dragHandleSize: $dragHandleSize, clipBehavior: $clipBehavior, constraints: $constraints)'; } } -abstract class _StacBottomSheetThemeData implements StacBottomSheetThemeData { - const factory _StacBottomSheetThemeData( - {final String? backgroundColor, - final String? surfaceTintColor, - final double? elevation, - final String? modalBackgroundColor, - final String? modalBarrierColor, - final String? shadowColor, - final double? modalElevation, - final StacBorder? shape, - final bool? showDragHandle, - final String? dragHandleColor, - final StacSize? dragHandleSize, - final Clip? clipBehavior, - final StacBoxConstraints? constraints}) = _$StacBottomSheetThemeDataImpl; - - factory _StacBottomSheetThemeData.fromJson(Map json) = - _$StacBottomSheetThemeDataImpl.fromJson; - - @override - String? get backgroundColor; - @override - String? get surfaceTintColor; - @override - double? get elevation; - @override - String? get modalBackgroundColor; - @override - String? get modalBarrierColor; - @override - String? get shadowColor; +/// @nodoc +abstract mixin class _$StacBottomSheetThemeDataCopyWith<$Res> + implements $StacBottomSheetThemeDataCopyWith<$Res> { + factory _$StacBottomSheetThemeDataCopyWith(_StacBottomSheetThemeData value, + $Res Function(_StacBottomSheetThemeData) _then) = + __$StacBottomSheetThemeDataCopyWithImpl; @override - double? get modalElevation; + @useResult + $Res call( + {String? backgroundColor, + String? surfaceTintColor, + double? elevation, + String? modalBackgroundColor, + String? modalBarrierColor, + String? shadowColor, + double? modalElevation, + StacBorder? shape, + bool? showDragHandle, + String? dragHandleColor, + StacSize? dragHandleSize, + Clip? clipBehavior, + StacBoxConstraints? constraints}); + @override - StacBorder? get shape; + $StacBorderCopyWith<$Res>? get shape; @override - bool? get showDragHandle; + $StacSizeCopyWith<$Res>? get dragHandleSize; @override - String? get dragHandleColor; + $StacBoxConstraintsCopyWith<$Res>? get constraints; +} + +/// @nodoc +class __$StacBottomSheetThemeDataCopyWithImpl<$Res> + implements _$StacBottomSheetThemeDataCopyWith<$Res> { + __$StacBottomSheetThemeDataCopyWithImpl(this._self, this._then); + + final _StacBottomSheetThemeData _self; + final $Res Function(_StacBottomSheetThemeData) _then; + + /// Create a copy of StacBottomSheetThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacSize? get dragHandleSize; + @pragma('vm:prefer-inline') + $Res call({ + Object? backgroundColor = freezed, + Object? surfaceTintColor = freezed, + Object? elevation = freezed, + Object? modalBackgroundColor = freezed, + Object? modalBarrierColor = freezed, + Object? shadowColor = freezed, + Object? modalElevation = freezed, + Object? shape = freezed, + Object? showDragHandle = freezed, + Object? dragHandleColor = freezed, + Object? dragHandleSize = freezed, + Object? clipBehavior = freezed, + Object? constraints = freezed, + }) { + return _then(_StacBottomSheetThemeData( + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + modalBackgroundColor: freezed == modalBackgroundColor + ? _self.modalBackgroundColor + : modalBackgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + modalBarrierColor: freezed == modalBarrierColor + ? _self.modalBarrierColor + : modalBarrierColor // ignore: cast_nullable_to_non_nullable + as String?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + modalElevation: freezed == modalElevation + ? _self.modalElevation + : modalElevation // ignore: cast_nullable_to_non_nullable + as double?, + shape: freezed == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as StacBorder?, + showDragHandle: freezed == showDragHandle + ? _self.showDragHandle + : showDragHandle // ignore: cast_nullable_to_non_nullable + as bool?, + dragHandleColor: freezed == dragHandleColor + ? _self.dragHandleColor + : dragHandleColor // ignore: cast_nullable_to_non_nullable + as String?, + dragHandleSize: freezed == dragHandleSize + ? _self.dragHandleSize + : dragHandleSize // ignore: cast_nullable_to_non_nullable + as StacSize?, + clipBehavior: freezed == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip?, + constraints: freezed == constraints + ? _self.constraints + : constraints // ignore: cast_nullable_to_non_nullable + as StacBoxConstraints?, + )); + } + + /// Create a copy of StacBottomSheetThemeData + /// with the given fields replaced by the non-null parameter values. @override - Clip? get clipBehavior; + @pragma('vm:prefer-inline') + $StacBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } + + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); + } + + /// Create a copy of StacBottomSheetThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacBoxConstraints? get constraints; + @pragma('vm:prefer-inline') + $StacSizeCopyWith<$Res>? get dragHandleSize { + if (_self.dragHandleSize == null) { + return null; + } + + return $StacSizeCopyWith<$Res>(_self.dragHandleSize!, (value) { + return _then(_self.copyWith(dragHandleSize: value)); + }); + } /// Create a copy of StacBottomSheetThemeData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBottomSheetThemeDataImplCopyWith<_$StacBottomSheetThemeDataImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get constraints { + if (_self.constraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.g.dart b/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.g.dart index ae1cd869..10b4d0ce 100644 --- a/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.g.dart +++ b/packages/stac/lib/src/parsers/stac_bottom_sheet_theme/stac_bottom_sheet_theme.g.dart @@ -6,9 +6,9 @@ part of 'stac_bottom_sheet_theme.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBottomSheetThemeDataImpl _$$StacBottomSheetThemeDataImplFromJson( +_StacBottomSheetThemeData _$StacBottomSheetThemeDataFromJson( Map json) => - _$StacBottomSheetThemeDataImpl( + _StacBottomSheetThemeData( backgroundColor: json['backgroundColor'] as String?, surfaceTintColor: json['surfaceTintColor'] as String?, elevation: (json['elevation'] as num?)?.toDouble(), @@ -31,8 +31,8 @@ _$StacBottomSheetThemeDataImpl _$$StacBottomSheetThemeDataImplFromJson( json['constraints'] as Map), ); -Map _$$StacBottomSheetThemeDataImplToJson( - _$StacBottomSheetThemeDataImpl instance) => +Map _$StacBottomSheetThemeDataToJson( + _StacBottomSheetThemeData instance) => { 'backgroundColor': instance.backgroundColor, 'surfaceTintColor': instance.surfaceTintColor, diff --git a/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.dart b/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.dart index 245a4598..9cbbda66 100644 --- a/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.dart +++ b/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.dart @@ -5,7 +5,7 @@ part 'stac_box_constraints.freezed.dart'; part 'stac_box_constraints.g.dart'; @freezed -class StacBoxConstraints with _$StacBoxConstraints { +abstract class StacBoxConstraints with _$StacBoxConstraints { const factory StacBoxConstraints({ required double minWidth, required double maxWidth, diff --git a/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.freezed.dart b/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.freezed.dart index 1b8af93e..418ec078 100644 --- a/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,102 +10,70 @@ part of 'stac_box_constraints.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBoxConstraints _$StacBoxConstraintsFromJson(Map json) { - return _StacBoxConstraints.fromJson(json); -} - /// @nodoc mixin _$StacBoxConstraints { - double get minWidth => throw _privateConstructorUsedError; - double get maxWidth => throw _privateConstructorUsedError; - double get minHeight => throw _privateConstructorUsedError; - double get maxHeight => throw _privateConstructorUsedError; - - /// Serializes this StacBoxConstraints to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get minWidth; + double get maxWidth; + double get minHeight; + double get maxHeight; /// Create a copy of StacBoxConstraints /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacBoxConstraintsCopyWithImpl( + this as StacBoxConstraints, _$identity); -/// @nodoc -abstract class $StacBoxConstraintsCopyWith<$Res> { - factory $StacBoxConstraintsCopyWith( - StacBoxConstraints value, $Res Function(StacBoxConstraints) then) = - _$StacBoxConstraintsCopyWithImpl<$Res, StacBoxConstraints>; - @useResult - $Res call( - {double minWidth, double maxWidth, double minHeight, double maxHeight}); -} + /// Serializes this StacBoxConstraints to a JSON map. + Map toJson(); -/// @nodoc -class _$StacBoxConstraintsCopyWithImpl<$Res, $Val extends StacBoxConstraints> - implements $StacBoxConstraintsCopyWith<$Res> { - _$StacBoxConstraintsCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBoxConstraints && + (identical(other.minWidth, minWidth) || + other.minWidth == minWidth) && + (identical(other.maxWidth, maxWidth) || + other.maxWidth == maxWidth) && + (identical(other.minHeight, minHeight) || + other.minHeight == minHeight) && + (identical(other.maxHeight, maxHeight) || + other.maxHeight == maxHeight)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, minWidth, maxWidth, minHeight, maxHeight); - /// Create a copy of StacBoxConstraints - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? minWidth = null, - Object? maxWidth = null, - Object? minHeight = null, - Object? maxHeight = null, - }) { - return _then(_value.copyWith( - minWidth: null == minWidth - ? _value.minWidth - : minWidth // ignore: cast_nullable_to_non_nullable - as double, - maxWidth: null == maxWidth - ? _value.maxWidth - : maxWidth // ignore: cast_nullable_to_non_nullable - as double, - minHeight: null == minHeight - ? _value.minHeight - : minHeight // ignore: cast_nullable_to_non_nullable - as double, - maxHeight: null == maxHeight - ? _value.maxHeight - : maxHeight // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + String toString() { + return 'StacBoxConstraints(minWidth: $minWidth, maxWidth: $maxWidth, minHeight: $minHeight, maxHeight: $maxHeight)'; } } /// @nodoc -abstract class _$$StacBoxConstraintsImplCopyWith<$Res> - implements $StacBoxConstraintsCopyWith<$Res> { - factory _$$StacBoxConstraintsImplCopyWith(_$StacBoxConstraintsImpl value, - $Res Function(_$StacBoxConstraintsImpl) then) = - __$$StacBoxConstraintsImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacBoxConstraintsCopyWith<$Res> { + factory $StacBoxConstraintsCopyWith( + StacBoxConstraints value, $Res Function(StacBoxConstraints) _then) = + _$StacBoxConstraintsCopyWithImpl; @useResult $Res call( {double minWidth, double maxWidth, double minHeight, double maxHeight}); } /// @nodoc -class __$$StacBoxConstraintsImplCopyWithImpl<$Res> - extends _$StacBoxConstraintsCopyWithImpl<$Res, _$StacBoxConstraintsImpl> - implements _$$StacBoxConstraintsImplCopyWith<$Res> { - __$$StacBoxConstraintsImplCopyWithImpl(_$StacBoxConstraintsImpl _value, - $Res Function(_$StacBoxConstraintsImpl) _then) - : super(_value, _then); +class _$StacBoxConstraintsCopyWithImpl<$Res> + implements $StacBoxConstraintsCopyWith<$Res> { + _$StacBoxConstraintsCopyWithImpl(this._self, this._then); + + final StacBoxConstraints _self; + final $Res Function(StacBoxConstraints) _then; /// Create a copy of StacBoxConstraints /// with the given fields replaced by the non-null parameter values. @@ -116,21 +85,21 @@ class __$$StacBoxConstraintsImplCopyWithImpl<$Res> Object? minHeight = null, Object? maxHeight = null, }) { - return _then(_$StacBoxConstraintsImpl( + return _then(_self.copyWith( minWidth: null == minWidth - ? _value.minWidth + ? _self.minWidth : minWidth // ignore: cast_nullable_to_non_nullable as double, maxWidth: null == maxWidth - ? _value.maxWidth + ? _self.maxWidth : maxWidth // ignore: cast_nullable_to_non_nullable as double, minHeight: null == minHeight - ? _value.minHeight + ? _self.minHeight : minHeight // ignore: cast_nullable_to_non_nullable as double, maxHeight: null == maxHeight - ? _value.maxHeight + ? _self.maxHeight : maxHeight // ignore: cast_nullable_to_non_nullable as double, )); @@ -139,15 +108,14 @@ class __$$StacBoxConstraintsImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacBoxConstraintsImpl implements _StacBoxConstraints { - const _$StacBoxConstraintsImpl( +class _StacBoxConstraints implements StacBoxConstraints { + const _StacBoxConstraints( {required this.minWidth, required this.maxWidth, required this.minHeight, required this.maxHeight}); - - factory _$StacBoxConstraintsImpl.fromJson(Map json) => - _$$StacBoxConstraintsImplFromJson(json); + factory _StacBoxConstraints.fromJson(Map json) => + _$StacBoxConstraintsFromJson(json); @override final double minWidth; @@ -158,16 +126,26 @@ class _$StacBoxConstraintsImpl implements _StacBoxConstraints { @override final double maxHeight; + /// Create a copy of StacBoxConstraints + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBoxConstraints(minWidth: $minWidth, maxWidth: $maxWidth, minHeight: $minHeight, maxHeight: $maxHeight)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBoxConstraintsCopyWith<_StacBoxConstraints> get copyWith => + __$StacBoxConstraintsCopyWithImpl<_StacBoxConstraints>(this, _$identity); + + @override + Map toJson() { + return _$StacBoxConstraintsToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBoxConstraintsImpl && + other is _StacBoxConstraints && (identical(other.minWidth, minWidth) || other.minWidth == minWidth) && (identical(other.maxWidth, maxWidth) || @@ -183,46 +161,61 @@ class _$StacBoxConstraintsImpl implements _StacBoxConstraints { int get hashCode => Object.hash(runtimeType, minWidth, maxWidth, minHeight, maxHeight); - /// Create a copy of StacBoxConstraints - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacBoxConstraintsImplCopyWith<_$StacBoxConstraintsImpl> get copyWith => - __$$StacBoxConstraintsImplCopyWithImpl<_$StacBoxConstraintsImpl>( - this, _$identity); + String toString() { + return 'StacBoxConstraints(minWidth: $minWidth, maxWidth: $maxWidth, minHeight: $minHeight, maxHeight: $maxHeight)'; + } +} +/// @nodoc +abstract mixin class _$StacBoxConstraintsCopyWith<$Res> + implements $StacBoxConstraintsCopyWith<$Res> { + factory _$StacBoxConstraintsCopyWith( + _StacBoxConstraints value, $Res Function(_StacBoxConstraints) _then) = + __$StacBoxConstraintsCopyWithImpl; @override - Map toJson() { - return _$$StacBoxConstraintsImplToJson( - this, - ); - } + @useResult + $Res call( + {double minWidth, double maxWidth, double minHeight, double maxHeight}); } -abstract class _StacBoxConstraints implements StacBoxConstraints { - const factory _StacBoxConstraints( - {required final double minWidth, - required final double maxWidth, - required final double minHeight, - required final double maxHeight}) = _$StacBoxConstraintsImpl; +/// @nodoc +class __$StacBoxConstraintsCopyWithImpl<$Res> + implements _$StacBoxConstraintsCopyWith<$Res> { + __$StacBoxConstraintsCopyWithImpl(this._self, this._then); - factory _StacBoxConstraints.fromJson(Map json) = - _$StacBoxConstraintsImpl.fromJson; - - @override - double get minWidth; - @override - double get maxWidth; - @override - double get minHeight; - @override - double get maxHeight; + final _StacBoxConstraints _self; + final $Res Function(_StacBoxConstraints) _then; /// Create a copy of StacBoxConstraints /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBoxConstraintsImplCopyWith<_$StacBoxConstraintsImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? minWidth = null, + Object? maxWidth = null, + Object? minHeight = null, + Object? maxHeight = null, + }) { + return _then(_StacBoxConstraints( + minWidth: null == minWidth + ? _self.minWidth + : minWidth // ignore: cast_nullable_to_non_nullable + as double, + maxWidth: null == maxWidth + ? _self.maxWidth + : maxWidth // ignore: cast_nullable_to_non_nullable + as double, + minHeight: null == minHeight + ? _self.minHeight + : minHeight // ignore: cast_nullable_to_non_nullable + as double, + maxHeight: null == maxHeight + ? _self.maxHeight + : maxHeight // ignore: cast_nullable_to_non_nullable + as double, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.g.dart b/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.g.dart index ba8560e0..65b9cd93 100644 --- a/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.g.dart +++ b/packages/stac/lib/src/parsers/stac_box_constraints/stac_box_constraints.g.dart @@ -6,17 +6,15 @@ part of 'stac_box_constraints.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBoxConstraintsImpl _$$StacBoxConstraintsImplFromJson( - Map json) => - _$StacBoxConstraintsImpl( +_StacBoxConstraints _$StacBoxConstraintsFromJson(Map json) => + _StacBoxConstraints( minWidth: (json['minWidth'] as num).toDouble(), maxWidth: (json['maxWidth'] as num).toDouble(), minHeight: (json['minHeight'] as num).toDouble(), maxHeight: (json['maxHeight'] as num).toDouble(), ); -Map _$$StacBoxConstraintsImplToJson( - _$StacBoxConstraintsImpl instance) => +Map _$StacBoxConstraintsToJson(_StacBoxConstraints instance) => { 'minWidth': instance.minWidth, 'maxWidth': instance.maxWidth, diff --git a/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.dart b/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.dart index 932f063e..8766c0de 100644 --- a/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.dart +++ b/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.dart @@ -11,7 +11,7 @@ part 'stac_box_decoration.freezed.dart'; part 'stac_box_decoration.g.dart'; @freezed -class StacBoxDecoration with _$StacBoxDecoration { +abstract class StacBoxDecoration with _$StacBoxDecoration { const factory StacBoxDecoration({ String? color, BlendMode? backgroundBlendMode, diff --git a/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.freezed.dart b/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.freezed.dart index 7cffca2d..2125d808 100644 --- a/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,41 +10,73 @@ part of 'stac_box_decoration.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBoxDecoration _$StacBoxDecorationFromJson(Map json) { - return _StacBoxDecoration.fromJson(json); -} - /// @nodoc mixin _$StacBoxDecoration { - String? get color => throw _privateConstructorUsedError; - BlendMode? get backgroundBlendMode => throw _privateConstructorUsedError; - List? get boxShadow => throw _privateConstructorUsedError; - BoxShape get shape => throw _privateConstructorUsedError; - StacBorder? get border => throw _privateConstructorUsedError; - StacBorderRadius? get borderRadius => throw _privateConstructorUsedError; - StacDecorationImage? get image => throw _privateConstructorUsedError; - StacGradient? get gradient => throw _privateConstructorUsedError; - - /// Serializes this StacBoxDecoration to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get color; + BlendMode? get backgroundBlendMode; + List? get boxShadow; + BoxShape get shape; + StacBorder? get border; + StacBorderRadius? get borderRadius; + StacDecorationImage? get image; + StacGradient? get gradient; /// Create a copy of StacBoxDecoration /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBoxDecorationCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacBoxDecorationCopyWithImpl( + this as StacBoxDecoration, _$identity); + + /// Serializes this StacBoxDecoration to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBoxDecoration && + (identical(other.color, color) || other.color == color) && + (identical(other.backgroundBlendMode, backgroundBlendMode) || + other.backgroundBlendMode == backgroundBlendMode) && + const DeepCollectionEquality().equals(other.boxShadow, boxShadow) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.border, border) || other.border == border) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius) && + (identical(other.image, image) || other.image == image) && + (identical(other.gradient, gradient) || + other.gradient == gradient)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + color, + backgroundBlendMode, + const DeepCollectionEquality().hash(boxShadow), + shape, + border, + borderRadius, + image, + gradient); + + @override + String toString() { + return 'StacBoxDecoration(color: $color, backgroundBlendMode: $backgroundBlendMode, boxShadow: $boxShadow, shape: $shape, border: $border, borderRadius: $borderRadius, image: $image, gradient: $gradient)'; + } } /// @nodoc -abstract class $StacBoxDecorationCopyWith<$Res> { +abstract mixin class $StacBoxDecorationCopyWith<$Res> { factory $StacBoxDecorationCopyWith( - StacBoxDecoration value, $Res Function(StacBoxDecoration) then) = - _$StacBoxDecorationCopyWithImpl<$Res, StacBoxDecoration>; + StacBoxDecoration value, $Res Function(StacBoxDecoration) _then) = + _$StacBoxDecorationCopyWithImpl; @useResult $Res call( {String? color, @@ -62,14 +95,12 @@ abstract class $StacBoxDecorationCopyWith<$Res> { } /// @nodoc -class _$StacBoxDecorationCopyWithImpl<$Res, $Val extends StacBoxDecoration> +class _$StacBoxDecorationCopyWithImpl<$Res> implements $StacBoxDecorationCopyWith<$Res> { - _$StacBoxDecorationCopyWithImpl(this._value, this._then); + _$StacBoxDecorationCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacBoxDecoration _self; + final $Res Function(StacBoxDecoration) _then; /// Create a copy of StacBoxDecoration /// with the given fields replaced by the non-null parameter values. @@ -85,40 +116,40 @@ class _$StacBoxDecorationCopyWithImpl<$Res, $Val extends StacBoxDecoration> Object? image = freezed, Object? gradient = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, backgroundBlendMode: freezed == backgroundBlendMode - ? _value.backgroundBlendMode + ? _self.backgroundBlendMode : backgroundBlendMode // ignore: cast_nullable_to_non_nullable as BlendMode?, boxShadow: freezed == boxShadow - ? _value.boxShadow + ? _self.boxShadow : boxShadow // ignore: cast_nullable_to_non_nullable as List?, shape: null == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as BoxShape, border: freezed == border - ? _value.border + ? _self.border : border // ignore: cast_nullable_to_non_nullable as StacBorder?, borderRadius: freezed == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius?, image: freezed == image - ? _value.image + ? _self.image : image // ignore: cast_nullable_to_non_nullable as StacDecorationImage?, gradient: freezed == gradient - ? _value.gradient + ? _self.gradient : gradient // ignore: cast_nullable_to_non_nullable as StacGradient?, - ) as $Val); + )); } /// Create a copy of StacBoxDecoration @@ -126,12 +157,12 @@ class _$StacBoxDecorationCopyWithImpl<$Res, $Val extends StacBoxDecoration> @override @pragma('vm:prefer-inline') $StacBorderCopyWith<$Res>? get border { - if (_value.border == null) { + if (_self.border == null) { return null; } - return $StacBorderCopyWith<$Res>(_value.border!, (value) { - return _then(_value.copyWith(border: value) as $Val); + return $StacBorderCopyWith<$Res>(_self.border!, (value) { + return _then(_self.copyWith(border: value)); }); } @@ -140,12 +171,12 @@ class _$StacBoxDecorationCopyWithImpl<$Res, $Val extends StacBoxDecoration> @override @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith<$Res>? get borderRadius { - if (_value.borderRadius == null) { + if (_self.borderRadius == null) { return null; } - return $StacBorderRadiusCopyWith<$Res>(_value.borderRadius!, (value) { - return _then(_value.copyWith(borderRadius: value) as $Val); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius!, (value) { + return _then(_self.copyWith(borderRadius: value)); }); } @@ -154,12 +185,12 @@ class _$StacBoxDecorationCopyWithImpl<$Res, $Val extends StacBoxDecoration> @override @pragma('vm:prefer-inline') $StacDecorationImageCopyWith<$Res>? get image { - if (_value.image == null) { + if (_self.image == null) { return null; } - return $StacDecorationImageCopyWith<$Res>(_value.image!, (value) { - return _then(_value.copyWith(image: value) as $Val); + return $StacDecorationImageCopyWith<$Res>(_self.image!, (value) { + return _then(_self.copyWith(image: value)); }); } @@ -168,107 +199,20 @@ class _$StacBoxDecorationCopyWithImpl<$Res, $Val extends StacBoxDecoration> @override @pragma('vm:prefer-inline') $StacGradientCopyWith<$Res>? get gradient { - if (_value.gradient == null) { + if (_self.gradient == null) { return null; } - return $StacGradientCopyWith<$Res>(_value.gradient!, (value) { - return _then(_value.copyWith(gradient: value) as $Val); + return $StacGradientCopyWith<$Res>(_self.gradient!, (value) { + return _then(_self.copyWith(gradient: value)); }); } } -/// @nodoc -abstract class _$$StacBoxDecorationImplCopyWith<$Res> - implements $StacBoxDecorationCopyWith<$Res> { - factory _$$StacBoxDecorationImplCopyWith(_$StacBoxDecorationImpl value, - $Res Function(_$StacBoxDecorationImpl) then) = - __$$StacBoxDecorationImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? color, - BlendMode? backgroundBlendMode, - List? boxShadow, - BoxShape shape, - StacBorder? border, - StacBorderRadius? borderRadius, - StacDecorationImage? image, - StacGradient? gradient}); - - @override - $StacBorderCopyWith<$Res>? get border; - @override - $StacBorderRadiusCopyWith<$Res>? get borderRadius; - @override - $StacDecorationImageCopyWith<$Res>? get image; - @override - $StacGradientCopyWith<$Res>? get gradient; -} - -/// @nodoc -class __$$StacBoxDecorationImplCopyWithImpl<$Res> - extends _$StacBoxDecorationCopyWithImpl<$Res, _$StacBoxDecorationImpl> - implements _$$StacBoxDecorationImplCopyWith<$Res> { - __$$StacBoxDecorationImplCopyWithImpl(_$StacBoxDecorationImpl _value, - $Res Function(_$StacBoxDecorationImpl) _then) - : super(_value, _then); - - /// Create a copy of StacBoxDecoration - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? color = freezed, - Object? backgroundBlendMode = freezed, - Object? boxShadow = freezed, - Object? shape = null, - Object? border = freezed, - Object? borderRadius = freezed, - Object? image = freezed, - Object? gradient = freezed, - }) { - return _then(_$StacBoxDecorationImpl( - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - backgroundBlendMode: freezed == backgroundBlendMode - ? _value.backgroundBlendMode - : backgroundBlendMode // ignore: cast_nullable_to_non_nullable - as BlendMode?, - boxShadow: freezed == boxShadow - ? _value._boxShadow - : boxShadow // ignore: cast_nullable_to_non_nullable - as List?, - shape: null == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as BoxShape, - border: freezed == border - ? _value.border - : border // ignore: cast_nullable_to_non_nullable - as StacBorder?, - borderRadius: freezed == borderRadius - ? _value.borderRadius - : borderRadius // ignore: cast_nullable_to_non_nullable - as StacBorderRadius?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as StacDecorationImage?, - gradient: freezed == gradient - ? _value.gradient - : gradient // ignore: cast_nullable_to_non_nullable - as StacGradient?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacBoxDecorationImpl implements _StacBoxDecoration { - const _$StacBoxDecorationImpl( +class _StacBoxDecoration implements StacBoxDecoration { + const _StacBoxDecoration( {this.color, this.backgroundBlendMode, final List? boxShadow, @@ -278,9 +222,8 @@ class _$StacBoxDecorationImpl implements _StacBoxDecoration { this.image, this.gradient}) : _boxShadow = boxShadow; - - factory _$StacBoxDecorationImpl.fromJson(Map json) => - _$$StacBoxDecorationImplFromJson(json); + factory _StacBoxDecoration.fromJson(Map json) => + _$StacBoxDecorationFromJson(json); @override final String? color; @@ -308,16 +251,26 @@ class _$StacBoxDecorationImpl implements _StacBoxDecoration { @override final StacGradient? gradient; + /// Create a copy of StacBoxDecoration + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBoxDecoration(color: $color, backgroundBlendMode: $backgroundBlendMode, boxShadow: $boxShadow, shape: $shape, border: $border, borderRadius: $borderRadius, image: $image, gradient: $gradient)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBoxDecorationCopyWith<_StacBoxDecoration> get copyWith => + __$StacBoxDecorationCopyWithImpl<_StacBoxDecoration>(this, _$identity); + + @override + Map toJson() { + return _$StacBoxDecorationToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBoxDecorationImpl && + other is _StacBoxDecoration && (identical(other.color, color) || other.color == color) && (identical(other.backgroundBlendMode, backgroundBlendMode) || other.backgroundBlendMode == backgroundBlendMode) && @@ -345,58 +298,153 @@ class _$StacBoxDecorationImpl implements _StacBoxDecoration { image, gradient); - /// Create a copy of StacBoxDecoration - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacBoxDecorationImplCopyWith<_$StacBoxDecorationImpl> get copyWith => - __$$StacBoxDecorationImplCopyWithImpl<_$StacBoxDecorationImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacBoxDecorationImplToJson( - this, - ); + String toString() { + return 'StacBoxDecoration(color: $color, backgroundBlendMode: $backgroundBlendMode, boxShadow: $boxShadow, shape: $shape, border: $border, borderRadius: $borderRadius, image: $image, gradient: $gradient)'; } } -abstract class _StacBoxDecoration implements StacBoxDecoration { - const factory _StacBoxDecoration( - {final String? color, - final BlendMode? backgroundBlendMode, - final List? boxShadow, - final BoxShape shape, - final StacBorder? border, - final StacBorderRadius? borderRadius, - final StacDecorationImage? image, - final StacGradient? gradient}) = _$StacBoxDecorationImpl; - - factory _StacBoxDecoration.fromJson(Map json) = - _$StacBoxDecorationImpl.fromJson; +/// @nodoc +abstract mixin class _$StacBoxDecorationCopyWith<$Res> + implements $StacBoxDecorationCopyWith<$Res> { + factory _$StacBoxDecorationCopyWith( + _StacBoxDecoration value, $Res Function(_StacBoxDecoration) _then) = + __$StacBoxDecorationCopyWithImpl; + @override + @useResult + $Res call( + {String? color, + BlendMode? backgroundBlendMode, + List? boxShadow, + BoxShape shape, + StacBorder? border, + StacBorderRadius? borderRadius, + StacDecorationImage? image, + StacGradient? gradient}); @override - String? get color; + $StacBorderCopyWith<$Res>? get border; @override - BlendMode? get backgroundBlendMode; + $StacBorderRadiusCopyWith<$Res>? get borderRadius; @override - List? get boxShadow; + $StacDecorationImageCopyWith<$Res>? get image; @override - BoxShape get shape; + $StacGradientCopyWith<$Res>? get gradient; +} + +/// @nodoc +class __$StacBoxDecorationCopyWithImpl<$Res> + implements _$StacBoxDecorationCopyWith<$Res> { + __$StacBoxDecorationCopyWithImpl(this._self, this._then); + + final _StacBoxDecoration _self; + final $Res Function(_StacBoxDecoration) _then; + + /// Create a copy of StacBoxDecoration + /// with the given fields replaced by the non-null parameter values. @override - StacBorder? get border; + @pragma('vm:prefer-inline') + $Res call({ + Object? color = freezed, + Object? backgroundBlendMode = freezed, + Object? boxShadow = freezed, + Object? shape = null, + Object? border = freezed, + Object? borderRadius = freezed, + Object? image = freezed, + Object? gradient = freezed, + }) { + return _then(_StacBoxDecoration( + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + backgroundBlendMode: freezed == backgroundBlendMode + ? _self.backgroundBlendMode + : backgroundBlendMode // ignore: cast_nullable_to_non_nullable + as BlendMode?, + boxShadow: freezed == boxShadow + ? _self._boxShadow + : boxShadow // ignore: cast_nullable_to_non_nullable + as List?, + shape: null == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as BoxShape, + border: freezed == border + ? _self.border + : border // ignore: cast_nullable_to_non_nullable + as StacBorder?, + borderRadius: freezed == borderRadius + ? _self.borderRadius + : borderRadius // ignore: cast_nullable_to_non_nullable + as StacBorderRadius?, + image: freezed == image + ? _self.image + : image // ignore: cast_nullable_to_non_nullable + as StacDecorationImage?, + gradient: freezed == gradient + ? _self.gradient + : gradient // ignore: cast_nullable_to_non_nullable + as StacGradient?, + )); + } + + /// Create a copy of StacBoxDecoration + /// with the given fields replaced by the non-null parameter values. @override - StacBorderRadius? get borderRadius; + @pragma('vm:prefer-inline') + $StacBorderCopyWith<$Res>? get border { + if (_self.border == null) { + return null; + } + + return $StacBorderCopyWith<$Res>(_self.border!, (value) { + return _then(_self.copyWith(border: value)); + }); + } + + /// Create a copy of StacBoxDecoration + /// with the given fields replaced by the non-null parameter values. @override - StacDecorationImage? get image; + @pragma('vm:prefer-inline') + $StacBorderRadiusCopyWith<$Res>? get borderRadius { + if (_self.borderRadius == null) { + return null; + } + + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius!, (value) { + return _then(_self.copyWith(borderRadius: value)); + }); + } + + /// Create a copy of StacBoxDecoration + /// with the given fields replaced by the non-null parameter values. @override - StacGradient? get gradient; + @pragma('vm:prefer-inline') + $StacDecorationImageCopyWith<$Res>? get image { + if (_self.image == null) { + return null; + } + + return $StacDecorationImageCopyWith<$Res>(_self.image!, (value) { + return _then(_self.copyWith(image: value)); + }); + } /// Create a copy of StacBoxDecoration /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBoxDecorationImplCopyWith<_$StacBoxDecorationImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacGradientCopyWith<$Res>? get gradient { + if (_self.gradient == null) { + return null; + } + + return $StacGradientCopyWith<$Res>(_self.gradient!, (value) { + return _then(_self.copyWith(gradient: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.g.dart b/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.g.dart index 2e74de82..bb9fb41e 100644 --- a/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.g.dart +++ b/packages/stac/lib/src/parsers/stac_box_decoration/stac_box_decoration.g.dart @@ -6,9 +6,8 @@ part of 'stac_box_decoration.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBoxDecorationImpl _$$StacBoxDecorationImplFromJson( - Map json) => - _$StacBoxDecorationImpl( +_StacBoxDecoration _$StacBoxDecorationFromJson(Map json) => + _StacBoxDecoration( color: json['color'] as String?, backgroundBlendMode: $enumDecodeNullable(_$BlendModeEnumMap, json['backgroundBlendMode']), @@ -33,8 +32,7 @@ _$StacBoxDecorationImpl _$$StacBoxDecorationImplFromJson( : StacGradient.fromJson(json['gradient'] as Map), ); -Map _$$StacBoxDecorationImplToJson( - _$StacBoxDecorationImpl instance) => +Map _$StacBoxDecorationToJson(_StacBoxDecoration instance) => { 'color': instance.color, 'backgroundBlendMode': _$BlendModeEnumMap[instance.backgroundBlendMode], diff --git a/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.dart b/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.dart index d1fd9232..8e328536 100644 --- a/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.dart +++ b/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.dart @@ -7,7 +7,7 @@ part 'stac_box_shadow.freezed.dart'; part 'stac_box_shadow.g.dart'; @freezed -class StacBoxShadow with _$StacBoxShadow { +abstract class StacBoxShadow with _$StacBoxShadow { const factory StacBoxShadow({ String? color, @Default(0.0) double? blurRadius, diff --git a/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.freezed.dart b/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.freezed.dart index c96ee5c1..68b00ee6 100644 --- a/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,38 +10,59 @@ part of 'stac_box_shadow.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBoxShadow _$StacBoxShadowFromJson(Map json) { - return _StacBoxShadow.fromJson(json); -} - /// @nodoc mixin _$StacBoxShadow { - String? get color => throw _privateConstructorUsedError; - double? get blurRadius => throw _privateConstructorUsedError; - StacOffset get offset => throw _privateConstructorUsedError; - double? get spreadRadius => throw _privateConstructorUsedError; - BlurStyle? get blurStyle => throw _privateConstructorUsedError; - - /// Serializes this StacBoxShadow to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get color; + double? get blurRadius; + StacOffset get offset; + double? get spreadRadius; + BlurStyle? get blurStyle; /// Create a copy of StacBoxShadow /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBoxShadowCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacBoxShadowCopyWithImpl( + this as StacBoxShadow, _$identity); + + /// Serializes this StacBoxShadow to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBoxShadow && + (identical(other.color, color) || other.color == color) && + (identical(other.blurRadius, blurRadius) || + other.blurRadius == blurRadius) && + (identical(other.offset, offset) || other.offset == offset) && + (identical(other.spreadRadius, spreadRadius) || + other.spreadRadius == spreadRadius) && + (identical(other.blurStyle, blurStyle) || + other.blurStyle == blurStyle)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, color, blurRadius, offset, spreadRadius, blurStyle); + + @override + String toString() { + return 'StacBoxShadow(color: $color, blurRadius: $blurRadius, offset: $offset, spreadRadius: $spreadRadius, blurStyle: $blurStyle)'; + } } /// @nodoc -abstract class $StacBoxShadowCopyWith<$Res> { +abstract mixin class $StacBoxShadowCopyWith<$Res> { factory $StacBoxShadowCopyWith( - StacBoxShadow value, $Res Function(StacBoxShadow) then) = - _$StacBoxShadowCopyWithImpl<$Res, StacBoxShadow>; + StacBoxShadow value, $Res Function(StacBoxShadow) _then) = + _$StacBoxShadowCopyWithImpl; @useResult $Res call( {String? color, @@ -53,14 +75,12 @@ abstract class $StacBoxShadowCopyWith<$Res> { } /// @nodoc -class _$StacBoxShadowCopyWithImpl<$Res, $Val extends StacBoxShadow> +class _$StacBoxShadowCopyWithImpl<$Res> implements $StacBoxShadowCopyWith<$Res> { - _$StacBoxShadowCopyWithImpl(this._value, this._then); + _$StacBoxShadowCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacBoxShadow _self; + final $Res Function(StacBoxShadow) _then; /// Create a copy of StacBoxShadow /// with the given fields replaced by the non-null parameter values. @@ -73,28 +93,28 @@ class _$StacBoxShadowCopyWithImpl<$Res, $Val extends StacBoxShadow> Object? spreadRadius = freezed, Object? blurStyle = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, blurRadius: freezed == blurRadius - ? _value.blurRadius + ? _self.blurRadius : blurRadius // ignore: cast_nullable_to_non_nullable as double?, offset: null == offset - ? _value.offset + ? _self.offset : offset // ignore: cast_nullable_to_non_nullable as StacOffset, spreadRadius: freezed == spreadRadius - ? _value.spreadRadius + ? _self.spreadRadius : spreadRadius // ignore: cast_nullable_to_non_nullable as double?, blurStyle: freezed == blurStyle - ? _value.blurStyle + ? _self.blurStyle : blurStyle // ignore: cast_nullable_to_non_nullable as BlurStyle?, - ) as $Val); + )); } /// Create a copy of StacBoxShadow @@ -102,87 +122,23 @@ class _$StacBoxShadowCopyWithImpl<$Res, $Val extends StacBoxShadow> @override @pragma('vm:prefer-inline') $StacOffsetCopyWith<$Res> get offset { - return $StacOffsetCopyWith<$Res>(_value.offset, (value) { - return _then(_value.copyWith(offset: value) as $Val); + return $StacOffsetCopyWith<$Res>(_self.offset, (value) { + return _then(_self.copyWith(offset: value)); }); } } -/// @nodoc -abstract class _$$StacBoxShadowImplCopyWith<$Res> - implements $StacBoxShadowCopyWith<$Res> { - factory _$$StacBoxShadowImplCopyWith( - _$StacBoxShadowImpl value, $Res Function(_$StacBoxShadowImpl) then) = - __$$StacBoxShadowImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? color, - double? blurRadius, - StacOffset offset, - double? spreadRadius, - BlurStyle? blurStyle}); - - @override - $StacOffsetCopyWith<$Res> get offset; -} - -/// @nodoc -class __$$StacBoxShadowImplCopyWithImpl<$Res> - extends _$StacBoxShadowCopyWithImpl<$Res, _$StacBoxShadowImpl> - implements _$$StacBoxShadowImplCopyWith<$Res> { - __$$StacBoxShadowImplCopyWithImpl( - _$StacBoxShadowImpl _value, $Res Function(_$StacBoxShadowImpl) _then) - : super(_value, _then); - - /// Create a copy of StacBoxShadow - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? color = freezed, - Object? blurRadius = freezed, - Object? offset = null, - Object? spreadRadius = freezed, - Object? blurStyle = freezed, - }) { - return _then(_$StacBoxShadowImpl( - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - blurRadius: freezed == blurRadius - ? _value.blurRadius - : blurRadius // ignore: cast_nullable_to_non_nullable - as double?, - offset: null == offset - ? _value.offset - : offset // ignore: cast_nullable_to_non_nullable - as StacOffset, - spreadRadius: freezed == spreadRadius - ? _value.spreadRadius - : spreadRadius // ignore: cast_nullable_to_non_nullable - as double?, - blurStyle: freezed == blurStyle - ? _value.blurStyle - : blurStyle // ignore: cast_nullable_to_non_nullable - as BlurStyle?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacBoxShadowImpl implements _StacBoxShadow { - const _$StacBoxShadowImpl( +class _StacBoxShadow implements StacBoxShadow { + const _StacBoxShadow( {this.color, this.blurRadius = 0.0, this.offset = const StacOffset(dx: 0, dy: 0), this.spreadRadius = 0.0, this.blurStyle = BlurStyle.normal}); - - factory _$StacBoxShadowImpl.fromJson(Map json) => - _$$StacBoxShadowImplFromJson(json); + factory _StacBoxShadow.fromJson(Map json) => + _$StacBoxShadowFromJson(json); @override final String? color; @@ -199,16 +155,26 @@ class _$StacBoxShadowImpl implements _StacBoxShadow { @JsonKey() final BlurStyle? blurStyle; + /// Create a copy of StacBoxShadow + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBoxShadow(color: $color, blurRadius: $blurRadius, offset: $offset, spreadRadius: $spreadRadius, blurStyle: $blurStyle)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBoxShadowCopyWith<_StacBoxShadow> get copyWith => + __$StacBoxShadowCopyWithImpl<_StacBoxShadow>(this, _$identity); + + @override + Map toJson() { + return _$StacBoxShadowToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBoxShadowImpl && + other is _StacBoxShadow && (identical(other.color, color) || other.color == color) && (identical(other.blurRadius, blurRadius) || other.blurRadius == blurRadius) && @@ -224,48 +190,83 @@ class _$StacBoxShadowImpl implements _StacBoxShadow { int get hashCode => Object.hash( runtimeType, color, blurRadius, offset, spreadRadius, blurStyle); - /// Create a copy of StacBoxShadow - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacBoxShadowImplCopyWith<_$StacBoxShadowImpl> get copyWith => - __$$StacBoxShadowImplCopyWithImpl<_$StacBoxShadowImpl>(this, _$identity); + String toString() { + return 'StacBoxShadow(color: $color, blurRadius: $blurRadius, offset: $offset, spreadRadius: $spreadRadius, blurStyle: $blurStyle)'; + } +} +/// @nodoc +abstract mixin class _$StacBoxShadowCopyWith<$Res> + implements $StacBoxShadowCopyWith<$Res> { + factory _$StacBoxShadowCopyWith( + _StacBoxShadow value, $Res Function(_StacBoxShadow) _then) = + __$StacBoxShadowCopyWithImpl; @override - Map toJson() { - return _$$StacBoxShadowImplToJson( - this, - ); - } + @useResult + $Res call( + {String? color, + double? blurRadius, + StacOffset offset, + double? spreadRadius, + BlurStyle? blurStyle}); + + @override + $StacOffsetCopyWith<$Res> get offset; } -abstract class _StacBoxShadow implements StacBoxShadow { - const factory _StacBoxShadow( - {final String? color, - final double? blurRadius, - final StacOffset offset, - final double? spreadRadius, - final BlurStyle? blurStyle}) = _$StacBoxShadowImpl; +/// @nodoc +class __$StacBoxShadowCopyWithImpl<$Res> + implements _$StacBoxShadowCopyWith<$Res> { + __$StacBoxShadowCopyWithImpl(this._self, this._then); - factory _StacBoxShadow.fromJson(Map json) = - _$StacBoxShadowImpl.fromJson; + final _StacBoxShadow _self; + final $Res Function(_StacBoxShadow) _then; + /// Create a copy of StacBoxShadow + /// with the given fields replaced by the non-null parameter values. @override - String? get color; - @override - double? get blurRadius; - @override - StacOffset get offset; - @override - double? get spreadRadius; - @override - BlurStyle? get blurStyle; + @pragma('vm:prefer-inline') + $Res call({ + Object? color = freezed, + Object? blurRadius = freezed, + Object? offset = null, + Object? spreadRadius = freezed, + Object? blurStyle = freezed, + }) { + return _then(_StacBoxShadow( + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + blurRadius: freezed == blurRadius + ? _self.blurRadius + : blurRadius // ignore: cast_nullable_to_non_nullable + as double?, + offset: null == offset + ? _self.offset + : offset // ignore: cast_nullable_to_non_nullable + as StacOffset, + spreadRadius: freezed == spreadRadius + ? _self.spreadRadius + : spreadRadius // ignore: cast_nullable_to_non_nullable + as double?, + blurStyle: freezed == blurStyle + ? _self.blurStyle + : blurStyle // ignore: cast_nullable_to_non_nullable + as BlurStyle?, + )); + } /// Create a copy of StacBoxShadow /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBoxShadowImplCopyWith<_$StacBoxShadowImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacOffsetCopyWith<$Res> get offset { + return $StacOffsetCopyWith<$Res>(_self.offset, (value) { + return _then(_self.copyWith(offset: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.g.dart b/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.g.dart index 380cb1b5..3b89c8dc 100644 --- a/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.g.dart +++ b/packages/stac/lib/src/parsers/stac_box_shadow/stac_box_shadow.g.dart @@ -6,8 +6,8 @@ part of 'stac_box_shadow.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBoxShadowImpl _$$StacBoxShadowImplFromJson(Map json) => - _$StacBoxShadowImpl( +_StacBoxShadow _$StacBoxShadowFromJson(Map json) => + _StacBoxShadow( color: json['color'] as String?, blurRadius: (json['blurRadius'] as num?)?.toDouble() ?? 0.0, offset: json['offset'] == null @@ -18,7 +18,7 @@ _$StacBoxShadowImpl _$$StacBoxShadowImplFromJson(Map json) => BlurStyle.normal, ); -Map _$$StacBoxShadowImplToJson(_$StacBoxShadowImpl instance) => +Map _$StacBoxShadowToJson(_StacBoxShadow instance) => { 'color': instance.color, 'blurRadius': instance.blurRadius, diff --git a/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.dart b/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.dart index a72c9a83..183a3389 100644 --- a/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.dart +++ b/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.dart @@ -11,7 +11,7 @@ part 'stac_button_style.freezed.dart'; part 'stac_button_style.g.dart'; @freezed -class StacButtonStyle with _$StacButtonStyle { +abstract class StacButtonStyle with _$StacButtonStyle { const factory StacButtonStyle({ String? foregroundColor, String? backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.freezed.dart b/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.freezed.dart index e1b8ef46..d8d2885a 100644 --- a/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,51 +10,117 @@ part of 'stac_button_style.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacButtonStyle _$StacButtonStyleFromJson(Map json) { - return _StacButtonStyle.fromJson(json); -} - /// @nodoc mixin _$StacButtonStyle { - String? get foregroundColor => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get disabledForegroundColor => throw _privateConstructorUsedError; - String? get disabledBackgroundColor => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - String? get iconColor => throw _privateConstructorUsedError; - String? get disabledIconColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - StacTextStyle? get textStyle => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - StacSize? get minimumSize => throw _privateConstructorUsedError; - StacSize? get fixedSize => throw _privateConstructorUsedError; - StacSize? get maximumSize => throw _privateConstructorUsedError; - StacBorderSide? get side => throw _privateConstructorUsedError; - StacRoundedRectangleBorder? get shape => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - double? get iconSize => throw _privateConstructorUsedError; - - /// Serializes this StacButtonStyle to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get foregroundColor; + String? get backgroundColor; + String? get disabledForegroundColor; + String? get disabledBackgroundColor; + String? get shadowColor; + String? get surfaceTintColor; + String? get iconColor; + String? get disabledIconColor; + double? get elevation; + StacTextStyle? get textStyle; + StacEdgeInsets? get padding; + StacSize? get minimumSize; + StacSize? get fixedSize; + StacSize? get maximumSize; + StacBorderSide? get side; + StacRoundedRectangleBorder? get shape; + bool? get enableFeedback; + double? get iconSize; /// Create a copy of StacButtonStyle /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacButtonStyleCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacButtonStyleCopyWithImpl( + this as StacButtonStyle, _$identity); + + /// Serializes this StacButtonStyle to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacButtonStyle && + (identical(other.foregroundColor, foregroundColor) || + other.foregroundColor == foregroundColor) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical( + other.disabledForegroundColor, disabledForegroundColor) || + other.disabledForegroundColor == disabledForegroundColor) && + (identical( + other.disabledBackgroundColor, disabledBackgroundColor) || + other.disabledBackgroundColor == disabledBackgroundColor) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.iconColor, iconColor) || + other.iconColor == iconColor) && + (identical(other.disabledIconColor, disabledIconColor) || + other.disabledIconColor == disabledIconColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.textStyle, textStyle) || + other.textStyle == textStyle) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.minimumSize, minimumSize) || + other.minimumSize == minimumSize) && + (identical(other.fixedSize, fixedSize) || + other.fixedSize == fixedSize) && + (identical(other.maximumSize, maximumSize) || + other.maximumSize == maximumSize) && + (identical(other.side, side) || other.side == side) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.iconSize, iconSize) || + other.iconSize == iconSize)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + foregroundColor, + backgroundColor, + disabledForegroundColor, + disabledBackgroundColor, + shadowColor, + surfaceTintColor, + iconColor, + disabledIconColor, + elevation, + textStyle, + padding, + minimumSize, + fixedSize, + maximumSize, + side, + shape, + enableFeedback, + iconSize); + + @override + String toString() { + return 'StacButtonStyle(foregroundColor: $foregroundColor, backgroundColor: $backgroundColor, disabledForegroundColor: $disabledForegroundColor, disabledBackgroundColor: $disabledBackgroundColor, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconColor: $iconColor, disabledIconColor: $disabledIconColor, elevation: $elevation, textStyle: $textStyle, padding: $padding, minimumSize: $minimumSize, fixedSize: $fixedSize, maximumSize: $maximumSize, side: $side, shape: $shape, enableFeedback: $enableFeedback, iconSize: $iconSize)'; + } } /// @nodoc -abstract class $StacButtonStyleCopyWith<$Res> { +abstract mixin class $StacButtonStyleCopyWith<$Res> { factory $StacButtonStyleCopyWith( - StacButtonStyle value, $Res Function(StacButtonStyle) then) = - _$StacButtonStyleCopyWithImpl<$Res, StacButtonStyle>; + StacButtonStyle value, $Res Function(StacButtonStyle) _then) = + _$StacButtonStyleCopyWithImpl; @useResult $Res call( {String? foregroundColor, @@ -85,14 +152,12 @@ abstract class $StacButtonStyleCopyWith<$Res> { } /// @nodoc -class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> +class _$StacButtonStyleCopyWithImpl<$Res> implements $StacButtonStyleCopyWith<$Res> { - _$StacButtonStyleCopyWithImpl(this._value, this._then); + _$StacButtonStyleCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacButtonStyle _self; + final $Res Function(StacButtonStyle) _then; /// Create a copy of StacButtonStyle /// with the given fields replaced by the non-null parameter values. @@ -118,80 +183,80 @@ class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> Object? enableFeedback = freezed, Object? iconSize = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( foregroundColor: freezed == foregroundColor - ? _value.foregroundColor + ? _self.foregroundColor : foregroundColor // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, disabledForegroundColor: freezed == disabledForegroundColor - ? _value.disabledForegroundColor + ? _self.disabledForegroundColor : disabledForegroundColor // ignore: cast_nullable_to_non_nullable as String?, disabledBackgroundColor: freezed == disabledBackgroundColor - ? _value.disabledBackgroundColor + ? _self.disabledBackgroundColor : disabledBackgroundColor // ignore: cast_nullable_to_non_nullable as String?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, iconColor: freezed == iconColor - ? _value.iconColor + ? _self.iconColor : iconColor // ignore: cast_nullable_to_non_nullable as String?, disabledIconColor: freezed == disabledIconColor - ? _value.disabledIconColor + ? _self.disabledIconColor : disabledIconColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, textStyle: freezed == textStyle - ? _value.textStyle + ? _self.textStyle : textStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, minimumSize: freezed == minimumSize - ? _value.minimumSize + ? _self.minimumSize : minimumSize // ignore: cast_nullable_to_non_nullable as StacSize?, fixedSize: freezed == fixedSize - ? _value.fixedSize + ? _self.fixedSize : fixedSize // ignore: cast_nullable_to_non_nullable as StacSize?, maximumSize: freezed == maximumSize - ? _value.maximumSize + ? _self.maximumSize : maximumSize // ignore: cast_nullable_to_non_nullable as StacSize?, side: freezed == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacRoundedRectangleBorder?, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, iconSize: freezed == iconSize - ? _value.iconSize + ? _self.iconSize : iconSize // ignore: cast_nullable_to_non_nullable as double?, - ) as $Val); + )); } /// Create a copy of StacButtonStyle @@ -199,12 +264,12 @@ class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get textStyle { - if (_value.textStyle == null) { + if (_self.textStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.textStyle!, (value) { - return _then(_value.copyWith(textStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.textStyle!, (value) { + return _then(_self.copyWith(textStyle: value)); }); } @@ -213,12 +278,12 @@ class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } @@ -227,12 +292,12 @@ class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> @override @pragma('vm:prefer-inline') $StacSizeCopyWith<$Res>? get minimumSize { - if (_value.minimumSize == null) { + if (_self.minimumSize == null) { return null; } - return $StacSizeCopyWith<$Res>(_value.minimumSize!, (value) { - return _then(_value.copyWith(minimumSize: value) as $Val); + return $StacSizeCopyWith<$Res>(_self.minimumSize!, (value) { + return _then(_self.copyWith(minimumSize: value)); }); } @@ -241,12 +306,12 @@ class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> @override @pragma('vm:prefer-inline') $StacSizeCopyWith<$Res>? get fixedSize { - if (_value.fixedSize == null) { + if (_self.fixedSize == null) { return null; } - return $StacSizeCopyWith<$Res>(_value.fixedSize!, (value) { - return _then(_value.copyWith(fixedSize: value) as $Val); + return $StacSizeCopyWith<$Res>(_self.fixedSize!, (value) { + return _then(_self.copyWith(fixedSize: value)); }); } @@ -255,12 +320,12 @@ class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> @override @pragma('vm:prefer-inline') $StacSizeCopyWith<$Res>? get maximumSize { - if (_value.maximumSize == null) { + if (_self.maximumSize == null) { return null; } - return $StacSizeCopyWith<$Res>(_value.maximumSize!, (value) { - return _then(_value.copyWith(maximumSize: value) as $Val); + return $StacSizeCopyWith<$Res>(_self.maximumSize!, (value) { + return _then(_self.copyWith(maximumSize: value)); }); } @@ -269,12 +334,12 @@ class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res>? get side { - if (_value.side == null) { + if (_self.side == null) { return null; } - return $StacBorderSideCopyWith<$Res>(_value.side!, (value) { - return _then(_value.copyWith(side: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.side!, (value) { + return _then(_self.copyWith(side: value)); }); } @@ -283,173 +348,20 @@ class _$StacButtonStyleCopyWithImpl<$Res, $Val extends StacButtonStyle> @override @pragma('vm:prefer-inline') $StacRoundedRectangleBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacRoundedRectangleBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacRoundedRectangleBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } } -/// @nodoc -abstract class _$$StacButtonStyleImplCopyWith<$Res> - implements $StacButtonStyleCopyWith<$Res> { - factory _$$StacButtonStyleImplCopyWith(_$StacButtonStyleImpl value, - $Res Function(_$StacButtonStyleImpl) then) = - __$$StacButtonStyleImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? foregroundColor, - String? backgroundColor, - String? disabledForegroundColor, - String? disabledBackgroundColor, - String? shadowColor, - String? surfaceTintColor, - String? iconColor, - String? disabledIconColor, - double? elevation, - StacTextStyle? textStyle, - StacEdgeInsets? padding, - StacSize? minimumSize, - StacSize? fixedSize, - StacSize? maximumSize, - StacBorderSide? side, - StacRoundedRectangleBorder? shape, - bool? enableFeedback, - double? iconSize}); - - @override - $StacTextStyleCopyWith<$Res>? get textStyle; - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; - @override - $StacSizeCopyWith<$Res>? get minimumSize; - @override - $StacSizeCopyWith<$Res>? get fixedSize; - @override - $StacSizeCopyWith<$Res>? get maximumSize; - @override - $StacBorderSideCopyWith<$Res>? get side; - @override - $StacRoundedRectangleBorderCopyWith<$Res>? get shape; -} - -/// @nodoc -class __$$StacButtonStyleImplCopyWithImpl<$Res> - extends _$StacButtonStyleCopyWithImpl<$Res, _$StacButtonStyleImpl> - implements _$$StacButtonStyleImplCopyWith<$Res> { - __$$StacButtonStyleImplCopyWithImpl( - _$StacButtonStyleImpl _value, $Res Function(_$StacButtonStyleImpl) _then) - : super(_value, _then); - - /// Create a copy of StacButtonStyle - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? foregroundColor = freezed, - Object? backgroundColor = freezed, - Object? disabledForegroundColor = freezed, - Object? disabledBackgroundColor = freezed, - Object? shadowColor = freezed, - Object? surfaceTintColor = freezed, - Object? iconColor = freezed, - Object? disabledIconColor = freezed, - Object? elevation = freezed, - Object? textStyle = freezed, - Object? padding = freezed, - Object? minimumSize = freezed, - Object? fixedSize = freezed, - Object? maximumSize = freezed, - Object? side = freezed, - Object? shape = freezed, - Object? enableFeedback = freezed, - Object? iconSize = freezed, - }) { - return _then(_$StacButtonStyleImpl( - foregroundColor: freezed == foregroundColor - ? _value.foregroundColor - : foregroundColor // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - disabledForegroundColor: freezed == disabledForegroundColor - ? _value.disabledForegroundColor - : disabledForegroundColor // ignore: cast_nullable_to_non_nullable - as String?, - disabledBackgroundColor: freezed == disabledBackgroundColor - ? _value.disabledBackgroundColor - : disabledBackgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - iconColor: freezed == iconColor - ? _value.iconColor - : iconColor // ignore: cast_nullable_to_non_nullable - as String?, - disabledIconColor: freezed == disabledIconColor - ? _value.disabledIconColor - : disabledIconColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - textStyle: freezed == textStyle - ? _value.textStyle - : textStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - minimumSize: freezed == minimumSize - ? _value.minimumSize - : minimumSize // ignore: cast_nullable_to_non_nullable - as StacSize?, - fixedSize: freezed == fixedSize - ? _value.fixedSize - : fixedSize // ignore: cast_nullable_to_non_nullable - as StacSize?, - maximumSize: freezed == maximumSize - ? _value.maximumSize - : maximumSize // ignore: cast_nullable_to_non_nullable - as StacSize?, - side: freezed == side - ? _value.side - : side // ignore: cast_nullable_to_non_nullable - as StacBorderSide?, - shape: freezed == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as StacRoundedRectangleBorder?, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - iconSize: freezed == iconSize - ? _value.iconSize - : iconSize // ignore: cast_nullable_to_non_nullable - as double?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacButtonStyleImpl implements _StacButtonStyle { - const _$StacButtonStyleImpl( +class _StacButtonStyle implements StacButtonStyle { + const _StacButtonStyle( {this.foregroundColor, this.backgroundColor, this.disabledForegroundColor, @@ -468,9 +380,8 @@ class _$StacButtonStyleImpl implements _StacButtonStyle { this.shape, this.enableFeedback, this.iconSize}); - - factory _$StacButtonStyleImpl.fromJson(Map json) => - _$$StacButtonStyleImplFromJson(json); + factory _StacButtonStyle.fromJson(Map json) => + _$StacButtonStyleFromJson(json); @override final String? foregroundColor; @@ -509,16 +420,26 @@ class _$StacButtonStyleImpl implements _StacButtonStyle { @override final double? iconSize; + /// Create a copy of StacButtonStyle + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacButtonStyle(foregroundColor: $foregroundColor, backgroundColor: $backgroundColor, disabledForegroundColor: $disabledForegroundColor, disabledBackgroundColor: $disabledBackgroundColor, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconColor: $iconColor, disabledIconColor: $disabledIconColor, elevation: $elevation, textStyle: $textStyle, padding: $padding, minimumSize: $minimumSize, fixedSize: $fixedSize, maximumSize: $maximumSize, side: $side, shape: $shape, enableFeedback: $enableFeedback, iconSize: $iconSize)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacButtonStyleCopyWith<_StacButtonStyle> get copyWith => + __$StacButtonStyleCopyWithImpl<_StacButtonStyle>(this, _$identity); + + @override + Map toJson() { + return _$StacButtonStyleToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacButtonStyleImpl && + other is _StacButtonStyle && (identical(other.foregroundColor, foregroundColor) || other.foregroundColor == foregroundColor) && (identical(other.backgroundColor, backgroundColor) || @@ -579,88 +500,261 @@ class _$StacButtonStyleImpl implements _StacButtonStyle { enableFeedback, iconSize); - /// Create a copy of StacButtonStyle - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacButtonStyleImplCopyWith<_$StacButtonStyleImpl> get copyWith => - __$$StacButtonStyleImplCopyWithImpl<_$StacButtonStyleImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacButtonStyleImplToJson( - this, - ); + String toString() { + return 'StacButtonStyle(foregroundColor: $foregroundColor, backgroundColor: $backgroundColor, disabledForegroundColor: $disabledForegroundColor, disabledBackgroundColor: $disabledBackgroundColor, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconColor: $iconColor, disabledIconColor: $disabledIconColor, elevation: $elevation, textStyle: $textStyle, padding: $padding, minimumSize: $minimumSize, fixedSize: $fixedSize, maximumSize: $maximumSize, side: $side, shape: $shape, enableFeedback: $enableFeedback, iconSize: $iconSize)'; } } -abstract class _StacButtonStyle implements StacButtonStyle { - const factory _StacButtonStyle( - {final String? foregroundColor, - final String? backgroundColor, - final String? disabledForegroundColor, - final String? disabledBackgroundColor, - final String? shadowColor, - final String? surfaceTintColor, - final String? iconColor, - final String? disabledIconColor, - final double? elevation, - final StacTextStyle? textStyle, - final StacEdgeInsets? padding, - final StacSize? minimumSize, - final StacSize? fixedSize, - final StacSize? maximumSize, - final StacBorderSide? side, - final StacRoundedRectangleBorder? shape, - final bool? enableFeedback, - final double? iconSize}) = _$StacButtonStyleImpl; - - factory _StacButtonStyle.fromJson(Map json) = - _$StacButtonStyleImpl.fromJson; - - @override - String? get foregroundColor; - @override - String? get backgroundColor; - @override - String? get disabledForegroundColor; +/// @nodoc +abstract mixin class _$StacButtonStyleCopyWith<$Res> + implements $StacButtonStyleCopyWith<$Res> { + factory _$StacButtonStyleCopyWith( + _StacButtonStyle value, $Res Function(_StacButtonStyle) _then) = + __$StacButtonStyleCopyWithImpl; @override - String? get disabledBackgroundColor; + @useResult + $Res call( + {String? foregroundColor, + String? backgroundColor, + String? disabledForegroundColor, + String? disabledBackgroundColor, + String? shadowColor, + String? surfaceTintColor, + String? iconColor, + String? disabledIconColor, + double? elevation, + StacTextStyle? textStyle, + StacEdgeInsets? padding, + StacSize? minimumSize, + StacSize? fixedSize, + StacSize? maximumSize, + StacBorderSide? side, + StacRoundedRectangleBorder? shape, + bool? enableFeedback, + double? iconSize}); + @override - String? get shadowColor; + $StacTextStyleCopyWith<$Res>? get textStyle; @override - String? get surfaceTintColor; + $StacEdgeInsetsCopyWith<$Res>? get padding; @override - String? get iconColor; + $StacSizeCopyWith<$Res>? get minimumSize; @override - String? get disabledIconColor; + $StacSizeCopyWith<$Res>? get fixedSize; @override - double? get elevation; + $StacSizeCopyWith<$Res>? get maximumSize; @override - StacTextStyle? get textStyle; + $StacBorderSideCopyWith<$Res>? get side; @override - StacEdgeInsets? get padding; + $StacRoundedRectangleBorderCopyWith<$Res>? get shape; +} + +/// @nodoc +class __$StacButtonStyleCopyWithImpl<$Res> + implements _$StacButtonStyleCopyWith<$Res> { + __$StacButtonStyleCopyWithImpl(this._self, this._then); + + final _StacButtonStyle _self; + final $Res Function(_StacButtonStyle) _then; + + /// Create a copy of StacButtonStyle + /// with the given fields replaced by the non-null parameter values. @override - StacSize? get minimumSize; + @pragma('vm:prefer-inline') + $Res call({ + Object? foregroundColor = freezed, + Object? backgroundColor = freezed, + Object? disabledForegroundColor = freezed, + Object? disabledBackgroundColor = freezed, + Object? shadowColor = freezed, + Object? surfaceTintColor = freezed, + Object? iconColor = freezed, + Object? disabledIconColor = freezed, + Object? elevation = freezed, + Object? textStyle = freezed, + Object? padding = freezed, + Object? minimumSize = freezed, + Object? fixedSize = freezed, + Object? maximumSize = freezed, + Object? side = freezed, + Object? shape = freezed, + Object? enableFeedback = freezed, + Object? iconSize = freezed, + }) { + return _then(_StacButtonStyle( + foregroundColor: freezed == foregroundColor + ? _self.foregroundColor + : foregroundColor // ignore: cast_nullable_to_non_nullable + as String?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + disabledForegroundColor: freezed == disabledForegroundColor + ? _self.disabledForegroundColor + : disabledForegroundColor // ignore: cast_nullable_to_non_nullable + as String?, + disabledBackgroundColor: freezed == disabledBackgroundColor + ? _self.disabledBackgroundColor + : disabledBackgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + iconColor: freezed == iconColor + ? _self.iconColor + : iconColor // ignore: cast_nullable_to_non_nullable + as String?, + disabledIconColor: freezed == disabledIconColor + ? _self.disabledIconColor + : disabledIconColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + textStyle: freezed == textStyle + ? _self.textStyle + : textStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + minimumSize: freezed == minimumSize + ? _self.minimumSize + : minimumSize // ignore: cast_nullable_to_non_nullable + as StacSize?, + fixedSize: freezed == fixedSize + ? _self.fixedSize + : fixedSize // ignore: cast_nullable_to_non_nullable + as StacSize?, + maximumSize: freezed == maximumSize + ? _self.maximumSize + : maximumSize // ignore: cast_nullable_to_non_nullable + as StacSize?, + side: freezed == side + ? _self.side + : side // ignore: cast_nullable_to_non_nullable + as StacBorderSide?, + shape: freezed == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as StacRoundedRectangleBorder?, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + iconSize: freezed == iconSize + ? _self.iconSize + : iconSize // ignore: cast_nullable_to_non_nullable + as double?, + )); + } + + /// Create a copy of StacButtonStyle + /// with the given fields replaced by the non-null parameter values. @override - StacSize? get fixedSize; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get textStyle { + if (_self.textStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.textStyle!, (value) { + return _then(_self.copyWith(textStyle: value)); + }); + } + + /// Create a copy of StacButtonStyle + /// with the given fields replaced by the non-null parameter values. @override - StacSize? get maximumSize; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } + + /// Create a copy of StacButtonStyle + /// with the given fields replaced by the non-null parameter values. @override - StacBorderSide? get side; + @pragma('vm:prefer-inline') + $StacSizeCopyWith<$Res>? get minimumSize { + if (_self.minimumSize == null) { + return null; + } + + return $StacSizeCopyWith<$Res>(_self.minimumSize!, (value) { + return _then(_self.copyWith(minimumSize: value)); + }); + } + + /// Create a copy of StacButtonStyle + /// with the given fields replaced by the non-null parameter values. @override - StacRoundedRectangleBorder? get shape; + @pragma('vm:prefer-inline') + $StacSizeCopyWith<$Res>? get fixedSize { + if (_self.fixedSize == null) { + return null; + } + + return $StacSizeCopyWith<$Res>(_self.fixedSize!, (value) { + return _then(_self.copyWith(fixedSize: value)); + }); + } + + /// Create a copy of StacButtonStyle + /// with the given fields replaced by the non-null parameter values. @override - bool? get enableFeedback; + @pragma('vm:prefer-inline') + $StacSizeCopyWith<$Res>? get maximumSize { + if (_self.maximumSize == null) { + return null; + } + + return $StacSizeCopyWith<$Res>(_self.maximumSize!, (value) { + return _then(_self.copyWith(maximumSize: value)); + }); + } + + /// Create a copy of StacButtonStyle + /// with the given fields replaced by the non-null parameter values. @override - double? get iconSize; + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res>? get side { + if (_self.side == null) { + return null; + } + + return $StacBorderSideCopyWith<$Res>(_self.side!, (value) { + return _then(_self.copyWith(side: value)); + }); + } /// Create a copy of StacButtonStyle /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacButtonStyleImplCopyWith<_$StacButtonStyleImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacRoundedRectangleBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } + + return $StacRoundedRectangleBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.g.dart b/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.g.dart index f64fa1b8..5b907e83 100644 --- a/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.g.dart +++ b/packages/stac/lib/src/parsers/stac_button_style/stac_button_style.g.dart @@ -6,9 +6,8 @@ part of 'stac_button_style.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacButtonStyleImpl _$$StacButtonStyleImplFromJson( - Map json) => - _$StacButtonStyleImpl( +_StacButtonStyle _$StacButtonStyleFromJson(Map json) => + _StacButtonStyle( foregroundColor: json['foregroundColor'] as String?, backgroundColor: json['backgroundColor'] as String?, disabledForegroundColor: json['disabledForegroundColor'] as String?, @@ -44,8 +43,7 @@ _$StacButtonStyleImpl _$$StacButtonStyleImplFromJson( iconSize: (json['iconSize'] as num?)?.toDouble(), ); -Map _$$StacButtonStyleImplToJson( - _$StacButtonStyleImpl instance) => +Map _$StacButtonStyleToJson(_StacButtonStyle instance) => { 'foregroundColor': instance.foregroundColor, 'backgroundColor': instance.backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_card/stac_card.dart b/packages/stac/lib/src/parsers/stac_card/stac_card.dart index d3ac6d0e..46e0f15f 100644 --- a/packages/stac/lib/src/parsers/stac_card/stac_card.dart +++ b/packages/stac/lib/src/parsers/stac_card/stac_card.dart @@ -9,7 +9,7 @@ part 'stac_card.freezed.dart'; part 'stac_card.g.dart'; @freezed -class StacCard with _$StacCard { +abstract class StacCard with _$StacCard { const factory StacCard({ String? color, String? shadowColor, diff --git a/packages/stac/lib/src/parsers/stac_card/stac_card.freezed.dart b/packages/stac/lib/src/parsers/stac_card/stac_card.freezed.dart index a3d05ca7..171115e3 100644 --- a/packages/stac/lib/src/parsers/stac_card/stac_card.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_card/stac_card.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,42 +10,80 @@ part of 'stac_card.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCard _$StacCardFromJson(Map json) { - return _StacCard.fromJson(json); -} - /// @nodoc mixin _$StacCard { - String? get color => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - StacShapeBorder? get shape => throw _privateConstructorUsedError; - bool get borderOnForeground => throw _privateConstructorUsedError; - StacEdgeInsets? get margin => throw _privateConstructorUsedError; - Clip? get clipBehavior => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - bool get semanticContainer => throw _privateConstructorUsedError; - - /// Serializes this StacCard to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get color; + String? get shadowColor; + String? get surfaceTintColor; + double? get elevation; + StacShapeBorder? get shape; + bool get borderOnForeground; + StacEdgeInsets? get margin; + Clip? get clipBehavior; + Map? get child; + bool get semanticContainer; /// Create a copy of StacCard /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCardCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacCardCopyWithImpl(this as StacCard, _$identity); + + /// Serializes this StacCard to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCard && + (identical(other.color, color) || other.color == color) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.borderOnForeground, borderOnForeground) || + other.borderOnForeground == borderOnForeground) && + (identical(other.margin, margin) || other.margin == margin) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + const DeepCollectionEquality().equals(other.child, child) && + (identical(other.semanticContainer, semanticContainer) || + other.semanticContainer == semanticContainer)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + color, + shadowColor, + surfaceTintColor, + elevation, + shape, + borderOnForeground, + margin, + clipBehavior, + const DeepCollectionEquality().hash(child), + semanticContainer); + + @override + String toString() { + return 'StacCard(color: $color, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, shape: $shape, borderOnForeground: $borderOnForeground, margin: $margin, clipBehavior: $clipBehavior, child: $child, semanticContainer: $semanticContainer)'; + } } /// @nodoc -abstract class $StacCardCopyWith<$Res> { - factory $StacCardCopyWith(StacCard value, $Res Function(StacCard) then) = - _$StacCardCopyWithImpl<$Res, StacCard>; +abstract mixin class $StacCardCopyWith<$Res> { + factory $StacCardCopyWith(StacCard value, $Res Function(StacCard) _then) = + _$StacCardCopyWithImpl; @useResult $Res call( {String? color, @@ -63,14 +102,11 @@ abstract class $StacCardCopyWith<$Res> { } /// @nodoc -class _$StacCardCopyWithImpl<$Res, $Val extends StacCard> - implements $StacCardCopyWith<$Res> { - _$StacCardCopyWithImpl(this._value, this._then); +class _$StacCardCopyWithImpl<$Res> implements $StacCardCopyWith<$Res> { + _$StacCardCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacCard _self; + final $Res Function(StacCard) _then; /// Create a copy of StacCard /// with the given fields replaced by the non-null parameter values. @@ -88,48 +124,48 @@ class _$StacCardCopyWithImpl<$Res, $Val extends StacCard> Object? child = freezed, Object? semanticContainer = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacShapeBorder?, borderOnForeground: null == borderOnForeground - ? _value.borderOnForeground + ? _self.borderOnForeground : borderOnForeground // ignore: cast_nullable_to_non_nullable as bool, margin: freezed == margin - ? _value.margin + ? _self.margin : margin // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, clipBehavior: freezed == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip?, child: freezed == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, semanticContainer: null == semanticContainer - ? _value.semanticContainer + ? _self.semanticContainer : semanticContainer // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of StacCard @@ -137,12 +173,12 @@ class _$StacCardCopyWithImpl<$Res, $Val extends StacCard> @override @pragma('vm:prefer-inline') $StacShapeBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacShapeBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacShapeBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -151,115 +187,20 @@ class _$StacCardCopyWithImpl<$Res, $Val extends StacCard> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get margin { - if (_value.margin == null) { + if (_self.margin == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.margin!, (value) { - return _then(_value.copyWith(margin: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.margin!, (value) { + return _then(_self.copyWith(margin: value)); }); } } -/// @nodoc -abstract class _$$StacCardImplCopyWith<$Res> - implements $StacCardCopyWith<$Res> { - factory _$$StacCardImplCopyWith( - _$StacCardImpl value, $Res Function(_$StacCardImpl) then) = - __$$StacCardImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? color, - String? shadowColor, - String? surfaceTintColor, - double? elevation, - StacShapeBorder? shape, - bool borderOnForeground, - StacEdgeInsets? margin, - Clip? clipBehavior, - Map? child, - bool semanticContainer}); - - @override - $StacShapeBorderCopyWith<$Res>? get shape; - @override - $StacEdgeInsetsCopyWith<$Res>? get margin; -} - -/// @nodoc -class __$$StacCardImplCopyWithImpl<$Res> - extends _$StacCardCopyWithImpl<$Res, _$StacCardImpl> - implements _$$StacCardImplCopyWith<$Res> { - __$$StacCardImplCopyWithImpl( - _$StacCardImpl _value, $Res Function(_$StacCardImpl) _then) - : super(_value, _then); - - /// Create a copy of StacCard - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? color = freezed, - Object? shadowColor = freezed, - Object? surfaceTintColor = freezed, - Object? elevation = freezed, - Object? shape = freezed, - Object? borderOnForeground = null, - Object? margin = freezed, - Object? clipBehavior = freezed, - Object? child = freezed, - Object? semanticContainer = null, - }) { - return _then(_$StacCardImpl( - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - shape: freezed == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as StacShapeBorder?, - borderOnForeground: null == borderOnForeground - ? _value.borderOnForeground - : borderOnForeground // ignore: cast_nullable_to_non_nullable - as bool, - margin: freezed == margin - ? _value.margin - : margin // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - clipBehavior: freezed == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip?, - child: freezed == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - semanticContainer: null == semanticContainer - ? _value.semanticContainer - : semanticContainer // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacCardImpl implements _StacCard { - const _$StacCardImpl( +class _StacCard implements StacCard { + const _StacCard( {this.color, this.shadowColor, this.surfaceTintColor, @@ -271,9 +212,8 @@ class _$StacCardImpl implements _StacCard { final Map? child, this.semanticContainer = true}) : _child = child; - - factory _$StacCardImpl.fromJson(Map json) => - _$$StacCardImplFromJson(json); + factory _StacCard.fromJson(Map json) => + _$StacCardFromJson(json); @override final String? color; @@ -306,16 +246,26 @@ class _$StacCardImpl implements _StacCard { @JsonKey() final bool semanticContainer; + /// Create a copy of StacCard + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacCard(color: $color, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, shape: $shape, borderOnForeground: $borderOnForeground, margin: $margin, clipBehavior: $clipBehavior, child: $child, semanticContainer: $semanticContainer)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCardCopyWith<_StacCard> get copyWith => + __$StacCardCopyWithImpl<_StacCard>(this, _$identity); + + @override + Map toJson() { + return _$StacCardToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacCardImpl && + other is _StacCard && (identical(other.color, color) || other.color == color) && (identical(other.shadowColor, shadowColor) || other.shadowColor == shadowColor) && @@ -349,63 +299,131 @@ class _$StacCardImpl implements _StacCard { const DeepCollectionEquality().hash(_child), semanticContainer); - /// Create a copy of StacCard - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacCardImplCopyWith<_$StacCardImpl> get copyWith => - __$$StacCardImplCopyWithImpl<_$StacCardImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacCardImplToJson( - this, - ); + String toString() { + return 'StacCard(color: $color, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, shape: $shape, borderOnForeground: $borderOnForeground, margin: $margin, clipBehavior: $clipBehavior, child: $child, semanticContainer: $semanticContainer)'; } } -abstract class _StacCard implements StacCard { - const factory _StacCard( - {final String? color, - final String? shadowColor, - final String? surfaceTintColor, - final double? elevation, - final StacShapeBorder? shape, - final bool borderOnForeground, - final StacEdgeInsets? margin, - final Clip? clipBehavior, - final Map? child, - final bool semanticContainer}) = _$StacCardImpl; - - factory _StacCard.fromJson(Map json) = - _$StacCardImpl.fromJson; - - @override - String? get color; - @override - String? get shadowColor; - @override - String? get surfaceTintColor; - @override - double? get elevation; - @override - StacShapeBorder? get shape; +/// @nodoc +abstract mixin class _$StacCardCopyWith<$Res> + implements $StacCardCopyWith<$Res> { + factory _$StacCardCopyWith(_StacCard value, $Res Function(_StacCard) _then) = + __$StacCardCopyWithImpl; @override - bool get borderOnForeground; + @useResult + $Res call( + {String? color, + String? shadowColor, + String? surfaceTintColor, + double? elevation, + StacShapeBorder? shape, + bool borderOnForeground, + StacEdgeInsets? margin, + Clip? clipBehavior, + Map? child, + bool semanticContainer}); + @override - StacEdgeInsets? get margin; + $StacShapeBorderCopyWith<$Res>? get shape; @override - Clip? get clipBehavior; + $StacEdgeInsetsCopyWith<$Res>? get margin; +} + +/// @nodoc +class __$StacCardCopyWithImpl<$Res> implements _$StacCardCopyWith<$Res> { + __$StacCardCopyWithImpl(this._self, this._then); + + final _StacCard _self; + final $Res Function(_StacCard) _then; + + /// Create a copy of StacCard + /// with the given fields replaced by the non-null parameter values. @override - Map? get child; + @pragma('vm:prefer-inline') + $Res call({ + Object? color = freezed, + Object? shadowColor = freezed, + Object? surfaceTintColor = freezed, + Object? elevation = freezed, + Object? shape = freezed, + Object? borderOnForeground = null, + Object? margin = freezed, + Object? clipBehavior = freezed, + Object? child = freezed, + Object? semanticContainer = null, + }) { + return _then(_StacCard( + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + shape: freezed == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as StacShapeBorder?, + borderOnForeground: null == borderOnForeground + ? _self.borderOnForeground + : borderOnForeground // ignore: cast_nullable_to_non_nullable + as bool, + margin: freezed == margin + ? _self.margin + : margin // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + clipBehavior: freezed == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + semanticContainer: null == semanticContainer + ? _self.semanticContainer + : semanticContainer // ignore: cast_nullable_to_non_nullable + as bool, + )); + } + + /// Create a copy of StacCard + /// with the given fields replaced by the non-null parameter values. @override - bool get semanticContainer; + @pragma('vm:prefer-inline') + $StacShapeBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } + + return $StacShapeBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); + } /// Create a copy of StacCard /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCardImplCopyWith<_$StacCardImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get margin { + if (_self.margin == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.margin!, (value) { + return _then(_self.copyWith(margin: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_card/stac_card.g.dart b/packages/stac/lib/src/parsers/stac_card/stac_card.g.dart index 3e00fc69..afd014a2 100644 --- a/packages/stac/lib/src/parsers/stac_card/stac_card.g.dart +++ b/packages/stac/lib/src/parsers/stac_card/stac_card.g.dart @@ -6,8 +6,7 @@ part of 'stac_card.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCardImpl _$$StacCardImplFromJson(Map json) => - _$StacCardImpl( +_StacCard _$StacCardFromJson(Map json) => _StacCard( color: json['color'] as String?, shadowColor: json['shadowColor'] as String?, surfaceTintColor: json['surfaceTintColor'] as String?, @@ -24,8 +23,7 @@ _$StacCardImpl _$$StacCardImplFromJson(Map json) => semanticContainer: json['semanticContainer'] as bool? ?? true, ); -Map _$$StacCardImplToJson(_$StacCardImpl instance) => - { +Map _$StacCardToJson(_StacCard instance) => { 'color': instance.color, 'shadowColor': instance.shadowColor, 'surfaceTintColor': instance.surfaceTintColor, diff --git a/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.dart b/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.dart index 8f1026f2..3ee2d73b 100644 --- a/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.dart +++ b/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.dart @@ -8,7 +8,7 @@ part 'stac_card_theme_data.freezed.dart'; part 'stac_card_theme_data.g.dart'; @freezed -class StacCardThemeData with _$StacCardThemeData { +abstract class StacCardThemeData with _$StacCardThemeData { const factory StacCardThemeData({ Clip? clipBehavior, String? color, diff --git a/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.freezed.dart b/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.freezed.dart index 424488ce..817cfe9e 100644 --- a/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,40 +10,64 @@ part of 'stac_card_theme_data.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCardThemeData _$StacCardThemeDataFromJson(Map json) { - return _StacCardThemeData.fromJson(json); -} - /// @nodoc mixin _$StacCardThemeData { - Clip? get clipBehavior => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - StacEdgeInsets? get margin => throw _privateConstructorUsedError; - StacBorder? get shape => throw _privateConstructorUsedError; - - /// Serializes this StacCardThemeData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Clip? get clipBehavior; + String? get color; + String? get shadowColor; + String? get surfaceTintColor; + double? get elevation; + StacEdgeInsets? get margin; + StacBorder? get shape; /// Create a copy of StacCardThemeData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCardThemeDataCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacCardThemeDataCopyWithImpl( + this as StacCardThemeData, _$identity); + + /// Serializes this StacCardThemeData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCardThemeData && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.color, color) || other.color == color) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.margin, margin) || other.margin == margin) && + (identical(other.shape, shape) || other.shape == shape)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, clipBehavior, color, shadowColor, + surfaceTintColor, elevation, margin, shape); + + @override + String toString() { + return 'StacCardThemeData(clipBehavior: $clipBehavior, color: $color, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, margin: $margin, shape: $shape)'; + } } /// @nodoc -abstract class $StacCardThemeDataCopyWith<$Res> { +abstract mixin class $StacCardThemeDataCopyWith<$Res> { factory $StacCardThemeDataCopyWith( - StacCardThemeData value, $Res Function(StacCardThemeData) then) = - _$StacCardThemeDataCopyWithImpl<$Res, StacCardThemeData>; + StacCardThemeData value, $Res Function(StacCardThemeData) _then) = + _$StacCardThemeDataCopyWithImpl; @useResult $Res call( {Clip? clipBehavior, @@ -58,14 +83,12 @@ abstract class $StacCardThemeDataCopyWith<$Res> { } /// @nodoc -class _$StacCardThemeDataCopyWithImpl<$Res, $Val extends StacCardThemeData> +class _$StacCardThemeDataCopyWithImpl<$Res> implements $StacCardThemeDataCopyWith<$Res> { - _$StacCardThemeDataCopyWithImpl(this._value, this._then); + _$StacCardThemeDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacCardThemeData _self; + final $Res Function(StacCardThemeData) _then; /// Create a copy of StacCardThemeData /// with the given fields replaced by the non-null parameter values. @@ -80,36 +103,36 @@ class _$StacCardThemeDataCopyWithImpl<$Res, $Val extends StacCardThemeData> Object? margin = freezed, Object? shape = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( clipBehavior: freezed == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, margin: freezed == margin - ? _value.margin + ? _self.margin : margin // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacBorder?, - ) as $Val); + )); } /// Create a copy of StacCardThemeData @@ -117,12 +140,12 @@ class _$StacCardThemeDataCopyWithImpl<$Res, $Val extends StacCardThemeData> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get margin { - if (_value.margin == null) { + if (_self.margin == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.margin!, (value) { - return _then(_value.copyWith(margin: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.margin!, (value) { + return _then(_self.copyWith(margin: value)); }); } @@ -131,22 +154,95 @@ class _$StacCardThemeDataCopyWithImpl<$Res, $Val extends StacCardThemeData> @override @pragma('vm:prefer-inline') $StacBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } } /// @nodoc -abstract class _$$StacCardThemeDataImplCopyWith<$Res> +@JsonSerializable() +class _StacCardThemeData implements StacCardThemeData { + const _StacCardThemeData( + {this.clipBehavior, + this.color, + this.shadowColor, + this.surfaceTintColor, + this.elevation, + this.margin, + this.shape}); + factory _StacCardThemeData.fromJson(Map json) => + _$StacCardThemeDataFromJson(json); + + @override + final Clip? clipBehavior; + @override + final String? color; + @override + final String? shadowColor; + @override + final String? surfaceTintColor; + @override + final double? elevation; + @override + final StacEdgeInsets? margin; + @override + final StacBorder? shape; + + /// Create a copy of StacCardThemeData + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCardThemeDataCopyWith<_StacCardThemeData> get copyWith => + __$StacCardThemeDataCopyWithImpl<_StacCardThemeData>(this, _$identity); + + @override + Map toJson() { + return _$StacCardThemeDataToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacCardThemeData && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.color, color) || other.color == color) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.margin, margin) || other.margin == margin) && + (identical(other.shape, shape) || other.shape == shape)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, clipBehavior, color, shadowColor, + surfaceTintColor, elevation, margin, shape); + + @override + String toString() { + return 'StacCardThemeData(clipBehavior: $clipBehavior, color: $color, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, margin: $margin, shape: $shape)'; + } +} + +/// @nodoc +abstract mixin class _$StacCardThemeDataCopyWith<$Res> implements $StacCardThemeDataCopyWith<$Res> { - factory _$$StacCardThemeDataImplCopyWith(_$StacCardThemeDataImpl value, - $Res Function(_$StacCardThemeDataImpl) then) = - __$$StacCardThemeDataImplCopyWithImpl<$Res>; + factory _$StacCardThemeDataCopyWith( + _StacCardThemeData value, $Res Function(_StacCardThemeData) _then) = + __$StacCardThemeDataCopyWithImpl; @override @useResult $Res call( @@ -165,17 +261,17 @@ abstract class _$$StacCardThemeDataImplCopyWith<$Res> } /// @nodoc -class __$$StacCardThemeDataImplCopyWithImpl<$Res> - extends _$StacCardThemeDataCopyWithImpl<$Res, _$StacCardThemeDataImpl> - implements _$$StacCardThemeDataImplCopyWith<$Res> { - __$$StacCardThemeDataImplCopyWithImpl(_$StacCardThemeDataImpl _value, - $Res Function(_$StacCardThemeDataImpl) _then) - : super(_value, _then); +class __$StacCardThemeDataCopyWithImpl<$Res> + implements _$StacCardThemeDataCopyWith<$Res> { + __$StacCardThemeDataCopyWithImpl(this._self, this._then); + + final _StacCardThemeData _self; + final $Res Function(_StacCardThemeData) _then; /// Create a copy of StacCardThemeData /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ Object? clipBehavior = freezed, Object? color = freezed, @@ -185,146 +281,65 @@ class __$$StacCardThemeDataImplCopyWithImpl<$Res> Object? margin = freezed, Object? shape = freezed, }) { - return _then(_$StacCardThemeDataImpl( + return _then(_StacCardThemeData( clipBehavior: freezed == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, margin: freezed == margin - ? _value.margin + ? _self.margin : margin // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacBorder?, )); } -} - -/// @nodoc -@JsonSerializable() -class _$StacCardThemeDataImpl implements _StacCardThemeData { - const _$StacCardThemeDataImpl( - {this.clipBehavior, - this.color, - this.shadowColor, - this.surfaceTintColor, - this.elevation, - this.margin, - this.shape}); - - factory _$StacCardThemeDataImpl.fromJson(Map json) => - _$$StacCardThemeDataImplFromJson(json); - - @override - final Clip? clipBehavior; - @override - final String? color; - @override - final String? shadowColor; - @override - final String? surfaceTintColor; - @override - final double? elevation; - @override - final StacEdgeInsets? margin; - @override - final StacBorder? shape; + /// Create a copy of StacCardThemeData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacCardThemeData(clipBehavior: $clipBehavior, color: $color, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, elevation: $elevation, margin: $margin, shape: $shape)'; - } + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get margin { + if (_self.margin == null) { + return null; + } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacCardThemeDataImpl && - (identical(other.clipBehavior, clipBehavior) || - other.clipBehavior == clipBehavior) && - (identical(other.color, color) || other.color == color) && - (identical(other.shadowColor, shadowColor) || - other.shadowColor == shadowColor) && - (identical(other.surfaceTintColor, surfaceTintColor) || - other.surfaceTintColor == surfaceTintColor) && - (identical(other.elevation, elevation) || - other.elevation == elevation) && - (identical(other.margin, margin) || other.margin == margin) && - (identical(other.shape, shape) || other.shape == shape)); + return $StacEdgeInsetsCopyWith<$Res>(_self.margin!, (value) { + return _then(_self.copyWith(margin: value)); + }); } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, clipBehavior, color, shadowColor, - surfaceTintColor, elevation, margin, shape); - /// Create a copy of StacCardThemeData /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacCardThemeDataImplCopyWith<_$StacCardThemeDataImpl> get copyWith => - __$$StacCardThemeDataImplCopyWithImpl<_$StacCardThemeDataImpl>( - this, _$identity); + $StacBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } - @override - Map toJson() { - return _$$StacCardThemeDataImplToJson( - this, - ); + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); } } -abstract class _StacCardThemeData implements StacCardThemeData { - const factory _StacCardThemeData( - {final Clip? clipBehavior, - final String? color, - final String? shadowColor, - final String? surfaceTintColor, - final double? elevation, - final StacEdgeInsets? margin, - final StacBorder? shape}) = _$StacCardThemeDataImpl; - - factory _StacCardThemeData.fromJson(Map json) = - _$StacCardThemeDataImpl.fromJson; - - @override - Clip? get clipBehavior; - @override - String? get color; - @override - String? get shadowColor; - @override - String? get surfaceTintColor; - @override - double? get elevation; - @override - StacEdgeInsets? get margin; - @override - StacBorder? get shape; - - /// Create a copy of StacCardThemeData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCardThemeDataImplCopyWith<_$StacCardThemeDataImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.g.dart b/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.g.dart index b7848353..87408233 100644 --- a/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.g.dart +++ b/packages/stac/lib/src/parsers/stac_card_theme_data/stac_card_theme_data.g.dart @@ -6,9 +6,8 @@ part of 'stac_card_theme_data.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCardThemeDataImpl _$$StacCardThemeDataImplFromJson( - Map json) => - _$StacCardThemeDataImpl( +_StacCardThemeData _$StacCardThemeDataFromJson(Map json) => + _StacCardThemeData( clipBehavior: $enumDecodeNullable(_$ClipEnumMap, json['clipBehavior']), color: json['color'] as String?, shadowColor: json['shadowColor'] as String?, @@ -22,8 +21,7 @@ _$StacCardThemeDataImpl _$$StacCardThemeDataImplFromJson( : StacBorder.fromJson(json['shape'] as Map), ); -Map _$$StacCardThemeDataImplToJson( - _$StacCardThemeDataImpl instance) => +Map _$StacCardThemeDataToJson(_StacCardThemeData instance) => { 'clipBehavior': _$ClipEnumMap[instance.clipBehavior], 'color': instance.color, diff --git a/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.dart b/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.dart index 2468fdfa..52f922ed 100644 --- a/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.dart +++ b/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.dart @@ -13,7 +13,7 @@ enum StacCarouselViewType { } @freezed -class StacCarouselView with _$StacCarouselView { +abstract class StacCarouselView with _$StacCarouselView { const factory StacCarouselView({ @Default(StacCarouselViewType.regular) StacCarouselViewType carouselType, StacEdgeInsets? padding, diff --git a/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.freezed.dart b/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.freezed.dart index 593eaf94..b262720a 100644 --- a/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,48 +10,98 @@ part of 'stac_carousel_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCarouselView _$StacCarouselViewFromJson(Map json) { - return _StacCarouselView.fromJson(json); -} - /// @nodoc mixin _$StacCarouselView { - StacCarouselViewType get carouselType => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - String? get overlayColor => throw _privateConstructorUsedError; - bool get itemSnapping => throw _privateConstructorUsedError; - double get shrinkExtent => throw _privateConstructorUsedError; - Axis get scrollDirection => throw _privateConstructorUsedError; - bool get reverse => throw _privateConstructorUsedError; - Map? get onTap => throw _privateConstructorUsedError; - bool get enableSplash => throw _privateConstructorUsedError; - double? get itemExtent => throw _privateConstructorUsedError; - List? get flexWeights => throw _privateConstructorUsedError; - List>? get children => - throw _privateConstructorUsedError; - - /// Serializes this StacCarouselView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacCarouselViewType get carouselType; + StacEdgeInsets? get padding; + String? get backgroundColor; + double? get elevation; + String? get overlayColor; + bool get itemSnapping; + double get shrinkExtent; + Axis get scrollDirection; + bool get reverse; + Map? get onTap; + bool get enableSplash; + double? get itemExtent; + List? get flexWeights; + List>? get children; /// Create a copy of StacCarouselView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCarouselViewCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacCarouselViewCopyWithImpl( + this as StacCarouselView, _$identity); + + /// Serializes this StacCarouselView to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCarouselView && + (identical(other.carouselType, carouselType) || + other.carouselType == carouselType) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.overlayColor, overlayColor) || + other.overlayColor == overlayColor) && + (identical(other.itemSnapping, itemSnapping) || + other.itemSnapping == itemSnapping) && + (identical(other.shrinkExtent, shrinkExtent) || + other.shrinkExtent == shrinkExtent) && + (identical(other.scrollDirection, scrollDirection) || + other.scrollDirection == scrollDirection) && + (identical(other.reverse, reverse) || other.reverse == reverse) && + const DeepCollectionEquality().equals(other.onTap, onTap) && + (identical(other.enableSplash, enableSplash) || + other.enableSplash == enableSplash) && + (identical(other.itemExtent, itemExtent) || + other.itemExtent == itemExtent) && + const DeepCollectionEquality() + .equals(other.flexWeights, flexWeights) && + const DeepCollectionEquality().equals(other.children, children)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + carouselType, + padding, + backgroundColor, + elevation, + overlayColor, + itemSnapping, + shrinkExtent, + scrollDirection, + reverse, + const DeepCollectionEquality().hash(onTap), + enableSplash, + itemExtent, + const DeepCollectionEquality().hash(flexWeights), + const DeepCollectionEquality().hash(children)); + + @override + String toString() { + return 'StacCarouselView(carouselType: $carouselType, padding: $padding, backgroundColor: $backgroundColor, elevation: $elevation, overlayColor: $overlayColor, itemSnapping: $itemSnapping, shrinkExtent: $shrinkExtent, scrollDirection: $scrollDirection, reverse: $reverse, onTap: $onTap, enableSplash: $enableSplash, itemExtent: $itemExtent, flexWeights: $flexWeights, children: $children)'; + } } /// @nodoc -abstract class $StacCarouselViewCopyWith<$Res> { +abstract mixin class $StacCarouselViewCopyWith<$Res> { factory $StacCarouselViewCopyWith( - StacCarouselView value, $Res Function(StacCarouselView) then) = - _$StacCarouselViewCopyWithImpl<$Res, StacCarouselView>; + StacCarouselView value, $Res Function(StacCarouselView) _then) = + _$StacCarouselViewCopyWithImpl; @useResult $Res call( {StacCarouselViewType carouselType, @@ -72,14 +123,12 @@ abstract class $StacCarouselViewCopyWith<$Res> { } /// @nodoc -class _$StacCarouselViewCopyWithImpl<$Res, $Val extends StacCarouselView> +class _$StacCarouselViewCopyWithImpl<$Res> implements $StacCarouselViewCopyWith<$Res> { - _$StacCarouselViewCopyWithImpl(this._value, this._then); + _$StacCarouselViewCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacCarouselView _self; + final $Res Function(StacCarouselView) _then; /// Create a copy of StacCarouselView /// with the given fields replaced by the non-null parameter values. @@ -101,64 +150,64 @@ class _$StacCarouselViewCopyWithImpl<$Res, $Val extends StacCarouselView> Object? flexWeights = freezed, Object? children = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( carouselType: null == carouselType - ? _value.carouselType + ? _self.carouselType : carouselType // ignore: cast_nullable_to_non_nullable as StacCarouselViewType, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, overlayColor: freezed == overlayColor - ? _value.overlayColor + ? _self.overlayColor : overlayColor // ignore: cast_nullable_to_non_nullable as String?, itemSnapping: null == itemSnapping - ? _value.itemSnapping + ? _self.itemSnapping : itemSnapping // ignore: cast_nullable_to_non_nullable as bool, shrinkExtent: null == shrinkExtent - ? _value.shrinkExtent + ? _self.shrinkExtent : shrinkExtent // ignore: cast_nullable_to_non_nullable as double, scrollDirection: null == scrollDirection - ? _value.scrollDirection + ? _self.scrollDirection : scrollDirection // ignore: cast_nullable_to_non_nullable as Axis, reverse: null == reverse - ? _value.reverse + ? _self.reverse : reverse // ignore: cast_nullable_to_non_nullable as bool, onTap: freezed == onTap - ? _value.onTap + ? _self.onTap : onTap // ignore: cast_nullable_to_non_nullable as Map?, enableSplash: null == enableSplash - ? _value.enableSplash + ? _self.enableSplash : enableSplash // ignore: cast_nullable_to_non_nullable as bool, itemExtent: freezed == itemExtent - ? _value.itemExtent + ? _self.itemExtent : itemExtent // ignore: cast_nullable_to_non_nullable as double?, flexWeights: freezed == flexWeights - ? _value.flexWeights + ? _self.flexWeights : flexWeights // ignore: cast_nullable_to_non_nullable as List?, children: freezed == children - ? _value.children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>?, - ) as $Val); + )); } /// Create a copy of StacCarouselView @@ -166,137 +215,20 @@ class _$StacCarouselViewCopyWithImpl<$Res, $Val extends StacCarouselView> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } } -/// @nodoc -abstract class _$$StacCarouselViewImplCopyWith<$Res> - implements $StacCarouselViewCopyWith<$Res> { - factory _$$StacCarouselViewImplCopyWith(_$StacCarouselViewImpl value, - $Res Function(_$StacCarouselViewImpl) then) = - __$$StacCarouselViewImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacCarouselViewType carouselType, - StacEdgeInsets? padding, - String? backgroundColor, - double? elevation, - String? overlayColor, - bool itemSnapping, - double shrinkExtent, - Axis scrollDirection, - bool reverse, - Map? onTap, - bool enableSplash, - double? itemExtent, - List? flexWeights, - List>? children}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; -} - -/// @nodoc -class __$$StacCarouselViewImplCopyWithImpl<$Res> - extends _$StacCarouselViewCopyWithImpl<$Res, _$StacCarouselViewImpl> - implements _$$StacCarouselViewImplCopyWith<$Res> { - __$$StacCarouselViewImplCopyWithImpl(_$StacCarouselViewImpl _value, - $Res Function(_$StacCarouselViewImpl) _then) - : super(_value, _then); - - /// Create a copy of StacCarouselView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? carouselType = null, - Object? padding = freezed, - Object? backgroundColor = freezed, - Object? elevation = freezed, - Object? overlayColor = freezed, - Object? itemSnapping = null, - Object? shrinkExtent = null, - Object? scrollDirection = null, - Object? reverse = null, - Object? onTap = freezed, - Object? enableSplash = null, - Object? itemExtent = freezed, - Object? flexWeights = freezed, - Object? children = freezed, - }) { - return _then(_$StacCarouselViewImpl( - carouselType: null == carouselType - ? _value.carouselType - : carouselType // ignore: cast_nullable_to_non_nullable - as StacCarouselViewType, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - overlayColor: freezed == overlayColor - ? _value.overlayColor - : overlayColor // ignore: cast_nullable_to_non_nullable - as String?, - itemSnapping: null == itemSnapping - ? _value.itemSnapping - : itemSnapping // ignore: cast_nullable_to_non_nullable - as bool, - shrinkExtent: null == shrinkExtent - ? _value.shrinkExtent - : shrinkExtent // ignore: cast_nullable_to_non_nullable - as double, - scrollDirection: null == scrollDirection - ? _value.scrollDirection - : scrollDirection // ignore: cast_nullable_to_non_nullable - as Axis, - reverse: null == reverse - ? _value.reverse - : reverse // ignore: cast_nullable_to_non_nullable - as bool, - onTap: freezed == onTap - ? _value._onTap - : onTap // ignore: cast_nullable_to_non_nullable - as Map?, - enableSplash: null == enableSplash - ? _value.enableSplash - : enableSplash // ignore: cast_nullable_to_non_nullable - as bool, - itemExtent: freezed == itemExtent - ? _value.itemExtent - : itemExtent // ignore: cast_nullable_to_non_nullable - as double?, - flexWeights: freezed == flexWeights - ? _value._flexWeights - : flexWeights // ignore: cast_nullable_to_non_nullable - as List?, - children: freezed == children - ? _value._children - : children // ignore: cast_nullable_to_non_nullable - as List>?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacCarouselViewImpl implements _StacCarouselView { - const _$StacCarouselViewImpl( +class _StacCarouselView implements StacCarouselView { + const _StacCarouselView( {this.carouselType = StacCarouselViewType.regular, this.padding, this.backgroundColor, @@ -314,9 +246,8 @@ class _$StacCarouselViewImpl implements _StacCarouselView { : _onTap = onTap, _flexWeights = flexWeights, _children = children; - - factory _$StacCarouselViewImpl.fromJson(Map json) => - _$$StacCarouselViewImplFromJson(json); + factory _StacCarouselView.fromJson(Map json) => + _$StacCarouselViewFromJson(json); @override @JsonKey() @@ -376,16 +307,26 @@ class _$StacCarouselViewImpl implements _StacCarouselView { return EqualUnmodifiableListView(value); } + /// Create a copy of StacCarouselView + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCarouselViewCopyWith<_StacCarouselView> get copyWith => + __$StacCarouselViewCopyWithImpl<_StacCarouselView>(this, _$identity); + @override - String toString() { - return 'StacCarouselView(carouselType: $carouselType, padding: $padding, backgroundColor: $backgroundColor, elevation: $elevation, overlayColor: $overlayColor, itemSnapping: $itemSnapping, shrinkExtent: $shrinkExtent, scrollDirection: $scrollDirection, reverse: $reverse, onTap: $onTap, enableSplash: $enableSplash, itemExtent: $itemExtent, flexWeights: $flexWeights, children: $children)'; + Map toJson() { + return _$StacCarouselViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacCarouselViewImpl && + other is _StacCarouselView && (identical(other.carouselType, carouselType) || other.carouselType == carouselType) && (identical(other.padding, padding) || other.padding == padding) && @@ -431,77 +372,141 @@ class _$StacCarouselViewImpl implements _StacCarouselView { const DeepCollectionEquality().hash(_flexWeights), const DeepCollectionEquality().hash(_children)); - /// Create a copy of StacCarouselView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacCarouselViewImplCopyWith<_$StacCarouselViewImpl> get copyWith => - __$$StacCarouselViewImplCopyWithImpl<_$StacCarouselViewImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacCarouselViewImplToJson( - this, - ); + String toString() { + return 'StacCarouselView(carouselType: $carouselType, padding: $padding, backgroundColor: $backgroundColor, elevation: $elevation, overlayColor: $overlayColor, itemSnapping: $itemSnapping, shrinkExtent: $shrinkExtent, scrollDirection: $scrollDirection, reverse: $reverse, onTap: $onTap, enableSplash: $enableSplash, itemExtent: $itemExtent, flexWeights: $flexWeights, children: $children)'; } } -abstract class _StacCarouselView implements StacCarouselView { - const factory _StacCarouselView( - {final StacCarouselViewType carouselType, - final StacEdgeInsets? padding, - final String? backgroundColor, - final double? elevation, - final String? overlayColor, - final bool itemSnapping, - final double shrinkExtent, - final Axis scrollDirection, - final bool reverse, - final Map? onTap, - final bool enableSplash, - final double? itemExtent, - final List? flexWeights, - required final List>? children}) = - _$StacCarouselViewImpl; - - factory _StacCarouselView.fromJson(Map json) = - _$StacCarouselViewImpl.fromJson; - - @override - StacCarouselViewType get carouselType; - @override - StacEdgeInsets? get padding; - @override - String? get backgroundColor; - @override - double? get elevation; - @override - String? get overlayColor; - @override - bool get itemSnapping; - @override - double get shrinkExtent; - @override - Axis get scrollDirection; - @override - bool get reverse; - @override - Map? get onTap; - @override - bool get enableSplash; +/// @nodoc +abstract mixin class _$StacCarouselViewCopyWith<$Res> + implements $StacCarouselViewCopyWith<$Res> { + factory _$StacCarouselViewCopyWith( + _StacCarouselView value, $Res Function(_StacCarouselView) _then) = + __$StacCarouselViewCopyWithImpl; @override - double? get itemExtent; + @useResult + $Res call( + {StacCarouselViewType carouselType, + StacEdgeInsets? padding, + String? backgroundColor, + double? elevation, + String? overlayColor, + bool itemSnapping, + double shrinkExtent, + Axis scrollDirection, + bool reverse, + Map? onTap, + bool enableSplash, + double? itemExtent, + List? flexWeights, + List>? children}); + @override - List? get flexWeights; + $StacEdgeInsetsCopyWith<$Res>? get padding; +} + +/// @nodoc +class __$StacCarouselViewCopyWithImpl<$Res> + implements _$StacCarouselViewCopyWith<$Res> { + __$StacCarouselViewCopyWithImpl(this._self, this._then); + + final _StacCarouselView _self; + final $Res Function(_StacCarouselView) _then; + + /// Create a copy of StacCarouselView + /// with the given fields replaced by the non-null parameter values. @override - List>? get children; + @pragma('vm:prefer-inline') + $Res call({ + Object? carouselType = null, + Object? padding = freezed, + Object? backgroundColor = freezed, + Object? elevation = freezed, + Object? overlayColor = freezed, + Object? itemSnapping = null, + Object? shrinkExtent = null, + Object? scrollDirection = null, + Object? reverse = null, + Object? onTap = freezed, + Object? enableSplash = null, + Object? itemExtent = freezed, + Object? flexWeights = freezed, + Object? children = freezed, + }) { + return _then(_StacCarouselView( + carouselType: null == carouselType + ? _self.carouselType + : carouselType // ignore: cast_nullable_to_non_nullable + as StacCarouselViewType, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + overlayColor: freezed == overlayColor + ? _self.overlayColor + : overlayColor // ignore: cast_nullable_to_non_nullable + as String?, + itemSnapping: null == itemSnapping + ? _self.itemSnapping + : itemSnapping // ignore: cast_nullable_to_non_nullable + as bool, + shrinkExtent: null == shrinkExtent + ? _self.shrinkExtent + : shrinkExtent // ignore: cast_nullable_to_non_nullable + as double, + scrollDirection: null == scrollDirection + ? _self.scrollDirection + : scrollDirection // ignore: cast_nullable_to_non_nullable + as Axis, + reverse: null == reverse + ? _self.reverse + : reverse // ignore: cast_nullable_to_non_nullable + as bool, + onTap: freezed == onTap + ? _self._onTap + : onTap // ignore: cast_nullable_to_non_nullable + as Map?, + enableSplash: null == enableSplash + ? _self.enableSplash + : enableSplash // ignore: cast_nullable_to_non_nullable + as bool, + itemExtent: freezed == itemExtent + ? _self.itemExtent + : itemExtent // ignore: cast_nullable_to_non_nullable + as double?, + flexWeights: freezed == flexWeights + ? _self._flexWeights + : flexWeights // ignore: cast_nullable_to_non_nullable + as List?, + children: freezed == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>?, + )); + } /// Create a copy of StacCarouselView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCarouselViewImplCopyWith<_$StacCarouselViewImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.g.dart b/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.g.dart index 61bb3106..4af7e1ad 100644 --- a/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_carousel_view/stac_carousel_view.g.dart @@ -6,9 +6,8 @@ part of 'stac_carousel_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCarouselViewImpl _$$StacCarouselViewImplFromJson( - Map json) => - _$StacCarouselViewImpl( +_StacCarouselView _$StacCarouselViewFromJson(Map json) => + _StacCarouselView( carouselType: $enumDecodeNullable( _$StacCarouselViewTypeEnumMap, json['carouselType']) ?? StacCarouselViewType.regular, @@ -35,8 +34,7 @@ _$StacCarouselViewImpl _$$StacCarouselViewImplFromJson( .toList(), ); -Map _$$StacCarouselViewImplToJson( - _$StacCarouselViewImpl instance) => +Map _$StacCarouselViewToJson(_StacCarouselView instance) => { 'carouselType': _$StacCarouselViewTypeEnumMap[instance.carouselType]!, 'padding': instance.padding, diff --git a/packages/stac/lib/src/parsers/stac_center/stac_center.dart b/packages/stac/lib/src/parsers/stac_center/stac_center.dart index 0ff81fe2..9493ea6e 100644 --- a/packages/stac/lib/src/parsers/stac_center/stac_center.dart +++ b/packages/stac/lib/src/parsers/stac_center/stac_center.dart @@ -6,7 +6,7 @@ part 'stac_center.freezed.dart'; part 'stac_center.g.dart'; @freezed -class StacCenter with _$StacCenter { +abstract class StacCenter with _$StacCenter { const factory StacCenter({ double? widthFactor, double? heightFactor, diff --git a/packages/stac/lib/src/parsers/stac_center/stac_center.freezed.dart b/packages/stac/lib/src/parsers/stac_center/stac_center.freezed.dart index 6cb739b7..0c4d45f7 100644 --- a/packages/stac/lib/src/parsers/stac_center/stac_center.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_center/stac_center.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,96 +10,64 @@ part of 'stac_center.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCenter _$StacCenterFromJson(Map json) { - return _StacCenter.fromJson(json); -} - /// @nodoc mixin _$StacCenter { - double? get widthFactor => throw _privateConstructorUsedError; - double? get heightFactor => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacCenter to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get widthFactor; + double? get heightFactor; + Map? get child; /// Create a copy of StacCenter /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCenterCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacCenterCopyWithImpl(this as StacCenter, _$identity); -/// @nodoc -abstract class $StacCenterCopyWith<$Res> { - factory $StacCenterCopyWith( - StacCenter value, $Res Function(StacCenter) then) = - _$StacCenterCopyWithImpl<$Res, StacCenter>; - @useResult - $Res call( - {double? widthFactor, double? heightFactor, Map? child}); -} + /// Serializes this StacCenter to a JSON map. + Map toJson(); -/// @nodoc -class _$StacCenterCopyWithImpl<$Res, $Val extends StacCenter> - implements $StacCenterCopyWith<$Res> { - _$StacCenterCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCenter && + (identical(other.widthFactor, widthFactor) || + other.widthFactor == widthFactor) && + (identical(other.heightFactor, heightFactor) || + other.heightFactor == heightFactor) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, widthFactor, heightFactor, + const DeepCollectionEquality().hash(child)); - /// Create a copy of StacCenter - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? widthFactor = freezed, - Object? heightFactor = freezed, - Object? child = freezed, - }) { - return _then(_value.copyWith( - widthFactor: freezed == widthFactor - ? _value.widthFactor - : widthFactor // ignore: cast_nullable_to_non_nullable - as double?, - heightFactor: freezed == heightFactor - ? _value.heightFactor - : heightFactor // ignore: cast_nullable_to_non_nullable - as double?, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacCenter(widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; } } /// @nodoc -abstract class _$$StacCenterImplCopyWith<$Res> - implements $StacCenterCopyWith<$Res> { - factory _$$StacCenterImplCopyWith( - _$StacCenterImpl value, $Res Function(_$StacCenterImpl) then) = - __$$StacCenterImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacCenterCopyWith<$Res> { + factory $StacCenterCopyWith( + StacCenter value, $Res Function(StacCenter) _then) = + _$StacCenterCopyWithImpl; @useResult $Res call( {double? widthFactor, double? heightFactor, Map? child}); } /// @nodoc -class __$$StacCenterImplCopyWithImpl<$Res> - extends _$StacCenterCopyWithImpl<$Res, _$StacCenterImpl> - implements _$$StacCenterImplCopyWith<$Res> { - __$$StacCenterImplCopyWithImpl( - _$StacCenterImpl _value, $Res Function(_$StacCenterImpl) _then) - : super(_value, _then); +class _$StacCenterCopyWithImpl<$Res> implements $StacCenterCopyWith<$Res> { + _$StacCenterCopyWithImpl(this._self, this._then); + + final StacCenter _self; + final $Res Function(StacCenter) _then; /// Create a copy of StacCenter /// with the given fields replaced by the non-null parameter values. @@ -109,17 +78,17 @@ class __$$StacCenterImplCopyWithImpl<$Res> Object? heightFactor = freezed, Object? child = freezed, }) { - return _then(_$StacCenterImpl( + return _then(_self.copyWith( widthFactor: freezed == widthFactor - ? _value.widthFactor + ? _self.widthFactor : widthFactor // ignore: cast_nullable_to_non_nullable as double?, heightFactor: freezed == heightFactor - ? _value.heightFactor + ? _self.heightFactor : heightFactor // ignore: cast_nullable_to_non_nullable as double?, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -128,13 +97,12 @@ class __$$StacCenterImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacCenterImpl implements _StacCenter { - const _$StacCenterImpl( +class _StacCenter implements StacCenter { + const _StacCenter( {this.widthFactor, this.heightFactor, final Map? child}) : _child = child; - - factory _$StacCenterImpl.fromJson(Map json) => - _$$StacCenterImplFromJson(json); + factory _StacCenter.fromJson(Map json) => + _$StacCenterFromJson(json); @override final double? widthFactor; @@ -150,16 +118,26 @@ class _$StacCenterImpl implements _StacCenter { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacCenter + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacCenter(widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCenterCopyWith<_StacCenter> get copyWith => + __$StacCenterCopyWithImpl<_StacCenter>(this, _$identity); + + @override + Map toJson() { + return _$StacCenterToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacCenterImpl && + other is _StacCenter && (identical(other.widthFactor, widthFactor) || other.widthFactor == widthFactor) && (identical(other.heightFactor, heightFactor) || @@ -172,42 +150,55 @@ class _$StacCenterImpl implements _StacCenter { int get hashCode => Object.hash(runtimeType, widthFactor, heightFactor, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacCenter - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacCenterImplCopyWith<_$StacCenterImpl> get copyWith => - __$$StacCenterImplCopyWithImpl<_$StacCenterImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacCenterImplToJson( - this, - ); + String toString() { + return 'StacCenter(widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; } } -abstract class _StacCenter implements StacCenter { - const factory _StacCenter( - {final double? widthFactor, - final double? heightFactor, - final Map? child}) = _$StacCenterImpl; +/// @nodoc +abstract mixin class _$StacCenterCopyWith<$Res> + implements $StacCenterCopyWith<$Res> { + factory _$StacCenterCopyWith( + _StacCenter value, $Res Function(_StacCenter) _then) = + __$StacCenterCopyWithImpl; + @override + @useResult + $Res call( + {double? widthFactor, double? heightFactor, Map? child}); +} - factory _StacCenter.fromJson(Map json) = - _$StacCenterImpl.fromJson; +/// @nodoc +class __$StacCenterCopyWithImpl<$Res> implements _$StacCenterCopyWith<$Res> { + __$StacCenterCopyWithImpl(this._self, this._then); - @override - double? get widthFactor; - @override - double? get heightFactor; - @override - Map? get child; + final _StacCenter _self; + final $Res Function(_StacCenter) _then; /// Create a copy of StacCenter /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCenterImplCopyWith<_$StacCenterImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? widthFactor = freezed, + Object? heightFactor = freezed, + Object? child = freezed, + }) { + return _then(_StacCenter( + widthFactor: freezed == widthFactor + ? _self.widthFactor + : widthFactor // ignore: cast_nullable_to_non_nullable + as double?, + heightFactor: freezed == heightFactor + ? _self.heightFactor + : heightFactor // ignore: cast_nullable_to_non_nullable + as double?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_center/stac_center.g.dart b/packages/stac/lib/src/parsers/stac_center/stac_center.g.dart index 71185f51..3d8ecdee 100644 --- a/packages/stac/lib/src/parsers/stac_center/stac_center.g.dart +++ b/packages/stac/lib/src/parsers/stac_center/stac_center.g.dart @@ -6,14 +6,13 @@ part of 'stac_center.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCenterImpl _$$StacCenterImplFromJson(Map json) => - _$StacCenterImpl( +_StacCenter _$StacCenterFromJson(Map json) => _StacCenter( widthFactor: (json['widthFactor'] as num?)?.toDouble(), heightFactor: (json['heightFactor'] as num?)?.toDouble(), child: json['child'] as Map?, ); -Map _$$StacCenterImplToJson(_$StacCenterImpl instance) => +Map _$StacCenterToJson(_StacCenter instance) => { 'widthFactor': instance.widthFactor, 'heightFactor': instance.heightFactor, diff --git a/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.dart b/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.dart index 16d9ad65..5eb5ba5d 100644 --- a/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.dart +++ b/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.dart @@ -9,7 +9,7 @@ part 'stac_check_box.freezed.dart'; part 'stac_check_box.g.dart'; @freezed -class StacCheckBox with _$StacCheckBox { +abstract class StacCheckBox with _$StacCheckBox { const factory StacCheckBox({ String? id, bool? value, diff --git a/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.freezed.dart b/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.freezed.dart index 5326b8dc..6ab6467a 100644 --- a/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,49 +10,102 @@ part of 'stac_check_box.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCheckBox _$StacCheckBoxFromJson(Map json) { - return _StacCheckBox.fromJson(json); -} - /// @nodoc mixin _$StacCheckBox { - String? get id => throw _privateConstructorUsedError; - bool? get value => throw _privateConstructorUsedError; - bool get tristate => throw _privateConstructorUsedError; - Map? get onChanged => throw _privateConstructorUsedError; - StacMouseCursor? get mouseCursor => throw _privateConstructorUsedError; - String? get activeColor => throw _privateConstructorUsedError; - StacMaterialColor? get fillColor => throw _privateConstructorUsedError; - String? get checkColor => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - StacMaterialColor? get overlayColor => throw _privateConstructorUsedError; - double? get splashRadius => throw _privateConstructorUsedError; - MaterialTapTargetSize? get materialTapTargetSize => - throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - bool get isError => throw _privateConstructorUsedError; - - /// Serializes this StacCheckBox to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get id; + bool? get value; + bool get tristate; + Map? get onChanged; + StacMouseCursor? get mouseCursor; + String? get activeColor; + StacMaterialColor? get fillColor; + String? get checkColor; + String? get focusColor; + String? get hoverColor; + StacMaterialColor? get overlayColor; + double? get splashRadius; + MaterialTapTargetSize? get materialTapTargetSize; + bool get autofocus; + bool get isError; /// Create a copy of StacCheckBox /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCheckBoxCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacCheckBoxCopyWithImpl( + this as StacCheckBox, _$identity); + + /// Serializes this StacCheckBox to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCheckBox && + (identical(other.id, id) || other.id == id) && + (identical(other.value, value) || other.value == value) && + (identical(other.tristate, tristate) || + other.tristate == tristate) && + const DeepCollectionEquality().equals(other.onChanged, onChanged) && + (identical(other.mouseCursor, mouseCursor) || + other.mouseCursor == mouseCursor) && + (identical(other.activeColor, activeColor) || + other.activeColor == activeColor) && + (identical(other.fillColor, fillColor) || + other.fillColor == fillColor) && + (identical(other.checkColor, checkColor) || + other.checkColor == checkColor) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.overlayColor, overlayColor) || + other.overlayColor == overlayColor) && + (identical(other.splashRadius, splashRadius) || + other.splashRadius == splashRadius) && + (identical(other.materialTapTargetSize, materialTapTargetSize) || + other.materialTapTargetSize == materialTapTargetSize) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.isError, isError) || other.isError == isError)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + value, + tristate, + const DeepCollectionEquality().hash(onChanged), + mouseCursor, + activeColor, + fillColor, + checkColor, + focusColor, + hoverColor, + overlayColor, + splashRadius, + materialTapTargetSize, + autofocus, + isError); + + @override + String toString() { + return 'StacCheckBox(id: $id, value: $value, tristate: $tristate, onChanged: $onChanged, mouseCursor: $mouseCursor, activeColor: $activeColor, fillColor: $fillColor, checkColor: $checkColor, focusColor: $focusColor, hoverColor: $hoverColor, overlayColor: $overlayColor, splashRadius: $splashRadius, materialTapTargetSize: $materialTapTargetSize, autofocus: $autofocus, isError: $isError)'; + } } /// @nodoc -abstract class $StacCheckBoxCopyWith<$Res> { +abstract mixin class $StacCheckBoxCopyWith<$Res> { factory $StacCheckBoxCopyWith( - StacCheckBox value, $Res Function(StacCheckBox) then) = - _$StacCheckBoxCopyWithImpl<$Res, StacCheckBox>; + StacCheckBox value, $Res Function(StacCheckBox) _then) = + _$StacCheckBoxCopyWithImpl; @useResult $Res call( {String? id, @@ -75,14 +129,11 @@ abstract class $StacCheckBoxCopyWith<$Res> { } /// @nodoc -class _$StacCheckBoxCopyWithImpl<$Res, $Val extends StacCheckBox> - implements $StacCheckBoxCopyWith<$Res> { - _$StacCheckBoxCopyWithImpl(this._value, this._then); +class _$StacCheckBoxCopyWithImpl<$Res> implements $StacCheckBoxCopyWith<$Res> { + _$StacCheckBoxCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacCheckBox _self; + final $Res Function(StacCheckBox) _then; /// Create a copy of StacCheckBox /// with the given fields replaced by the non-null parameter values. @@ -105,68 +156,68 @@ class _$StacCheckBoxCopyWithImpl<$Res, $Val extends StacCheckBox> Object? autofocus = null, Object? isError = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: freezed == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String?, value: freezed == value - ? _value.value + ? _self.value : value // ignore: cast_nullable_to_non_nullable as bool?, tristate: null == tristate - ? _value.tristate + ? _self.tristate : tristate // ignore: cast_nullable_to_non_nullable as bool, onChanged: freezed == onChanged - ? _value.onChanged + ? _self.onChanged : onChanged // ignore: cast_nullable_to_non_nullable as Map?, mouseCursor: freezed == mouseCursor - ? _value.mouseCursor + ? _self.mouseCursor : mouseCursor // ignore: cast_nullable_to_non_nullable as StacMouseCursor?, activeColor: freezed == activeColor - ? _value.activeColor + ? _self.activeColor : activeColor // ignore: cast_nullable_to_non_nullable as String?, fillColor: freezed == fillColor - ? _value.fillColor + ? _self.fillColor : fillColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, checkColor: freezed == checkColor - ? _value.checkColor + ? _self.checkColor : checkColor // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, overlayColor: freezed == overlayColor - ? _value.overlayColor + ? _self.overlayColor : overlayColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, splashRadius: freezed == splashRadius - ? _value.splashRadius + ? _self.splashRadius : splashRadius // ignore: cast_nullable_to_non_nullable as double?, materialTapTargetSize: freezed == materialTapTargetSize - ? _value.materialTapTargetSize + ? _self.materialTapTargetSize : materialTapTargetSize // ignore: cast_nullable_to_non_nullable as MaterialTapTargetSize?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, isError: null == isError - ? _value.isError + ? _self.isError : isError // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of StacCheckBox @@ -174,12 +225,12 @@ class _$StacCheckBoxCopyWithImpl<$Res, $Val extends StacCheckBox> @override @pragma('vm:prefer-inline') $StacMaterialColorCopyWith<$Res>? get fillColor { - if (_value.fillColor == null) { + if (_self.fillColor == null) { return null; } - return $StacMaterialColorCopyWith<$Res>(_value.fillColor!, (value) { - return _then(_value.copyWith(fillColor: value) as $Val); + return $StacMaterialColorCopyWith<$Res>(_self.fillColor!, (value) { + return _then(_self.copyWith(fillColor: value)); }); } @@ -188,145 +239,20 @@ class _$StacCheckBoxCopyWithImpl<$Res, $Val extends StacCheckBox> @override @pragma('vm:prefer-inline') $StacMaterialColorCopyWith<$Res>? get overlayColor { - if (_value.overlayColor == null) { + if (_self.overlayColor == null) { return null; } - return $StacMaterialColorCopyWith<$Res>(_value.overlayColor!, (value) { - return _then(_value.copyWith(overlayColor: value) as $Val); + return $StacMaterialColorCopyWith<$Res>(_self.overlayColor!, (value) { + return _then(_self.copyWith(overlayColor: value)); }); } } -/// @nodoc -abstract class _$$StacCheckBoxImplCopyWith<$Res> - implements $StacCheckBoxCopyWith<$Res> { - factory _$$StacCheckBoxImplCopyWith( - _$StacCheckBoxImpl value, $Res Function(_$StacCheckBoxImpl) then) = - __$$StacCheckBoxImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? id, - bool? value, - bool tristate, - Map? onChanged, - StacMouseCursor? mouseCursor, - String? activeColor, - StacMaterialColor? fillColor, - String? checkColor, - String? focusColor, - String? hoverColor, - StacMaterialColor? overlayColor, - double? splashRadius, - MaterialTapTargetSize? materialTapTargetSize, - bool autofocus, - bool isError}); - - @override - $StacMaterialColorCopyWith<$Res>? get fillColor; - @override - $StacMaterialColorCopyWith<$Res>? get overlayColor; -} - -/// @nodoc -class __$$StacCheckBoxImplCopyWithImpl<$Res> - extends _$StacCheckBoxCopyWithImpl<$Res, _$StacCheckBoxImpl> - implements _$$StacCheckBoxImplCopyWith<$Res> { - __$$StacCheckBoxImplCopyWithImpl( - _$StacCheckBoxImpl _value, $Res Function(_$StacCheckBoxImpl) _then) - : super(_value, _then); - - /// Create a copy of StacCheckBox - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = freezed, - Object? value = freezed, - Object? tristate = null, - Object? onChanged = freezed, - Object? mouseCursor = freezed, - Object? activeColor = freezed, - Object? fillColor = freezed, - Object? checkColor = freezed, - Object? focusColor = freezed, - Object? hoverColor = freezed, - Object? overlayColor = freezed, - Object? splashRadius = freezed, - Object? materialTapTargetSize = freezed, - Object? autofocus = null, - Object? isError = null, - }) { - return _then(_$StacCheckBoxImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String?, - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as bool?, - tristate: null == tristate - ? _value.tristate - : tristate // ignore: cast_nullable_to_non_nullable - as bool, - onChanged: freezed == onChanged - ? _value._onChanged - : onChanged // ignore: cast_nullable_to_non_nullable - as Map?, - mouseCursor: freezed == mouseCursor - ? _value.mouseCursor - : mouseCursor // ignore: cast_nullable_to_non_nullable - as StacMouseCursor?, - activeColor: freezed == activeColor - ? _value.activeColor - : activeColor // ignore: cast_nullable_to_non_nullable - as String?, - fillColor: freezed == fillColor - ? _value.fillColor - : fillColor // ignore: cast_nullable_to_non_nullable - as StacMaterialColor?, - checkColor: freezed == checkColor - ? _value.checkColor - : checkColor // ignore: cast_nullable_to_non_nullable - as String?, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - overlayColor: freezed == overlayColor - ? _value.overlayColor - : overlayColor // ignore: cast_nullable_to_non_nullable - as StacMaterialColor?, - splashRadius: freezed == splashRadius - ? _value.splashRadius - : splashRadius // ignore: cast_nullable_to_non_nullable - as double?, - materialTapTargetSize: freezed == materialTapTargetSize - ? _value.materialTapTargetSize - : materialTapTargetSize // ignore: cast_nullable_to_non_nullable - as MaterialTapTargetSize?, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - isError: null == isError - ? _value.isError - : isError // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacCheckBoxImpl implements _StacCheckBox { - const _$StacCheckBoxImpl( +class _StacCheckBox implements StacCheckBox { + const _StacCheckBox( {this.id, this.value, this.tristate = false, @@ -343,9 +269,8 @@ class _$StacCheckBoxImpl implements _StacCheckBox { this.autofocus = false, this.isError = false}) : _onChanged = onChanged; - - factory _$StacCheckBoxImpl.fromJson(Map json) => - _$$StacCheckBoxImplFromJson(json); + factory _StacCheckBox.fromJson(Map json) => + _$StacCheckBoxFromJson(json); @override final String? id; @@ -389,16 +314,26 @@ class _$StacCheckBoxImpl implements _StacCheckBox { @JsonKey() final bool isError; + /// Create a copy of StacCheckBox + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCheckBoxCopyWith<_StacCheckBox> get copyWith => + __$StacCheckBoxCopyWithImpl<_StacCheckBox>(this, _$identity); + @override - String toString() { - return 'StacCheckBox(id: $id, value: $value, tristate: $tristate, onChanged: $onChanged, mouseCursor: $mouseCursor, activeColor: $activeColor, fillColor: $fillColor, checkColor: $checkColor, focusColor: $focusColor, hoverColor: $hoverColor, overlayColor: $overlayColor, splashRadius: $splashRadius, materialTapTargetSize: $materialTapTargetSize, autofocus: $autofocus, isError: $isError)'; + Map toJson() { + return _$StacCheckBoxToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacCheckBoxImpl && + other is _StacCheckBox && (identical(other.id, id) || other.id == id) && (identical(other.value, value) || other.value == value) && (identical(other.tristate, tristate) || @@ -448,78 +383,163 @@ class _$StacCheckBoxImpl implements _StacCheckBox { autofocus, isError); - /// Create a copy of StacCheckBox - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacCheckBoxImplCopyWith<_$StacCheckBoxImpl> get copyWith => - __$$StacCheckBoxImplCopyWithImpl<_$StacCheckBoxImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacCheckBoxImplToJson( - this, - ); + String toString() { + return 'StacCheckBox(id: $id, value: $value, tristate: $tristate, onChanged: $onChanged, mouseCursor: $mouseCursor, activeColor: $activeColor, fillColor: $fillColor, checkColor: $checkColor, focusColor: $focusColor, hoverColor: $hoverColor, overlayColor: $overlayColor, splashRadius: $splashRadius, materialTapTargetSize: $materialTapTargetSize, autofocus: $autofocus, isError: $isError)'; } } -abstract class _StacCheckBox implements StacCheckBox { - const factory _StacCheckBox( - {final String? id, - final bool? value, - final bool tristate, - final Map? onChanged, - final StacMouseCursor? mouseCursor, - final String? activeColor, - final StacMaterialColor? fillColor, - final String? checkColor, - final String? focusColor, - final String? hoverColor, - final StacMaterialColor? overlayColor, - final double? splashRadius, - final MaterialTapTargetSize? materialTapTargetSize, - final bool autofocus, - final bool isError}) = _$StacCheckBoxImpl; - - factory _StacCheckBox.fromJson(Map json) = - _$StacCheckBoxImpl.fromJson; - - @override - String? get id; - @override - bool? get value; - @override - bool get tristate; - @override - Map? get onChanged; - @override - StacMouseCursor? get mouseCursor; - @override - String? get activeColor; - @override - StacMaterialColor? get fillColor; - @override - String? get checkColor; - @override - String? get focusColor; - @override - String? get hoverColor; +/// @nodoc +abstract mixin class _$StacCheckBoxCopyWith<$Res> + implements $StacCheckBoxCopyWith<$Res> { + factory _$StacCheckBoxCopyWith( + _StacCheckBox value, $Res Function(_StacCheckBox) _then) = + __$StacCheckBoxCopyWithImpl; @override - StacMaterialColor? get overlayColor; + @useResult + $Res call( + {String? id, + bool? value, + bool tristate, + Map? onChanged, + StacMouseCursor? mouseCursor, + String? activeColor, + StacMaterialColor? fillColor, + String? checkColor, + String? focusColor, + String? hoverColor, + StacMaterialColor? overlayColor, + double? splashRadius, + MaterialTapTargetSize? materialTapTargetSize, + bool autofocus, + bool isError}); + @override - double? get splashRadius; + $StacMaterialColorCopyWith<$Res>? get fillColor; @override - MaterialTapTargetSize? get materialTapTargetSize; + $StacMaterialColorCopyWith<$Res>? get overlayColor; +} + +/// @nodoc +class __$StacCheckBoxCopyWithImpl<$Res> + implements _$StacCheckBoxCopyWith<$Res> { + __$StacCheckBoxCopyWithImpl(this._self, this._then); + + final _StacCheckBox _self; + final $Res Function(_StacCheckBox) _then; + + /// Create a copy of StacCheckBox + /// with the given fields replaced by the non-null parameter values. @override - bool get autofocus; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = freezed, + Object? value = freezed, + Object? tristate = null, + Object? onChanged = freezed, + Object? mouseCursor = freezed, + Object? activeColor = freezed, + Object? fillColor = freezed, + Object? checkColor = freezed, + Object? focusColor = freezed, + Object? hoverColor = freezed, + Object? overlayColor = freezed, + Object? splashRadius = freezed, + Object? materialTapTargetSize = freezed, + Object? autofocus = null, + Object? isError = null, + }) { + return _then(_StacCheckBox( + id: freezed == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + value: freezed == value + ? _self.value + : value // ignore: cast_nullable_to_non_nullable + as bool?, + tristate: null == tristate + ? _self.tristate + : tristate // ignore: cast_nullable_to_non_nullable + as bool, + onChanged: freezed == onChanged + ? _self._onChanged + : onChanged // ignore: cast_nullable_to_non_nullable + as Map?, + mouseCursor: freezed == mouseCursor + ? _self.mouseCursor + : mouseCursor // ignore: cast_nullable_to_non_nullable + as StacMouseCursor?, + activeColor: freezed == activeColor + ? _self.activeColor + : activeColor // ignore: cast_nullable_to_non_nullable + as String?, + fillColor: freezed == fillColor + ? _self.fillColor + : fillColor // ignore: cast_nullable_to_non_nullable + as StacMaterialColor?, + checkColor: freezed == checkColor + ? _self.checkColor + : checkColor // ignore: cast_nullable_to_non_nullable + as String?, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + overlayColor: freezed == overlayColor + ? _self.overlayColor + : overlayColor // ignore: cast_nullable_to_non_nullable + as StacMaterialColor?, + splashRadius: freezed == splashRadius + ? _self.splashRadius + : splashRadius // ignore: cast_nullable_to_non_nullable + as double?, + materialTapTargetSize: freezed == materialTapTargetSize + ? _self.materialTapTargetSize + : materialTapTargetSize // ignore: cast_nullable_to_non_nullable + as MaterialTapTargetSize?, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + isError: null == isError + ? _self.isError + : isError // ignore: cast_nullable_to_non_nullable + as bool, + )); + } + + /// Create a copy of StacCheckBox + /// with the given fields replaced by the non-null parameter values. @override - bool get isError; + @pragma('vm:prefer-inline') + $StacMaterialColorCopyWith<$Res>? get fillColor { + if (_self.fillColor == null) { + return null; + } + + return $StacMaterialColorCopyWith<$Res>(_self.fillColor!, (value) { + return _then(_self.copyWith(fillColor: value)); + }); + } /// Create a copy of StacCheckBox /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCheckBoxImplCopyWith<_$StacCheckBoxImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacMaterialColorCopyWith<$Res>? get overlayColor { + if (_self.overlayColor == null) { + return null; + } + + return $StacMaterialColorCopyWith<$Res>(_self.overlayColor!, (value) { + return _then(_self.copyWith(overlayColor: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.g.dart b/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.g.dart index d19f5f22..2a3c85e7 100644 --- a/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.g.dart +++ b/packages/stac/lib/src/parsers/stac_check_box/stac_check_box.g.dart @@ -6,8 +6,8 @@ part of 'stac_check_box.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCheckBoxImpl _$$StacCheckBoxImplFromJson(Map json) => - _$StacCheckBoxImpl( +_StacCheckBox _$StacCheckBoxFromJson(Map json) => + _StacCheckBox( id: json['id'] as String?, value: json['value'] as bool?, tristate: json['tristate'] as bool? ?? false, @@ -33,7 +33,7 @@ _$StacCheckBoxImpl _$$StacCheckBoxImplFromJson(Map json) => isError: json['isError'] as bool? ?? false, ); -Map _$$StacCheckBoxImplToJson(_$StacCheckBoxImpl instance) => +Map _$StacCheckBoxToJson(_StacCheckBox instance) => { 'id': instance.id, 'value': instance.value, diff --git a/packages/stac/lib/src/parsers/stac_chip/stac_chip.dart b/packages/stac/lib/src/parsers/stac_chip/stac_chip.dart index 43d144c9..8038b6a6 100644 --- a/packages/stac/lib/src/parsers/stac_chip/stac_chip.dart +++ b/packages/stac/lib/src/parsers/stac_chip/stac_chip.dart @@ -11,7 +11,7 @@ part 'stac_chip.freezed.dart'; part 'stac_chip.g.dart'; @freezed -class StacChip with _$StacChip { +abstract class StacChip with _$StacChip { const factory StacChip({ Map? avatar, required Map label, diff --git a/packages/stac/lib/src/parsers/stac_chip/stac_chip.freezed.dart b/packages/stac/lib/src/parsers/stac_chip/stac_chip.freezed.dart index 625e0699..386c5142 100644 --- a/packages/stac/lib/src/parsers/stac_chip/stac_chip.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_chip/stac_chip.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,58 +10,133 @@ part of 'stac_chip.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacChip _$StacChipFromJson(Map json) { - return _StacChip.fromJson(json); -} - /// @nodoc mixin _$StacChip { - Map? get avatar => throw _privateConstructorUsedError; - Map get label => throw _privateConstructorUsedError; - StacTextStyle? get labelStyle => throw _privateConstructorUsedError; - StacEdgeInsets? get labelPadding => throw _privateConstructorUsedError; - Map? get deleteIcon => throw _privateConstructorUsedError; - Map? get onDeleted => throw _privateConstructorUsedError; - String? get deleteIconColor => throw _privateConstructorUsedError; - String? get deleteButtonTooltipMessage => throw _privateConstructorUsedError; - StacBorderSide? get side => throw _privateConstructorUsedError; - StacRoundedRectangleBorder? get shape => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - StacVisualDensity? get visualDensity => throw _privateConstructorUsedError; - MaterialTapTargetSize? get materialTapTargetSize => - throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - StacIconThemeData? get iconTheme => throw _privateConstructorUsedError; - StacBoxConstraints? get avatarBoxConstraints => - throw _privateConstructorUsedError; - StacBoxConstraints? get deleteIconBoxConstraints => - throw _privateConstructorUsedError; - - /// Serializes this StacChip to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get avatar; + Map get label; + StacTextStyle? get labelStyle; + StacEdgeInsets? get labelPadding; + Map? get deleteIcon; + Map? get onDeleted; + String? get deleteIconColor; + String? get deleteButtonTooltipMessage; + StacBorderSide? get side; + StacRoundedRectangleBorder? get shape; + Clip get clipBehavior; + bool get autofocus; + String? get color; + String? get backgroundColor; + StacEdgeInsets? get padding; + StacVisualDensity? get visualDensity; + MaterialTapTargetSize? get materialTapTargetSize; + double? get elevation; + String? get shadowColor; + String? get surfaceTintColor; + StacIconThemeData? get iconTheme; + StacBoxConstraints? get avatarBoxConstraints; + StacBoxConstraints? get deleteIconBoxConstraints; /// Create a copy of StacChip /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacChipCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacChipCopyWithImpl(this as StacChip, _$identity); + + /// Serializes this StacChip to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacChip && + const DeepCollectionEquality().equals(other.avatar, avatar) && + const DeepCollectionEquality().equals(other.label, label) && + (identical(other.labelStyle, labelStyle) || + other.labelStyle == labelStyle) && + (identical(other.labelPadding, labelPadding) || + other.labelPadding == labelPadding) && + const DeepCollectionEquality() + .equals(other.deleteIcon, deleteIcon) && + const DeepCollectionEquality().equals(other.onDeleted, onDeleted) && + (identical(other.deleteIconColor, deleteIconColor) || + other.deleteIconColor == deleteIconColor) && + (identical(other.deleteButtonTooltipMessage, + deleteButtonTooltipMessage) || + other.deleteButtonTooltipMessage == + deleteButtonTooltipMessage) && + (identical(other.side, side) || other.side == side) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.color, color) || other.color == color) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.visualDensity, visualDensity) || + other.visualDensity == visualDensity) && + (identical(other.materialTapTargetSize, materialTapTargetSize) || + other.materialTapTargetSize == materialTapTargetSize) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.iconTheme, iconTheme) || + other.iconTheme == iconTheme) && + (identical(other.avatarBoxConstraints, avatarBoxConstraints) || + other.avatarBoxConstraints == avatarBoxConstraints) && + (identical( + other.deleteIconBoxConstraints, deleteIconBoxConstraints) || + other.deleteIconBoxConstraints == deleteIconBoxConstraints)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(avatar), + const DeepCollectionEquality().hash(label), + labelStyle, + labelPadding, + const DeepCollectionEquality().hash(deleteIcon), + const DeepCollectionEquality().hash(onDeleted), + deleteIconColor, + deleteButtonTooltipMessage, + side, + shape, + clipBehavior, + autofocus, + color, + backgroundColor, + padding, + visualDensity, + materialTapTargetSize, + elevation, + shadowColor, + surfaceTintColor, + iconTheme, + avatarBoxConstraints, + deleteIconBoxConstraints + ]); + + @override + String toString() { + return 'StacChip(avatar: $avatar, label: $label, labelStyle: $labelStyle, labelPadding: $labelPadding, deleteIcon: $deleteIcon, onDeleted: $onDeleted, deleteIconColor: $deleteIconColor, deleteButtonTooltipMessage: $deleteButtonTooltipMessage, side: $side, shape: $shape, clipBehavior: $clipBehavior, autofocus: $autofocus, color: $color, backgroundColor: $backgroundColor, padding: $padding, visualDensity: $visualDensity, materialTapTargetSize: $materialTapTargetSize, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconTheme: $iconTheme, avatarBoxConstraints: $avatarBoxConstraints, deleteIconBoxConstraints: $deleteIconBoxConstraints)'; + } } /// @nodoc -abstract class $StacChipCopyWith<$Res> { - factory $StacChipCopyWith(StacChip value, $Res Function(StacChip) then) = - _$StacChipCopyWithImpl<$Res, StacChip>; +abstract mixin class $StacChipCopyWith<$Res> { + factory $StacChipCopyWith(StacChip value, $Res Function(StacChip) _then) = + _$StacChipCopyWithImpl; @useResult $Res call( {Map? avatar, @@ -99,14 +175,11 @@ abstract class $StacChipCopyWith<$Res> { } /// @nodoc -class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> - implements $StacChipCopyWith<$Res> { - _$StacChipCopyWithImpl(this._value, this._then); +class _$StacChipCopyWithImpl<$Res> implements $StacChipCopyWith<$Res> { + _$StacChipCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacChip _self; + final $Res Function(StacChip) _then; /// Create a copy of StacChip /// with the given fields replaced by the non-null parameter values. @@ -137,100 +210,100 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> Object? avatarBoxConstraints = freezed, Object? deleteIconBoxConstraints = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( avatar: freezed == avatar - ? _value.avatar + ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as Map?, label: null == label - ? _value.label + ? _self.label : label // ignore: cast_nullable_to_non_nullable as Map, labelStyle: freezed == labelStyle - ? _value.labelStyle + ? _self.labelStyle : labelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, labelPadding: freezed == labelPadding - ? _value.labelPadding + ? _self.labelPadding : labelPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, deleteIcon: freezed == deleteIcon - ? _value.deleteIcon + ? _self.deleteIcon : deleteIcon // ignore: cast_nullable_to_non_nullable as Map?, onDeleted: freezed == onDeleted - ? _value.onDeleted + ? _self.onDeleted : onDeleted // ignore: cast_nullable_to_non_nullable as Map?, deleteIconColor: freezed == deleteIconColor - ? _value.deleteIconColor + ? _self.deleteIconColor : deleteIconColor // ignore: cast_nullable_to_non_nullable as String?, deleteButtonTooltipMessage: freezed == deleteButtonTooltipMessage - ? _value.deleteButtonTooltipMessage + ? _self.deleteButtonTooltipMessage : deleteButtonTooltipMessage // ignore: cast_nullable_to_non_nullable as String?, side: freezed == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacRoundedRectangleBorder?, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, visualDensity: freezed == visualDensity - ? _value.visualDensity + ? _self.visualDensity : visualDensity // ignore: cast_nullable_to_non_nullable as StacVisualDensity?, materialTapTargetSize: freezed == materialTapTargetSize - ? _value.materialTapTargetSize + ? _self.materialTapTargetSize : materialTapTargetSize // ignore: cast_nullable_to_non_nullable as MaterialTapTargetSize?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, iconTheme: freezed == iconTheme - ? _value.iconTheme + ? _self.iconTheme : iconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, avatarBoxConstraints: freezed == avatarBoxConstraints - ? _value.avatarBoxConstraints + ? _self.avatarBoxConstraints : avatarBoxConstraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, deleteIconBoxConstraints: freezed == deleteIconBoxConstraints - ? _value.deleteIconBoxConstraints + ? _self.deleteIconBoxConstraints : deleteIconBoxConstraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, - ) as $Val); + )); } /// Create a copy of StacChip @@ -238,12 +311,12 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get labelStyle { - if (_value.labelStyle == null) { + if (_self.labelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.labelStyle!, (value) { - return _then(_value.copyWith(labelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); }); } @@ -252,12 +325,12 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get labelPadding { - if (_value.labelPadding == null) { + if (_self.labelPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.labelPadding!, (value) { - return _then(_value.copyWith(labelPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.labelPadding!, (value) { + return _then(_self.copyWith(labelPadding: value)); }); } @@ -266,12 +339,12 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res>? get side { - if (_value.side == null) { + if (_self.side == null) { return null; } - return $StacBorderSideCopyWith<$Res>(_value.side!, (value) { - return _then(_value.copyWith(side: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.side!, (value) { + return _then(_self.copyWith(side: value)); }); } @@ -280,12 +353,12 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacRoundedRectangleBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacRoundedRectangleBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacRoundedRectangleBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -294,12 +367,12 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } @@ -308,12 +381,12 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacVisualDensityCopyWith<$Res>? get visualDensity { - if (_value.visualDensity == null) { + if (_self.visualDensity == null) { return null; } - return $StacVisualDensityCopyWith<$Res>(_value.visualDensity!, (value) { - return _then(_value.copyWith(visualDensity: value) as $Val); + return $StacVisualDensityCopyWith<$Res>(_self.visualDensity!, (value) { + return _then(_self.copyWith(visualDensity: value)); }); } @@ -322,12 +395,12 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get iconTheme { - if (_value.iconTheme == null) { + if (_self.iconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.iconTheme!, (value) { - return _then(_value.copyWith(iconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); }); } @@ -336,13 +409,13 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get avatarBoxConstraints { - if (_value.avatarBoxConstraints == null) { + if (_self.avatarBoxConstraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.avatarBoxConstraints!, + return $StacBoxConstraintsCopyWith<$Res>(_self.avatarBoxConstraints!, (value) { - return _then(_value.copyWith(avatarBoxConstraints: value) as $Val); + return _then(_self.copyWith(avatarBoxConstraints: value)); }); } @@ -351,94 +424,305 @@ class _$StacChipCopyWithImpl<$Res, $Val extends StacChip> @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get deleteIconBoxConstraints { - if (_value.deleteIconBoxConstraints == null) { + if (_self.deleteIconBoxConstraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.deleteIconBoxConstraints!, + return $StacBoxConstraintsCopyWith<$Res>(_self.deleteIconBoxConstraints!, (value) { - return _then(_value.copyWith(deleteIconBoxConstraints: value) as $Val); + return _then(_self.copyWith(deleteIconBoxConstraints: value)); }); } } /// @nodoc -abstract class _$$StacChipImplCopyWith<$Res> - implements $StacChipCopyWith<$Res> { - factory _$$StacChipImplCopyWith( - _$StacChipImpl value, $Res Function(_$StacChipImpl) then) = - __$$StacChipImplCopyWithImpl<$Res>; +@JsonSerializable() +class _StacChip implements StacChip { + const _StacChip( + {final Map? avatar, + required final Map label, + this.labelStyle, + this.labelPadding, + final Map? deleteIcon, + final Map? onDeleted, + this.deleteIconColor, + this.deleteButtonTooltipMessage, + this.side, + this.shape, + this.clipBehavior = Clip.none, + this.autofocus = false, + this.color, + this.backgroundColor, + this.padding, + this.visualDensity, + this.materialTapTargetSize, + this.elevation, + this.shadowColor, + this.surfaceTintColor, + this.iconTheme, + this.avatarBoxConstraints, + this.deleteIconBoxConstraints}) + : _avatar = avatar, + _label = label, + _deleteIcon = deleteIcon, + _onDeleted = onDeleted; + factory _StacChip.fromJson(Map json) => + _$StacChipFromJson(json); + + final Map? _avatar; @override - @useResult - $Res call( - {Map? avatar, - Map label, - StacTextStyle? labelStyle, - StacEdgeInsets? labelPadding, - Map? deleteIcon, - Map? onDeleted, - String? deleteIconColor, - String? deleteButtonTooltipMessage, - StacBorderSide? side, - StacRoundedRectangleBorder? shape, - Clip clipBehavior, - bool autofocus, - String? color, - String? backgroundColor, - StacEdgeInsets? padding, - StacVisualDensity? visualDensity, - MaterialTapTargetSize? materialTapTargetSize, - double? elevation, - String? shadowColor, - String? surfaceTintColor, - StacIconThemeData? iconTheme, - StacBoxConstraints? avatarBoxConstraints, - StacBoxConstraints? deleteIconBoxConstraints}); + Map? get avatar { + final value = _avatar; + if (value == null) return null; + if (_avatar is EqualUnmodifiableMapView) return _avatar; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + final Map _label; @override - $StacTextStyleCopyWith<$Res>? get labelStyle; + Map get label { + if (_label is EqualUnmodifiableMapView) return _label; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_label); + } + @override - $StacEdgeInsetsCopyWith<$Res>? get labelPadding; + final StacTextStyle? labelStyle; @override - $StacBorderSideCopyWith<$Res>? get side; + final StacEdgeInsets? labelPadding; + final Map? _deleteIcon; @override - $StacRoundedRectangleBorderCopyWith<$Res>? get shape; + Map? get deleteIcon { + final value = _deleteIcon; + if (value == null) return null; + if (_deleteIcon is EqualUnmodifiableMapView) return _deleteIcon; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _onDeleted; @override - $StacEdgeInsetsCopyWith<$Res>? get padding; + Map? get onDeleted { + final value = _onDeleted; + if (value == null) return null; + if (_onDeleted is EqualUnmodifiableMapView) return _onDeleted; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + @override - $StacVisualDensityCopyWith<$Res>? get visualDensity; + final String? deleteIconColor; @override - $StacIconThemeDataCopyWith<$Res>? get iconTheme; + final String? deleteButtonTooltipMessage; @override - $StacBoxConstraintsCopyWith<$Res>? get avatarBoxConstraints; + final StacBorderSide? side; @override - $StacBoxConstraintsCopyWith<$Res>? get deleteIconBoxConstraints; -} - -/// @nodoc -class __$$StacChipImplCopyWithImpl<$Res> - extends _$StacChipCopyWithImpl<$Res, _$StacChipImpl> - implements _$$StacChipImplCopyWith<$Res> { - __$$StacChipImplCopyWithImpl( - _$StacChipImpl _value, $Res Function(_$StacChipImpl) _then) - : super(_value, _then); + final StacRoundedRectangleBorder? shape; + @override + @JsonKey() + final Clip clipBehavior; + @override + @JsonKey() + final bool autofocus; + @override + final String? color; + @override + final String? backgroundColor; + @override + final StacEdgeInsets? padding; + @override + final StacVisualDensity? visualDensity; + @override + final MaterialTapTargetSize? materialTapTargetSize; + @override + final double? elevation; + @override + final String? shadowColor; + @override + final String? surfaceTintColor; + @override + final StacIconThemeData? iconTheme; + @override + final StacBoxConstraints? avatarBoxConstraints; + @override + final StacBoxConstraints? deleteIconBoxConstraints; /// Create a copy of StacChip /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') + _$StacChipCopyWith<_StacChip> get copyWith => + __$StacChipCopyWithImpl<_StacChip>(this, _$identity); + @override - $Res call({ - Object? avatar = freezed, - Object? label = null, - Object? labelStyle = freezed, - Object? labelPadding = freezed, - Object? deleteIcon = freezed, - Object? onDeleted = freezed, - Object? deleteIconColor = freezed, - Object? deleteButtonTooltipMessage = freezed, - Object? side = freezed, - Object? shape = freezed, - Object? clipBehavior = null, + Map toJson() { + return _$StacChipToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacChip && + const DeepCollectionEquality().equals(other._avatar, _avatar) && + const DeepCollectionEquality().equals(other._label, _label) && + (identical(other.labelStyle, labelStyle) || + other.labelStyle == labelStyle) && + (identical(other.labelPadding, labelPadding) || + other.labelPadding == labelPadding) && + const DeepCollectionEquality() + .equals(other._deleteIcon, _deleteIcon) && + const DeepCollectionEquality() + .equals(other._onDeleted, _onDeleted) && + (identical(other.deleteIconColor, deleteIconColor) || + other.deleteIconColor == deleteIconColor) && + (identical(other.deleteButtonTooltipMessage, + deleteButtonTooltipMessage) || + other.deleteButtonTooltipMessage == + deleteButtonTooltipMessage) && + (identical(other.side, side) || other.side == side) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.color, color) || other.color == color) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.visualDensity, visualDensity) || + other.visualDensity == visualDensity) && + (identical(other.materialTapTargetSize, materialTapTargetSize) || + other.materialTapTargetSize == materialTapTargetSize) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.iconTheme, iconTheme) || + other.iconTheme == iconTheme) && + (identical(other.avatarBoxConstraints, avatarBoxConstraints) || + other.avatarBoxConstraints == avatarBoxConstraints) && + (identical( + other.deleteIconBoxConstraints, deleteIconBoxConstraints) || + other.deleteIconBoxConstraints == deleteIconBoxConstraints)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(_avatar), + const DeepCollectionEquality().hash(_label), + labelStyle, + labelPadding, + const DeepCollectionEquality().hash(_deleteIcon), + const DeepCollectionEquality().hash(_onDeleted), + deleteIconColor, + deleteButtonTooltipMessage, + side, + shape, + clipBehavior, + autofocus, + color, + backgroundColor, + padding, + visualDensity, + materialTapTargetSize, + elevation, + shadowColor, + surfaceTintColor, + iconTheme, + avatarBoxConstraints, + deleteIconBoxConstraints + ]); + + @override + String toString() { + return 'StacChip(avatar: $avatar, label: $label, labelStyle: $labelStyle, labelPadding: $labelPadding, deleteIcon: $deleteIcon, onDeleted: $onDeleted, deleteIconColor: $deleteIconColor, deleteButtonTooltipMessage: $deleteButtonTooltipMessage, side: $side, shape: $shape, clipBehavior: $clipBehavior, autofocus: $autofocus, color: $color, backgroundColor: $backgroundColor, padding: $padding, visualDensity: $visualDensity, materialTapTargetSize: $materialTapTargetSize, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconTheme: $iconTheme, avatarBoxConstraints: $avatarBoxConstraints, deleteIconBoxConstraints: $deleteIconBoxConstraints)'; + } +} + +/// @nodoc +abstract mixin class _$StacChipCopyWith<$Res> + implements $StacChipCopyWith<$Res> { + factory _$StacChipCopyWith(_StacChip value, $Res Function(_StacChip) _then) = + __$StacChipCopyWithImpl; + @override + @useResult + $Res call( + {Map? avatar, + Map label, + StacTextStyle? labelStyle, + StacEdgeInsets? labelPadding, + Map? deleteIcon, + Map? onDeleted, + String? deleteIconColor, + String? deleteButtonTooltipMessage, + StacBorderSide? side, + StacRoundedRectangleBorder? shape, + Clip clipBehavior, + bool autofocus, + String? color, + String? backgroundColor, + StacEdgeInsets? padding, + StacVisualDensity? visualDensity, + MaterialTapTargetSize? materialTapTargetSize, + double? elevation, + String? shadowColor, + String? surfaceTintColor, + StacIconThemeData? iconTheme, + StacBoxConstraints? avatarBoxConstraints, + StacBoxConstraints? deleteIconBoxConstraints}); + + @override + $StacTextStyleCopyWith<$Res>? get labelStyle; + @override + $StacEdgeInsetsCopyWith<$Res>? get labelPadding; + @override + $StacBorderSideCopyWith<$Res>? get side; + @override + $StacRoundedRectangleBorderCopyWith<$Res>? get shape; + @override + $StacEdgeInsetsCopyWith<$Res>? get padding; + @override + $StacVisualDensityCopyWith<$Res>? get visualDensity; + @override + $StacIconThemeDataCopyWith<$Res>? get iconTheme; + @override + $StacBoxConstraintsCopyWith<$Res>? get avatarBoxConstraints; + @override + $StacBoxConstraintsCopyWith<$Res>? get deleteIconBoxConstraints; +} + +/// @nodoc +class __$StacChipCopyWithImpl<$Res> implements _$StacChipCopyWith<$Res> { + __$StacChipCopyWithImpl(this._self, this._then); + + final _StacChip _self; + final $Res Function(_StacChip) _then; + + /// Create a copy of StacChip + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? avatar = freezed, + Object? label = null, + Object? labelStyle = freezed, + Object? labelPadding = freezed, + Object? deleteIcon = freezed, + Object? onDeleted = freezed, + Object? deleteIconColor = freezed, + Object? deleteButtonTooltipMessage = freezed, + Object? side = freezed, + Object? shape = freezed, + Object? clipBehavior = null, Object? autofocus = null, Object? color = freezed, Object? backgroundColor = freezed, @@ -452,397 +736,229 @@ class __$$StacChipImplCopyWithImpl<$Res> Object? avatarBoxConstraints = freezed, Object? deleteIconBoxConstraints = freezed, }) { - return _then(_$StacChipImpl( + return _then(_StacChip( avatar: freezed == avatar - ? _value._avatar + ? _self._avatar : avatar // ignore: cast_nullable_to_non_nullable as Map?, label: null == label - ? _value._label + ? _self._label : label // ignore: cast_nullable_to_non_nullable as Map, labelStyle: freezed == labelStyle - ? _value.labelStyle + ? _self.labelStyle : labelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, labelPadding: freezed == labelPadding - ? _value.labelPadding + ? _self.labelPadding : labelPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, deleteIcon: freezed == deleteIcon - ? _value._deleteIcon + ? _self._deleteIcon : deleteIcon // ignore: cast_nullable_to_non_nullable as Map?, onDeleted: freezed == onDeleted - ? _value._onDeleted + ? _self._onDeleted : onDeleted // ignore: cast_nullable_to_non_nullable as Map?, deleteIconColor: freezed == deleteIconColor - ? _value.deleteIconColor + ? _self.deleteIconColor : deleteIconColor // ignore: cast_nullable_to_non_nullable as String?, deleteButtonTooltipMessage: freezed == deleteButtonTooltipMessage - ? _value.deleteButtonTooltipMessage + ? _self.deleteButtonTooltipMessage : deleteButtonTooltipMessage // ignore: cast_nullable_to_non_nullable as String?, side: freezed == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacRoundedRectangleBorder?, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, visualDensity: freezed == visualDensity - ? _value.visualDensity + ? _self.visualDensity : visualDensity // ignore: cast_nullable_to_non_nullable as StacVisualDensity?, materialTapTargetSize: freezed == materialTapTargetSize - ? _value.materialTapTargetSize + ? _self.materialTapTargetSize : materialTapTargetSize // ignore: cast_nullable_to_non_nullable as MaterialTapTargetSize?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, iconTheme: freezed == iconTheme - ? _value.iconTheme + ? _self.iconTheme : iconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, avatarBoxConstraints: freezed == avatarBoxConstraints - ? _value.avatarBoxConstraints + ? _self.avatarBoxConstraints : avatarBoxConstraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, deleteIconBoxConstraints: freezed == deleteIconBoxConstraints - ? _value.deleteIconBoxConstraints + ? _self.deleteIconBoxConstraints : deleteIconBoxConstraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, )); } -} -/// @nodoc -@JsonSerializable() -class _$StacChipImpl implements _StacChip { - const _$StacChipImpl( - {final Map? avatar, - required final Map label, - this.labelStyle, - this.labelPadding, - final Map? deleteIcon, - final Map? onDeleted, - this.deleteIconColor, - this.deleteButtonTooltipMessage, - this.side, - this.shape, - this.clipBehavior = Clip.none, - this.autofocus = false, - this.color, - this.backgroundColor, - this.padding, - this.visualDensity, - this.materialTapTargetSize, - this.elevation, - this.shadowColor, - this.surfaceTintColor, - this.iconTheme, - this.avatarBoxConstraints, - this.deleteIconBoxConstraints}) - : _avatar = avatar, - _label = label, - _deleteIcon = deleteIcon, - _onDeleted = onDeleted; - - factory _$StacChipImpl.fromJson(Map json) => - _$$StacChipImplFromJson(json); - - final Map? _avatar; + /// Create a copy of StacChip + /// with the given fields replaced by the non-null parameter values. @override - Map? get avatar { - final value = _avatar; - if (value == null) return null; - if (_avatar is EqualUnmodifiableMapView) return _avatar; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get labelStyle { + if (_self.labelStyle == null) { + return null; + } - final Map _label; - @override - Map get label { - if (_label is EqualUnmodifiableMapView) return _label; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_label); + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); + }); } + /// Create a copy of StacChip + /// with the given fields replaced by the non-null parameter values. @override - final StacTextStyle? labelStyle; - @override - final StacEdgeInsets? labelPadding; - final Map? _deleteIcon; - @override - Map? get deleteIcon { - final value = _deleteIcon; - if (value == null) return null; - if (_deleteIcon is EqualUnmodifiableMapView) return _deleteIcon; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get labelPadding { + if (_self.labelPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.labelPadding!, (value) { + return _then(_self.copyWith(labelPadding: value)); + }); } - final Map? _onDeleted; + /// Create a copy of StacChip + /// with the given fields replaced by the non-null parameter values. @override - Map? get onDeleted { - final value = _onDeleted; - if (value == null) return null; - if (_onDeleted is EqualUnmodifiableMapView) return _onDeleted; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res>? get side { + if (_self.side == null) { + return null; + } + + return $StacBorderSideCopyWith<$Res>(_self.side!, (value) { + return _then(_self.copyWith(side: value)); + }); } + /// Create a copy of StacChip + /// with the given fields replaced by the non-null parameter values. @override - final String? deleteIconColor; - @override - final String? deleteButtonTooltipMessage; - @override - final StacBorderSide? side; - @override - final StacRoundedRectangleBorder? shape; - @override - @JsonKey() - final Clip clipBehavior; - @override - @JsonKey() - final bool autofocus; - @override - final String? color; - @override - final String? backgroundColor; - @override - final StacEdgeInsets? padding; - @override - final StacVisualDensity? visualDensity; - @override - final MaterialTapTargetSize? materialTapTargetSize; - @override - final double? elevation; - @override - final String? shadowColor; - @override - final String? surfaceTintColor; - @override - final StacIconThemeData? iconTheme; - @override - final StacBoxConstraints? avatarBoxConstraints; - @override - final StacBoxConstraints? deleteIconBoxConstraints; + @pragma('vm:prefer-inline') + $StacRoundedRectangleBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } - @override - String toString() { - return 'StacChip(avatar: $avatar, label: $label, labelStyle: $labelStyle, labelPadding: $labelPadding, deleteIcon: $deleteIcon, onDeleted: $onDeleted, deleteIconColor: $deleteIconColor, deleteButtonTooltipMessage: $deleteButtonTooltipMessage, side: $side, shape: $shape, clipBehavior: $clipBehavior, autofocus: $autofocus, color: $color, backgroundColor: $backgroundColor, padding: $padding, visualDensity: $visualDensity, materialTapTargetSize: $materialTapTargetSize, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, iconTheme: $iconTheme, avatarBoxConstraints: $avatarBoxConstraints, deleteIconBoxConstraints: $deleteIconBoxConstraints)'; + return $StacRoundedRectangleBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); } + /// Create a copy of StacChip + /// with the given fields replaced by the non-null parameter values. @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacChipImpl && - const DeepCollectionEquality().equals(other._avatar, _avatar) && - const DeepCollectionEquality().equals(other._label, _label) && - (identical(other.labelStyle, labelStyle) || - other.labelStyle == labelStyle) && - (identical(other.labelPadding, labelPadding) || - other.labelPadding == labelPadding) && - const DeepCollectionEquality() - .equals(other._deleteIcon, _deleteIcon) && - const DeepCollectionEquality() - .equals(other._onDeleted, _onDeleted) && - (identical(other.deleteIconColor, deleteIconColor) || - other.deleteIconColor == deleteIconColor) && - (identical(other.deleteButtonTooltipMessage, - deleteButtonTooltipMessage) || - other.deleteButtonTooltipMessage == - deleteButtonTooltipMessage) && - (identical(other.side, side) || other.side == side) && - (identical(other.shape, shape) || other.shape == shape) && - (identical(other.clipBehavior, clipBehavior) || - other.clipBehavior == clipBehavior) && - (identical(other.autofocus, autofocus) || - other.autofocus == autofocus) && - (identical(other.color, color) || other.color == color) && - (identical(other.backgroundColor, backgroundColor) || - other.backgroundColor == backgroundColor) && - (identical(other.padding, padding) || other.padding == padding) && - (identical(other.visualDensity, visualDensity) || - other.visualDensity == visualDensity) && - (identical(other.materialTapTargetSize, materialTapTargetSize) || - other.materialTapTargetSize == materialTapTargetSize) && - (identical(other.elevation, elevation) || - other.elevation == elevation) && - (identical(other.shadowColor, shadowColor) || - other.shadowColor == shadowColor) && - (identical(other.surfaceTintColor, surfaceTintColor) || - other.surfaceTintColor == surfaceTintColor) && - (identical(other.iconTheme, iconTheme) || - other.iconTheme == iconTheme) && - (identical(other.avatarBoxConstraints, avatarBoxConstraints) || - other.avatarBoxConstraints == avatarBoxConstraints) && - (identical( - other.deleteIconBoxConstraints, deleteIconBoxConstraints) || - other.deleteIconBoxConstraints == deleteIconBoxConstraints)); + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); } - @JsonKey(includeFromJson: false, includeToJson: false) + /// Create a copy of StacChip + /// with the given fields replaced by the non-null parameter values. @override - int get hashCode => Object.hashAll([ - runtimeType, - const DeepCollectionEquality().hash(_avatar), - const DeepCollectionEquality().hash(_label), - labelStyle, - labelPadding, - const DeepCollectionEquality().hash(_deleteIcon), - const DeepCollectionEquality().hash(_onDeleted), - deleteIconColor, - deleteButtonTooltipMessage, - side, - shape, - clipBehavior, - autofocus, - color, - backgroundColor, - padding, - visualDensity, - materialTapTargetSize, - elevation, - shadowColor, - surfaceTintColor, - iconTheme, - avatarBoxConstraints, - deleteIconBoxConstraints - ]); + @pragma('vm:prefer-inline') + $StacVisualDensityCopyWith<$Res>? get visualDensity { + if (_self.visualDensity == null) { + return null; + } + + return $StacVisualDensityCopyWith<$Res>(_self.visualDensity!, (value) { + return _then(_self.copyWith(visualDensity: value)); + }); + } /// Create a copy of StacChip /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacChipImplCopyWith<_$StacChipImpl> get copyWith => - __$$StacChipImplCopyWithImpl<_$StacChipImpl>(this, _$identity); + $StacIconThemeDataCopyWith<$Res>? get iconTheme { + if (_self.iconTheme == null) { + return null; + } - @override - Map toJson() { - return _$$StacChipImplToJson( - this, - ); + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); + }); } -} -abstract class _StacChip implements StacChip { - const factory _StacChip( - {final Map? avatar, - required final Map label, - final StacTextStyle? labelStyle, - final StacEdgeInsets? labelPadding, - final Map? deleteIcon, - final Map? onDeleted, - final String? deleteIconColor, - final String? deleteButtonTooltipMessage, - final StacBorderSide? side, - final StacRoundedRectangleBorder? shape, - final Clip clipBehavior, - final bool autofocus, - final String? color, - final String? backgroundColor, - final StacEdgeInsets? padding, - final StacVisualDensity? visualDensity, - final MaterialTapTargetSize? materialTapTargetSize, - final double? elevation, - final String? shadowColor, - final String? surfaceTintColor, - final StacIconThemeData? iconTheme, - final StacBoxConstraints? avatarBoxConstraints, - final StacBoxConstraints? deleteIconBoxConstraints}) = _$StacChipImpl; - - factory _StacChip.fromJson(Map json) = - _$StacChipImpl.fromJson; - - @override - Map? get avatar; - @override - Map get label; - @override - StacTextStyle? get labelStyle; - @override - StacEdgeInsets? get labelPadding; - @override - Map? get deleteIcon; - @override - Map? get onDeleted; - @override - String? get deleteIconColor; - @override - String? get deleteButtonTooltipMessage; - @override - StacBorderSide? get side; - @override - StacRoundedRectangleBorder? get shape; - @override - Clip get clipBehavior; - @override - bool get autofocus; - @override - String? get color; - @override - String? get backgroundColor; - @override - StacEdgeInsets? get padding; - @override - StacVisualDensity? get visualDensity; - @override - MaterialTapTargetSize? get materialTapTargetSize; - @override - double? get elevation; - @override - String? get shadowColor; - @override - String? get surfaceTintColor; - @override - StacIconThemeData? get iconTheme; - @override - StacBoxConstraints? get avatarBoxConstraints; + /// Create a copy of StacChip + /// with the given fields replaced by the non-null parameter values. @override - StacBoxConstraints? get deleteIconBoxConstraints; + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get avatarBoxConstraints { + if (_self.avatarBoxConstraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.avatarBoxConstraints!, + (value) { + return _then(_self.copyWith(avatarBoxConstraints: value)); + }); + } /// Create a copy of StacChip /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacChipImplCopyWith<_$StacChipImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get deleteIconBoxConstraints { + if (_self.deleteIconBoxConstraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.deleteIconBoxConstraints!, + (value) { + return _then(_self.copyWith(deleteIconBoxConstraints: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_chip/stac_chip.g.dart b/packages/stac/lib/src/parsers/stac_chip/stac_chip.g.dart index cd30bf70..62f4c11c 100644 --- a/packages/stac/lib/src/parsers/stac_chip/stac_chip.g.dart +++ b/packages/stac/lib/src/parsers/stac_chip/stac_chip.g.dart @@ -6,8 +6,7 @@ part of 'stac_chip.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacChipImpl _$$StacChipImplFromJson(Map json) => - _$StacChipImpl( +_StacChip _$StacChipFromJson(Map json) => _StacChip( avatar: json['avatar'] as Map?, label: json['label'] as Map, labelStyle: json['labelStyle'] == null @@ -58,8 +57,7 @@ _$StacChipImpl _$$StacChipImplFromJson(Map json) => json['deleteIconBoxConstraints'] as Map), ); -Map _$$StacChipImplToJson(_$StacChipImpl instance) => - { +Map _$StacChipToJson(_StacChip instance) => { 'avatar': instance.avatar, 'label': instance.label, 'labelStyle': instance.labelStyle, diff --git a/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.dart b/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.dart index a1f92f5d..3b40c63f 100644 --- a/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.dart +++ b/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.dart @@ -6,7 +6,7 @@ part 'stac_circle_avatar.freezed.dart'; part 'stac_circle_avatar.g.dart'; @freezed -class StacCircleAvatar with _$StacCircleAvatar { +abstract class StacCircleAvatar with _$StacCircleAvatar { const factory StacCircleAvatar({ Map? child, String? backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.freezed.dart b/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.freezed.dart index 380a7a79..66e0af2d 100644 --- a/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,137 +10,84 @@ part of 'stac_circle_avatar.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCircleAvatar _$StacCircleAvatarFromJson(Map json) { - return _StacCircleAvatar.fromJson(json); -} - /// @nodoc mixin _$StacCircleAvatar { - Map? get child => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get backgroundImage => throw _privateConstructorUsedError; - String? get foregroundImage => throw _privateConstructorUsedError; - Map? get onBackgroundImageError => - throw _privateConstructorUsedError; - Map? get onForegroundImageError => - throw _privateConstructorUsedError; - String? get foregroundColor => throw _privateConstructorUsedError; - double? get radius => throw _privateConstructorUsedError; - double? get minRadius => throw _privateConstructorUsedError; - double? get maxRadius => throw _privateConstructorUsedError; - - /// Serializes this StacCircleAvatar to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get child; + String? get backgroundColor; + String? get backgroundImage; + String? get foregroundImage; + Map? get onBackgroundImageError; + Map? get onForegroundImageError; + String? get foregroundColor; + double? get radius; + double? get minRadius; + double? get maxRadius; /// Create a copy of StacCircleAvatar /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCircleAvatarCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacCircleAvatarCopyWithImpl( + this as StacCircleAvatar, _$identity); -/// @nodoc -abstract class $StacCircleAvatarCopyWith<$Res> { - factory $StacCircleAvatarCopyWith( - StacCircleAvatar value, $Res Function(StacCircleAvatar) then) = - _$StacCircleAvatarCopyWithImpl<$Res, StacCircleAvatar>; - @useResult - $Res call( - {Map? child, - String? backgroundColor, - String? backgroundImage, - String? foregroundImage, - Map? onBackgroundImageError, - Map? onForegroundImageError, - String? foregroundColor, - double? radius, - double? minRadius, - double? maxRadius}); -} + /// Serializes this StacCircleAvatar to a JSON map. + Map toJson(); -/// @nodoc -class _$StacCircleAvatarCopyWithImpl<$Res, $Val extends StacCircleAvatar> - implements $StacCircleAvatarCopyWith<$Res> { - _$StacCircleAvatarCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCircleAvatar && + const DeepCollectionEquality().equals(other.child, child) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.backgroundImage, backgroundImage) || + other.backgroundImage == backgroundImage) && + (identical(other.foregroundImage, foregroundImage) || + other.foregroundImage == foregroundImage) && + const DeepCollectionEquality() + .equals(other.onBackgroundImageError, onBackgroundImageError) && + const DeepCollectionEquality() + .equals(other.onForegroundImageError, onForegroundImageError) && + (identical(other.foregroundColor, foregroundColor) || + other.foregroundColor == foregroundColor) && + (identical(other.radius, radius) || other.radius == radius) && + (identical(other.minRadius, minRadius) || + other.minRadius == minRadius) && + (identical(other.maxRadius, maxRadius) || + other.maxRadius == maxRadius)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(child), + backgroundColor, + backgroundImage, + foregroundImage, + const DeepCollectionEquality().hash(onBackgroundImageError), + const DeepCollectionEquality().hash(onForegroundImageError), + foregroundColor, + radius, + minRadius, + maxRadius); - /// Create a copy of StacCircleAvatar - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? child = freezed, - Object? backgroundColor = freezed, - Object? backgroundImage = freezed, - Object? foregroundImage = freezed, - Object? onBackgroundImageError = freezed, - Object? onForegroundImageError = freezed, - Object? foregroundColor = freezed, - Object? radius = freezed, - Object? minRadius = freezed, - Object? maxRadius = freezed, - }) { - return _then(_value.copyWith( - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - backgroundImage: freezed == backgroundImage - ? _value.backgroundImage - : backgroundImage // ignore: cast_nullable_to_non_nullable - as String?, - foregroundImage: freezed == foregroundImage - ? _value.foregroundImage - : foregroundImage // ignore: cast_nullable_to_non_nullable - as String?, - onBackgroundImageError: freezed == onBackgroundImageError - ? _value.onBackgroundImageError - : onBackgroundImageError // ignore: cast_nullable_to_non_nullable - as Map?, - onForegroundImageError: freezed == onForegroundImageError - ? _value.onForegroundImageError - : onForegroundImageError // ignore: cast_nullable_to_non_nullable - as Map?, - foregroundColor: freezed == foregroundColor - ? _value.foregroundColor - : foregroundColor // ignore: cast_nullable_to_non_nullable - as String?, - radius: freezed == radius - ? _value.radius - : radius // ignore: cast_nullable_to_non_nullable - as double?, - minRadius: freezed == minRadius - ? _value.minRadius - : minRadius // ignore: cast_nullable_to_non_nullable - as double?, - maxRadius: freezed == maxRadius - ? _value.maxRadius - : maxRadius // ignore: cast_nullable_to_non_nullable - as double?, - ) as $Val); + String toString() { + return 'StacCircleAvatar(child: $child, backgroundColor: $backgroundColor, backgroundImage: $backgroundImage, foregroundImage: $foregroundImage, onBackgroundImageError: $onBackgroundImageError, onForegroundImageError: $onForegroundImageError, foregroundColor: $foregroundColor, radius: $radius, minRadius: $minRadius, maxRadius: $maxRadius)'; } } /// @nodoc -abstract class _$$StacCircleAvatarImplCopyWith<$Res> - implements $StacCircleAvatarCopyWith<$Res> { - factory _$$StacCircleAvatarImplCopyWith(_$StacCircleAvatarImpl value, - $Res Function(_$StacCircleAvatarImpl) then) = - __$$StacCircleAvatarImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacCircleAvatarCopyWith<$Res> { + factory $StacCircleAvatarCopyWith( + StacCircleAvatar value, $Res Function(StacCircleAvatar) _then) = + _$StacCircleAvatarCopyWithImpl; @useResult $Res call( {Map? child, @@ -155,12 +103,12 @@ abstract class _$$StacCircleAvatarImplCopyWith<$Res> } /// @nodoc -class __$$StacCircleAvatarImplCopyWithImpl<$Res> - extends _$StacCircleAvatarCopyWithImpl<$Res, _$StacCircleAvatarImpl> - implements _$$StacCircleAvatarImplCopyWith<$Res> { - __$$StacCircleAvatarImplCopyWithImpl(_$StacCircleAvatarImpl _value, - $Res Function(_$StacCircleAvatarImpl) _then) - : super(_value, _then); +class _$StacCircleAvatarCopyWithImpl<$Res> + implements $StacCircleAvatarCopyWith<$Res> { + _$StacCircleAvatarCopyWithImpl(this._self, this._then); + + final StacCircleAvatar _self; + final $Res Function(StacCircleAvatar) _then; /// Create a copy of StacCircleAvatar /// with the given fields replaced by the non-null parameter values. @@ -178,45 +126,45 @@ class __$$StacCircleAvatarImplCopyWithImpl<$Res> Object? minRadius = freezed, Object? maxRadius = freezed, }) { - return _then(_$StacCircleAvatarImpl( + return _then(_self.copyWith( child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, backgroundImage: freezed == backgroundImage - ? _value.backgroundImage + ? _self.backgroundImage : backgroundImage // ignore: cast_nullable_to_non_nullable as String?, foregroundImage: freezed == foregroundImage - ? _value.foregroundImage + ? _self.foregroundImage : foregroundImage // ignore: cast_nullable_to_non_nullable as String?, onBackgroundImageError: freezed == onBackgroundImageError - ? _value._onBackgroundImageError + ? _self.onBackgroundImageError : onBackgroundImageError // ignore: cast_nullable_to_non_nullable as Map?, onForegroundImageError: freezed == onForegroundImageError - ? _value._onForegroundImageError + ? _self.onForegroundImageError : onForegroundImageError // ignore: cast_nullable_to_non_nullable as Map?, foregroundColor: freezed == foregroundColor - ? _value.foregroundColor + ? _self.foregroundColor : foregroundColor // ignore: cast_nullable_to_non_nullable as String?, radius: freezed == radius - ? _value.radius + ? _self.radius : radius // ignore: cast_nullable_to_non_nullable as double?, minRadius: freezed == minRadius - ? _value.minRadius + ? _self.minRadius : minRadius // ignore: cast_nullable_to_non_nullable as double?, maxRadius: freezed == maxRadius - ? _value.maxRadius + ? _self.maxRadius : maxRadius // ignore: cast_nullable_to_non_nullable as double?, )); @@ -225,8 +173,8 @@ class __$$StacCircleAvatarImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacCircleAvatarImpl implements _StacCircleAvatar { - const _$StacCircleAvatarImpl( +class _StacCircleAvatar implements StacCircleAvatar { + const _StacCircleAvatar( {final Map? child, this.backgroundColor, this.backgroundImage, @@ -240,9 +188,8 @@ class _$StacCircleAvatarImpl implements _StacCircleAvatar { : _child = child, _onBackgroundImageError = onBackgroundImageError, _onForegroundImageError = onForegroundImageError; - - factory _$StacCircleAvatarImpl.fromJson(Map json) => - _$$StacCircleAvatarImplFromJson(json); + factory _StacCircleAvatar.fromJson(Map json) => + _$StacCircleAvatarFromJson(json); final Map? _child; @override @@ -291,16 +238,26 @@ class _$StacCircleAvatarImpl implements _StacCircleAvatar { @override final double? maxRadius; + /// Create a copy of StacCircleAvatar + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacCircleAvatar(child: $child, backgroundColor: $backgroundColor, backgroundImage: $backgroundImage, foregroundImage: $foregroundImage, onBackgroundImageError: $onBackgroundImageError, onForegroundImageError: $onForegroundImageError, foregroundColor: $foregroundColor, radius: $radius, minRadius: $minRadius, maxRadius: $maxRadius)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCircleAvatarCopyWith<_StacCircleAvatar> get copyWith => + __$StacCircleAvatarCopyWithImpl<_StacCircleAvatar>(this, _$identity); + + @override + Map toJson() { + return _$StacCircleAvatarToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacCircleAvatarImpl && + other is _StacCircleAvatar && const DeepCollectionEquality().equals(other._child, _child) && (identical(other.backgroundColor, backgroundColor) || other.backgroundColor == backgroundColor) && @@ -336,64 +293,100 @@ class _$StacCircleAvatarImpl implements _StacCircleAvatar { minRadius, maxRadius); - /// Create a copy of StacCircleAvatar - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacCircleAvatarImplCopyWith<_$StacCircleAvatarImpl> get copyWith => - __$$StacCircleAvatarImplCopyWithImpl<_$StacCircleAvatarImpl>( - this, _$identity); + String toString() { + return 'StacCircleAvatar(child: $child, backgroundColor: $backgroundColor, backgroundImage: $backgroundImage, foregroundImage: $foregroundImage, onBackgroundImageError: $onBackgroundImageError, onForegroundImageError: $onForegroundImageError, foregroundColor: $foregroundColor, radius: $radius, minRadius: $minRadius, maxRadius: $maxRadius)'; + } +} +/// @nodoc +abstract mixin class _$StacCircleAvatarCopyWith<$Res> + implements $StacCircleAvatarCopyWith<$Res> { + factory _$StacCircleAvatarCopyWith( + _StacCircleAvatar value, $Res Function(_StacCircleAvatar) _then) = + __$StacCircleAvatarCopyWithImpl; @override - Map toJson() { - return _$$StacCircleAvatarImplToJson( - this, - ); - } + @useResult + $Res call( + {Map? child, + String? backgroundColor, + String? backgroundImage, + String? foregroundImage, + Map? onBackgroundImageError, + Map? onForegroundImageError, + String? foregroundColor, + double? radius, + double? minRadius, + double? maxRadius}); } -abstract class _StacCircleAvatar implements StacCircleAvatar { - const factory _StacCircleAvatar( - {final Map? child, - final String? backgroundColor, - final String? backgroundImage, - final String? foregroundImage, - final Map? onBackgroundImageError, - final Map? onForegroundImageError, - final String? foregroundColor, - final double? radius, - final double? minRadius, - final double? maxRadius}) = _$StacCircleAvatarImpl; +/// @nodoc +class __$StacCircleAvatarCopyWithImpl<$Res> + implements _$StacCircleAvatarCopyWith<$Res> { + __$StacCircleAvatarCopyWithImpl(this._self, this._then); - factory _StacCircleAvatar.fromJson(Map json) = - _$StacCircleAvatarImpl.fromJson; - - @override - Map? get child; - @override - String? get backgroundColor; - @override - String? get backgroundImage; - @override - String? get foregroundImage; - @override - Map? get onBackgroundImageError; - @override - Map? get onForegroundImageError; - @override - String? get foregroundColor; - @override - double? get radius; - @override - double? get minRadius; - @override - double? get maxRadius; + final _StacCircleAvatar _self; + final $Res Function(_StacCircleAvatar) _then; /// Create a copy of StacCircleAvatar /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCircleAvatarImplCopyWith<_$StacCircleAvatarImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? child = freezed, + Object? backgroundColor = freezed, + Object? backgroundImage = freezed, + Object? foregroundImage = freezed, + Object? onBackgroundImageError = freezed, + Object? onForegroundImageError = freezed, + Object? foregroundColor = freezed, + Object? radius = freezed, + Object? minRadius = freezed, + Object? maxRadius = freezed, + }) { + return _then(_StacCircleAvatar( + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + backgroundImage: freezed == backgroundImage + ? _self.backgroundImage + : backgroundImage // ignore: cast_nullable_to_non_nullable + as String?, + foregroundImage: freezed == foregroundImage + ? _self.foregroundImage + : foregroundImage // ignore: cast_nullable_to_non_nullable + as String?, + onBackgroundImageError: freezed == onBackgroundImageError + ? _self._onBackgroundImageError + : onBackgroundImageError // ignore: cast_nullable_to_non_nullable + as Map?, + onForegroundImageError: freezed == onForegroundImageError + ? _self._onForegroundImageError + : onForegroundImageError // ignore: cast_nullable_to_non_nullable + as Map?, + foregroundColor: freezed == foregroundColor + ? _self.foregroundColor + : foregroundColor // ignore: cast_nullable_to_non_nullable + as String?, + radius: freezed == radius + ? _self.radius + : radius // ignore: cast_nullable_to_non_nullable + as double?, + minRadius: freezed == minRadius + ? _self.minRadius + : minRadius // ignore: cast_nullable_to_non_nullable + as double?, + maxRadius: freezed == maxRadius + ? _self.maxRadius + : maxRadius // ignore: cast_nullable_to_non_nullable + as double?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.g.dart b/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.g.dart index 9d1152e2..f313ac61 100644 --- a/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.g.dart +++ b/packages/stac/lib/src/parsers/stac_circle_avatar/stac_circle_avatar.g.dart @@ -6,9 +6,8 @@ part of 'stac_circle_avatar.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCircleAvatarImpl _$$StacCircleAvatarImplFromJson( - Map json) => - _$StacCircleAvatarImpl( +_StacCircleAvatar _$StacCircleAvatarFromJson(Map json) => + _StacCircleAvatar( child: json['child'] as Map?, backgroundColor: json['backgroundColor'] as String?, backgroundImage: json['backgroundImage'] as String?, @@ -23,8 +22,7 @@ _$StacCircleAvatarImpl _$$StacCircleAvatarImplFromJson( maxRadius: (json['maxRadius'] as num?)?.toDouble(), ); -Map _$$StacCircleAvatarImplToJson( - _$StacCircleAvatarImpl instance) => +Map _$StacCircleAvatarToJson(_StacCircleAvatar instance) => { 'child': instance.child, 'backgroundColor': instance.backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.dart b/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.dart index fc2477ee..01a0f878 100644 --- a/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.dart +++ b/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.dart @@ -8,7 +8,8 @@ part 'stac_circular_progress_indicator.freezed.dart'; part 'stac_circular_progress_indicator.g.dart'; @freezed -class StacCircularProgressIndicator with _$StacCircularProgressIndicator { +abstract class StacCircularProgressIndicator + with _$StacCircularProgressIndicator { const factory StacCircularProgressIndicator({ double? value, String? backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.freezed.dart b/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.freezed.dart index be9447fe..d43af8ab 100644 --- a/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,126 +10,70 @@ part of 'stac_circular_progress_indicator.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCircularProgressIndicator _$StacCircularProgressIndicatorFromJson( - Map json) { - return _StacCircularProgressIndicator.fromJson(json); -} - /// @nodoc mixin _$StacCircularProgressIndicator { - double? get value => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - double get strokeWidth => throw _privateConstructorUsedError; - double get strokeAlign => throw _privateConstructorUsedError; - String? get semanticsLabel => throw _privateConstructorUsedError; - String? get semanticsValue => throw _privateConstructorUsedError; - StrokeCap? get strokeCap => throw _privateConstructorUsedError; - - /// Serializes this StacCircularProgressIndicator to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get value; + String? get backgroundColor; + String? get color; + double get strokeWidth; + double get strokeAlign; + String? get semanticsLabel; + String? get semanticsValue; + StrokeCap? get strokeCap; /// Create a copy of StacCircularProgressIndicator /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCircularProgressIndicatorCopyWith - get copyWith => throw _privateConstructorUsedError; -} + get copyWith => _$StacCircularProgressIndicatorCopyWithImpl< + StacCircularProgressIndicator>( + this as StacCircularProgressIndicator, _$identity); -/// @nodoc -abstract class $StacCircularProgressIndicatorCopyWith<$Res> { - factory $StacCircularProgressIndicatorCopyWith( - StacCircularProgressIndicator value, - $Res Function(StacCircularProgressIndicator) then) = - _$StacCircularProgressIndicatorCopyWithImpl<$Res, - StacCircularProgressIndicator>; - @useResult - $Res call( - {double? value, - String? backgroundColor, - String? color, - double strokeWidth, - double strokeAlign, - String? semanticsLabel, - String? semanticsValue, - StrokeCap? strokeCap}); -} + /// Serializes this StacCircularProgressIndicator to a JSON map. + Map toJson(); -/// @nodoc -class _$StacCircularProgressIndicatorCopyWithImpl<$Res, - $Val extends StacCircularProgressIndicator> - implements $StacCircularProgressIndicatorCopyWith<$Res> { - _$StacCircularProgressIndicatorCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCircularProgressIndicator && + (identical(other.value, value) || other.value == value) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.color, color) || other.color == color) && + (identical(other.strokeWidth, strokeWidth) || + other.strokeWidth == strokeWidth) && + (identical(other.strokeAlign, strokeAlign) || + other.strokeAlign == strokeAlign) && + (identical(other.semanticsLabel, semanticsLabel) || + other.semanticsLabel == semanticsLabel) && + (identical(other.semanticsValue, semanticsValue) || + other.semanticsValue == semanticsValue) && + (identical(other.strokeCap, strokeCap) || + other.strokeCap == strokeCap)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, value, backgroundColor, color, + strokeWidth, strokeAlign, semanticsLabel, semanticsValue, strokeCap); - /// Create a copy of StacCircularProgressIndicator - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? value = freezed, - Object? backgroundColor = freezed, - Object? color = freezed, - Object? strokeWidth = null, - Object? strokeAlign = null, - Object? semanticsLabel = freezed, - Object? semanticsValue = freezed, - Object? strokeCap = freezed, - }) { - return _then(_value.copyWith( - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as double?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - strokeWidth: null == strokeWidth - ? _value.strokeWidth - : strokeWidth // ignore: cast_nullable_to_non_nullable - as double, - strokeAlign: null == strokeAlign - ? _value.strokeAlign - : strokeAlign // ignore: cast_nullable_to_non_nullable - as double, - semanticsLabel: freezed == semanticsLabel - ? _value.semanticsLabel - : semanticsLabel // ignore: cast_nullable_to_non_nullable - as String?, - semanticsValue: freezed == semanticsValue - ? _value.semanticsValue - : semanticsValue // ignore: cast_nullable_to_non_nullable - as String?, - strokeCap: freezed == strokeCap - ? _value.strokeCap - : strokeCap // ignore: cast_nullable_to_non_nullable - as StrokeCap?, - ) as $Val); + String toString() { + return 'StacCircularProgressIndicator(value: $value, backgroundColor: $backgroundColor, color: $color, strokeWidth: $strokeWidth, strokeAlign: $strokeAlign, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, strokeCap: $strokeCap)'; } } /// @nodoc -abstract class _$$StacCircularProgressIndicatorImplCopyWith<$Res> - implements $StacCircularProgressIndicatorCopyWith<$Res> { - factory _$$StacCircularProgressIndicatorImplCopyWith( - _$StacCircularProgressIndicatorImpl value, - $Res Function(_$StacCircularProgressIndicatorImpl) then) = - __$$StacCircularProgressIndicatorImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacCircularProgressIndicatorCopyWith<$Res> { + factory $StacCircularProgressIndicatorCopyWith( + StacCircularProgressIndicator value, + $Res Function(StacCircularProgressIndicator) _then) = + _$StacCircularProgressIndicatorCopyWithImpl; @useResult $Res call( {double? value, @@ -142,14 +87,12 @@ abstract class _$$StacCircularProgressIndicatorImplCopyWith<$Res> } /// @nodoc -class __$$StacCircularProgressIndicatorImplCopyWithImpl<$Res> - extends _$StacCircularProgressIndicatorCopyWithImpl<$Res, - _$StacCircularProgressIndicatorImpl> - implements _$$StacCircularProgressIndicatorImplCopyWith<$Res> { - __$$StacCircularProgressIndicatorImplCopyWithImpl( - _$StacCircularProgressIndicatorImpl _value, - $Res Function(_$StacCircularProgressIndicatorImpl) _then) - : super(_value, _then); +class _$StacCircularProgressIndicatorCopyWithImpl<$Res> + implements $StacCircularProgressIndicatorCopyWith<$Res> { + _$StacCircularProgressIndicatorCopyWithImpl(this._self, this._then); + + final StacCircularProgressIndicator _self; + final $Res Function(StacCircularProgressIndicator) _then; /// Create a copy of StacCircularProgressIndicator /// with the given fields replaced by the non-null parameter values. @@ -165,37 +108,37 @@ class __$$StacCircularProgressIndicatorImplCopyWithImpl<$Res> Object? semanticsValue = freezed, Object? strokeCap = freezed, }) { - return _then(_$StacCircularProgressIndicatorImpl( + return _then(_self.copyWith( value: freezed == value - ? _value.value + ? _self.value : value // ignore: cast_nullable_to_non_nullable as double?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, strokeWidth: null == strokeWidth - ? _value.strokeWidth + ? _self.strokeWidth : strokeWidth // ignore: cast_nullable_to_non_nullable as double, strokeAlign: null == strokeAlign - ? _value.strokeAlign + ? _self.strokeAlign : strokeAlign // ignore: cast_nullable_to_non_nullable as double, semanticsLabel: freezed == semanticsLabel - ? _value.semanticsLabel + ? _self.semanticsLabel : semanticsLabel // ignore: cast_nullable_to_non_nullable as String?, semanticsValue: freezed == semanticsValue - ? _value.semanticsValue + ? _self.semanticsValue : semanticsValue // ignore: cast_nullable_to_non_nullable as String?, strokeCap: freezed == strokeCap - ? _value.strokeCap + ? _self.strokeCap : strokeCap // ignore: cast_nullable_to_non_nullable as StrokeCap?, )); @@ -204,9 +147,8 @@ class __$$StacCircularProgressIndicatorImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacCircularProgressIndicatorImpl - implements _StacCircularProgressIndicator { - const _$StacCircularProgressIndicatorImpl( +class _StacCircularProgressIndicator implements StacCircularProgressIndicator { + const _StacCircularProgressIndicator( {this.value, this.backgroundColor, this.color, @@ -215,10 +157,8 @@ class _$StacCircularProgressIndicatorImpl this.semanticsLabel, this.semanticsValue, this.strokeCap}); - - factory _$StacCircularProgressIndicatorImpl.fromJson( - Map json) => - _$$StacCircularProgressIndicatorImplFromJson(json); + factory _StacCircularProgressIndicator.fromJson(Map json) => + _$StacCircularProgressIndicatorFromJson(json); @override final double? value; @@ -239,16 +179,27 @@ class _$StacCircularProgressIndicatorImpl @override final StrokeCap? strokeCap; + /// Create a copy of StacCircularProgressIndicator + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCircularProgressIndicatorCopyWith<_StacCircularProgressIndicator> + get copyWith => __$StacCircularProgressIndicatorCopyWithImpl< + _StacCircularProgressIndicator>(this, _$identity); + @override - String toString() { - return 'StacCircularProgressIndicator(value: $value, backgroundColor: $backgroundColor, color: $color, strokeWidth: $strokeWidth, strokeAlign: $strokeAlign, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, strokeCap: $strokeCap)'; + Map toJson() { + return _$StacCircularProgressIndicatorToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacCircularProgressIndicatorImpl && + other is _StacCircularProgressIndicator && (identical(other.value, value) || other.value == value) && (identical(other.backgroundColor, backgroundColor) || other.backgroundColor == backgroundColor) && @@ -270,61 +221,89 @@ class _$StacCircularProgressIndicatorImpl int get hashCode => Object.hash(runtimeType, value, backgroundColor, color, strokeWidth, strokeAlign, semanticsLabel, semanticsValue, strokeCap); - /// Create a copy of StacCircularProgressIndicator - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacCircularProgressIndicatorImplCopyWith< - _$StacCircularProgressIndicatorImpl> - get copyWith => __$$StacCircularProgressIndicatorImplCopyWithImpl< - _$StacCircularProgressIndicatorImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacCircularProgressIndicatorImplToJson( - this, - ); + String toString() { + return 'StacCircularProgressIndicator(value: $value, backgroundColor: $backgroundColor, color: $color, strokeWidth: $strokeWidth, strokeAlign: $strokeAlign, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, strokeCap: $strokeCap)'; } } -abstract class _StacCircularProgressIndicator - implements StacCircularProgressIndicator { - const factory _StacCircularProgressIndicator( - {final double? value, - final String? backgroundColor, - final String? color, - final double strokeWidth, - final double strokeAlign, - final String? semanticsLabel, - final String? semanticsValue, - final StrokeCap? strokeCap}) = _$StacCircularProgressIndicatorImpl; +/// @nodoc +abstract mixin class _$StacCircularProgressIndicatorCopyWith<$Res> + implements $StacCircularProgressIndicatorCopyWith<$Res> { + factory _$StacCircularProgressIndicatorCopyWith( + _StacCircularProgressIndicator value, + $Res Function(_StacCircularProgressIndicator) _then) = + __$StacCircularProgressIndicatorCopyWithImpl; + @override + @useResult + $Res call( + {double? value, + String? backgroundColor, + String? color, + double strokeWidth, + double strokeAlign, + String? semanticsLabel, + String? semanticsValue, + StrokeCap? strokeCap}); +} - factory _StacCircularProgressIndicator.fromJson(Map json) = - _$StacCircularProgressIndicatorImpl.fromJson; +/// @nodoc +class __$StacCircularProgressIndicatorCopyWithImpl<$Res> + implements _$StacCircularProgressIndicatorCopyWith<$Res> { + __$StacCircularProgressIndicatorCopyWithImpl(this._self, this._then); - @override - double? get value; - @override - String? get backgroundColor; - @override - String? get color; - @override - double get strokeWidth; - @override - double get strokeAlign; - @override - String? get semanticsLabel; - @override - String? get semanticsValue; - @override - StrokeCap? get strokeCap; + final _StacCircularProgressIndicator _self; + final $Res Function(_StacCircularProgressIndicator) _then; /// Create a copy of StacCircularProgressIndicator /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCircularProgressIndicatorImplCopyWith< - _$StacCircularProgressIndicatorImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? value = freezed, + Object? backgroundColor = freezed, + Object? color = freezed, + Object? strokeWidth = null, + Object? strokeAlign = null, + Object? semanticsLabel = freezed, + Object? semanticsValue = freezed, + Object? strokeCap = freezed, + }) { + return _then(_StacCircularProgressIndicator( + value: freezed == value + ? _self.value + : value // ignore: cast_nullable_to_non_nullable + as double?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + strokeWidth: null == strokeWidth + ? _self.strokeWidth + : strokeWidth // ignore: cast_nullable_to_non_nullable + as double, + strokeAlign: null == strokeAlign + ? _self.strokeAlign + : strokeAlign // ignore: cast_nullable_to_non_nullable + as double, + semanticsLabel: freezed == semanticsLabel + ? _self.semanticsLabel + : semanticsLabel // ignore: cast_nullable_to_non_nullable + as String?, + semanticsValue: freezed == semanticsValue + ? _self.semanticsValue + : semanticsValue // ignore: cast_nullable_to_non_nullable + as String?, + strokeCap: freezed == strokeCap + ? _self.strokeCap + : strokeCap // ignore: cast_nullable_to_non_nullable + as StrokeCap?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.g.dart b/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.g.dart index 78fabf49..4d6e5e34 100644 --- a/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.g.dart +++ b/packages/stac/lib/src/parsers/stac_circular_progress_indicator/stac_circular_progress_indicator.g.dart @@ -6,21 +6,21 @@ part of 'stac_circular_progress_indicator.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCircularProgressIndicatorImpl - _$$StacCircularProgressIndicatorImplFromJson(Map json) => - _$StacCircularProgressIndicatorImpl( - value: (json['value'] as num?)?.toDouble(), - backgroundColor: json['backgroundColor'] as String?, - color: json['color'] as String?, - strokeWidth: (json['strokeWidth'] as num?)?.toDouble() ?? 4.0, - strokeAlign: (json['strokeAlign'] as num?)?.toDouble() ?? 0, - semanticsLabel: json['semanticsLabel'] as String?, - semanticsValue: json['semanticsValue'] as String?, - strokeCap: $enumDecodeNullable(_$StrokeCapEnumMap, json['strokeCap']), - ); +_StacCircularProgressIndicator _$StacCircularProgressIndicatorFromJson( + Map json) => + _StacCircularProgressIndicator( + value: (json['value'] as num?)?.toDouble(), + backgroundColor: json['backgroundColor'] as String?, + color: json['color'] as String?, + strokeWidth: (json['strokeWidth'] as num?)?.toDouble() ?? 4.0, + strokeAlign: (json['strokeAlign'] as num?)?.toDouble() ?? 0, + semanticsLabel: json['semanticsLabel'] as String?, + semanticsValue: json['semanticsValue'] as String?, + strokeCap: $enumDecodeNullable(_$StrokeCapEnumMap, json['strokeCap']), + ); -Map _$$StacCircularProgressIndicatorImplToJson( - _$StacCircularProgressIndicatorImpl instance) => +Map _$StacCircularProgressIndicatorToJson( + _StacCircularProgressIndicator instance) => { 'value': instance.value, 'backgroundColor': instance.backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.dart b/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.dart index c646df9e..f7c879a7 100644 --- a/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.dart +++ b/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.dart @@ -6,7 +6,7 @@ part 'stac_color_scheme.freezed.dart'; part 'stac_color_scheme.g.dart'; @freezed -class StacColorScheme with _$StacColorScheme { +abstract class StacColorScheme with _$StacColorScheme { const factory StacColorScheme({ required Brightness brightness, required String primary, diff --git a/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.freezed.dart b/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.freezed.dart index aef27bec..1e734fb0 100644 --- a/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,282 +10,164 @@ part of 'stac_color_scheme.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacColorScheme _$StacColorSchemeFromJson(Map json) { - return _StacColorScheme.fromJson(json); -} - /// @nodoc mixin _$StacColorScheme { - Brightness get brightness => throw _privateConstructorUsedError; - String get primary => throw _privateConstructorUsedError; - String get onPrimary => throw _privateConstructorUsedError; - String? get primaryContainer => throw _privateConstructorUsedError; - String? get onPrimaryContainer => throw _privateConstructorUsedError; - String get secondary => throw _privateConstructorUsedError; - String get onSecondary => throw _privateConstructorUsedError; - String? get secondaryContainer => throw _privateConstructorUsedError; - String? get onSecondaryContainer => throw _privateConstructorUsedError; - String? get tertiary => throw _privateConstructorUsedError; - String? get onTertiary => throw _privateConstructorUsedError; - String? get tertiaryContainer => throw _privateConstructorUsedError; - String? get onTertiaryContainer => throw _privateConstructorUsedError; - String get error => throw _privateConstructorUsedError; - String get onError => throw _privateConstructorUsedError; - String? get errorContainer => throw _privateConstructorUsedError; - String? get onErrorContainer => throw _privateConstructorUsedError; - String get background => throw _privateConstructorUsedError; - String get onBackground => throw _privateConstructorUsedError; - String get surface => throw _privateConstructorUsedError; - String get onSurface => throw _privateConstructorUsedError; - String? get surfaceVariant => throw _privateConstructorUsedError; - String? get onSurfaceVariant => throw _privateConstructorUsedError; - String? get outline => throw _privateConstructorUsedError; - String? get outlineVariant => throw _privateConstructorUsedError; - String? get shadow => throw _privateConstructorUsedError; - String? get scrim => throw _privateConstructorUsedError; - String? get inverseSurface => throw _privateConstructorUsedError; - String? get onInverseSurface => throw _privateConstructorUsedError; - String? get inversePrimary => throw _privateConstructorUsedError; - String? get surfaceTint => throw _privateConstructorUsedError; - - /// Serializes this StacColorScheme to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Brightness get brightness; + String get primary; + String get onPrimary; + String? get primaryContainer; + String? get onPrimaryContainer; + String get secondary; + String get onSecondary; + String? get secondaryContainer; + String? get onSecondaryContainer; + String? get tertiary; + String? get onTertiary; + String? get tertiaryContainer; + String? get onTertiaryContainer; + String get error; + String get onError; + String? get errorContainer; + String? get onErrorContainer; + String get background; + String get onBackground; + String get surface; + String get onSurface; + String? get surfaceVariant; + String? get onSurfaceVariant; + String? get outline; + String? get outlineVariant; + String? get shadow; + String? get scrim; + String? get inverseSurface; + String? get onInverseSurface; + String? get inversePrimary; + String? get surfaceTint; /// Create a copy of StacColorScheme /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacColorSchemeCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacColorSchemeCopyWithImpl( + this as StacColorScheme, _$identity); -/// @nodoc -abstract class $StacColorSchemeCopyWith<$Res> { - factory $StacColorSchemeCopyWith( - StacColorScheme value, $Res Function(StacColorScheme) then) = - _$StacColorSchemeCopyWithImpl<$Res, StacColorScheme>; - @useResult - $Res call( - {Brightness brightness, - String primary, - String onPrimary, - String? primaryContainer, - String? onPrimaryContainer, - String secondary, - String onSecondary, - String? secondaryContainer, - String? onSecondaryContainer, - String? tertiary, - String? onTertiary, - String? tertiaryContainer, - String? onTertiaryContainer, - String error, - String onError, - String? errorContainer, - String? onErrorContainer, - String background, - String onBackground, - String surface, - String onSurface, - String? surfaceVariant, - String? onSurfaceVariant, - String? outline, - String? outlineVariant, - String? shadow, - String? scrim, - String? inverseSurface, - String? onInverseSurface, - String? inversePrimary, - String? surfaceTint}); -} + /// Serializes this StacColorScheme to a JSON map. + Map toJson(); -/// @nodoc -class _$StacColorSchemeCopyWithImpl<$Res, $Val extends StacColorScheme> - implements $StacColorSchemeCopyWith<$Res> { - _$StacColorSchemeCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacColorScheme && + (identical(other.brightness, brightness) || + other.brightness == brightness) && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.onPrimary, onPrimary) || + other.onPrimary == onPrimary) && + (identical(other.primaryContainer, primaryContainer) || + other.primaryContainer == primaryContainer) && + (identical(other.onPrimaryContainer, onPrimaryContainer) || + other.onPrimaryContainer == onPrimaryContainer) && + (identical(other.secondary, secondary) || + other.secondary == secondary) && + (identical(other.onSecondary, onSecondary) || + other.onSecondary == onSecondary) && + (identical(other.secondaryContainer, secondaryContainer) || + other.secondaryContainer == secondaryContainer) && + (identical(other.onSecondaryContainer, onSecondaryContainer) || + other.onSecondaryContainer == onSecondaryContainer) && + (identical(other.tertiary, tertiary) || + other.tertiary == tertiary) && + (identical(other.onTertiary, onTertiary) || + other.onTertiary == onTertiary) && + (identical(other.tertiaryContainer, tertiaryContainer) || + other.tertiaryContainer == tertiaryContainer) && + (identical(other.onTertiaryContainer, onTertiaryContainer) || + other.onTertiaryContainer == onTertiaryContainer) && + (identical(other.error, error) || other.error == error) && + (identical(other.onError, onError) || other.onError == onError) && + (identical(other.errorContainer, errorContainer) || + other.errorContainer == errorContainer) && + (identical(other.onErrorContainer, onErrorContainer) || + other.onErrorContainer == onErrorContainer) && + (identical(other.background, background) || + other.background == background) && + (identical(other.onBackground, onBackground) || + other.onBackground == onBackground) && + (identical(other.surface, surface) || other.surface == surface) && + (identical(other.onSurface, onSurface) || + other.onSurface == onSurface) && + (identical(other.surfaceVariant, surfaceVariant) || + other.surfaceVariant == surfaceVariant) && + (identical(other.onSurfaceVariant, onSurfaceVariant) || + other.onSurfaceVariant == onSurfaceVariant) && + (identical(other.outline, outline) || other.outline == outline) && + (identical(other.outlineVariant, outlineVariant) || + other.outlineVariant == outlineVariant) && + (identical(other.shadow, shadow) || other.shadow == shadow) && + (identical(other.scrim, scrim) || other.scrim == scrim) && + (identical(other.inverseSurface, inverseSurface) || + other.inverseSurface == inverseSurface) && + (identical(other.onInverseSurface, onInverseSurface) || + other.onInverseSurface == onInverseSurface) && + (identical(other.inversePrimary, inversePrimary) || + other.inversePrimary == inversePrimary) && + (identical(other.surfaceTint, surfaceTint) || + other.surfaceTint == surfaceTint)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + brightness, + primary, + onPrimary, + primaryContainer, + onPrimaryContainer, + secondary, + onSecondary, + secondaryContainer, + onSecondaryContainer, + tertiary, + onTertiary, + tertiaryContainer, + onTertiaryContainer, + error, + onError, + errorContainer, + onErrorContainer, + background, + onBackground, + surface, + onSurface, + surfaceVariant, + onSurfaceVariant, + outline, + outlineVariant, + shadow, + scrim, + inverseSurface, + onInverseSurface, + inversePrimary, + surfaceTint + ]); - /// Create a copy of StacColorScheme - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? brightness = null, - Object? primary = null, - Object? onPrimary = null, - Object? primaryContainer = freezed, - Object? onPrimaryContainer = freezed, - Object? secondary = null, - Object? onSecondary = null, - Object? secondaryContainer = freezed, - Object? onSecondaryContainer = freezed, - Object? tertiary = freezed, - Object? onTertiary = freezed, - Object? tertiaryContainer = freezed, - Object? onTertiaryContainer = freezed, - Object? error = null, - Object? onError = null, - Object? errorContainer = freezed, - Object? onErrorContainer = freezed, - Object? background = null, - Object? onBackground = null, - Object? surface = null, - Object? onSurface = null, - Object? surfaceVariant = freezed, - Object? onSurfaceVariant = freezed, - Object? outline = freezed, - Object? outlineVariant = freezed, - Object? shadow = freezed, - Object? scrim = freezed, - Object? inverseSurface = freezed, - Object? onInverseSurface = freezed, - Object? inversePrimary = freezed, - Object? surfaceTint = freezed, - }) { - return _then(_value.copyWith( - brightness: null == brightness - ? _value.brightness - : brightness // ignore: cast_nullable_to_non_nullable - as Brightness, - primary: null == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as String, - onPrimary: null == onPrimary - ? _value.onPrimary - : onPrimary // ignore: cast_nullable_to_non_nullable - as String, - primaryContainer: freezed == primaryContainer - ? _value.primaryContainer - : primaryContainer // ignore: cast_nullable_to_non_nullable - as String?, - onPrimaryContainer: freezed == onPrimaryContainer - ? _value.onPrimaryContainer - : onPrimaryContainer // ignore: cast_nullable_to_non_nullable - as String?, - secondary: null == secondary - ? _value.secondary - : secondary // ignore: cast_nullable_to_non_nullable - as String, - onSecondary: null == onSecondary - ? _value.onSecondary - : onSecondary // ignore: cast_nullable_to_non_nullable - as String, - secondaryContainer: freezed == secondaryContainer - ? _value.secondaryContainer - : secondaryContainer // ignore: cast_nullable_to_non_nullable - as String?, - onSecondaryContainer: freezed == onSecondaryContainer - ? _value.onSecondaryContainer - : onSecondaryContainer // ignore: cast_nullable_to_non_nullable - as String?, - tertiary: freezed == tertiary - ? _value.tertiary - : tertiary // ignore: cast_nullable_to_non_nullable - as String?, - onTertiary: freezed == onTertiary - ? _value.onTertiary - : onTertiary // ignore: cast_nullable_to_non_nullable - as String?, - tertiaryContainer: freezed == tertiaryContainer - ? _value.tertiaryContainer - : tertiaryContainer // ignore: cast_nullable_to_non_nullable - as String?, - onTertiaryContainer: freezed == onTertiaryContainer - ? _value.onTertiaryContainer - : onTertiaryContainer // ignore: cast_nullable_to_non_nullable - as String?, - error: null == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String, - onError: null == onError - ? _value.onError - : onError // ignore: cast_nullable_to_non_nullable - as String, - errorContainer: freezed == errorContainer - ? _value.errorContainer - : errorContainer // ignore: cast_nullable_to_non_nullable - as String?, - onErrorContainer: freezed == onErrorContainer - ? _value.onErrorContainer - : onErrorContainer // ignore: cast_nullable_to_non_nullable - as String?, - background: null == background - ? _value.background - : background // ignore: cast_nullable_to_non_nullable - as String, - onBackground: null == onBackground - ? _value.onBackground - : onBackground // ignore: cast_nullable_to_non_nullable - as String, - surface: null == surface - ? _value.surface - : surface // ignore: cast_nullable_to_non_nullable - as String, - onSurface: null == onSurface - ? _value.onSurface - : onSurface // ignore: cast_nullable_to_non_nullable - as String, - surfaceVariant: freezed == surfaceVariant - ? _value.surfaceVariant - : surfaceVariant // ignore: cast_nullable_to_non_nullable - as String?, - onSurfaceVariant: freezed == onSurfaceVariant - ? _value.onSurfaceVariant - : onSurfaceVariant // ignore: cast_nullable_to_non_nullable - as String?, - outline: freezed == outline - ? _value.outline - : outline // ignore: cast_nullable_to_non_nullable - as String?, - outlineVariant: freezed == outlineVariant - ? _value.outlineVariant - : outlineVariant // ignore: cast_nullable_to_non_nullable - as String?, - shadow: freezed == shadow - ? _value.shadow - : shadow // ignore: cast_nullable_to_non_nullable - as String?, - scrim: freezed == scrim - ? _value.scrim - : scrim // ignore: cast_nullable_to_non_nullable - as String?, - inverseSurface: freezed == inverseSurface - ? _value.inverseSurface - : inverseSurface // ignore: cast_nullable_to_non_nullable - as String?, - onInverseSurface: freezed == onInverseSurface - ? _value.onInverseSurface - : onInverseSurface // ignore: cast_nullable_to_non_nullable - as String?, - inversePrimary: freezed == inversePrimary - ? _value.inversePrimary - : inversePrimary // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTint: freezed == surfaceTint - ? _value.surfaceTint - : surfaceTint // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + String toString() { + return 'StacColorScheme(brightness: $brightness, primary: $primary, onPrimary: $onPrimary, primaryContainer: $primaryContainer, onPrimaryContainer: $onPrimaryContainer, secondary: $secondary, onSecondary: $onSecondary, secondaryContainer: $secondaryContainer, onSecondaryContainer: $onSecondaryContainer, tertiary: $tertiary, onTertiary: $onTertiary, tertiaryContainer: $tertiaryContainer, onTertiaryContainer: $onTertiaryContainer, error: $error, onError: $onError, errorContainer: $errorContainer, onErrorContainer: $onErrorContainer, background: $background, onBackground: $onBackground, surface: $surface, onSurface: $onSurface, surfaceVariant: $surfaceVariant, onSurfaceVariant: $onSurfaceVariant, outline: $outline, outlineVariant: $outlineVariant, shadow: $shadow, scrim: $scrim, inverseSurface: $inverseSurface, onInverseSurface: $onInverseSurface, inversePrimary: $inversePrimary, surfaceTint: $surfaceTint)'; } } /// @nodoc -abstract class _$$StacColorSchemeImplCopyWith<$Res> - implements $StacColorSchemeCopyWith<$Res> { - factory _$$StacColorSchemeImplCopyWith(_$StacColorSchemeImpl value, - $Res Function(_$StacColorSchemeImpl) then) = - __$$StacColorSchemeImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacColorSchemeCopyWith<$Res> { + factory $StacColorSchemeCopyWith( + StacColorScheme value, $Res Function(StacColorScheme) _then) = + _$StacColorSchemeCopyWithImpl; @useResult $Res call( {Brightness brightness, @@ -321,12 +204,12 @@ abstract class _$$StacColorSchemeImplCopyWith<$Res> } /// @nodoc -class __$$StacColorSchemeImplCopyWithImpl<$Res> - extends _$StacColorSchemeCopyWithImpl<$Res, _$StacColorSchemeImpl> - implements _$$StacColorSchemeImplCopyWith<$Res> { - __$$StacColorSchemeImplCopyWithImpl( - _$StacColorSchemeImpl _value, $Res Function(_$StacColorSchemeImpl) _then) - : super(_value, _then); +class _$StacColorSchemeCopyWithImpl<$Res> + implements $StacColorSchemeCopyWith<$Res> { + _$StacColorSchemeCopyWithImpl(this._self, this._then); + + final StacColorScheme _self; + final $Res Function(StacColorScheme) _then; /// Create a copy of StacColorScheme /// with the given fields replaced by the non-null parameter values. @@ -365,129 +248,129 @@ class __$$StacColorSchemeImplCopyWithImpl<$Res> Object? inversePrimary = freezed, Object? surfaceTint = freezed, }) { - return _then(_$StacColorSchemeImpl( + return _then(_self.copyWith( brightness: null == brightness - ? _value.brightness + ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable as Brightness, primary: null == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as String, onPrimary: null == onPrimary - ? _value.onPrimary + ? _self.onPrimary : onPrimary // ignore: cast_nullable_to_non_nullable as String, primaryContainer: freezed == primaryContainer - ? _value.primaryContainer + ? _self.primaryContainer : primaryContainer // ignore: cast_nullable_to_non_nullable as String?, onPrimaryContainer: freezed == onPrimaryContainer - ? _value.onPrimaryContainer + ? _self.onPrimaryContainer : onPrimaryContainer // ignore: cast_nullable_to_non_nullable as String?, secondary: null == secondary - ? _value.secondary + ? _self.secondary : secondary // ignore: cast_nullable_to_non_nullable as String, onSecondary: null == onSecondary - ? _value.onSecondary + ? _self.onSecondary : onSecondary // ignore: cast_nullable_to_non_nullable as String, secondaryContainer: freezed == secondaryContainer - ? _value.secondaryContainer + ? _self.secondaryContainer : secondaryContainer // ignore: cast_nullable_to_non_nullable as String?, onSecondaryContainer: freezed == onSecondaryContainer - ? _value.onSecondaryContainer + ? _self.onSecondaryContainer : onSecondaryContainer // ignore: cast_nullable_to_non_nullable as String?, tertiary: freezed == tertiary - ? _value.tertiary + ? _self.tertiary : tertiary // ignore: cast_nullable_to_non_nullable as String?, onTertiary: freezed == onTertiary - ? _value.onTertiary + ? _self.onTertiary : onTertiary // ignore: cast_nullable_to_non_nullable as String?, tertiaryContainer: freezed == tertiaryContainer - ? _value.tertiaryContainer + ? _self.tertiaryContainer : tertiaryContainer // ignore: cast_nullable_to_non_nullable as String?, onTertiaryContainer: freezed == onTertiaryContainer - ? _value.onTertiaryContainer + ? _self.onTertiaryContainer : onTertiaryContainer // ignore: cast_nullable_to_non_nullable as String?, error: null == error - ? _value.error + ? _self.error : error // ignore: cast_nullable_to_non_nullable as String, onError: null == onError - ? _value.onError + ? _self.onError : onError // ignore: cast_nullable_to_non_nullable as String, errorContainer: freezed == errorContainer - ? _value.errorContainer + ? _self.errorContainer : errorContainer // ignore: cast_nullable_to_non_nullable as String?, onErrorContainer: freezed == onErrorContainer - ? _value.onErrorContainer + ? _self.onErrorContainer : onErrorContainer // ignore: cast_nullable_to_non_nullable as String?, background: null == background - ? _value.background + ? _self.background : background // ignore: cast_nullable_to_non_nullable as String, onBackground: null == onBackground - ? _value.onBackground + ? _self.onBackground : onBackground // ignore: cast_nullable_to_non_nullable as String, surface: null == surface - ? _value.surface + ? _self.surface : surface // ignore: cast_nullable_to_non_nullable as String, onSurface: null == onSurface - ? _value.onSurface + ? _self.onSurface : onSurface // ignore: cast_nullable_to_non_nullable as String, surfaceVariant: freezed == surfaceVariant - ? _value.surfaceVariant + ? _self.surfaceVariant : surfaceVariant // ignore: cast_nullable_to_non_nullable as String?, onSurfaceVariant: freezed == onSurfaceVariant - ? _value.onSurfaceVariant + ? _self.onSurfaceVariant : onSurfaceVariant // ignore: cast_nullable_to_non_nullable as String?, outline: freezed == outline - ? _value.outline + ? _self.outline : outline // ignore: cast_nullable_to_non_nullable as String?, outlineVariant: freezed == outlineVariant - ? _value.outlineVariant + ? _self.outlineVariant : outlineVariant // ignore: cast_nullable_to_non_nullable as String?, shadow: freezed == shadow - ? _value.shadow + ? _self.shadow : shadow // ignore: cast_nullable_to_non_nullable as String?, scrim: freezed == scrim - ? _value.scrim + ? _self.scrim : scrim // ignore: cast_nullable_to_non_nullable as String?, inverseSurface: freezed == inverseSurface - ? _value.inverseSurface + ? _self.inverseSurface : inverseSurface // ignore: cast_nullable_to_non_nullable as String?, onInverseSurface: freezed == onInverseSurface - ? _value.onInverseSurface + ? _self.onInverseSurface : onInverseSurface // ignore: cast_nullable_to_non_nullable as String?, inversePrimary: freezed == inversePrimary - ? _value.inversePrimary + ? _self.inversePrimary : inversePrimary // ignore: cast_nullable_to_non_nullable as String?, surfaceTint: freezed == surfaceTint - ? _value.surfaceTint + ? _self.surfaceTint : surfaceTint // ignore: cast_nullable_to_non_nullable as String?, )); @@ -496,8 +379,8 @@ class __$$StacColorSchemeImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacColorSchemeImpl implements _StacColorScheme { - const _$StacColorSchemeImpl( +class _StacColorScheme implements StacColorScheme { + const _StacColorScheme( {required this.brightness, required this.primary, required this.onPrimary, @@ -529,9 +412,8 @@ class _$StacColorSchemeImpl implements _StacColorScheme { this.onInverseSurface, this.inversePrimary, this.surfaceTint}); - - factory _$StacColorSchemeImpl.fromJson(Map json) => - _$$StacColorSchemeImplFromJson(json); + factory _StacColorScheme.fromJson(Map json) => + _$StacColorSchemeFromJson(json); @override final Brightness brightness; @@ -596,16 +478,26 @@ class _$StacColorSchemeImpl implements _StacColorScheme { @override final String? surfaceTint; + /// Create a copy of StacColorScheme + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacColorScheme(brightness: $brightness, primary: $primary, onPrimary: $onPrimary, primaryContainer: $primaryContainer, onPrimaryContainer: $onPrimaryContainer, secondary: $secondary, onSecondary: $onSecondary, secondaryContainer: $secondaryContainer, onSecondaryContainer: $onSecondaryContainer, tertiary: $tertiary, onTertiary: $onTertiary, tertiaryContainer: $tertiaryContainer, onTertiaryContainer: $onTertiaryContainer, error: $error, onError: $onError, errorContainer: $errorContainer, onErrorContainer: $onErrorContainer, background: $background, onBackground: $onBackground, surface: $surface, onSurface: $onSurface, surfaceVariant: $surfaceVariant, onSurfaceVariant: $onSurfaceVariant, outline: $outline, outlineVariant: $outlineVariant, shadow: $shadow, scrim: $scrim, inverseSurface: $inverseSurface, onInverseSurface: $onInverseSurface, inversePrimary: $inversePrimary, surfaceTint: $surfaceTint)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacColorSchemeCopyWith<_StacColorScheme> get copyWith => + __$StacColorSchemeCopyWithImpl<_StacColorScheme>(this, _$identity); + + @override + Map toJson() { + return _$StacColorSchemeToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacColorSchemeImpl && + other is _StacColorScheme && (identical(other.brightness, brightness) || other.brightness == brightness) && (identical(other.primary, primary) || other.primary == primary) && @@ -700,127 +592,226 @@ class _$StacColorSchemeImpl implements _StacColorScheme { surfaceTint ]); - /// Create a copy of StacColorScheme - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacColorSchemeImplCopyWith<_$StacColorSchemeImpl> get copyWith => - __$$StacColorSchemeImplCopyWithImpl<_$StacColorSchemeImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacColorSchemeImplToJson( - this, - ); + String toString() { + return 'StacColorScheme(brightness: $brightness, primary: $primary, onPrimary: $onPrimary, primaryContainer: $primaryContainer, onPrimaryContainer: $onPrimaryContainer, secondary: $secondary, onSecondary: $onSecondary, secondaryContainer: $secondaryContainer, onSecondaryContainer: $onSecondaryContainer, tertiary: $tertiary, onTertiary: $onTertiary, tertiaryContainer: $tertiaryContainer, onTertiaryContainer: $onTertiaryContainer, error: $error, onError: $onError, errorContainer: $errorContainer, onErrorContainer: $onErrorContainer, background: $background, onBackground: $onBackground, surface: $surface, onSurface: $onSurface, surfaceVariant: $surfaceVariant, onSurfaceVariant: $onSurfaceVariant, outline: $outline, outlineVariant: $outlineVariant, shadow: $shadow, scrim: $scrim, inverseSurface: $inverseSurface, onInverseSurface: $onInverseSurface, inversePrimary: $inversePrimary, surfaceTint: $surfaceTint)'; } } -abstract class _StacColorScheme implements StacColorScheme { - const factory _StacColorScheme( - {required final Brightness brightness, - required final String primary, - required final String onPrimary, - final String? primaryContainer, - final String? onPrimaryContainer, - required final String secondary, - required final String onSecondary, - final String? secondaryContainer, - final String? onSecondaryContainer, - final String? tertiary, - final String? onTertiary, - final String? tertiaryContainer, - final String? onTertiaryContainer, - required final String error, - required final String onError, - final String? errorContainer, - final String? onErrorContainer, - required final String background, - required final String onBackground, - required final String surface, - required final String onSurface, - final String? surfaceVariant, - final String? onSurfaceVariant, - final String? outline, - final String? outlineVariant, - final String? shadow, - final String? scrim, - final String? inverseSurface, - final String? onInverseSurface, - final String? inversePrimary, - final String? surfaceTint}) = _$StacColorSchemeImpl; +/// @nodoc +abstract mixin class _$StacColorSchemeCopyWith<$Res> + implements $StacColorSchemeCopyWith<$Res> { + factory _$StacColorSchemeCopyWith( + _StacColorScheme value, $Res Function(_StacColorScheme) _then) = + __$StacColorSchemeCopyWithImpl; + @override + @useResult + $Res call( + {Brightness brightness, + String primary, + String onPrimary, + String? primaryContainer, + String? onPrimaryContainer, + String secondary, + String onSecondary, + String? secondaryContainer, + String? onSecondaryContainer, + String? tertiary, + String? onTertiary, + String? tertiaryContainer, + String? onTertiaryContainer, + String error, + String onError, + String? errorContainer, + String? onErrorContainer, + String background, + String onBackground, + String surface, + String onSurface, + String? surfaceVariant, + String? onSurfaceVariant, + String? outline, + String? outlineVariant, + String? shadow, + String? scrim, + String? inverseSurface, + String? onInverseSurface, + String? inversePrimary, + String? surfaceTint}); +} - factory _StacColorScheme.fromJson(Map json) = - _$StacColorSchemeImpl.fromJson; +/// @nodoc +class __$StacColorSchemeCopyWithImpl<$Res> + implements _$StacColorSchemeCopyWith<$Res> { + __$StacColorSchemeCopyWithImpl(this._self, this._then); - @override - Brightness get brightness; - @override - String get primary; - @override - String get onPrimary; - @override - String? get primaryContainer; - @override - String? get onPrimaryContainer; - @override - String get secondary; - @override - String get onSecondary; - @override - String? get secondaryContainer; - @override - String? get onSecondaryContainer; - @override - String? get tertiary; - @override - String? get onTertiary; - @override - String? get tertiaryContainer; - @override - String? get onTertiaryContainer; - @override - String get error; - @override - String get onError; - @override - String? get errorContainer; - @override - String? get onErrorContainer; - @override - String get background; - @override - String get onBackground; - @override - String get surface; - @override - String get onSurface; - @override - String? get surfaceVariant; - @override - String? get onSurfaceVariant; - @override - String? get outline; - @override - String? get outlineVariant; - @override - String? get shadow; - @override - String? get scrim; - @override - String? get inverseSurface; - @override - String? get onInverseSurface; - @override - String? get inversePrimary; - @override - String? get surfaceTint; + final _StacColorScheme _self; + final $Res Function(_StacColorScheme) _then; /// Create a copy of StacColorScheme /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacColorSchemeImplCopyWith<_$StacColorSchemeImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? brightness = null, + Object? primary = null, + Object? onPrimary = null, + Object? primaryContainer = freezed, + Object? onPrimaryContainer = freezed, + Object? secondary = null, + Object? onSecondary = null, + Object? secondaryContainer = freezed, + Object? onSecondaryContainer = freezed, + Object? tertiary = freezed, + Object? onTertiary = freezed, + Object? tertiaryContainer = freezed, + Object? onTertiaryContainer = freezed, + Object? error = null, + Object? onError = null, + Object? errorContainer = freezed, + Object? onErrorContainer = freezed, + Object? background = null, + Object? onBackground = null, + Object? surface = null, + Object? onSurface = null, + Object? surfaceVariant = freezed, + Object? onSurfaceVariant = freezed, + Object? outline = freezed, + Object? outlineVariant = freezed, + Object? shadow = freezed, + Object? scrim = freezed, + Object? inverseSurface = freezed, + Object? onInverseSurface = freezed, + Object? inversePrimary = freezed, + Object? surfaceTint = freezed, + }) { + return _then(_StacColorScheme( + brightness: null == brightness + ? _self.brightness + : brightness // ignore: cast_nullable_to_non_nullable + as Brightness, + primary: null == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as String, + onPrimary: null == onPrimary + ? _self.onPrimary + : onPrimary // ignore: cast_nullable_to_non_nullable + as String, + primaryContainer: freezed == primaryContainer + ? _self.primaryContainer + : primaryContainer // ignore: cast_nullable_to_non_nullable + as String?, + onPrimaryContainer: freezed == onPrimaryContainer + ? _self.onPrimaryContainer + : onPrimaryContainer // ignore: cast_nullable_to_non_nullable + as String?, + secondary: null == secondary + ? _self.secondary + : secondary // ignore: cast_nullable_to_non_nullable + as String, + onSecondary: null == onSecondary + ? _self.onSecondary + : onSecondary // ignore: cast_nullable_to_non_nullable + as String, + secondaryContainer: freezed == secondaryContainer + ? _self.secondaryContainer + : secondaryContainer // ignore: cast_nullable_to_non_nullable + as String?, + onSecondaryContainer: freezed == onSecondaryContainer + ? _self.onSecondaryContainer + : onSecondaryContainer // ignore: cast_nullable_to_non_nullable + as String?, + tertiary: freezed == tertiary + ? _self.tertiary + : tertiary // ignore: cast_nullable_to_non_nullable + as String?, + onTertiary: freezed == onTertiary + ? _self.onTertiary + : onTertiary // ignore: cast_nullable_to_non_nullable + as String?, + tertiaryContainer: freezed == tertiaryContainer + ? _self.tertiaryContainer + : tertiaryContainer // ignore: cast_nullable_to_non_nullable + as String?, + onTertiaryContainer: freezed == onTertiaryContainer + ? _self.onTertiaryContainer + : onTertiaryContainer // ignore: cast_nullable_to_non_nullable + as String?, + error: null == error + ? _self.error + : error // ignore: cast_nullable_to_non_nullable + as String, + onError: null == onError + ? _self.onError + : onError // ignore: cast_nullable_to_non_nullable + as String, + errorContainer: freezed == errorContainer + ? _self.errorContainer + : errorContainer // ignore: cast_nullable_to_non_nullable + as String?, + onErrorContainer: freezed == onErrorContainer + ? _self.onErrorContainer + : onErrorContainer // ignore: cast_nullable_to_non_nullable + as String?, + background: null == background + ? _self.background + : background // ignore: cast_nullable_to_non_nullable + as String, + onBackground: null == onBackground + ? _self.onBackground + : onBackground // ignore: cast_nullable_to_non_nullable + as String, + surface: null == surface + ? _self.surface + : surface // ignore: cast_nullable_to_non_nullable + as String, + onSurface: null == onSurface + ? _self.onSurface + : onSurface // ignore: cast_nullable_to_non_nullable + as String, + surfaceVariant: freezed == surfaceVariant + ? _self.surfaceVariant + : surfaceVariant // ignore: cast_nullable_to_non_nullable + as String?, + onSurfaceVariant: freezed == onSurfaceVariant + ? _self.onSurfaceVariant + : onSurfaceVariant // ignore: cast_nullable_to_non_nullable + as String?, + outline: freezed == outline + ? _self.outline + : outline // ignore: cast_nullable_to_non_nullable + as String?, + outlineVariant: freezed == outlineVariant + ? _self.outlineVariant + : outlineVariant // ignore: cast_nullable_to_non_nullable + as String?, + shadow: freezed == shadow + ? _self.shadow + : shadow // ignore: cast_nullable_to_non_nullable + as String?, + scrim: freezed == scrim + ? _self.scrim + : scrim // ignore: cast_nullable_to_non_nullable + as String?, + inverseSurface: freezed == inverseSurface + ? _self.inverseSurface + : inverseSurface // ignore: cast_nullable_to_non_nullable + as String?, + onInverseSurface: freezed == onInverseSurface + ? _self.onInverseSurface + : onInverseSurface // ignore: cast_nullable_to_non_nullable + as String?, + inversePrimary: freezed == inversePrimary + ? _self.inversePrimary + : inversePrimary // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTint: freezed == surfaceTint + ? _self.surfaceTint + : surfaceTint // ignore: cast_nullable_to_non_nullable + as String?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.g.dart b/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.g.dart index b0693d37..9f69189b 100644 --- a/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.g.dart +++ b/packages/stac/lib/src/parsers/stac_color_scheme/stac_color_scheme.g.dart @@ -6,9 +6,8 @@ part of 'stac_color_scheme.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacColorSchemeImpl _$$StacColorSchemeImplFromJson( - Map json) => - _$StacColorSchemeImpl( +_StacColorScheme _$StacColorSchemeFromJson(Map json) => + _StacColorScheme( brightness: $enumDecode(_$BrightnessEnumMap, json['brightness']), primary: json['primary'] as String, onPrimary: json['onPrimary'] as String, @@ -42,8 +41,7 @@ _$StacColorSchemeImpl _$$StacColorSchemeImplFromJson( surfaceTint: json['surfaceTint'] as String?, ); -Map _$$StacColorSchemeImplToJson( - _$StacColorSchemeImpl instance) => +Map _$StacColorSchemeToJson(_StacColorScheme instance) => { 'brightness': _$BrightnessEnumMap[instance.brightness]!, 'primary': instance.primary, diff --git a/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.dart b/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.dart index a79f12ac..9a9bfa30 100644 --- a/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.dart +++ b/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.dart @@ -6,7 +6,7 @@ part 'stac_colored_box.freezed.dart'; part 'stac_colored_box.g.dart'; @freezed -class StacColoredBox with _$StacColoredBox { +abstract class StacColoredBox with _$StacColoredBox { const factory StacColoredBox({ required String color, Map? child, diff --git a/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.freezed.dart b/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.freezed.dart index ffe9c420..0e13e845 100644 --- a/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,61 @@ part of 'stac_colored_box.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacColoredBox _$StacColoredBoxFromJson(Map json) { - return _StacColoredBox.fromJson(json); -} - /// @nodoc mixin _$StacColoredBox { - String get color => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacColoredBox to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get color; + Map? get child; /// Create a copy of StacColoredBox /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacColoredBoxCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacColoredBoxCopyWithImpl( + this as StacColoredBox, _$identity); -/// @nodoc -abstract class $StacColoredBoxCopyWith<$Res> { - factory $StacColoredBoxCopyWith( - StacColoredBox value, $Res Function(StacColoredBox) then) = - _$StacColoredBoxCopyWithImpl<$Res, StacColoredBox>; - @useResult - $Res call({String color, Map? child}); -} + /// Serializes this StacColoredBox to a JSON map. + Map toJson(); -/// @nodoc -class _$StacColoredBoxCopyWithImpl<$Res, $Val extends StacColoredBox> - implements $StacColoredBoxCopyWith<$Res> { - _$StacColoredBoxCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacColoredBox && + (identical(other.color, color) || other.color == color) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, color, const DeepCollectionEquality().hash(child)); - /// Create a copy of StacColoredBox - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? color = null, - Object? child = freezed, - }) { - return _then(_value.copyWith( - color: null == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacColoredBox(color: $color, child: $child)'; } } /// @nodoc -abstract class _$$StacColoredBoxImplCopyWith<$Res> - implements $StacColoredBoxCopyWith<$Res> { - factory _$$StacColoredBoxImplCopyWith(_$StacColoredBoxImpl value, - $Res Function(_$StacColoredBoxImpl) then) = - __$$StacColoredBoxImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacColoredBoxCopyWith<$Res> { + factory $StacColoredBoxCopyWith( + StacColoredBox value, $Res Function(StacColoredBox) _then) = + _$StacColoredBoxCopyWithImpl; @useResult $Res call({String color, Map? child}); } /// @nodoc -class __$$StacColoredBoxImplCopyWithImpl<$Res> - extends _$StacColoredBoxCopyWithImpl<$Res, _$StacColoredBoxImpl> - implements _$$StacColoredBoxImplCopyWith<$Res> { - __$$StacColoredBoxImplCopyWithImpl( - _$StacColoredBoxImpl _value, $Res Function(_$StacColoredBoxImpl) _then) - : super(_value, _then); +class _$StacColoredBoxCopyWithImpl<$Res> + implements $StacColoredBoxCopyWith<$Res> { + _$StacColoredBoxCopyWithImpl(this._self, this._then); + + final StacColoredBox _self; + final $Res Function(StacColoredBox) _then; /// Create a copy of StacColoredBox /// with the given fields replaced by the non-null parameter values. @@ -100,13 +74,13 @@ class __$$StacColoredBoxImplCopyWithImpl<$Res> Object? color = null, Object? child = freezed, }) { - return _then(_$StacColoredBoxImpl( + return _then(_self.copyWith( color: null == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -115,13 +89,12 @@ class __$$StacColoredBoxImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacColoredBoxImpl implements _StacColoredBox { - const _$StacColoredBoxImpl( +class _StacColoredBox implements StacColoredBox { + const _StacColoredBox( {required this.color, final Map? child}) : _child = child; - - factory _$StacColoredBoxImpl.fromJson(Map json) => - _$$StacColoredBoxImplFromJson(json); + factory _StacColoredBox.fromJson(Map json) => + _$StacColoredBoxFromJson(json); @override final String color; @@ -135,16 +108,26 @@ class _$StacColoredBoxImpl implements _StacColoredBox { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacColoredBox + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacColoredBox(color: $color, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacColoredBoxCopyWith<_StacColoredBox> get copyWith => + __$StacColoredBoxCopyWithImpl<_StacColoredBox>(this, _$identity); + + @override + Map toJson() { + return _$StacColoredBoxToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacColoredBoxImpl && + other is _StacColoredBox && (identical(other.color, color) || other.color == color) && const DeepCollectionEquality().equals(other._child, _child)); } @@ -154,40 +137,50 @@ class _$StacColoredBoxImpl implements _StacColoredBox { int get hashCode => Object.hash( runtimeType, color, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacColoredBox - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacColoredBoxImplCopyWith<_$StacColoredBoxImpl> get copyWith => - __$$StacColoredBoxImplCopyWithImpl<_$StacColoredBoxImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacColoredBoxImplToJson( - this, - ); + String toString() { + return 'StacColoredBox(color: $color, child: $child)'; } } -abstract class _StacColoredBox implements StacColoredBox { - const factory _StacColoredBox( - {required final String color, - final Map? child}) = _$StacColoredBoxImpl; +/// @nodoc +abstract mixin class _$StacColoredBoxCopyWith<$Res> + implements $StacColoredBoxCopyWith<$Res> { + factory _$StacColoredBoxCopyWith( + _StacColoredBox value, $Res Function(_StacColoredBox) _then) = + __$StacColoredBoxCopyWithImpl; + @override + @useResult + $Res call({String color, Map? child}); +} - factory _StacColoredBox.fromJson(Map json) = - _$StacColoredBoxImpl.fromJson; +/// @nodoc +class __$StacColoredBoxCopyWithImpl<$Res> + implements _$StacColoredBoxCopyWith<$Res> { + __$StacColoredBoxCopyWithImpl(this._self, this._then); - @override - String get color; - @override - Map? get child; + final _StacColoredBox _self; + final $Res Function(_StacColoredBox) _then; /// Create a copy of StacColoredBox /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacColoredBoxImplCopyWith<_$StacColoredBoxImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? color = null, + Object? child = freezed, + }) { + return _then(_StacColoredBox( + color: null == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.g.dart b/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.g.dart index 1d9c64cd..6db120f0 100644 --- a/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.g.dart +++ b/packages/stac/lib/src/parsers/stac_colored_box/stac_colored_box.g.dart @@ -6,14 +6,13 @@ part of 'stac_colored_box.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacColoredBoxImpl _$$StacColoredBoxImplFromJson(Map json) => - _$StacColoredBoxImpl( +_StacColoredBox _$StacColoredBoxFromJson(Map json) => + _StacColoredBox( color: json['color'] as String, child: json['child'] as Map?, ); -Map _$$StacColoredBoxImplToJson( - _$StacColoredBoxImpl instance) => +Map _$StacColoredBoxToJson(_StacColoredBox instance) => { 'color': instance.color, 'child': instance.child, diff --git a/packages/stac/lib/src/parsers/stac_column/stac_column.dart b/packages/stac/lib/src/parsers/stac_column/stac_column.dart index 45ac5227..e135feec 100644 --- a/packages/stac/lib/src/parsers/stac_column/stac_column.dart +++ b/packages/stac/lib/src/parsers/stac_column/stac_column.dart @@ -7,7 +7,7 @@ part 'stac_column.freezed.dart'; part 'stac_column.g.dart'; @freezed -class StacColumn with _$StacColumn { +abstract class StacColumn with _$StacColumn { const factory StacColumn({ @Default(MainAxisAlignment.start) MainAxisAlignment mainAxisAlignment, @Default(CrossAxisAlignment.center) CrossAxisAlignment crossAxisAlignment, diff --git a/packages/stac/lib/src/parsers/stac_column/stac_column.freezed.dart b/packages/stac/lib/src/parsers/stac_column/stac_column.freezed.dart index a1b6165c..461a5c51 100644 --- a/packages/stac/lib/src/parsers/stac_column/stac_column.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_column/stac_column.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,115 +10,71 @@ part of 'stac_column.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacColumn _$StacColumnFromJson(Map json) { - return _StacColumn.fromJson(json); -} - /// @nodoc mixin _$StacColumn { - MainAxisAlignment get mainAxisAlignment => throw _privateConstructorUsedError; - CrossAxisAlignment get crossAxisAlignment => - throw _privateConstructorUsedError; - MainAxisSize get mainAxisSize => throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - VerticalDirection get verticalDirection => throw _privateConstructorUsedError; - double get spacing => throw _privateConstructorUsedError; - List> get children => throw _privateConstructorUsedError; - - /// Serializes this StacColumn to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + MainAxisAlignment get mainAxisAlignment; + CrossAxisAlignment get crossAxisAlignment; + MainAxisSize get mainAxisSize; + TextDirection? get textDirection; + VerticalDirection get verticalDirection; + double get spacing; + List> get children; /// Create a copy of StacColumn /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacColumnCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacColumnCopyWithImpl(this as StacColumn, _$identity); -/// @nodoc -abstract class $StacColumnCopyWith<$Res> { - factory $StacColumnCopyWith( - StacColumn value, $Res Function(StacColumn) then) = - _$StacColumnCopyWithImpl<$Res, StacColumn>; - @useResult - $Res call( - {MainAxisAlignment mainAxisAlignment, - CrossAxisAlignment crossAxisAlignment, - MainAxisSize mainAxisSize, - TextDirection? textDirection, - VerticalDirection verticalDirection, - double spacing, - List> children}); -} + /// Serializes this StacColumn to a JSON map. + Map toJson(); -/// @nodoc -class _$StacColumnCopyWithImpl<$Res, $Val extends StacColumn> - implements $StacColumnCopyWith<$Res> { - _$StacColumnCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacColumn && + (identical(other.mainAxisAlignment, mainAxisAlignment) || + other.mainAxisAlignment == mainAxisAlignment) && + (identical(other.crossAxisAlignment, crossAxisAlignment) || + other.crossAxisAlignment == crossAxisAlignment) && + (identical(other.mainAxisSize, mainAxisSize) || + other.mainAxisSize == mainAxisSize) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + (identical(other.verticalDirection, verticalDirection) || + other.verticalDirection == verticalDirection) && + (identical(other.spacing, spacing) || other.spacing == spacing) && + const DeepCollectionEquality().equals(other.children, children)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + mainAxisAlignment, + crossAxisAlignment, + mainAxisSize, + textDirection, + verticalDirection, + spacing, + const DeepCollectionEquality().hash(children)); - /// Create a copy of StacColumn - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? mainAxisAlignment = null, - Object? crossAxisAlignment = null, - Object? mainAxisSize = null, - Object? textDirection = freezed, - Object? verticalDirection = null, - Object? spacing = null, - Object? children = null, - }) { - return _then(_value.copyWith( - mainAxisAlignment: null == mainAxisAlignment - ? _value.mainAxisAlignment - : mainAxisAlignment // ignore: cast_nullable_to_non_nullable - as MainAxisAlignment, - crossAxisAlignment: null == crossAxisAlignment - ? _value.crossAxisAlignment - : crossAxisAlignment // ignore: cast_nullable_to_non_nullable - as CrossAxisAlignment, - mainAxisSize: null == mainAxisSize - ? _value.mainAxisSize - : mainAxisSize // ignore: cast_nullable_to_non_nullable - as MainAxisSize, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - verticalDirection: null == verticalDirection - ? _value.verticalDirection - : verticalDirection // ignore: cast_nullable_to_non_nullable - as VerticalDirection, - spacing: null == spacing - ? _value.spacing - : spacing // ignore: cast_nullable_to_non_nullable - as double, - children: null == children - ? _value.children - : children // ignore: cast_nullable_to_non_nullable - as List>, - ) as $Val); + String toString() { + return 'StacColumn(mainAxisAlignment: $mainAxisAlignment, crossAxisAlignment: $crossAxisAlignment, mainAxisSize: $mainAxisSize, textDirection: $textDirection, verticalDirection: $verticalDirection, spacing: $spacing, children: $children)'; } } /// @nodoc -abstract class _$$StacColumnImplCopyWith<$Res> - implements $StacColumnCopyWith<$Res> { - factory _$$StacColumnImplCopyWith( - _$StacColumnImpl value, $Res Function(_$StacColumnImpl) then) = - __$$StacColumnImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacColumnCopyWith<$Res> { + factory $StacColumnCopyWith( + StacColumn value, $Res Function(StacColumn) _then) = + _$StacColumnCopyWithImpl; @useResult $Res call( {MainAxisAlignment mainAxisAlignment, @@ -130,12 +87,11 @@ abstract class _$$StacColumnImplCopyWith<$Res> } /// @nodoc -class __$$StacColumnImplCopyWithImpl<$Res> - extends _$StacColumnCopyWithImpl<$Res, _$StacColumnImpl> - implements _$$StacColumnImplCopyWith<$Res> { - __$$StacColumnImplCopyWithImpl( - _$StacColumnImpl _value, $Res Function(_$StacColumnImpl) _then) - : super(_value, _then); +class _$StacColumnCopyWithImpl<$Res> implements $StacColumnCopyWith<$Res> { + _$StacColumnCopyWithImpl(this._self, this._then); + + final StacColumn _self; + final $Res Function(StacColumn) _then; /// Create a copy of StacColumn /// with the given fields replaced by the non-null parameter values. @@ -150,33 +106,33 @@ class __$$StacColumnImplCopyWithImpl<$Res> Object? spacing = null, Object? children = null, }) { - return _then(_$StacColumnImpl( + return _then(_self.copyWith( mainAxisAlignment: null == mainAxisAlignment - ? _value.mainAxisAlignment + ? _self.mainAxisAlignment : mainAxisAlignment // ignore: cast_nullable_to_non_nullable as MainAxisAlignment, crossAxisAlignment: null == crossAxisAlignment - ? _value.crossAxisAlignment + ? _self.crossAxisAlignment : crossAxisAlignment // ignore: cast_nullable_to_non_nullable as CrossAxisAlignment, mainAxisSize: null == mainAxisSize - ? _value.mainAxisSize + ? _self.mainAxisSize : mainAxisSize // ignore: cast_nullable_to_non_nullable as MainAxisSize, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, verticalDirection: null == verticalDirection - ? _value.verticalDirection + ? _self.verticalDirection : verticalDirection // ignore: cast_nullable_to_non_nullable as VerticalDirection, spacing: null == spacing - ? _value.spacing + ? _self.spacing : spacing // ignore: cast_nullable_to_non_nullable as double, children: null == children - ? _value._children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, )); @@ -185,8 +141,8 @@ class __$$StacColumnImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacColumnImpl implements _StacColumn { - const _$StacColumnImpl( +class _StacColumn implements StacColumn { + const _StacColumn( {this.mainAxisAlignment = MainAxisAlignment.start, this.crossAxisAlignment = CrossAxisAlignment.center, this.mainAxisSize = MainAxisSize.max, @@ -195,9 +151,8 @@ class _$StacColumnImpl implements _StacColumn { this.spacing = 0, final List> children = const []}) : _children = children; - - factory _$StacColumnImpl.fromJson(Map json) => - _$$StacColumnImplFromJson(json); + factory _StacColumn.fromJson(Map json) => + _$StacColumnFromJson(json); @override @JsonKey() @@ -225,16 +180,26 @@ class _$StacColumnImpl implements _StacColumn { return EqualUnmodifiableListView(_children); } + /// Create a copy of StacColumn + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacColumn(mainAxisAlignment: $mainAxisAlignment, crossAxisAlignment: $crossAxisAlignment, mainAxisSize: $mainAxisSize, textDirection: $textDirection, verticalDirection: $verticalDirection, spacing: $spacing, children: $children)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacColumnCopyWith<_StacColumn> get copyWith => + __$StacColumnCopyWithImpl<_StacColumn>(this, _$identity); + + @override + Map toJson() { + return _$StacColumnToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacColumnImpl && + other is _StacColumn && (identical(other.mainAxisAlignment, mainAxisAlignment) || other.mainAxisAlignment == mainAxisAlignment) && (identical(other.crossAxisAlignment, crossAxisAlignment) || @@ -261,54 +226,81 @@ class _$StacColumnImpl implements _StacColumn { spacing, const DeepCollectionEquality().hash(_children)); - /// Create a copy of StacColumn - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacColumnImplCopyWith<_$StacColumnImpl> get copyWith => - __$$StacColumnImplCopyWithImpl<_$StacColumnImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacColumnImplToJson( - this, - ); + String toString() { + return 'StacColumn(mainAxisAlignment: $mainAxisAlignment, crossAxisAlignment: $crossAxisAlignment, mainAxisSize: $mainAxisSize, textDirection: $textDirection, verticalDirection: $verticalDirection, spacing: $spacing, children: $children)'; } } -abstract class _StacColumn implements StacColumn { - const factory _StacColumn( - {final MainAxisAlignment mainAxisAlignment, - final CrossAxisAlignment crossAxisAlignment, - final MainAxisSize mainAxisSize, - final TextDirection? textDirection, - final VerticalDirection verticalDirection, - final double spacing, - final List> children}) = _$StacColumnImpl; +/// @nodoc +abstract mixin class _$StacColumnCopyWith<$Res> + implements $StacColumnCopyWith<$Res> { + factory _$StacColumnCopyWith( + _StacColumn value, $Res Function(_StacColumn) _then) = + __$StacColumnCopyWithImpl; + @override + @useResult + $Res call( + {MainAxisAlignment mainAxisAlignment, + CrossAxisAlignment crossAxisAlignment, + MainAxisSize mainAxisSize, + TextDirection? textDirection, + VerticalDirection verticalDirection, + double spacing, + List> children}); +} - factory _StacColumn.fromJson(Map json) = - _$StacColumnImpl.fromJson; +/// @nodoc +class __$StacColumnCopyWithImpl<$Res> implements _$StacColumnCopyWith<$Res> { + __$StacColumnCopyWithImpl(this._self, this._then); - @override - MainAxisAlignment get mainAxisAlignment; - @override - CrossAxisAlignment get crossAxisAlignment; - @override - MainAxisSize get mainAxisSize; - @override - TextDirection? get textDirection; - @override - VerticalDirection get verticalDirection; - @override - double get spacing; - @override - List> get children; + final _StacColumn _self; + final $Res Function(_StacColumn) _then; /// Create a copy of StacColumn /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacColumnImplCopyWith<_$StacColumnImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? mainAxisAlignment = null, + Object? crossAxisAlignment = null, + Object? mainAxisSize = null, + Object? textDirection = freezed, + Object? verticalDirection = null, + Object? spacing = null, + Object? children = null, + }) { + return _then(_StacColumn( + mainAxisAlignment: null == mainAxisAlignment + ? _self.mainAxisAlignment + : mainAxisAlignment // ignore: cast_nullable_to_non_nullable + as MainAxisAlignment, + crossAxisAlignment: null == crossAxisAlignment + ? _self.crossAxisAlignment + : crossAxisAlignment // ignore: cast_nullable_to_non_nullable + as CrossAxisAlignment, + mainAxisSize: null == mainAxisSize + ? _self.mainAxisSize + : mainAxisSize // ignore: cast_nullable_to_non_nullable + as MainAxisSize, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + verticalDirection: null == verticalDirection + ? _self.verticalDirection + : verticalDirection // ignore: cast_nullable_to_non_nullable + as VerticalDirection, + spacing: null == spacing + ? _self.spacing + : spacing // ignore: cast_nullable_to_non_nullable + as double, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_column/stac_column.g.dart b/packages/stac/lib/src/parsers/stac_column/stac_column.g.dart index 55464c3f..30a40b92 100644 --- a/packages/stac/lib/src/parsers/stac_column/stac_column.g.dart +++ b/packages/stac/lib/src/parsers/stac_column/stac_column.g.dart @@ -6,8 +6,7 @@ part of 'stac_column.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacColumnImpl _$$StacColumnImplFromJson(Map json) => - _$StacColumnImpl( +_StacColumn _$StacColumnFromJson(Map json) => _StacColumn( mainAxisAlignment: $enumDecodeNullable( _$MainAxisAlignmentEnumMap, json['mainAxisAlignment']) ?? MainAxisAlignment.start, @@ -29,7 +28,7 @@ _$StacColumnImpl _$$StacColumnImplFromJson(Map json) => const [], ); -Map _$$StacColumnImplToJson(_$StacColumnImpl instance) => +Map _$StacColumnToJson(_StacColumn instance) => { 'mainAxisAlignment': _$MainAxisAlignmentEnumMap[instance.mainAxisAlignment]!, diff --git a/packages/stac/lib/src/parsers/stac_container/stac_container.dart b/packages/stac/lib/src/parsers/stac_container/stac_container.dart index 4077e8ea..5d63179f 100644 --- a/packages/stac/lib/src/parsers/stac_container/stac_container.dart +++ b/packages/stac/lib/src/parsers/stac_container/stac_container.dart @@ -12,7 +12,7 @@ part 'stac_container.freezed.dart'; part 'stac_container.g.dart'; @freezed -class StacContainer with _$StacContainer { +abstract class StacContainer with _$StacContainer { const factory StacContainer({ StacAlignment? alignment, StacEdgeInsets? padding, diff --git a/packages/stac/lib/src/parsers/stac_container/stac_container.freezed.dart b/packages/stac/lib/src/parsers/stac_container/stac_container.freezed.dart index 3f78e427..f3019727 100644 --- a/packages/stac/lib/src/parsers/stac_container/stac_container.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_container/stac_container.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,45 +10,84 @@ part of 'stac_container.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacContainer _$StacContainerFromJson(Map json) { - return _StacContainer.fromJson(json); -} - /// @nodoc mixin _$StacContainer { - StacAlignment? get alignment => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - StacBoxDecoration? get decoration => throw _privateConstructorUsedError; - StacBoxDecoration? get foregroundDecoration => - throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - double? get width => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - StacBoxConstraints? get constraints => throw _privateConstructorUsedError; - StacEdgeInsets? get margin => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - - /// Serializes this StacContainer to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacAlignment? get alignment; + StacEdgeInsets? get padding; + StacBoxDecoration? get decoration; + StacBoxDecoration? get foregroundDecoration; + String? get color; + double? get width; + double? get height; + StacBoxConstraints? get constraints; + StacEdgeInsets? get margin; + Map? get child; + Clip get clipBehavior; /// Create a copy of StacContainer /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacContainerCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacContainerCopyWithImpl( + this as StacContainer, _$identity); + + /// Serializes this StacContainer to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacContainer && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.decoration, decoration) || + other.decoration == decoration) && + (identical(other.foregroundDecoration, foregroundDecoration) || + other.foregroundDecoration == foregroundDecoration) && + (identical(other.color, color) || other.color == color) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.constraints, constraints) || + other.constraints == constraints) && + (identical(other.margin, margin) || other.margin == margin) && + const DeepCollectionEquality().equals(other.child, child) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + alignment, + padding, + decoration, + foregroundDecoration, + color, + width, + height, + constraints, + margin, + const DeepCollectionEquality().hash(child), + clipBehavior); + + @override + String toString() { + return 'StacContainer(alignment: $alignment, padding: $padding, decoration: $decoration, foregroundDecoration: $foregroundDecoration, color: $color, width: $width, height: $height, constraints: $constraints, margin: $margin, child: $child, clipBehavior: $clipBehavior)'; + } } /// @nodoc -abstract class $StacContainerCopyWith<$Res> { +abstract mixin class $StacContainerCopyWith<$Res> { factory $StacContainerCopyWith( - StacContainer value, $Res Function(StacContainer) then) = - _$StacContainerCopyWithImpl<$Res, StacContainer>; + StacContainer value, $Res Function(StacContainer) _then) = + _$StacContainerCopyWithImpl; @useResult $Res call( {StacAlignment? alignment, @@ -70,14 +110,12 @@ abstract class $StacContainerCopyWith<$Res> { } /// @nodoc -class _$StacContainerCopyWithImpl<$Res, $Val extends StacContainer> +class _$StacContainerCopyWithImpl<$Res> implements $StacContainerCopyWith<$Res> { - _$StacContainerCopyWithImpl(this._value, this._then); + _$StacContainerCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacContainer _self; + final $Res Function(StacContainer) _then; /// Create a copy of StacContainer /// with the given fields replaced by the non-null parameter values. @@ -96,52 +134,52 @@ class _$StacContainerCopyWithImpl<$Res, $Val extends StacContainer> Object? child = freezed, Object? clipBehavior = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( alignment: freezed == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignment?, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, decoration: freezed == decoration - ? _value.decoration + ? _self.decoration : decoration // ignore: cast_nullable_to_non_nullable as StacBoxDecoration?, foregroundDecoration: freezed == foregroundDecoration - ? _value.foregroundDecoration + ? _self.foregroundDecoration : foregroundDecoration // ignore: cast_nullable_to_non_nullable as StacBoxDecoration?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, width: freezed == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, constraints: freezed == constraints - ? _value.constraints + ? _self.constraints : constraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, margin: freezed == margin - ? _value.margin + ? _self.margin : margin // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, child: freezed == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, - ) as $Val); + )); } /// Create a copy of StacContainer @@ -149,12 +187,12 @@ class _$StacContainerCopyWithImpl<$Res, $Val extends StacContainer> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } @@ -163,12 +201,12 @@ class _$StacContainerCopyWithImpl<$Res, $Val extends StacContainer> @override @pragma('vm:prefer-inline') $StacBoxDecorationCopyWith<$Res>? get decoration { - if (_value.decoration == null) { + if (_self.decoration == null) { return null; } - return $StacBoxDecorationCopyWith<$Res>(_value.decoration!, (value) { - return _then(_value.copyWith(decoration: value) as $Val); + return $StacBoxDecorationCopyWith<$Res>(_self.decoration!, (value) { + return _then(_self.copyWith(decoration: value)); }); } @@ -177,13 +215,13 @@ class _$StacContainerCopyWithImpl<$Res, $Val extends StacContainer> @override @pragma('vm:prefer-inline') $StacBoxDecorationCopyWith<$Res>? get foregroundDecoration { - if (_value.foregroundDecoration == null) { + if (_self.foregroundDecoration == null) { return null; } - return $StacBoxDecorationCopyWith<$Res>(_value.foregroundDecoration!, + return $StacBoxDecorationCopyWith<$Res>(_self.foregroundDecoration!, (value) { - return _then(_value.copyWith(foregroundDecoration: value) as $Val); + return _then(_self.copyWith(foregroundDecoration: value)); }); } @@ -192,12 +230,12 @@ class _$StacContainerCopyWithImpl<$Res, $Val extends StacContainer> @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get constraints { - if (_value.constraints == null) { + if (_self.constraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.constraints!, (value) { - return _then(_value.copyWith(constraints: value) as $Val); + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); }); } @@ -206,127 +244,20 @@ class _$StacContainerCopyWithImpl<$Res, $Val extends StacContainer> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get margin { - if (_value.margin == null) { + if (_self.margin == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.margin!, (value) { - return _then(_value.copyWith(margin: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.margin!, (value) { + return _then(_self.copyWith(margin: value)); }); } } -/// @nodoc -abstract class _$$StacContainerImplCopyWith<$Res> - implements $StacContainerCopyWith<$Res> { - factory _$$StacContainerImplCopyWith( - _$StacContainerImpl value, $Res Function(_$StacContainerImpl) then) = - __$$StacContainerImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacAlignment? alignment, - StacEdgeInsets? padding, - StacBoxDecoration? decoration, - StacBoxDecoration? foregroundDecoration, - String? color, - double? width, - double? height, - StacBoxConstraints? constraints, - StacEdgeInsets? margin, - Map? child, - Clip clipBehavior}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; - @override - $StacBoxDecorationCopyWith<$Res>? get decoration; - @override - $StacBoxDecorationCopyWith<$Res>? get foregroundDecoration; - @override - $StacBoxConstraintsCopyWith<$Res>? get constraints; - @override - $StacEdgeInsetsCopyWith<$Res>? get margin; -} - -/// @nodoc -class __$$StacContainerImplCopyWithImpl<$Res> - extends _$StacContainerCopyWithImpl<$Res, _$StacContainerImpl> - implements _$$StacContainerImplCopyWith<$Res> { - __$$StacContainerImplCopyWithImpl( - _$StacContainerImpl _value, $Res Function(_$StacContainerImpl) _then) - : super(_value, _then); - - /// Create a copy of StacContainer - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? alignment = freezed, - Object? padding = freezed, - Object? decoration = freezed, - Object? foregroundDecoration = freezed, - Object? color = freezed, - Object? width = freezed, - Object? height = freezed, - Object? constraints = freezed, - Object? margin = freezed, - Object? child = freezed, - Object? clipBehavior = null, - }) { - return _then(_$StacContainerImpl( - alignment: freezed == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignment?, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - decoration: freezed == decoration - ? _value.decoration - : decoration // ignore: cast_nullable_to_non_nullable - as StacBoxDecoration?, - foregroundDecoration: freezed == foregroundDecoration - ? _value.foregroundDecoration - : foregroundDecoration // ignore: cast_nullable_to_non_nullable - as StacBoxDecoration?, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - width: freezed == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - constraints: freezed == constraints - ? _value.constraints - : constraints // ignore: cast_nullable_to_non_nullable - as StacBoxConstraints?, - margin: freezed == margin - ? _value.margin - : margin // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - child: freezed == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacContainerImpl implements _StacContainer { - const _$StacContainerImpl( +class _StacContainer implements StacContainer { + const _StacContainer( {this.alignment, this.padding, this.decoration, @@ -339,9 +270,8 @@ class _$StacContainerImpl implements _StacContainer { final Map? child, this.clipBehavior = Clip.none}) : _child = child; - - factory _$StacContainerImpl.fromJson(Map json) => - _$$StacContainerImplFromJson(json); + factory _StacContainer.fromJson(Map json) => + _$StacContainerFromJson(json); @override final StacAlignment? alignment; @@ -375,16 +305,26 @@ class _$StacContainerImpl implements _StacContainer { @JsonKey() final Clip clipBehavior; + /// Create a copy of StacContainer + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacContainer(alignment: $alignment, padding: $padding, decoration: $decoration, foregroundDecoration: $foregroundDecoration, color: $color, width: $width, height: $height, constraints: $constraints, margin: $margin, child: $child, clipBehavior: $clipBehavior)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacContainerCopyWith<_StacContainer> get copyWith => + __$StacContainerCopyWithImpl<_StacContainer>(this, _$identity); + + @override + Map toJson() { + return _$StacContainerToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacContainerImpl && + other is _StacContainer && (identical(other.alignment, alignment) || other.alignment == alignment) && (identical(other.padding, padding) || other.padding == padding) && @@ -419,66 +359,188 @@ class _$StacContainerImpl implements _StacContainer { const DeepCollectionEquality().hash(_child), clipBehavior); - /// Create a copy of StacContainer - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacContainerImplCopyWith<_$StacContainerImpl> get copyWith => - __$$StacContainerImplCopyWithImpl<_$StacContainerImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacContainerImplToJson( - this, - ); + String toString() { + return 'StacContainer(alignment: $alignment, padding: $padding, decoration: $decoration, foregroundDecoration: $foregroundDecoration, color: $color, width: $width, height: $height, constraints: $constraints, margin: $margin, child: $child, clipBehavior: $clipBehavior)'; } } -abstract class _StacContainer implements StacContainer { - const factory _StacContainer( - {final StacAlignment? alignment, - final StacEdgeInsets? padding, - final StacBoxDecoration? decoration, - final StacBoxDecoration? foregroundDecoration, - final String? color, - final double? width, - final double? height, - final StacBoxConstraints? constraints, - final StacEdgeInsets? margin, - final Map? child, - final Clip clipBehavior}) = _$StacContainerImpl; - - factory _StacContainer.fromJson(Map json) = - _$StacContainerImpl.fromJson; - +/// @nodoc +abstract mixin class _$StacContainerCopyWith<$Res> + implements $StacContainerCopyWith<$Res> { + factory _$StacContainerCopyWith( + _StacContainer value, $Res Function(_StacContainer) _then) = + __$StacContainerCopyWithImpl; @override - StacAlignment? get alignment; + @useResult + $Res call( + {StacAlignment? alignment, + StacEdgeInsets? padding, + StacBoxDecoration? decoration, + StacBoxDecoration? foregroundDecoration, + String? color, + double? width, + double? height, + StacBoxConstraints? constraints, + StacEdgeInsets? margin, + Map? child, + Clip clipBehavior}); + @override - StacEdgeInsets? get padding; + $StacEdgeInsetsCopyWith<$Res>? get padding; @override - StacBoxDecoration? get decoration; + $StacBoxDecorationCopyWith<$Res>? get decoration; @override - StacBoxDecoration? get foregroundDecoration; + $StacBoxDecorationCopyWith<$Res>? get foregroundDecoration; @override - String? get color; + $StacBoxConstraintsCopyWith<$Res>? get constraints; @override - double? get width; + $StacEdgeInsetsCopyWith<$Res>? get margin; +} + +/// @nodoc +class __$StacContainerCopyWithImpl<$Res> + implements _$StacContainerCopyWith<$Res> { + __$StacContainerCopyWithImpl(this._self, this._then); + + final _StacContainer _self; + final $Res Function(_StacContainer) _then; + + /// Create a copy of StacContainer + /// with the given fields replaced by the non-null parameter values. @override - double? get height; + @pragma('vm:prefer-inline') + $Res call({ + Object? alignment = freezed, + Object? padding = freezed, + Object? decoration = freezed, + Object? foregroundDecoration = freezed, + Object? color = freezed, + Object? width = freezed, + Object? height = freezed, + Object? constraints = freezed, + Object? margin = freezed, + Object? child = freezed, + Object? clipBehavior = null, + }) { + return _then(_StacContainer( + alignment: freezed == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignment?, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + decoration: freezed == decoration + ? _self.decoration + : decoration // ignore: cast_nullable_to_non_nullable + as StacBoxDecoration?, + foregroundDecoration: freezed == foregroundDecoration + ? _self.foregroundDecoration + : foregroundDecoration // ignore: cast_nullable_to_non_nullable + as StacBoxDecoration?, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + width: freezed == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as double?, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + constraints: freezed == constraints + ? _self.constraints + : constraints // ignore: cast_nullable_to_non_nullable + as StacBoxConstraints?, + margin: freezed == margin + ? _self.margin + : margin // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + )); + } + + /// Create a copy of StacContainer + /// with the given fields replaced by the non-null parameter values. @override - StacBoxConstraints? get constraints; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } + + /// Create a copy of StacContainer + /// with the given fields replaced by the non-null parameter values. @override - StacEdgeInsets? get margin; + @pragma('vm:prefer-inline') + $StacBoxDecorationCopyWith<$Res>? get decoration { + if (_self.decoration == null) { + return null; + } + + return $StacBoxDecorationCopyWith<$Res>(_self.decoration!, (value) { + return _then(_self.copyWith(decoration: value)); + }); + } + + /// Create a copy of StacContainer + /// with the given fields replaced by the non-null parameter values. @override - Map? get child; + @pragma('vm:prefer-inline') + $StacBoxDecorationCopyWith<$Res>? get foregroundDecoration { + if (_self.foregroundDecoration == null) { + return null; + } + + return $StacBoxDecorationCopyWith<$Res>(_self.foregroundDecoration!, + (value) { + return _then(_self.copyWith(foregroundDecoration: value)); + }); + } + + /// Create a copy of StacContainer + /// with the given fields replaced by the non-null parameter values. @override - Clip get clipBehavior; + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get constraints { + if (_self.constraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); + }); + } /// Create a copy of StacContainer /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacContainerImplCopyWith<_$StacContainerImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get margin { + if (_self.margin == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.margin!, (value) { + return _then(_self.copyWith(margin: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_container/stac_container.g.dart b/packages/stac/lib/src/parsers/stac_container/stac_container.g.dart index cba5ed37..1d4d6b67 100644 --- a/packages/stac/lib/src/parsers/stac_container/stac_container.g.dart +++ b/packages/stac/lib/src/parsers/stac_container/stac_container.g.dart @@ -6,8 +6,8 @@ part of 'stac_container.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacContainerImpl _$$StacContainerImplFromJson(Map json) => - _$StacContainerImpl( +_StacContainer _$StacContainerFromJson(Map json) => + _StacContainer( alignment: $enumDecodeNullable(_$StacAlignmentEnumMap, json['alignment']), padding: json['padding'] == null ? null @@ -35,7 +35,7 @@ _$StacContainerImpl _$$StacContainerImplFromJson(Map json) => $enumDecodeNullable(_$ClipEnumMap, json['clipBehavior']) ?? Clip.none, ); -Map _$$StacContainerImplToJson(_$StacContainerImpl instance) => +Map _$StacContainerToJson(_StacContainer instance) => { 'alignment': _$StacAlignmentEnumMap[instance.alignment], 'padding': instance.padding, diff --git a/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.dart b/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.dart index c22de090..aa914536 100644 --- a/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.dart +++ b/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.dart @@ -7,7 +7,7 @@ part 'stac_custom_scroll_view.freezed.dart'; part 'stac_custom_scroll_view.g.dart'; @freezed -class StacCustomScrollView with _$StacCustomScrollView { +abstract class StacCustomScrollView with _$StacCustomScrollView { const factory StacCustomScrollView({ @Default([]) List> slivers, @Default(Axis.vertical) Axis scrollDirection, diff --git a/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.freezed.dart b/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.freezed.dart index a2f97596..cd5478fe 100644 --- a/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,165 +10,98 @@ part of 'stac_custom_scroll_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCustomScrollView _$StacCustomScrollViewFromJson(Map json) { - return _StacCustomScrollView.fromJson(json); -} - /// @nodoc mixin _$StacCustomScrollView { - List> get slivers => throw _privateConstructorUsedError; - Axis get scrollDirection => throw _privateConstructorUsedError; - bool get reverse => throw _privateConstructorUsedError; - bool? get primary => throw _privateConstructorUsedError; - StacScrollPhysics? get physics => throw _privateConstructorUsedError; - bool get shrinkWrap => throw _privateConstructorUsedError; - double get anchor => throw _privateConstructorUsedError; - double? get cacheExtent => throw _privateConstructorUsedError; - int? get semanticChildCount => throw _privateConstructorUsedError; - DragStartBehavior get dragStartBehavior => throw _privateConstructorUsedError; - ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior => - throw _privateConstructorUsedError; - String? get restorationId => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - HitTestBehavior get hitTestBehavior => throw _privateConstructorUsedError; - - /// Serializes this StacCustomScrollView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List> get slivers; + Axis get scrollDirection; + bool get reverse; + bool? get primary; + StacScrollPhysics? get physics; + bool get shrinkWrap; + double get anchor; + double? get cacheExtent; + int? get semanticChildCount; + DragStartBehavior get dragStartBehavior; + ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; + String? get restorationId; + Clip get clipBehavior; + HitTestBehavior get hitTestBehavior; /// Create a copy of StacCustomScrollView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCustomScrollViewCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacCustomScrollViewCopyWithImpl( + this as StacCustomScrollView, _$identity); -/// @nodoc -abstract class $StacCustomScrollViewCopyWith<$Res> { - factory $StacCustomScrollViewCopyWith(StacCustomScrollView value, - $Res Function(StacCustomScrollView) then) = - _$StacCustomScrollViewCopyWithImpl<$Res, StacCustomScrollView>; - @useResult - $Res call( - {List> slivers, - Axis scrollDirection, - bool reverse, - bool? primary, - StacScrollPhysics? physics, - bool shrinkWrap, - double anchor, - double? cacheExtent, - int? semanticChildCount, - DragStartBehavior dragStartBehavior, - ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, - String? restorationId, - Clip clipBehavior, - HitTestBehavior hitTestBehavior}); -} + /// Serializes this StacCustomScrollView to a JSON map. + Map toJson(); -/// @nodoc -class _$StacCustomScrollViewCopyWithImpl<$Res, - $Val extends StacCustomScrollView> - implements $StacCustomScrollViewCopyWith<$Res> { - _$StacCustomScrollViewCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCustomScrollView && + const DeepCollectionEquality().equals(other.slivers, slivers) && + (identical(other.scrollDirection, scrollDirection) || + other.scrollDirection == scrollDirection) && + (identical(other.reverse, reverse) || other.reverse == reverse) && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.physics, physics) || other.physics == physics) && + (identical(other.shrinkWrap, shrinkWrap) || + other.shrinkWrap == shrinkWrap) && + (identical(other.anchor, anchor) || other.anchor == anchor) && + (identical(other.cacheExtent, cacheExtent) || + other.cacheExtent == cacheExtent) && + (identical(other.semanticChildCount, semanticChildCount) || + other.semanticChildCount == semanticChildCount) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical( + other.keyboardDismissBehavior, keyboardDismissBehavior) || + other.keyboardDismissBehavior == keyboardDismissBehavior) && + (identical(other.restorationId, restorationId) || + other.restorationId == restorationId) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.hitTestBehavior, hitTestBehavior) || + other.hitTestBehavior == hitTestBehavior)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(slivers), + scrollDirection, + reverse, + primary, + physics, + shrinkWrap, + anchor, + cacheExtent, + semanticChildCount, + dragStartBehavior, + keyboardDismissBehavior, + restorationId, + clipBehavior, + hitTestBehavior); - /// Create a copy of StacCustomScrollView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? slivers = null, - Object? scrollDirection = null, - Object? reverse = null, - Object? primary = freezed, - Object? physics = freezed, - Object? shrinkWrap = null, - Object? anchor = null, - Object? cacheExtent = freezed, - Object? semanticChildCount = freezed, - Object? dragStartBehavior = null, - Object? keyboardDismissBehavior = null, - Object? restorationId = freezed, - Object? clipBehavior = null, - Object? hitTestBehavior = null, - }) { - return _then(_value.copyWith( - slivers: null == slivers - ? _value.slivers - : slivers // ignore: cast_nullable_to_non_nullable - as List>, - scrollDirection: null == scrollDirection - ? _value.scrollDirection - : scrollDirection // ignore: cast_nullable_to_non_nullable - as Axis, - reverse: null == reverse - ? _value.reverse - : reverse // ignore: cast_nullable_to_non_nullable - as bool, - primary: freezed == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as bool?, - physics: freezed == physics - ? _value.physics - : physics // ignore: cast_nullable_to_non_nullable - as StacScrollPhysics?, - shrinkWrap: null == shrinkWrap - ? _value.shrinkWrap - : shrinkWrap // ignore: cast_nullable_to_non_nullable - as bool, - anchor: null == anchor - ? _value.anchor - : anchor // ignore: cast_nullable_to_non_nullable - as double, - cacheExtent: freezed == cacheExtent - ? _value.cacheExtent - : cacheExtent // ignore: cast_nullable_to_non_nullable - as double?, - semanticChildCount: freezed == semanticChildCount - ? _value.semanticChildCount - : semanticChildCount // ignore: cast_nullable_to_non_nullable - as int?, - dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior - : dragStartBehavior // ignore: cast_nullable_to_non_nullable - as DragStartBehavior, - keyboardDismissBehavior: null == keyboardDismissBehavior - ? _value.keyboardDismissBehavior - : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable - as ScrollViewKeyboardDismissBehavior, - restorationId: freezed == restorationId - ? _value.restorationId - : restorationId // ignore: cast_nullable_to_non_nullable - as String?, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - hitTestBehavior: null == hitTestBehavior - ? _value.hitTestBehavior - : hitTestBehavior // ignore: cast_nullable_to_non_nullable - as HitTestBehavior, - ) as $Val); + String toString() { + return 'StacCustomScrollView(slivers: $slivers, scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, anchor: $anchor, cacheExtent: $cacheExtent, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior, hitTestBehavior: $hitTestBehavior)'; } } /// @nodoc -abstract class _$$StacCustomScrollViewImplCopyWith<$Res> - implements $StacCustomScrollViewCopyWith<$Res> { - factory _$$StacCustomScrollViewImplCopyWith(_$StacCustomScrollViewImpl value, - $Res Function(_$StacCustomScrollViewImpl) then) = - __$$StacCustomScrollViewImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacCustomScrollViewCopyWith<$Res> { + factory $StacCustomScrollViewCopyWith(StacCustomScrollView value, + $Res Function(StacCustomScrollView) _then) = + _$StacCustomScrollViewCopyWithImpl; @useResult $Res call( {List> slivers, @@ -187,12 +121,12 @@ abstract class _$$StacCustomScrollViewImplCopyWith<$Res> } /// @nodoc -class __$$StacCustomScrollViewImplCopyWithImpl<$Res> - extends _$StacCustomScrollViewCopyWithImpl<$Res, _$StacCustomScrollViewImpl> - implements _$$StacCustomScrollViewImplCopyWith<$Res> { - __$$StacCustomScrollViewImplCopyWithImpl(_$StacCustomScrollViewImpl _value, - $Res Function(_$StacCustomScrollViewImpl) _then) - : super(_value, _then); +class _$StacCustomScrollViewCopyWithImpl<$Res> + implements $StacCustomScrollViewCopyWith<$Res> { + _$StacCustomScrollViewCopyWithImpl(this._self, this._then); + + final StacCustomScrollView _self; + final $Res Function(StacCustomScrollView) _then; /// Create a copy of StacCustomScrollView /// with the given fields replaced by the non-null parameter values. @@ -214,61 +148,61 @@ class __$$StacCustomScrollViewImplCopyWithImpl<$Res> Object? clipBehavior = null, Object? hitTestBehavior = null, }) { - return _then(_$StacCustomScrollViewImpl( + return _then(_self.copyWith( slivers: null == slivers - ? _value._slivers + ? _self.slivers : slivers // ignore: cast_nullable_to_non_nullable as List>, scrollDirection: null == scrollDirection - ? _value.scrollDirection + ? _self.scrollDirection : scrollDirection // ignore: cast_nullable_to_non_nullable as Axis, reverse: null == reverse - ? _value.reverse + ? _self.reverse : reverse // ignore: cast_nullable_to_non_nullable as bool, primary: freezed == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as bool?, physics: freezed == physics - ? _value.physics + ? _self.physics : physics // ignore: cast_nullable_to_non_nullable as StacScrollPhysics?, shrinkWrap: null == shrinkWrap - ? _value.shrinkWrap + ? _self.shrinkWrap : shrinkWrap // ignore: cast_nullable_to_non_nullable as bool, anchor: null == anchor - ? _value.anchor + ? _self.anchor : anchor // ignore: cast_nullable_to_non_nullable as double, cacheExtent: freezed == cacheExtent - ? _value.cacheExtent + ? _self.cacheExtent : cacheExtent // ignore: cast_nullable_to_non_nullable as double?, semanticChildCount: freezed == semanticChildCount - ? _value.semanticChildCount + ? _self.semanticChildCount : semanticChildCount // ignore: cast_nullable_to_non_nullable as int?, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, keyboardDismissBehavior: null == keyboardDismissBehavior - ? _value.keyboardDismissBehavior + ? _self.keyboardDismissBehavior : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable as ScrollViewKeyboardDismissBehavior, restorationId: freezed == restorationId - ? _value.restorationId + ? _self.restorationId : restorationId // ignore: cast_nullable_to_non_nullable as String?, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, hitTestBehavior: null == hitTestBehavior - ? _value.hitTestBehavior + ? _self.hitTestBehavior : hitTestBehavior // ignore: cast_nullable_to_non_nullable as HitTestBehavior, )); @@ -277,8 +211,8 @@ class __$$StacCustomScrollViewImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacCustomScrollViewImpl implements _StacCustomScrollView { - const _$StacCustomScrollViewImpl( +class _StacCustomScrollView implements StacCustomScrollView { + const _StacCustomScrollView( {final List> slivers = const [], this.scrollDirection = Axis.vertical, this.reverse = false, @@ -294,9 +228,8 @@ class _$StacCustomScrollViewImpl implements _StacCustomScrollView { this.clipBehavior = Clip.hardEdge, this.hitTestBehavior = HitTestBehavior.opaque}) : _slivers = slivers; - - factory _$StacCustomScrollViewImpl.fromJson(Map json) => - _$$StacCustomScrollViewImplFromJson(json); + factory _StacCustomScrollView.fromJson(Map json) => + _$StacCustomScrollViewFromJson(json); final List> _slivers; @override @@ -342,16 +275,27 @@ class _$StacCustomScrollViewImpl implements _StacCustomScrollView { @JsonKey() final HitTestBehavior hitTestBehavior; + /// Create a copy of StacCustomScrollView + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacCustomScrollView(slivers: $slivers, scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, anchor: $anchor, cacheExtent: $cacheExtent, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior, hitTestBehavior: $hitTestBehavior)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCustomScrollViewCopyWith<_StacCustomScrollView> get copyWith => + __$StacCustomScrollViewCopyWithImpl<_StacCustomScrollView>( + this, _$identity); + + @override + Map toJson() { + return _$StacCustomScrollViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacCustomScrollViewImpl && + other is _StacCustomScrollView && const DeepCollectionEquality().equals(other._slivers, _slivers) && (identical(other.scrollDirection, scrollDirection) || other.scrollDirection == scrollDirection) && @@ -397,77 +341,124 @@ class _$StacCustomScrollViewImpl implements _StacCustomScrollView { clipBehavior, hitTestBehavior); - /// Create a copy of StacCustomScrollView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacCustomScrollViewImplCopyWith<_$StacCustomScrollViewImpl> - get copyWith => - __$$StacCustomScrollViewImplCopyWithImpl<_$StacCustomScrollViewImpl>( - this, _$identity); + String toString() { + return 'StacCustomScrollView(slivers: $slivers, scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, anchor: $anchor, cacheExtent: $cacheExtent, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior, hitTestBehavior: $hitTestBehavior)'; + } +} +/// @nodoc +abstract mixin class _$StacCustomScrollViewCopyWith<$Res> + implements $StacCustomScrollViewCopyWith<$Res> { + factory _$StacCustomScrollViewCopyWith(_StacCustomScrollView value, + $Res Function(_StacCustomScrollView) _then) = + __$StacCustomScrollViewCopyWithImpl; @override - Map toJson() { - return _$$StacCustomScrollViewImplToJson( - this, - ); - } + @useResult + $Res call( + {List> slivers, + Axis scrollDirection, + bool reverse, + bool? primary, + StacScrollPhysics? physics, + bool shrinkWrap, + double anchor, + double? cacheExtent, + int? semanticChildCount, + DragStartBehavior dragStartBehavior, + ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, + String? restorationId, + Clip clipBehavior, + HitTestBehavior hitTestBehavior}); } -abstract class _StacCustomScrollView implements StacCustomScrollView { - const factory _StacCustomScrollView( - {final List> slivers, - final Axis scrollDirection, - final bool reverse, - final bool? primary, - final StacScrollPhysics? physics, - final bool shrinkWrap, - final double anchor, - final double? cacheExtent, - final int? semanticChildCount, - final DragStartBehavior dragStartBehavior, - final ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, - final String? restorationId, - final Clip clipBehavior, - final HitTestBehavior hitTestBehavior}) = _$StacCustomScrollViewImpl; +/// @nodoc +class __$StacCustomScrollViewCopyWithImpl<$Res> + implements _$StacCustomScrollViewCopyWith<$Res> { + __$StacCustomScrollViewCopyWithImpl(this._self, this._then); - factory _StacCustomScrollView.fromJson(Map json) = - _$StacCustomScrollViewImpl.fromJson; - - @override - List> get slivers; - @override - Axis get scrollDirection; - @override - bool get reverse; - @override - bool? get primary; - @override - StacScrollPhysics? get physics; - @override - bool get shrinkWrap; - @override - double get anchor; - @override - double? get cacheExtent; - @override - int? get semanticChildCount; - @override - DragStartBehavior get dragStartBehavior; - @override - ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; - @override - String? get restorationId; - @override - Clip get clipBehavior; - @override - HitTestBehavior get hitTestBehavior; + final _StacCustomScrollView _self; + final $Res Function(_StacCustomScrollView) _then; /// Create a copy of StacCustomScrollView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCustomScrollViewImplCopyWith<_$StacCustomScrollViewImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? slivers = null, + Object? scrollDirection = null, + Object? reverse = null, + Object? primary = freezed, + Object? physics = freezed, + Object? shrinkWrap = null, + Object? anchor = null, + Object? cacheExtent = freezed, + Object? semanticChildCount = freezed, + Object? dragStartBehavior = null, + Object? keyboardDismissBehavior = null, + Object? restorationId = freezed, + Object? clipBehavior = null, + Object? hitTestBehavior = null, + }) { + return _then(_StacCustomScrollView( + slivers: null == slivers + ? _self._slivers + : slivers // ignore: cast_nullable_to_non_nullable + as List>, + scrollDirection: null == scrollDirection + ? _self.scrollDirection + : scrollDirection // ignore: cast_nullable_to_non_nullable + as Axis, + reverse: null == reverse + ? _self.reverse + : reverse // ignore: cast_nullable_to_non_nullable + as bool, + primary: freezed == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as bool?, + physics: freezed == physics + ? _self.physics + : physics // ignore: cast_nullable_to_non_nullable + as StacScrollPhysics?, + shrinkWrap: null == shrinkWrap + ? _self.shrinkWrap + : shrinkWrap // ignore: cast_nullable_to_non_nullable + as bool, + anchor: null == anchor + ? _self.anchor + : anchor // ignore: cast_nullable_to_non_nullable + as double, + cacheExtent: freezed == cacheExtent + ? _self.cacheExtent + : cacheExtent // ignore: cast_nullable_to_non_nullable + as double?, + semanticChildCount: freezed == semanticChildCount + ? _self.semanticChildCount + : semanticChildCount // ignore: cast_nullable_to_non_nullable + as int?, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + keyboardDismissBehavior: null == keyboardDismissBehavior + ? _self.keyboardDismissBehavior + : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable + as ScrollViewKeyboardDismissBehavior, + restorationId: freezed == restorationId + ? _self.restorationId + : restorationId // ignore: cast_nullable_to_non_nullable + as String?, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + hitTestBehavior: null == hitTestBehavior + ? _self.hitTestBehavior + : hitTestBehavior // ignore: cast_nullable_to_non_nullable + as HitTestBehavior, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.g.dart b/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.g.dart index 119f5315..d2e17d23 100644 --- a/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_custom_scroll_view/stac_custom_scroll_view.g.dart @@ -6,9 +6,9 @@ part of 'stac_custom_scroll_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCustomScrollViewImpl _$$StacCustomScrollViewImplFromJson( +_StacCustomScrollView _$StacCustomScrollViewFromJson( Map json) => - _$StacCustomScrollViewImpl( + _StacCustomScrollView( slivers: (json['slivers'] as List?) ?.map((e) => e as Map) .toList() ?? @@ -38,8 +38,8 @@ _$StacCustomScrollViewImpl _$$StacCustomScrollViewImplFromJson( HitTestBehavior.opaque, ); -Map _$$StacCustomScrollViewImplToJson( - _$StacCustomScrollViewImpl instance) => +Map _$StacCustomScrollViewToJson( + _StacCustomScrollView instance) => { 'slivers': instance.slivers, 'scrollDirection': _$AxisEnumMap[instance.scrollDirection]!, diff --git a/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.dart b/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.dart index 78ec8381..c1690dce 100644 --- a/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.dart +++ b/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.dart @@ -11,7 +11,7 @@ part 'stac_decoration_image.g.dart'; enum StacDecorationImageType { file, network, asset } @freezed -class StacDecorationImage with _$StacDecorationImage { +abstract class StacDecorationImage with _$StacDecorationImage { const factory StacDecorationImage({ required String src, BoxFit? fit, diff --git a/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.freezed.dart b/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.freezed.dart index a46a022d..ed744b44 100644 --- a/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,45 +10,89 @@ part of 'stac_decoration_image.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacDecorationImage _$StacDecorationImageFromJson(Map json) { - return _StacDecorationImage.fromJson(json); -} - /// @nodoc mixin _$StacDecorationImage { - String get src => throw _privateConstructorUsedError; - BoxFit? get fit => throw _privateConstructorUsedError; - StacDecorationImageType get imageType => throw _privateConstructorUsedError; - StacAlignment get alignment => throw _privateConstructorUsedError; - StacRect? get centerSlice => throw _privateConstructorUsedError; - ImageRepeat get repeat => throw _privateConstructorUsedError; - bool get matchTextDirection => throw _privateConstructorUsedError; - double get scale => throw _privateConstructorUsedError; - double get opacity => throw _privateConstructorUsedError; - FilterQuality get filterQuality => throw _privateConstructorUsedError; - bool get invertColors => throw _privateConstructorUsedError; - bool get isAntiAlias => throw _privateConstructorUsedError; - - /// Serializes this StacDecorationImage to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get src; + BoxFit? get fit; + StacDecorationImageType get imageType; + StacAlignment get alignment; + StacRect? get centerSlice; + ImageRepeat get repeat; + bool get matchTextDirection; + double get scale; + double get opacity; + FilterQuality get filterQuality; + bool get invertColors; + bool get isAntiAlias; /// Create a copy of StacDecorationImage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacDecorationImageCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacDecorationImageCopyWithImpl( + this as StacDecorationImage, _$identity); + + /// Serializes this StacDecorationImage to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacDecorationImage && + (identical(other.src, src) || other.src == src) && + (identical(other.fit, fit) || other.fit == fit) && + (identical(other.imageType, imageType) || + other.imageType == imageType) && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.centerSlice, centerSlice) || + other.centerSlice == centerSlice) && + (identical(other.repeat, repeat) || other.repeat == repeat) && + (identical(other.matchTextDirection, matchTextDirection) || + other.matchTextDirection == matchTextDirection) && + (identical(other.scale, scale) || other.scale == scale) && + (identical(other.opacity, opacity) || other.opacity == opacity) && + (identical(other.filterQuality, filterQuality) || + other.filterQuality == filterQuality) && + (identical(other.invertColors, invertColors) || + other.invertColors == invertColors) && + (identical(other.isAntiAlias, isAntiAlias) || + other.isAntiAlias == isAntiAlias)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + src, + fit, + imageType, + alignment, + centerSlice, + repeat, + matchTextDirection, + scale, + opacity, + filterQuality, + invertColors, + isAntiAlias); + + @override + String toString() { + return 'StacDecorationImage(src: $src, fit: $fit, imageType: $imageType, alignment: $alignment, centerSlice: $centerSlice, repeat: $repeat, matchTextDirection: $matchTextDirection, scale: $scale, opacity: $opacity, filterQuality: $filterQuality, invertColors: $invertColors, isAntiAlias: $isAntiAlias)'; + } } /// @nodoc -abstract class $StacDecorationImageCopyWith<$Res> { +abstract mixin class $StacDecorationImageCopyWith<$Res> { factory $StacDecorationImageCopyWith( - StacDecorationImage value, $Res Function(StacDecorationImage) then) = - _$StacDecorationImageCopyWithImpl<$Res, StacDecorationImage>; + StacDecorationImage value, $Res Function(StacDecorationImage) _then) = + _$StacDecorationImageCopyWithImpl; @useResult $Res call( {String src, @@ -67,14 +112,12 @@ abstract class $StacDecorationImageCopyWith<$Res> { } /// @nodoc -class _$StacDecorationImageCopyWithImpl<$Res, $Val extends StacDecorationImage> +class _$StacDecorationImageCopyWithImpl<$Res> implements $StacDecorationImageCopyWith<$Res> { - _$StacDecorationImageCopyWithImpl(this._value, this._then); + _$StacDecorationImageCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacDecorationImage _self; + final $Res Function(StacDecorationImage) _then; /// Create a copy of StacDecorationImage /// with the given fields replaced by the non-null parameter values. @@ -94,56 +137,56 @@ class _$StacDecorationImageCopyWithImpl<$Res, $Val extends StacDecorationImage> Object? invertColors = null, Object? isAntiAlias = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( src: null == src - ? _value.src + ? _self.src : src // ignore: cast_nullable_to_non_nullable as String, fit: freezed == fit - ? _value.fit + ? _self.fit : fit // ignore: cast_nullable_to_non_nullable as BoxFit?, imageType: null == imageType - ? _value.imageType + ? _self.imageType : imageType // ignore: cast_nullable_to_non_nullable as StacDecorationImageType, alignment: null == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignment, centerSlice: freezed == centerSlice - ? _value.centerSlice + ? _self.centerSlice : centerSlice // ignore: cast_nullable_to_non_nullable as StacRect?, repeat: null == repeat - ? _value.repeat + ? _self.repeat : repeat // ignore: cast_nullable_to_non_nullable as ImageRepeat, matchTextDirection: null == matchTextDirection - ? _value.matchTextDirection + ? _self.matchTextDirection : matchTextDirection // ignore: cast_nullable_to_non_nullable as bool, scale: null == scale - ? _value.scale + ? _self.scale : scale // ignore: cast_nullable_to_non_nullable as double, opacity: null == opacity - ? _value.opacity + ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable as double, filterQuality: null == filterQuality - ? _value.filterQuality + ? _self.filterQuality : filterQuality // ignore: cast_nullable_to_non_nullable as FilterQuality, invertColors: null == invertColors - ? _value.invertColors + ? _self.invertColors : invertColors // ignore: cast_nullable_to_non_nullable as bool, isAntiAlias: null == isAntiAlias - ? _value.isAntiAlias + ? _self.isAntiAlias : isAntiAlias // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of StacDecorationImage @@ -151,125 +194,20 @@ class _$StacDecorationImageCopyWithImpl<$Res, $Val extends StacDecorationImage> @override @pragma('vm:prefer-inline') $StacRectCopyWith<$Res>? get centerSlice { - if (_value.centerSlice == null) { + if (_self.centerSlice == null) { return null; } - return $StacRectCopyWith<$Res>(_value.centerSlice!, (value) { - return _then(_value.copyWith(centerSlice: value) as $Val); + return $StacRectCopyWith<$Res>(_self.centerSlice!, (value) { + return _then(_self.copyWith(centerSlice: value)); }); } } -/// @nodoc -abstract class _$$StacDecorationImageImplCopyWith<$Res> - implements $StacDecorationImageCopyWith<$Res> { - factory _$$StacDecorationImageImplCopyWith(_$StacDecorationImageImpl value, - $Res Function(_$StacDecorationImageImpl) then) = - __$$StacDecorationImageImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String src, - BoxFit? fit, - StacDecorationImageType imageType, - StacAlignment alignment, - StacRect? centerSlice, - ImageRepeat repeat, - bool matchTextDirection, - double scale, - double opacity, - FilterQuality filterQuality, - bool invertColors, - bool isAntiAlias}); - - @override - $StacRectCopyWith<$Res>? get centerSlice; -} - -/// @nodoc -class __$$StacDecorationImageImplCopyWithImpl<$Res> - extends _$StacDecorationImageCopyWithImpl<$Res, _$StacDecorationImageImpl> - implements _$$StacDecorationImageImplCopyWith<$Res> { - __$$StacDecorationImageImplCopyWithImpl(_$StacDecorationImageImpl _value, - $Res Function(_$StacDecorationImageImpl) _then) - : super(_value, _then); - - /// Create a copy of StacDecorationImage - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? src = null, - Object? fit = freezed, - Object? imageType = null, - Object? alignment = null, - Object? centerSlice = freezed, - Object? repeat = null, - Object? matchTextDirection = null, - Object? scale = null, - Object? opacity = null, - Object? filterQuality = null, - Object? invertColors = null, - Object? isAntiAlias = null, - }) { - return _then(_$StacDecorationImageImpl( - src: null == src - ? _value.src - : src // ignore: cast_nullable_to_non_nullable - as String, - fit: freezed == fit - ? _value.fit - : fit // ignore: cast_nullable_to_non_nullable - as BoxFit?, - imageType: null == imageType - ? _value.imageType - : imageType // ignore: cast_nullable_to_non_nullable - as StacDecorationImageType, - alignment: null == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignment, - centerSlice: freezed == centerSlice - ? _value.centerSlice - : centerSlice // ignore: cast_nullable_to_non_nullable - as StacRect?, - repeat: null == repeat - ? _value.repeat - : repeat // ignore: cast_nullable_to_non_nullable - as ImageRepeat, - matchTextDirection: null == matchTextDirection - ? _value.matchTextDirection - : matchTextDirection // ignore: cast_nullable_to_non_nullable - as bool, - scale: null == scale - ? _value.scale - : scale // ignore: cast_nullable_to_non_nullable - as double, - opacity: null == opacity - ? _value.opacity - : opacity // ignore: cast_nullable_to_non_nullable - as double, - filterQuality: null == filterQuality - ? _value.filterQuality - : filterQuality // ignore: cast_nullable_to_non_nullable - as FilterQuality, - invertColors: null == invertColors - ? _value.invertColors - : invertColors // ignore: cast_nullable_to_non_nullable - as bool, - isAntiAlias: null == isAntiAlias - ? _value.isAntiAlias - : isAntiAlias // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacDecorationImageImpl implements _StacDecorationImage { - const _$StacDecorationImageImpl( +class _StacDecorationImage implements StacDecorationImage { + const _StacDecorationImage( {required this.src, this.fit, this.imageType = StacDecorationImageType.network, @@ -282,9 +220,8 @@ class _$StacDecorationImageImpl implements _StacDecorationImage { this.filterQuality = FilterQuality.low, this.invertColors = false, this.isAntiAlias = false}); - - factory _$StacDecorationImageImpl.fromJson(Map json) => - _$$StacDecorationImageImplFromJson(json); + factory _StacDecorationImage.fromJson(Map json) => + _$StacDecorationImageFromJson(json); @override final String src; @@ -320,16 +257,27 @@ class _$StacDecorationImageImpl implements _StacDecorationImage { @JsonKey() final bool isAntiAlias; + /// Create a copy of StacDecorationImage + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacDecorationImage(src: $src, fit: $fit, imageType: $imageType, alignment: $alignment, centerSlice: $centerSlice, repeat: $repeat, matchTextDirection: $matchTextDirection, scale: $scale, opacity: $opacity, filterQuality: $filterQuality, invertColors: $invertColors, isAntiAlias: $isAntiAlias)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacDecorationImageCopyWith<_StacDecorationImage> get copyWith => + __$StacDecorationImageCopyWithImpl<_StacDecorationImage>( + this, _$identity); + + @override + Map toJson() { + return _$StacDecorationImageToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacDecorationImageImpl && + other is _StacDecorationImage && (identical(other.src, src) || other.src == src) && (identical(other.fit, fit) || other.fit == fit) && (identical(other.imageType, imageType) || @@ -368,70 +316,129 @@ class _$StacDecorationImageImpl implements _StacDecorationImage { invertColors, isAntiAlias); - /// Create a copy of StacDecorationImage - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacDecorationImageImplCopyWith<_$StacDecorationImageImpl> get copyWith => - __$$StacDecorationImageImplCopyWithImpl<_$StacDecorationImageImpl>( - this, _$identity); + String toString() { + return 'StacDecorationImage(src: $src, fit: $fit, imageType: $imageType, alignment: $alignment, centerSlice: $centerSlice, repeat: $repeat, matchTextDirection: $matchTextDirection, scale: $scale, opacity: $opacity, filterQuality: $filterQuality, invertColors: $invertColors, isAntiAlias: $isAntiAlias)'; + } +} +/// @nodoc +abstract mixin class _$StacDecorationImageCopyWith<$Res> + implements $StacDecorationImageCopyWith<$Res> { + factory _$StacDecorationImageCopyWith(_StacDecorationImage value, + $Res Function(_StacDecorationImage) _then) = + __$StacDecorationImageCopyWithImpl; @override - Map toJson() { - return _$$StacDecorationImageImplToJson( - this, - ); - } + @useResult + $Res call( + {String src, + BoxFit? fit, + StacDecorationImageType imageType, + StacAlignment alignment, + StacRect? centerSlice, + ImageRepeat repeat, + bool matchTextDirection, + double scale, + double opacity, + FilterQuality filterQuality, + bool invertColors, + bool isAntiAlias}); + + @override + $StacRectCopyWith<$Res>? get centerSlice; } -abstract class _StacDecorationImage implements StacDecorationImage { - const factory _StacDecorationImage( - {required final String src, - final BoxFit? fit, - final StacDecorationImageType imageType, - final StacAlignment alignment, - final StacRect? centerSlice, - final ImageRepeat repeat, - final bool matchTextDirection, - final double scale, - final double opacity, - final FilterQuality filterQuality, - final bool invertColors, - final bool isAntiAlias}) = _$StacDecorationImageImpl; +/// @nodoc +class __$StacDecorationImageCopyWithImpl<$Res> + implements _$StacDecorationImageCopyWith<$Res> { + __$StacDecorationImageCopyWithImpl(this._self, this._then); - factory _StacDecorationImage.fromJson(Map json) = - _$StacDecorationImageImpl.fromJson; + final _StacDecorationImage _self; + final $Res Function(_StacDecorationImage) _then; + /// Create a copy of StacDecorationImage + /// with the given fields replaced by the non-null parameter values. @override - String get src; - @override - BoxFit? get fit; - @override - StacDecorationImageType get imageType; - @override - StacAlignment get alignment; - @override - StacRect? get centerSlice; - @override - ImageRepeat get repeat; - @override - bool get matchTextDirection; - @override - double get scale; - @override - double get opacity; - @override - FilterQuality get filterQuality; - @override - bool get invertColors; - @override - bool get isAntiAlias; + @pragma('vm:prefer-inline') + $Res call({ + Object? src = null, + Object? fit = freezed, + Object? imageType = null, + Object? alignment = null, + Object? centerSlice = freezed, + Object? repeat = null, + Object? matchTextDirection = null, + Object? scale = null, + Object? opacity = null, + Object? filterQuality = null, + Object? invertColors = null, + Object? isAntiAlias = null, + }) { + return _then(_StacDecorationImage( + src: null == src + ? _self.src + : src // ignore: cast_nullable_to_non_nullable + as String, + fit: freezed == fit + ? _self.fit + : fit // ignore: cast_nullable_to_non_nullable + as BoxFit?, + imageType: null == imageType + ? _self.imageType + : imageType // ignore: cast_nullable_to_non_nullable + as StacDecorationImageType, + alignment: null == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignment, + centerSlice: freezed == centerSlice + ? _self.centerSlice + : centerSlice // ignore: cast_nullable_to_non_nullable + as StacRect?, + repeat: null == repeat + ? _self.repeat + : repeat // ignore: cast_nullable_to_non_nullable + as ImageRepeat, + matchTextDirection: null == matchTextDirection + ? _self.matchTextDirection + : matchTextDirection // ignore: cast_nullable_to_non_nullable + as bool, + scale: null == scale + ? _self.scale + : scale // ignore: cast_nullable_to_non_nullable + as double, + opacity: null == opacity + ? _self.opacity + : opacity // ignore: cast_nullable_to_non_nullable + as double, + filterQuality: null == filterQuality + ? _self.filterQuality + : filterQuality // ignore: cast_nullable_to_non_nullable + as FilterQuality, + invertColors: null == invertColors + ? _self.invertColors + : invertColors // ignore: cast_nullable_to_non_nullable + as bool, + isAntiAlias: null == isAntiAlias + ? _self.isAntiAlias + : isAntiAlias // ignore: cast_nullable_to_non_nullable + as bool, + )); + } /// Create a copy of StacDecorationImage /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacDecorationImageImplCopyWith<_$StacDecorationImageImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacRectCopyWith<$Res>? get centerSlice { + if (_self.centerSlice == null) { + return null; + } + + return $StacRectCopyWith<$Res>(_self.centerSlice!, (value) { + return _then(_self.copyWith(centerSlice: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.g.dart b/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.g.dart index 5f596ad7..c7f8d58b 100644 --- a/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.g.dart +++ b/packages/stac/lib/src/parsers/stac_decoration_image/stac_decoration_image.g.dart @@ -6,9 +6,8 @@ part of 'stac_decoration_image.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacDecorationImageImpl _$$StacDecorationImageImplFromJson( - Map json) => - _$StacDecorationImageImpl( +_StacDecorationImage _$StacDecorationImageFromJson(Map json) => + _StacDecorationImage( src: json['src'] as String, fit: $enumDecodeNullable(_$BoxFitEnumMap, json['fit']), imageType: $enumDecodeNullable( @@ -32,8 +31,8 @@ _$StacDecorationImageImpl _$$StacDecorationImageImplFromJson( isAntiAlias: json['isAntiAlias'] as bool? ?? false, ); -Map _$$StacDecorationImageImplToJson( - _$StacDecorationImageImpl instance) => +Map _$StacDecorationImageToJson( + _StacDecorationImage instance) => { 'src': instance.src, 'fit': _$BoxFitEnumMap[instance.fit], diff --git a/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.dart b/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.dart index ae6687c0..54359aa3 100644 --- a/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.dart +++ b/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.dart @@ -6,7 +6,7 @@ part 'stac_default_bottom_navigation_controller.freezed.dart'; part 'stac_default_bottom_navigation_controller.g.dart'; @freezed -class StacDefaultBottomNavigationController +abstract class StacDefaultBottomNavigationController with _$StacDefaultBottomNavigationController { const factory StacDefaultBottomNavigationController({ required int length, diff --git a/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.freezed.dart b/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.freezed.dart index 4781604b..4389a4d4 100644 --- a/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,102 +10,67 @@ part of 'stac_default_bottom_navigation_controller.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacDefaultBottomNavigationController - _$StacDefaultBottomNavigationControllerFromJson(Map json) { - return _StacDefaultBottomNavigationController.fromJson(json); -} - /// @nodoc mixin _$StacDefaultBottomNavigationController { - int get length => throw _privateConstructorUsedError; - int? get initialIndex => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - - /// Serializes this StacDefaultBottomNavigationController to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get length; + int? get initialIndex; + Map get child; /// Create a copy of StacDefaultBottomNavigationController /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacDefaultBottomNavigationControllerCopyWith< StacDefaultBottomNavigationController> - get copyWith => throw _privateConstructorUsedError; -} + get copyWith => _$StacDefaultBottomNavigationControllerCopyWithImpl< + StacDefaultBottomNavigationController>( + this as StacDefaultBottomNavigationController, _$identity); -/// @nodoc -abstract class $StacDefaultBottomNavigationControllerCopyWith<$Res> { - factory $StacDefaultBottomNavigationControllerCopyWith( - StacDefaultBottomNavigationController value, - $Res Function(StacDefaultBottomNavigationController) then) = - _$StacDefaultBottomNavigationControllerCopyWithImpl<$Res, - StacDefaultBottomNavigationController>; - @useResult - $Res call({int length, int? initialIndex, Map child}); -} + /// Serializes this StacDefaultBottomNavigationController to a JSON map. + Map toJson(); -/// @nodoc -class _$StacDefaultBottomNavigationControllerCopyWithImpl<$Res, - $Val extends StacDefaultBottomNavigationController> - implements $StacDefaultBottomNavigationControllerCopyWith<$Res> { - _$StacDefaultBottomNavigationControllerCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacDefaultBottomNavigationController && + (identical(other.length, length) || other.length == length) && + (identical(other.initialIndex, initialIndex) || + other.initialIndex == initialIndex) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, length, initialIndex, + const DeepCollectionEquality().hash(child)); - /// Create a copy of StacDefaultBottomNavigationController - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? length = null, - Object? initialIndex = freezed, - Object? child = null, - }) { - return _then(_value.copyWith( - length: null == length - ? _value.length - : length // ignore: cast_nullable_to_non_nullable - as int, - initialIndex: freezed == initialIndex - ? _value.initialIndex - : initialIndex // ignore: cast_nullable_to_non_nullable - as int?, - child: null == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + String toString() { + return 'StacDefaultBottomNavigationController(length: $length, initialIndex: $initialIndex, child: $child)'; } } /// @nodoc -abstract class _$$StacDefaultBottomNavigationControllerImplCopyWith<$Res> - implements $StacDefaultBottomNavigationControllerCopyWith<$Res> { - factory _$$StacDefaultBottomNavigationControllerImplCopyWith( - _$StacDefaultBottomNavigationControllerImpl value, - $Res Function(_$StacDefaultBottomNavigationControllerImpl) then) = - __$$StacDefaultBottomNavigationControllerImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacDefaultBottomNavigationControllerCopyWith<$Res> { + factory $StacDefaultBottomNavigationControllerCopyWith( + StacDefaultBottomNavigationController value, + $Res Function(StacDefaultBottomNavigationController) _then) = + _$StacDefaultBottomNavigationControllerCopyWithImpl; @useResult $Res call({int length, int? initialIndex, Map child}); } /// @nodoc -class __$$StacDefaultBottomNavigationControllerImplCopyWithImpl<$Res> - extends _$StacDefaultBottomNavigationControllerCopyWithImpl<$Res, - _$StacDefaultBottomNavigationControllerImpl> - implements _$$StacDefaultBottomNavigationControllerImplCopyWith<$Res> { - __$$StacDefaultBottomNavigationControllerImplCopyWithImpl( - _$StacDefaultBottomNavigationControllerImpl _value, - $Res Function(_$StacDefaultBottomNavigationControllerImpl) _then) - : super(_value, _then); +class _$StacDefaultBottomNavigationControllerCopyWithImpl<$Res> + implements $StacDefaultBottomNavigationControllerCopyWith<$Res> { + _$StacDefaultBottomNavigationControllerCopyWithImpl(this._self, this._then); + + final StacDefaultBottomNavigationController _self; + final $Res Function(StacDefaultBottomNavigationController) _then; /// Create a copy of StacDefaultBottomNavigationController /// with the given fields replaced by the non-null parameter values. @@ -115,17 +81,17 @@ class __$$StacDefaultBottomNavigationControllerImplCopyWithImpl<$Res> Object? initialIndex = freezed, Object? child = null, }) { - return _then(_$StacDefaultBottomNavigationControllerImpl( + return _then(_self.copyWith( length: null == length - ? _value.length + ? _self.length : length // ignore: cast_nullable_to_non_nullable as int, initialIndex: freezed == initialIndex - ? _value.initialIndex + ? _self.initialIndex : initialIndex // ignore: cast_nullable_to_non_nullable as int?, child: null == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, )); @@ -134,17 +100,16 @@ class __$$StacDefaultBottomNavigationControllerImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacDefaultBottomNavigationControllerImpl - implements _StacDefaultBottomNavigationController { - const _$StacDefaultBottomNavigationControllerImpl( +class _StacDefaultBottomNavigationController + implements StacDefaultBottomNavigationController { + const _StacDefaultBottomNavigationController( {required this.length, this.initialIndex, required final Map child}) : _child = child; - - factory _$StacDefaultBottomNavigationControllerImpl.fromJson( + factory _StacDefaultBottomNavigationController.fromJson( Map json) => - _$$StacDefaultBottomNavigationControllerImplFromJson(json); + _$StacDefaultBottomNavigationControllerFromJson(json); @override final int length; @@ -158,16 +123,28 @@ class _$StacDefaultBottomNavigationControllerImpl return EqualUnmodifiableMapView(_child); } + /// Create a copy of StacDefaultBottomNavigationController + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacDefaultBottomNavigationController(length: $length, initialIndex: $initialIndex, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacDefaultBottomNavigationControllerCopyWith< + _StacDefaultBottomNavigationController> + get copyWith => __$StacDefaultBottomNavigationControllerCopyWithImpl< + _StacDefaultBottomNavigationController>(this, _$identity); + + @override + Map toJson() { + return _$StacDefaultBottomNavigationControllerToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacDefaultBottomNavigationControllerImpl && + other is _StacDefaultBottomNavigationController && (identical(other.length, length) || other.length == length) && (identical(other.initialIndex, initialIndex) || other.initialIndex == initialIndex) && @@ -179,48 +156,56 @@ class _$StacDefaultBottomNavigationControllerImpl int get hashCode => Object.hash(runtimeType, length, initialIndex, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacDefaultBottomNavigationController - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacDefaultBottomNavigationControllerImplCopyWith< - _$StacDefaultBottomNavigationControllerImpl> - get copyWith => __$$StacDefaultBottomNavigationControllerImplCopyWithImpl< - _$StacDefaultBottomNavigationControllerImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacDefaultBottomNavigationControllerImplToJson( - this, - ); + String toString() { + return 'StacDefaultBottomNavigationController(length: $length, initialIndex: $initialIndex, child: $child)'; } } -abstract class _StacDefaultBottomNavigationController - implements StacDefaultBottomNavigationController { - const factory _StacDefaultBottomNavigationController( - {required final int length, - final int? initialIndex, - required final Map child}) = - _$StacDefaultBottomNavigationControllerImpl; +/// @nodoc +abstract mixin class _$StacDefaultBottomNavigationControllerCopyWith<$Res> + implements $StacDefaultBottomNavigationControllerCopyWith<$Res> { + factory _$StacDefaultBottomNavigationControllerCopyWith( + _StacDefaultBottomNavigationController value, + $Res Function(_StacDefaultBottomNavigationController) _then) = + __$StacDefaultBottomNavigationControllerCopyWithImpl; + @override + @useResult + $Res call({int length, int? initialIndex, Map child}); +} - factory _StacDefaultBottomNavigationController.fromJson( - Map json) = - _$StacDefaultBottomNavigationControllerImpl.fromJson; +/// @nodoc +class __$StacDefaultBottomNavigationControllerCopyWithImpl<$Res> + implements _$StacDefaultBottomNavigationControllerCopyWith<$Res> { + __$StacDefaultBottomNavigationControllerCopyWithImpl(this._self, this._then); - @override - int get length; - @override - int? get initialIndex; - @override - Map get child; + final _StacDefaultBottomNavigationController _self; + final $Res Function(_StacDefaultBottomNavigationController) _then; /// Create a copy of StacDefaultBottomNavigationController /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacDefaultBottomNavigationControllerImplCopyWith< - _$StacDefaultBottomNavigationControllerImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? length = null, + Object? initialIndex = freezed, + Object? child = null, + }) { + return _then(_StacDefaultBottomNavigationController( + length: null == length + ? _self.length + : length // ignore: cast_nullable_to_non_nullable + as int, + initialIndex: freezed == initialIndex + ? _self.initialIndex + : initialIndex // ignore: cast_nullable_to_non_nullable + as int?, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.g.dart b/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.g.dart index 769cd76d..940d86cb 100644 --- a/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.g.dart +++ b/packages/stac/lib/src/parsers/stac_default_bottom_navigation_controller/stac_default_bottom_navigation_controller.g.dart @@ -6,17 +6,17 @@ part of 'stac_default_bottom_navigation_controller.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacDefaultBottomNavigationControllerImpl - _$$StacDefaultBottomNavigationControllerImplFromJson( +_StacDefaultBottomNavigationController + _$StacDefaultBottomNavigationControllerFromJson( Map json) => - _$StacDefaultBottomNavigationControllerImpl( + _StacDefaultBottomNavigationController( length: (json['length'] as num).toInt(), initialIndex: (json['initialIndex'] as num?)?.toInt(), child: json['child'] as Map, ); -Map _$$StacDefaultBottomNavigationControllerImplToJson( - _$StacDefaultBottomNavigationControllerImpl instance) => +Map _$StacDefaultBottomNavigationControllerToJson( + _StacDefaultBottomNavigationController instance) => { 'length': instance.length, 'initialIndex': instance.initialIndex, diff --git a/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.dart b/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.dart index c375dc0f..3e27e8bb 100644 --- a/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.dart +++ b/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.dart @@ -6,7 +6,7 @@ part 'stac_default_tab_controller.freezed.dart'; part 'stac_default_tab_controller.g.dart'; @freezed -class StacDefaultTabController with _$StacDefaultTabController { +abstract class StacDefaultTabController with _$StacDefaultTabController { const factory StacDefaultTabController({ required int length, @Default(0) int initialIndex, diff --git a/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.freezed.dart b/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.freezed.dart index da5ac140..bc6ffdcf 100644 --- a/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,99 +10,64 @@ part of 'stac_default_tab_controller.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacDefaultTabController _$StacDefaultTabControllerFromJson( - Map json) { - return _StacDefaultTabController.fromJson(json); -} - /// @nodoc mixin _$StacDefaultTabController { - int get length => throw _privateConstructorUsedError; - int get initialIndex => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - - /// Serializes this StacDefaultTabController to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get length; + int get initialIndex; + Map get child; /// Create a copy of StacDefaultTabController /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacDefaultTabControllerCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacDefaultTabControllerCopyWithImpl( + this as StacDefaultTabController, _$identity); -/// @nodoc -abstract class $StacDefaultTabControllerCopyWith<$Res> { - factory $StacDefaultTabControllerCopyWith(StacDefaultTabController value, - $Res Function(StacDefaultTabController) then) = - _$StacDefaultTabControllerCopyWithImpl<$Res, StacDefaultTabController>; - @useResult - $Res call({int length, int initialIndex, Map child}); -} + /// Serializes this StacDefaultTabController to a JSON map. + Map toJson(); -/// @nodoc -class _$StacDefaultTabControllerCopyWithImpl<$Res, - $Val extends StacDefaultTabController> - implements $StacDefaultTabControllerCopyWith<$Res> { - _$StacDefaultTabControllerCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacDefaultTabController && + (identical(other.length, length) || other.length == length) && + (identical(other.initialIndex, initialIndex) || + other.initialIndex == initialIndex) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, length, initialIndex, + const DeepCollectionEquality().hash(child)); - /// Create a copy of StacDefaultTabController - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? length = null, - Object? initialIndex = null, - Object? child = null, - }) { - return _then(_value.copyWith( - length: null == length - ? _value.length - : length // ignore: cast_nullable_to_non_nullable - as int, - initialIndex: null == initialIndex - ? _value.initialIndex - : initialIndex // ignore: cast_nullable_to_non_nullable - as int, - child: null == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + String toString() { + return 'StacDefaultTabController(length: $length, initialIndex: $initialIndex, child: $child)'; } } /// @nodoc -abstract class _$$StacDefaultTabControllerImplCopyWith<$Res> - implements $StacDefaultTabControllerCopyWith<$Res> { - factory _$$StacDefaultTabControllerImplCopyWith( - _$StacDefaultTabControllerImpl value, - $Res Function(_$StacDefaultTabControllerImpl) then) = - __$$StacDefaultTabControllerImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacDefaultTabControllerCopyWith<$Res> { + factory $StacDefaultTabControllerCopyWith(StacDefaultTabController value, + $Res Function(StacDefaultTabController) _then) = + _$StacDefaultTabControllerCopyWithImpl; @useResult $Res call({int length, int initialIndex, Map child}); } /// @nodoc -class __$$StacDefaultTabControllerImplCopyWithImpl<$Res> - extends _$StacDefaultTabControllerCopyWithImpl<$Res, - _$StacDefaultTabControllerImpl> - implements _$$StacDefaultTabControllerImplCopyWith<$Res> { - __$$StacDefaultTabControllerImplCopyWithImpl( - _$StacDefaultTabControllerImpl _value, - $Res Function(_$StacDefaultTabControllerImpl) _then) - : super(_value, _then); +class _$StacDefaultTabControllerCopyWithImpl<$Res> + implements $StacDefaultTabControllerCopyWith<$Res> { + _$StacDefaultTabControllerCopyWithImpl(this._self, this._then); + + final StacDefaultTabController _self; + final $Res Function(StacDefaultTabController) _then; /// Create a copy of StacDefaultTabController /// with the given fields replaced by the non-null parameter values. @@ -112,17 +78,17 @@ class __$$StacDefaultTabControllerImplCopyWithImpl<$Res> Object? initialIndex = null, Object? child = null, }) { - return _then(_$StacDefaultTabControllerImpl( + return _then(_self.copyWith( length: null == length - ? _value.length + ? _self.length : length // ignore: cast_nullable_to_non_nullable as int, initialIndex: null == initialIndex - ? _value.initialIndex + ? _self.initialIndex : initialIndex // ignore: cast_nullable_to_non_nullable as int, child: null == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, )); @@ -131,15 +97,14 @@ class __$$StacDefaultTabControllerImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacDefaultTabControllerImpl implements _StacDefaultTabController { - const _$StacDefaultTabControllerImpl( +class _StacDefaultTabController implements StacDefaultTabController { + const _StacDefaultTabController( {required this.length, this.initialIndex = 0, required final Map child}) : _child = child; - - factory _$StacDefaultTabControllerImpl.fromJson(Map json) => - _$$StacDefaultTabControllerImplFromJson(json); + factory _StacDefaultTabController.fromJson(Map json) => + _$StacDefaultTabControllerFromJson(json); @override final int length; @@ -154,16 +119,27 @@ class _$StacDefaultTabControllerImpl implements _StacDefaultTabController { return EqualUnmodifiableMapView(_child); } + /// Create a copy of StacDefaultTabController + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacDefaultTabController(length: $length, initialIndex: $initialIndex, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacDefaultTabControllerCopyWith<_StacDefaultTabController> get copyWith => + __$StacDefaultTabControllerCopyWithImpl<_StacDefaultTabController>( + this, _$identity); + + @override + Map toJson() { + return _$StacDefaultTabControllerToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacDefaultTabControllerImpl && + other is _StacDefaultTabController && (identical(other.length, length) || other.length == length) && (identical(other.initialIndex, initialIndex) || other.initialIndex == initialIndex) && @@ -175,44 +151,55 @@ class _$StacDefaultTabControllerImpl implements _StacDefaultTabController { int get hashCode => Object.hash(runtimeType, length, initialIndex, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacDefaultTabController - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacDefaultTabControllerImplCopyWith<_$StacDefaultTabControllerImpl> - get copyWith => __$$StacDefaultTabControllerImplCopyWithImpl< - _$StacDefaultTabControllerImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacDefaultTabControllerImplToJson( - this, - ); + String toString() { + return 'StacDefaultTabController(length: $length, initialIndex: $initialIndex, child: $child)'; } } -abstract class _StacDefaultTabController implements StacDefaultTabController { - const factory _StacDefaultTabController( - {required final int length, - final int initialIndex, - required final Map child}) = - _$StacDefaultTabControllerImpl; +/// @nodoc +abstract mixin class _$StacDefaultTabControllerCopyWith<$Res> + implements $StacDefaultTabControllerCopyWith<$Res> { + factory _$StacDefaultTabControllerCopyWith(_StacDefaultTabController value, + $Res Function(_StacDefaultTabController) _then) = + __$StacDefaultTabControllerCopyWithImpl; + @override + @useResult + $Res call({int length, int initialIndex, Map child}); +} - factory _StacDefaultTabController.fromJson(Map json) = - _$StacDefaultTabControllerImpl.fromJson; +/// @nodoc +class __$StacDefaultTabControllerCopyWithImpl<$Res> + implements _$StacDefaultTabControllerCopyWith<$Res> { + __$StacDefaultTabControllerCopyWithImpl(this._self, this._then); - @override - int get length; - @override - int get initialIndex; - @override - Map get child; + final _StacDefaultTabController _self; + final $Res Function(_StacDefaultTabController) _then; /// Create a copy of StacDefaultTabController /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacDefaultTabControllerImplCopyWith<_$StacDefaultTabControllerImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? length = null, + Object? initialIndex = null, + Object? child = null, + }) { + return _then(_StacDefaultTabController( + length: null == length + ? _self.length + : length // ignore: cast_nullable_to_non_nullable + as int, + initialIndex: null == initialIndex + ? _self.initialIndex + : initialIndex // ignore: cast_nullable_to_non_nullable + as int, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.g.dart b/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.g.dart index c72baee6..80f0a5cd 100644 --- a/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.g.dart +++ b/packages/stac/lib/src/parsers/stac_default_tab_controller/stac_default_tab_controller.g.dart @@ -6,16 +6,16 @@ part of 'stac_default_tab_controller.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacDefaultTabControllerImpl _$$StacDefaultTabControllerImplFromJson( +_StacDefaultTabController _$StacDefaultTabControllerFromJson( Map json) => - _$StacDefaultTabControllerImpl( + _StacDefaultTabController( length: (json['length'] as num).toInt(), initialIndex: (json['initialIndex'] as num?)?.toInt() ?? 0, child: json['child'] as Map, ); -Map _$$StacDefaultTabControllerImplToJson( - _$StacDefaultTabControllerImpl instance) => +Map _$StacDefaultTabControllerToJson( + _StacDefaultTabController instance) => { 'length': instance.length, 'initialIndex': instance.initialIndex, diff --git a/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.dart b/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.dart index dec8c38a..f55a330c 100644 --- a/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.dart +++ b/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.dart @@ -10,7 +10,7 @@ part 'stac_dialog_theme.freezed.dart'; part 'stac_dialog_theme.g.dart'; @freezed -class StacDialogTheme with _$StacDialogTheme { +abstract class StacDialogTheme with _$StacDialogTheme { const factory StacDialogTheme({ String? backgroundColor, double? elevation, diff --git a/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.freezed.dart b/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.freezed.dart index b2fb4596..914c29c9 100644 --- a/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,43 +10,85 @@ part of 'stac_dialog_theme.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacDialogTheme _$StacDialogThemeFromJson(Map json) { - return _StacDialogTheme.fromJson(json); -} - /// @nodoc mixin _$StacDialogTheme { - String? get backgroundColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - StacBorder? get shape => throw _privateConstructorUsedError; - StacAlignmentGeometry? get alignment => throw _privateConstructorUsedError; - StacTextStyle? get titleTextStyle => throw _privateConstructorUsedError; - StacTextStyle? get contentTextStyle => throw _privateConstructorUsedError; - StacEdgeInsets? get actionsPadding => throw _privateConstructorUsedError; - String? get iconColor => throw _privateConstructorUsedError; - - /// Serializes this StacDialogTheme to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get backgroundColor; + double? get elevation; + String? get shadowColor; + String? get surfaceTintColor; + StacBorder? get shape; + StacAlignmentGeometry? get alignment; + StacTextStyle? get titleTextStyle; + StacTextStyle? get contentTextStyle; + StacEdgeInsets? get actionsPadding; + String? get iconColor; /// Create a copy of StacDialogTheme /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacDialogThemeCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacDialogThemeCopyWithImpl( + this as StacDialogTheme, _$identity); + + /// Serializes this StacDialogTheme to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacDialogTheme && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.titleTextStyle, titleTextStyle) || + other.titleTextStyle == titleTextStyle) && + (identical(other.contentTextStyle, contentTextStyle) || + other.contentTextStyle == contentTextStyle) && + (identical(other.actionsPadding, actionsPadding) || + other.actionsPadding == actionsPadding) && + (identical(other.iconColor, iconColor) || + other.iconColor == iconColor)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + backgroundColor, + elevation, + shadowColor, + surfaceTintColor, + shape, + alignment, + titleTextStyle, + contentTextStyle, + actionsPadding, + iconColor); + + @override + String toString() { + return 'StacDialogTheme(backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, shape: $shape, alignment: $alignment, titleTextStyle: $titleTextStyle, contentTextStyle: $contentTextStyle, actionsPadding: $actionsPadding, iconColor: $iconColor)'; + } } /// @nodoc -abstract class $StacDialogThemeCopyWith<$Res> { +abstract mixin class $StacDialogThemeCopyWith<$Res> { factory $StacDialogThemeCopyWith( - StacDialogTheme value, $Res Function(StacDialogTheme) then) = - _$StacDialogThemeCopyWithImpl<$Res, StacDialogTheme>; + StacDialogTheme value, $Res Function(StacDialogTheme) _then) = + _$StacDialogThemeCopyWithImpl; @useResult $Res call( {String? backgroundColor, @@ -67,14 +110,12 @@ abstract class $StacDialogThemeCopyWith<$Res> { } /// @nodoc -class _$StacDialogThemeCopyWithImpl<$Res, $Val extends StacDialogTheme> +class _$StacDialogThemeCopyWithImpl<$Res> implements $StacDialogThemeCopyWith<$Res> { - _$StacDialogThemeCopyWithImpl(this._value, this._then); + _$StacDialogThemeCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacDialogTheme _self; + final $Res Function(StacDialogTheme) _then; /// Create a copy of StacDialogTheme /// with the given fields replaced by the non-null parameter values. @@ -92,48 +133,48 @@ class _$StacDialogThemeCopyWithImpl<$Res, $Val extends StacDialogTheme> Object? actionsPadding = freezed, Object? iconColor = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacBorder?, alignment: freezed == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignmentGeometry?, titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle + ? _self.titleTextStyle : titleTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, contentTextStyle: freezed == contentTextStyle - ? _value.contentTextStyle + ? _self.contentTextStyle : contentTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, actionsPadding: freezed == actionsPadding - ? _value.actionsPadding + ? _self.actionsPadding : actionsPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, iconColor: freezed == iconColor - ? _value.iconColor + ? _self.iconColor : iconColor // ignore: cast_nullable_to_non_nullable as String?, - ) as $Val); + )); } /// Create a copy of StacDialogTheme @@ -141,12 +182,12 @@ class _$StacDialogThemeCopyWithImpl<$Res, $Val extends StacDialogTheme> @override @pragma('vm:prefer-inline') $StacBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -155,12 +196,12 @@ class _$StacDialogThemeCopyWithImpl<$Res, $Val extends StacDialogTheme> @override @pragma('vm:prefer-inline') $StacAlignmentGeometryCopyWith<$Res>? get alignment { - if (_value.alignment == null) { + if (_self.alignment == null) { return null; } - return $StacAlignmentGeometryCopyWith<$Res>(_value.alignment!, (value) { - return _then(_value.copyWith(alignment: value) as $Val); + return $StacAlignmentGeometryCopyWith<$Res>(_self.alignment!, (value) { + return _then(_self.copyWith(alignment: value)); }); } @@ -169,12 +210,12 @@ class _$StacDialogThemeCopyWithImpl<$Res, $Val extends StacDialogTheme> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get titleTextStyle { - if (_value.titleTextStyle == null) { + if (_self.titleTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.titleTextStyle!, (value) { - return _then(_value.copyWith(titleTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); }); } @@ -183,12 +224,12 @@ class _$StacDialogThemeCopyWithImpl<$Res, $Val extends StacDialogTheme> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get contentTextStyle { - if (_value.contentTextStyle == null) { + if (_self.contentTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.contentTextStyle!, (value) { - return _then(_value.copyWith(contentTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.contentTextStyle!, (value) { + return _then(_self.copyWith(contentTextStyle: value)); }); } @@ -197,22 +238,122 @@ class _$StacDialogThemeCopyWithImpl<$Res, $Val extends StacDialogTheme> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get actionsPadding { - if (_value.actionsPadding == null) { + if (_self.actionsPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.actionsPadding!, (value) { - return _then(_value.copyWith(actionsPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.actionsPadding!, (value) { + return _then(_self.copyWith(actionsPadding: value)); }); } } /// @nodoc -abstract class _$$StacDialogThemeImplCopyWith<$Res> +@JsonSerializable() +class _StacDialogTheme implements StacDialogTheme { + const _StacDialogTheme( + {this.backgroundColor, + this.elevation, + this.shadowColor, + this.surfaceTintColor, + this.shape, + this.alignment, + this.titleTextStyle, + this.contentTextStyle, + this.actionsPadding, + this.iconColor}); + factory _StacDialogTheme.fromJson(Map json) => + _$StacDialogThemeFromJson(json); + + @override + final String? backgroundColor; + @override + final double? elevation; + @override + final String? shadowColor; + @override + final String? surfaceTintColor; + @override + final StacBorder? shape; + @override + final StacAlignmentGeometry? alignment; + @override + final StacTextStyle? titleTextStyle; + @override + final StacTextStyle? contentTextStyle; + @override + final StacEdgeInsets? actionsPadding; + @override + final String? iconColor; + + /// Create a copy of StacDialogTheme + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacDialogThemeCopyWith<_StacDialogTheme> get copyWith => + __$StacDialogThemeCopyWithImpl<_StacDialogTheme>(this, _$identity); + + @override + Map toJson() { + return _$StacDialogThemeToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacDialogTheme && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.titleTextStyle, titleTextStyle) || + other.titleTextStyle == titleTextStyle) && + (identical(other.contentTextStyle, contentTextStyle) || + other.contentTextStyle == contentTextStyle) && + (identical(other.actionsPadding, actionsPadding) || + other.actionsPadding == actionsPadding) && + (identical(other.iconColor, iconColor) || + other.iconColor == iconColor)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + backgroundColor, + elevation, + shadowColor, + surfaceTintColor, + shape, + alignment, + titleTextStyle, + contentTextStyle, + actionsPadding, + iconColor); + + @override + String toString() { + return 'StacDialogTheme(backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, shape: $shape, alignment: $alignment, titleTextStyle: $titleTextStyle, contentTextStyle: $contentTextStyle, actionsPadding: $actionsPadding, iconColor: $iconColor)'; + } +} + +/// @nodoc +abstract mixin class _$StacDialogThemeCopyWith<$Res> implements $StacDialogThemeCopyWith<$Res> { - factory _$$StacDialogThemeImplCopyWith(_$StacDialogThemeImpl value, - $Res Function(_$StacDialogThemeImpl) then) = - __$$StacDialogThemeImplCopyWithImpl<$Res>; + factory _$StacDialogThemeCopyWith( + _StacDialogTheme value, $Res Function(_StacDialogTheme) _then) = + __$StacDialogThemeCopyWithImpl; @override @useResult $Res call( @@ -240,17 +381,17 @@ abstract class _$$StacDialogThemeImplCopyWith<$Res> } /// @nodoc -class __$$StacDialogThemeImplCopyWithImpl<$Res> - extends _$StacDialogThemeCopyWithImpl<$Res, _$StacDialogThemeImpl> - implements _$$StacDialogThemeImplCopyWith<$Res> { - __$$StacDialogThemeImplCopyWithImpl( - _$StacDialogThemeImpl _value, $Res Function(_$StacDialogThemeImpl) _then) - : super(_value, _then); +class __$StacDialogThemeCopyWithImpl<$Res> + implements _$StacDialogThemeCopyWith<$Res> { + __$StacDialogThemeCopyWithImpl(this._self, this._then); + + final _StacDialogTheme _self; + final $Res Function(_StacDialogTheme) _then; /// Create a copy of StacDialogTheme /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ Object? backgroundColor = freezed, Object? elevation = freezed, @@ -263,194 +404,119 @@ class __$$StacDialogThemeImplCopyWithImpl<$Res> Object? actionsPadding = freezed, Object? iconColor = freezed, }) { - return _then(_$StacDialogThemeImpl( + return _then(_StacDialogTheme( backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacBorder?, alignment: freezed == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignmentGeometry?, titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle + ? _self.titleTextStyle : titleTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, contentTextStyle: freezed == contentTextStyle - ? _value.contentTextStyle + ? _self.contentTextStyle : contentTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, actionsPadding: freezed == actionsPadding - ? _value.actionsPadding + ? _self.actionsPadding : actionsPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, iconColor: freezed == iconColor - ? _value.iconColor + ? _self.iconColor : iconColor // ignore: cast_nullable_to_non_nullable as String?, )); } -} -/// @nodoc -@JsonSerializable() -class _$StacDialogThemeImpl implements _StacDialogTheme { - const _$StacDialogThemeImpl( - {this.backgroundColor, - this.elevation, - this.shadowColor, - this.surfaceTintColor, - this.shape, - this.alignment, - this.titleTextStyle, - this.contentTextStyle, - this.actionsPadding, - this.iconColor}); - - factory _$StacDialogThemeImpl.fromJson(Map json) => - _$$StacDialogThemeImplFromJson(json); - - @override - final String? backgroundColor; - @override - final double? elevation; - @override - final String? shadowColor; - @override - final String? surfaceTintColor; - @override - final StacBorder? shape; - @override - final StacAlignmentGeometry? alignment; - @override - final StacTextStyle? titleTextStyle; - @override - final StacTextStyle? contentTextStyle; - @override - final StacEdgeInsets? actionsPadding; + /// Create a copy of StacDialogTheme + /// with the given fields replaced by the non-null parameter values. @override - final String? iconColor; + @pragma('vm:prefer-inline') + $StacBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } - @override - String toString() { - return 'StacDialogTheme(backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, shape: $shape, alignment: $alignment, titleTextStyle: $titleTextStyle, contentTextStyle: $contentTextStyle, actionsPadding: $actionsPadding, iconColor: $iconColor)'; + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); } + /// Create a copy of StacDialogTheme + /// with the given fields replaced by the non-null parameter values. @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacDialogThemeImpl && - (identical(other.backgroundColor, backgroundColor) || - other.backgroundColor == backgroundColor) && - (identical(other.elevation, elevation) || - other.elevation == elevation) && - (identical(other.shadowColor, shadowColor) || - other.shadowColor == shadowColor) && - (identical(other.surfaceTintColor, surfaceTintColor) || - other.surfaceTintColor == surfaceTintColor) && - (identical(other.shape, shape) || other.shape == shape) && - (identical(other.alignment, alignment) || - other.alignment == alignment) && - (identical(other.titleTextStyle, titleTextStyle) || - other.titleTextStyle == titleTextStyle) && - (identical(other.contentTextStyle, contentTextStyle) || - other.contentTextStyle == contentTextStyle) && - (identical(other.actionsPadding, actionsPadding) || - other.actionsPadding == actionsPadding) && - (identical(other.iconColor, iconColor) || - other.iconColor == iconColor)); - } + @pragma('vm:prefer-inline') + $StacAlignmentGeometryCopyWith<$Res>? get alignment { + if (_self.alignment == null) { + return null; + } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - backgroundColor, - elevation, - shadowColor, - surfaceTintColor, - shape, - alignment, - titleTextStyle, - contentTextStyle, - actionsPadding, - iconColor); + return $StacAlignmentGeometryCopyWith<$Res>(_self.alignment!, (value) { + return _then(_self.copyWith(alignment: value)); + }); + } /// Create a copy of StacDialogTheme /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacDialogThemeImplCopyWith<_$StacDialogThemeImpl> get copyWith => - __$$StacDialogThemeImplCopyWithImpl<_$StacDialogThemeImpl>( - this, _$identity); + $StacTextStyleCopyWith<$Res>? get titleTextStyle { + if (_self.titleTextStyle == null) { + return null; + } - @override - Map toJson() { - return _$$StacDialogThemeImplToJson( - this, - ); + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); + }); } -} - -abstract class _StacDialogTheme implements StacDialogTheme { - const factory _StacDialogTheme( - {final String? backgroundColor, - final double? elevation, - final String? shadowColor, - final String? surfaceTintColor, - final StacBorder? shape, - final StacAlignmentGeometry? alignment, - final StacTextStyle? titleTextStyle, - final StacTextStyle? contentTextStyle, - final StacEdgeInsets? actionsPadding, - final String? iconColor}) = _$StacDialogThemeImpl; - - factory _StacDialogTheme.fromJson(Map json) = - _$StacDialogThemeImpl.fromJson; + /// Create a copy of StacDialogTheme + /// with the given fields replaced by the non-null parameter values. @override - String? get backgroundColor; - @override - double? get elevation; - @override - String? get shadowColor; - @override - String? get surfaceTintColor; - @override - StacBorder? get shape; - @override - StacAlignmentGeometry? get alignment; - @override - StacTextStyle? get titleTextStyle; - @override - StacTextStyle? get contentTextStyle; - @override - StacEdgeInsets? get actionsPadding; - @override - String? get iconColor; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get contentTextStyle { + if (_self.contentTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.contentTextStyle!, (value) { + return _then(_self.copyWith(contentTextStyle: value)); + }); + } /// Create a copy of StacDialogTheme /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacDialogThemeImplCopyWith<_$StacDialogThemeImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get actionsPadding { + if (_self.actionsPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.actionsPadding!, (value) { + return _then(_self.copyWith(actionsPadding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.g.dart b/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.g.dart index b44023fb..f442db02 100644 --- a/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.g.dart +++ b/packages/stac/lib/src/parsers/stac_dialog_theme/stac_dialog_theme.g.dart @@ -6,9 +6,8 @@ part of 'stac_dialog_theme.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacDialogThemeImpl _$$StacDialogThemeImplFromJson( - Map json) => - _$StacDialogThemeImpl( +_StacDialogTheme _$StacDialogThemeFromJson(Map json) => + _StacDialogTheme( backgroundColor: json['backgroundColor'] as String?, elevation: (json['elevation'] as num?)?.toDouble(), shadowColor: json['shadowColor'] as String?, @@ -32,8 +31,7 @@ _$StacDialogThemeImpl _$$StacDialogThemeImplFromJson( iconColor: json['iconColor'] as String?, ); -Map _$$StacDialogThemeImplToJson( - _$StacDialogThemeImpl instance) => +Map _$StacDialogThemeToJson(_StacDialogTheme instance) => { 'backgroundColor': instance.backgroundColor, 'elevation': instance.elevation, diff --git a/packages/stac/lib/src/parsers/stac_divider/stac_divider.dart b/packages/stac/lib/src/parsers/stac_divider/stac_divider.dart index e832b266..a8410fc7 100644 --- a/packages/stac/lib/src/parsers/stac_divider/stac_divider.dart +++ b/packages/stac/lib/src/parsers/stac_divider/stac_divider.dart @@ -6,7 +6,7 @@ part 'stac_divider.freezed.dart'; part 'stac_divider.g.dart'; @freezed -class StacDivider with _$StacDivider { +abstract class StacDivider with _$StacDivider { const factory StacDivider({ double? thickness, double? height, diff --git a/packages/stac/lib/src/parsers/stac_divider/stac_divider.freezed.dart b/packages/stac/lib/src/parsers/stac_divider/stac_divider.freezed.dart index 6e7e2fec..1b070040 100644 --- a/packages/stac/lib/src/parsers/stac_divider/stac_divider.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_divider/stac_divider.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,94 +10,61 @@ part of 'stac_divider.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacDivider _$StacDividerFromJson(Map json) { - return _StacDivider.fromJson(json); -} - /// @nodoc mixin _$StacDivider { - double? get thickness => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - - /// Serializes this StacDivider to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get thickness; + double? get height; + String? get color; /// Create a copy of StacDivider /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacDividerCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacDividerCopyWithImpl(this as StacDivider, _$identity); -/// @nodoc -abstract class $StacDividerCopyWith<$Res> { - factory $StacDividerCopyWith( - StacDivider value, $Res Function(StacDivider) then) = - _$StacDividerCopyWithImpl<$Res, StacDivider>; - @useResult - $Res call({double? thickness, double? height, String? color}); -} + /// Serializes this StacDivider to a JSON map. + Map toJson(); -/// @nodoc -class _$StacDividerCopyWithImpl<$Res, $Val extends StacDivider> - implements $StacDividerCopyWith<$Res> { - _$StacDividerCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacDivider && + (identical(other.thickness, thickness) || + other.thickness == thickness) && + (identical(other.height, height) || other.height == height) && + (identical(other.color, color) || other.color == color)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, thickness, height, color); - /// Create a copy of StacDivider - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? thickness = freezed, - Object? height = freezed, - Object? color = freezed, - }) { - return _then(_value.copyWith( - thickness: freezed == thickness - ? _value.thickness - : thickness // ignore: cast_nullable_to_non_nullable - as double?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + String toString() { + return 'StacDivider(thickness: $thickness, height: $height, color: $color)'; } } /// @nodoc -abstract class _$$StacDividerImplCopyWith<$Res> - implements $StacDividerCopyWith<$Res> { - factory _$$StacDividerImplCopyWith( - _$StacDividerImpl value, $Res Function(_$StacDividerImpl) then) = - __$$StacDividerImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacDividerCopyWith<$Res> { + factory $StacDividerCopyWith( + StacDivider value, $Res Function(StacDivider) _then) = + _$StacDividerCopyWithImpl; @useResult $Res call({double? thickness, double? height, String? color}); } /// @nodoc -class __$$StacDividerImplCopyWithImpl<$Res> - extends _$StacDividerCopyWithImpl<$Res, _$StacDividerImpl> - implements _$$StacDividerImplCopyWith<$Res> { - __$$StacDividerImplCopyWithImpl( - _$StacDividerImpl _value, $Res Function(_$StacDividerImpl) _then) - : super(_value, _then); +class _$StacDividerCopyWithImpl<$Res> implements $StacDividerCopyWith<$Res> { + _$StacDividerCopyWithImpl(this._self, this._then); + + final StacDivider _self; + final $Res Function(StacDivider) _then; /// Create a copy of StacDivider /// with the given fields replaced by the non-null parameter values. @@ -107,17 +75,17 @@ class __$$StacDividerImplCopyWithImpl<$Res> Object? height = freezed, Object? color = freezed, }) { - return _then(_$StacDividerImpl( + return _then(_self.copyWith( thickness: freezed == thickness - ? _value.thickness + ? _self.thickness : thickness // ignore: cast_nullable_to_non_nullable as double?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, )); @@ -126,11 +94,10 @@ class __$$StacDividerImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacDividerImpl implements _StacDivider { - const _$StacDividerImpl({this.thickness, this.height, this.color}); - - factory _$StacDividerImpl.fromJson(Map json) => - _$$StacDividerImplFromJson(json); +class _StacDivider implements StacDivider { + const _StacDivider({this.thickness, this.height, this.color}); + factory _StacDivider.fromJson(Map json) => + _$StacDividerFromJson(json); @override final double? thickness; @@ -139,16 +106,26 @@ class _$StacDividerImpl implements _StacDivider { @override final String? color; + /// Create a copy of StacDivider + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacDivider(thickness: $thickness, height: $height, color: $color)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacDividerCopyWith<_StacDivider> get copyWith => + __$StacDividerCopyWithImpl<_StacDivider>(this, _$identity); + + @override + Map toJson() { + return _$StacDividerToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacDividerImpl && + other is _StacDivider && (identical(other.thickness, thickness) || other.thickness == thickness) && (identical(other.height, height) || other.height == height) && @@ -159,42 +136,54 @@ class _$StacDividerImpl implements _StacDivider { @override int get hashCode => Object.hash(runtimeType, thickness, height, color); - /// Create a copy of StacDivider - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacDividerImplCopyWith<_$StacDividerImpl> get copyWith => - __$$StacDividerImplCopyWithImpl<_$StacDividerImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacDividerImplToJson( - this, - ); + String toString() { + return 'StacDivider(thickness: $thickness, height: $height, color: $color)'; } } -abstract class _StacDivider implements StacDivider { - const factory _StacDivider( - {final double? thickness, - final double? height, - final String? color}) = _$StacDividerImpl; +/// @nodoc +abstract mixin class _$StacDividerCopyWith<$Res> + implements $StacDividerCopyWith<$Res> { + factory _$StacDividerCopyWith( + _StacDivider value, $Res Function(_StacDivider) _then) = + __$StacDividerCopyWithImpl; + @override + @useResult + $Res call({double? thickness, double? height, String? color}); +} - factory _StacDivider.fromJson(Map json) = - _$StacDividerImpl.fromJson; +/// @nodoc +class __$StacDividerCopyWithImpl<$Res> implements _$StacDividerCopyWith<$Res> { + __$StacDividerCopyWithImpl(this._self, this._then); - @override - double? get thickness; - @override - double? get height; - @override - String? get color; + final _StacDivider _self; + final $Res Function(_StacDivider) _then; /// Create a copy of StacDivider /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacDividerImplCopyWith<_$StacDividerImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? thickness = freezed, + Object? height = freezed, + Object? color = freezed, + }) { + return _then(_StacDivider( + thickness: freezed == thickness + ? _self.thickness + : thickness // ignore: cast_nullable_to_non_nullable + as double?, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_divider/stac_divider.g.dart b/packages/stac/lib/src/parsers/stac_divider/stac_divider.g.dart index 33d5b8e0..84e91bdf 100644 --- a/packages/stac/lib/src/parsers/stac_divider/stac_divider.g.dart +++ b/packages/stac/lib/src/parsers/stac_divider/stac_divider.g.dart @@ -6,14 +6,13 @@ part of 'stac_divider.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacDividerImpl _$$StacDividerImplFromJson(Map json) => - _$StacDividerImpl( +_StacDivider _$StacDividerFromJson(Map json) => _StacDivider( thickness: (json['thickness'] as num?)?.toDouble(), height: (json['height'] as num?)?.toDouble(), color: json['color'] as String?, ); -Map _$$StacDividerImplToJson(_$StacDividerImpl instance) => +Map _$StacDividerToJson(_StacDivider instance) => { 'thickness': instance.thickness, 'height': instance.height, diff --git a/packages/stac/lib/src/parsers/stac_duration/stac_duration.dart b/packages/stac/lib/src/parsers/stac_duration/stac_duration.dart index d0dcc6c7..8a44b793 100644 --- a/packages/stac/lib/src/parsers/stac_duration/stac_duration.dart +++ b/packages/stac/lib/src/parsers/stac_duration/stac_duration.dart @@ -4,7 +4,7 @@ part 'stac_duration.freezed.dart'; part 'stac_duration.g.dart'; @freezed -class StacDuration with _$StacDuration { +abstract class StacDuration with _$StacDuration { const factory StacDuration({ @Default(0) int days, @Default(0) int hours, diff --git a/packages/stac/lib/src/parsers/stac_duration/stac_duration.freezed.dart b/packages/stac/lib/src/parsers/stac_duration/stac_duration.freezed.dart index caf68998..03cb970a 100644 --- a/packages/stac/lib/src/parsers/stac_duration/stac_duration.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_duration/stac_duration.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,107 +10,60 @@ part of 'stac_duration.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacDuration _$StacDurationFromJson(Map json) { - return _StacDuration.fromJson(json); -} - /// @nodoc mixin _$StacDuration { - int get days => throw _privateConstructorUsedError; - int get hours => throw _privateConstructorUsedError; - int get minutes => throw _privateConstructorUsedError; - int get seconds => throw _privateConstructorUsedError; - int get milliseconds => throw _privateConstructorUsedError; - int get microseconds => throw _privateConstructorUsedError; - - /// Serializes this StacDuration to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get days; + int get hours; + int get minutes; + int get seconds; + int get milliseconds; + int get microseconds; /// Create a copy of StacDuration /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacDurationCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacDurationCopyWithImpl( + this as StacDuration, _$identity); -/// @nodoc -abstract class $StacDurationCopyWith<$Res> { - factory $StacDurationCopyWith( - StacDuration value, $Res Function(StacDuration) then) = - _$StacDurationCopyWithImpl<$Res, StacDuration>; - @useResult - $Res call( - {int days, - int hours, - int minutes, - int seconds, - int milliseconds, - int microseconds}); -} + /// Serializes this StacDuration to a JSON map. + Map toJson(); -/// @nodoc -class _$StacDurationCopyWithImpl<$Res, $Val extends StacDuration> - implements $StacDurationCopyWith<$Res> { - _$StacDurationCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacDuration && + (identical(other.days, days) || other.days == days) && + (identical(other.hours, hours) || other.hours == hours) && + (identical(other.minutes, minutes) || other.minutes == minutes) && + (identical(other.seconds, seconds) || other.seconds == seconds) && + (identical(other.milliseconds, milliseconds) || + other.milliseconds == milliseconds) && + (identical(other.microseconds, microseconds) || + other.microseconds == microseconds)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, days, hours, minutes, seconds, milliseconds, microseconds); - /// Create a copy of StacDuration - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? days = null, - Object? hours = null, - Object? minutes = null, - Object? seconds = null, - Object? milliseconds = null, - Object? microseconds = null, - }) { - return _then(_value.copyWith( - days: null == days - ? _value.days - : days // ignore: cast_nullable_to_non_nullable - as int, - hours: null == hours - ? _value.hours - : hours // ignore: cast_nullable_to_non_nullable - as int, - minutes: null == minutes - ? _value.minutes - : minutes // ignore: cast_nullable_to_non_nullable - as int, - seconds: null == seconds - ? _value.seconds - : seconds // ignore: cast_nullable_to_non_nullable - as int, - milliseconds: null == milliseconds - ? _value.milliseconds - : milliseconds // ignore: cast_nullable_to_non_nullable - as int, - microseconds: null == microseconds - ? _value.microseconds - : microseconds // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + String toString() { + return 'StacDuration(days: $days, hours: $hours, minutes: $minutes, seconds: $seconds, milliseconds: $milliseconds, microseconds: $microseconds)'; } } /// @nodoc -abstract class _$$StacDurationImplCopyWith<$Res> - implements $StacDurationCopyWith<$Res> { - factory _$$StacDurationImplCopyWith( - _$StacDurationImpl value, $Res Function(_$StacDurationImpl) then) = - __$$StacDurationImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacDurationCopyWith<$Res> { + factory $StacDurationCopyWith( + StacDuration value, $Res Function(StacDuration) _then) = + _$StacDurationCopyWithImpl; @useResult $Res call( {int days, @@ -121,12 +75,11 @@ abstract class _$$StacDurationImplCopyWith<$Res> } /// @nodoc -class __$$StacDurationImplCopyWithImpl<$Res> - extends _$StacDurationCopyWithImpl<$Res, _$StacDurationImpl> - implements _$$StacDurationImplCopyWith<$Res> { - __$$StacDurationImplCopyWithImpl( - _$StacDurationImpl _value, $Res Function(_$StacDurationImpl) _then) - : super(_value, _then); +class _$StacDurationCopyWithImpl<$Res> implements $StacDurationCopyWith<$Res> { + _$StacDurationCopyWithImpl(this._self, this._then); + + final StacDuration _self; + final $Res Function(StacDuration) _then; /// Create a copy of StacDuration /// with the given fields replaced by the non-null parameter values. @@ -140,29 +93,29 @@ class __$$StacDurationImplCopyWithImpl<$Res> Object? milliseconds = null, Object? microseconds = null, }) { - return _then(_$StacDurationImpl( + return _then(_self.copyWith( days: null == days - ? _value.days + ? _self.days : days // ignore: cast_nullable_to_non_nullable as int, hours: null == hours - ? _value.hours + ? _self.hours : hours // ignore: cast_nullable_to_non_nullable as int, minutes: null == minutes - ? _value.minutes + ? _self.minutes : minutes // ignore: cast_nullable_to_non_nullable as int, seconds: null == seconds - ? _value.seconds + ? _self.seconds : seconds // ignore: cast_nullable_to_non_nullable as int, milliseconds: null == milliseconds - ? _value.milliseconds + ? _self.milliseconds : milliseconds // ignore: cast_nullable_to_non_nullable as int, microseconds: null == microseconds - ? _value.microseconds + ? _self.microseconds : microseconds // ignore: cast_nullable_to_non_nullable as int, )); @@ -171,17 +124,16 @@ class __$$StacDurationImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacDurationImpl implements _StacDuration { - const _$StacDurationImpl( +class _StacDuration implements StacDuration { + const _StacDuration( {this.days = 0, this.hours = 0, this.minutes = 0, this.seconds = 0, this.milliseconds = 0, this.microseconds = 0}); - - factory _$StacDurationImpl.fromJson(Map json) => - _$$StacDurationImplFromJson(json); + factory _StacDuration.fromJson(Map json) => + _$StacDurationFromJson(json); @override @JsonKey() @@ -202,16 +154,26 @@ class _$StacDurationImpl implements _StacDuration { @JsonKey() final int microseconds; + /// Create a copy of StacDuration + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacDuration(days: $days, hours: $hours, minutes: $minutes, seconds: $seconds, milliseconds: $milliseconds, microseconds: $microseconds)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacDurationCopyWith<_StacDuration> get copyWith => + __$StacDurationCopyWithImpl<_StacDuration>(this, _$identity); + + @override + Map toJson() { + return _$StacDurationToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacDurationImpl && + other is _StacDuration && (identical(other.days, days) || other.days == days) && (identical(other.hours, hours) || other.hours == hours) && (identical(other.minutes, minutes) || other.minutes == minutes) && @@ -227,51 +189,76 @@ class _$StacDurationImpl implements _StacDuration { int get hashCode => Object.hash( runtimeType, days, hours, minutes, seconds, milliseconds, microseconds); - /// Create a copy of StacDuration - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacDurationImplCopyWith<_$StacDurationImpl> get copyWith => - __$$StacDurationImplCopyWithImpl<_$StacDurationImpl>(this, _$identity); + String toString() { + return 'StacDuration(days: $days, hours: $hours, minutes: $minutes, seconds: $seconds, milliseconds: $milliseconds, microseconds: $microseconds)'; + } +} +/// @nodoc +abstract mixin class _$StacDurationCopyWith<$Res> + implements $StacDurationCopyWith<$Res> { + factory _$StacDurationCopyWith( + _StacDuration value, $Res Function(_StacDuration) _then) = + __$StacDurationCopyWithImpl; @override - Map toJson() { - return _$$StacDurationImplToJson( - this, - ); - } + @useResult + $Res call( + {int days, + int hours, + int minutes, + int seconds, + int milliseconds, + int microseconds}); } -abstract class _StacDuration implements StacDuration { - const factory _StacDuration( - {final int days, - final int hours, - final int minutes, - final int seconds, - final int milliseconds, - final int microseconds}) = _$StacDurationImpl; +/// @nodoc +class __$StacDurationCopyWithImpl<$Res> + implements _$StacDurationCopyWith<$Res> { + __$StacDurationCopyWithImpl(this._self, this._then); - factory _StacDuration.fromJson(Map json) = - _$StacDurationImpl.fromJson; - - @override - int get days; - @override - int get hours; - @override - int get minutes; - @override - int get seconds; - @override - int get milliseconds; - @override - int get microseconds; + final _StacDuration _self; + final $Res Function(_StacDuration) _then; /// Create a copy of StacDuration /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacDurationImplCopyWith<_$StacDurationImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? days = null, + Object? hours = null, + Object? minutes = null, + Object? seconds = null, + Object? milliseconds = null, + Object? microseconds = null, + }) { + return _then(_StacDuration( + days: null == days + ? _self.days + : days // ignore: cast_nullable_to_non_nullable + as int, + hours: null == hours + ? _self.hours + : hours // ignore: cast_nullable_to_non_nullable + as int, + minutes: null == minutes + ? _self.minutes + : minutes // ignore: cast_nullable_to_non_nullable + as int, + seconds: null == seconds + ? _self.seconds + : seconds // ignore: cast_nullable_to_non_nullable + as int, + milliseconds: null == milliseconds + ? _self.milliseconds + : milliseconds // ignore: cast_nullable_to_non_nullable + as int, + microseconds: null == microseconds + ? _self.microseconds + : microseconds // ignore: cast_nullable_to_non_nullable + as int, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_duration/stac_duration.g.dart b/packages/stac/lib/src/parsers/stac_duration/stac_duration.g.dart index 842a984a..3301274c 100644 --- a/packages/stac/lib/src/parsers/stac_duration/stac_duration.g.dart +++ b/packages/stac/lib/src/parsers/stac_duration/stac_duration.g.dart @@ -6,8 +6,8 @@ part of 'stac_duration.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacDurationImpl _$$StacDurationImplFromJson(Map json) => - _$StacDurationImpl( +_StacDuration _$StacDurationFromJson(Map json) => + _StacDuration( days: (json['days'] as num?)?.toInt() ?? 0, hours: (json['hours'] as num?)?.toInt() ?? 0, minutes: (json['minutes'] as num?)?.toInt() ?? 0, @@ -16,7 +16,7 @@ _$StacDurationImpl _$$StacDurationImplFromJson(Map json) => microseconds: (json['microseconds'] as num?)?.toInt() ?? 0, ); -Map _$$StacDurationImplToJson(_$StacDurationImpl instance) => +Map _$StacDurationToJson(_StacDuration instance) => { 'days': instance.days, 'hours': instance.hours, diff --git a/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.dart b/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.dart index afd96f24..e3422c72 100644 --- a/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.dart +++ b/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.dart @@ -9,7 +9,7 @@ part 'stac_dynamic_view.g.dart'; /// A model class for the StacDynamicView parser. /// This parser fetches data dynamically and renders it using a template. @freezed -class StacDynamicView with _$StacDynamicView { +abstract class StacDynamicView with _$StacDynamicView { const factory StacDynamicView({ required StacNetworkRequest request, @Default('') String targetPath, diff --git a/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.freezed.dart b/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.freezed.dart index 0e9b092e..c6dbc30d 100644 --- a/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,36 +10,53 @@ part of 'stac_dynamic_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacDynamicView _$StacDynamicViewFromJson(Map json) { - return _StacDynamicView.fromJson(json); -} - /// @nodoc mixin _$StacDynamicView { - StacNetworkRequest get request => throw _privateConstructorUsedError; - String get targetPath => throw _privateConstructorUsedError; - Map get template => throw _privateConstructorUsedError; - - /// Serializes this StacDynamicView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacNetworkRequest get request; + String get targetPath; + Map get template; /// Create a copy of StacDynamicView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacDynamicViewCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacDynamicViewCopyWithImpl( + this as StacDynamicView, _$identity); + + /// Serializes this StacDynamicView to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacDynamicView && + (identical(other.request, request) || other.request == request) && + (identical(other.targetPath, targetPath) || + other.targetPath == targetPath) && + const DeepCollectionEquality().equals(other.template, template)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, request, targetPath, + const DeepCollectionEquality().hash(template)); + + @override + String toString() { + return 'StacDynamicView(request: $request, targetPath: $targetPath, template: $template)'; + } } /// @nodoc -abstract class $StacDynamicViewCopyWith<$Res> { +abstract mixin class $StacDynamicViewCopyWith<$Res> { factory $StacDynamicViewCopyWith( - StacDynamicView value, $Res Function(StacDynamicView) then) = - _$StacDynamicViewCopyWithImpl<$Res, StacDynamicView>; + StacDynamicView value, $Res Function(StacDynamicView) _then) = + _$StacDynamicViewCopyWithImpl; @useResult $Res call( {StacNetworkRequest request, @@ -49,14 +67,12 @@ abstract class $StacDynamicViewCopyWith<$Res> { } /// @nodoc -class _$StacDynamicViewCopyWithImpl<$Res, $Val extends StacDynamicView> +class _$StacDynamicViewCopyWithImpl<$Res> implements $StacDynamicViewCopyWith<$Res> { - _$StacDynamicViewCopyWithImpl(this._value, this._then); + _$StacDynamicViewCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacDynamicView _self; + final $Res Function(StacDynamicView) _then; /// Create a copy of StacDynamicView /// with the given fields replaced by the non-null parameter values. @@ -67,20 +83,20 @@ class _$StacDynamicViewCopyWithImpl<$Res, $Val extends StacDynamicView> Object? targetPath = null, Object? template = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( request: null == request - ? _value.request + ? _self.request : request // ignore: cast_nullable_to_non_nullable as StacNetworkRequest, targetPath: null == targetPath - ? _value.targetPath + ? _self.targetPath : targetPath // ignore: cast_nullable_to_non_nullable as String, template: null == template - ? _value.template + ? _self.template : template // ignore: cast_nullable_to_non_nullable as Map, - ) as $Val); + )); } /// Create a copy of StacDynamicView @@ -88,74 +104,22 @@ class _$StacDynamicViewCopyWithImpl<$Res, $Val extends StacDynamicView> @override @pragma('vm:prefer-inline') $StacNetworkRequestCopyWith<$Res> get request { - return $StacNetworkRequestCopyWith<$Res>(_value.request, (value) { - return _then(_value.copyWith(request: value) as $Val); + return $StacNetworkRequestCopyWith<$Res>(_self.request, (value) { + return _then(_self.copyWith(request: value)); }); } } -/// @nodoc -abstract class _$$StacDynamicViewImplCopyWith<$Res> - implements $StacDynamicViewCopyWith<$Res> { - factory _$$StacDynamicViewImplCopyWith(_$StacDynamicViewImpl value, - $Res Function(_$StacDynamicViewImpl) then) = - __$$StacDynamicViewImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacNetworkRequest request, - String targetPath, - Map template}); - - @override - $StacNetworkRequestCopyWith<$Res> get request; -} - -/// @nodoc -class __$$StacDynamicViewImplCopyWithImpl<$Res> - extends _$StacDynamicViewCopyWithImpl<$Res, _$StacDynamicViewImpl> - implements _$$StacDynamicViewImplCopyWith<$Res> { - __$$StacDynamicViewImplCopyWithImpl( - _$StacDynamicViewImpl _value, $Res Function(_$StacDynamicViewImpl) _then) - : super(_value, _then); - - /// Create a copy of StacDynamicView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? request = null, - Object? targetPath = null, - Object? template = null, - }) { - return _then(_$StacDynamicViewImpl( - request: null == request - ? _value.request - : request // ignore: cast_nullable_to_non_nullable - as StacNetworkRequest, - targetPath: null == targetPath - ? _value.targetPath - : targetPath // ignore: cast_nullable_to_non_nullable - as String, - template: null == template - ? _value._template - : template // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacDynamicViewImpl implements _StacDynamicView { - const _$StacDynamicViewImpl( +class _StacDynamicView implements StacDynamicView { + const _StacDynamicView( {required this.request, this.targetPath = '', required final Map template}) : _template = template; - - factory _$StacDynamicViewImpl.fromJson(Map json) => - _$$StacDynamicViewImplFromJson(json); + factory _StacDynamicView.fromJson(Map json) => + _$StacDynamicViewFromJson(json); @override final StacNetworkRequest request; @@ -170,16 +134,26 @@ class _$StacDynamicViewImpl implements _StacDynamicView { return EqualUnmodifiableMapView(_template); } + /// Create a copy of StacDynamicView + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacDynamicView(request: $request, targetPath: $targetPath, template: $template)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacDynamicViewCopyWith<_StacDynamicView> get copyWith => + __$StacDynamicViewCopyWithImpl<_StacDynamicView>(this, _$identity); + + @override + Map toJson() { + return _$StacDynamicViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacDynamicViewImpl && + other is _StacDynamicView && (identical(other.request, request) || other.request == request) && (identical(other.targetPath, targetPath) || other.targetPath == targetPath) && @@ -191,43 +165,71 @@ class _$StacDynamicViewImpl implements _StacDynamicView { int get hashCode => Object.hash(runtimeType, request, targetPath, const DeepCollectionEquality().hash(_template)); - /// Create a copy of StacDynamicView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacDynamicViewImplCopyWith<_$StacDynamicViewImpl> get copyWith => - __$$StacDynamicViewImplCopyWithImpl<_$StacDynamicViewImpl>( - this, _$identity); + String toString() { + return 'StacDynamicView(request: $request, targetPath: $targetPath, template: $template)'; + } +} +/// @nodoc +abstract mixin class _$StacDynamicViewCopyWith<$Res> + implements $StacDynamicViewCopyWith<$Res> { + factory _$StacDynamicViewCopyWith( + _StacDynamicView value, $Res Function(_StacDynamicView) _then) = + __$StacDynamicViewCopyWithImpl; @override - Map toJson() { - return _$$StacDynamicViewImplToJson( - this, - ); - } + @useResult + $Res call( + {StacNetworkRequest request, + String targetPath, + Map template}); + + @override + $StacNetworkRequestCopyWith<$Res> get request; } -abstract class _StacDynamicView implements StacDynamicView { - const factory _StacDynamicView( - {required final StacNetworkRequest request, - final String targetPath, - required final Map template}) = _$StacDynamicViewImpl; +/// @nodoc +class __$StacDynamicViewCopyWithImpl<$Res> + implements _$StacDynamicViewCopyWith<$Res> { + __$StacDynamicViewCopyWithImpl(this._self, this._then); - factory _StacDynamicView.fromJson(Map json) = - _$StacDynamicViewImpl.fromJson; + final _StacDynamicView _self; + final $Res Function(_StacDynamicView) _then; + /// Create a copy of StacDynamicView + /// with the given fields replaced by the non-null parameter values. @override - StacNetworkRequest get request; - @override - String get targetPath; - @override - Map get template; + @pragma('vm:prefer-inline') + $Res call({ + Object? request = null, + Object? targetPath = null, + Object? template = null, + }) { + return _then(_StacDynamicView( + request: null == request + ? _self.request + : request // ignore: cast_nullable_to_non_nullable + as StacNetworkRequest, + targetPath: null == targetPath + ? _self.targetPath + : targetPath // ignore: cast_nullable_to_non_nullable + as String, + template: null == template + ? _self._template + : template // ignore: cast_nullable_to_non_nullable + as Map, + )); + } /// Create a copy of StacDynamicView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacDynamicViewImplCopyWith<_$StacDynamicViewImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacNetworkRequestCopyWith<$Res> get request { + return $StacNetworkRequestCopyWith<$Res>(_self.request, (value) { + return _then(_self.copyWith(request: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.g.dart b/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.g.dart index cf2a688a..0019a7c5 100644 --- a/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_dynamic_view/stac_dynamic_view.g.dart @@ -6,17 +6,15 @@ part of 'stac_dynamic_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacDynamicViewImpl _$$StacDynamicViewImplFromJson( - Map json) => - _$StacDynamicViewImpl( +_StacDynamicView _$StacDynamicViewFromJson(Map json) => + _StacDynamicView( request: StacNetworkRequest.fromJson(json['request'] as Map), targetPath: json['targetPath'] as String? ?? '', template: json['template'] as Map, ); -Map _$$StacDynamicViewImplToJson( - _$StacDynamicViewImpl instance) => +Map _$StacDynamicViewToJson(_StacDynamicView instance) => { 'request': instance.request, 'targetPath': instance.targetPath, diff --git a/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.dart b/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.dart index d0db6c9d..76cc8031 100644 --- a/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.dart +++ b/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.dart @@ -5,7 +5,7 @@ part 'stac_edge_insets.freezed.dart'; part 'stac_edge_insets.g.dart'; @freezed -class StacEdgeInsets with _$StacEdgeInsets { +abstract class StacEdgeInsets with _$StacEdgeInsets { const factory StacEdgeInsets({ double? left, double? top, diff --git a/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.freezed.dart b/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.freezed.dart index d60adf31..4073f02a 100644 --- a/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,100 +10,64 @@ part of 'stac_edge_insets.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacEdgeInsets _$StacEdgeInsetsFromJson(Map json) { - return _StacEdgeInsets.fromJson(json); -} - /// @nodoc mixin _$StacEdgeInsets { - double? get left => throw _privateConstructorUsedError; - double? get top => throw _privateConstructorUsedError; - double? get right => throw _privateConstructorUsedError; - double? get bottom => throw _privateConstructorUsedError; - - /// Serializes this StacEdgeInsets to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get left; + double? get top; + double? get right; + double? get bottom; /// Create a copy of StacEdgeInsets /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacEdgeInsetsCopyWithImpl( + this as StacEdgeInsets, _$identity); -/// @nodoc -abstract class $StacEdgeInsetsCopyWith<$Res> { - factory $StacEdgeInsetsCopyWith( - StacEdgeInsets value, $Res Function(StacEdgeInsets) then) = - _$StacEdgeInsetsCopyWithImpl<$Res, StacEdgeInsets>; - @useResult - $Res call({double? left, double? top, double? right, double? bottom}); -} + /// Serializes this StacEdgeInsets to a JSON map. + Map toJson(); -/// @nodoc -class _$StacEdgeInsetsCopyWithImpl<$Res, $Val extends StacEdgeInsets> - implements $StacEdgeInsetsCopyWith<$Res> { - _$StacEdgeInsetsCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacEdgeInsets && + (identical(other.left, left) || other.left == left) && + (identical(other.top, top) || other.top == top) && + (identical(other.right, right) || other.right == right) && + (identical(other.bottom, bottom) || other.bottom == bottom)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, left, top, right, bottom); - /// Create a copy of StacEdgeInsets - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? left = freezed, - Object? top = freezed, - Object? right = freezed, - Object? bottom = freezed, - }) { - return _then(_value.copyWith( - left: freezed == left - ? _value.left - : left // ignore: cast_nullable_to_non_nullable - as double?, - top: freezed == top - ? _value.top - : top // ignore: cast_nullable_to_non_nullable - as double?, - right: freezed == right - ? _value.right - : right // ignore: cast_nullable_to_non_nullable - as double?, - bottom: freezed == bottom - ? _value.bottom - : bottom // ignore: cast_nullable_to_non_nullable - as double?, - ) as $Val); + String toString() { + return 'StacEdgeInsets(left: $left, top: $top, right: $right, bottom: $bottom)'; } } /// @nodoc -abstract class _$$StacEdgeInsetsImplCopyWith<$Res> - implements $StacEdgeInsetsCopyWith<$Res> { - factory _$$StacEdgeInsetsImplCopyWith(_$StacEdgeInsetsImpl value, - $Res Function(_$StacEdgeInsetsImpl) then) = - __$$StacEdgeInsetsImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacEdgeInsetsCopyWith<$Res> { + factory $StacEdgeInsetsCopyWith( + StacEdgeInsets value, $Res Function(StacEdgeInsets) _then) = + _$StacEdgeInsetsCopyWithImpl; @useResult $Res call({double? left, double? top, double? right, double? bottom}); } /// @nodoc -class __$$StacEdgeInsetsImplCopyWithImpl<$Res> - extends _$StacEdgeInsetsCopyWithImpl<$Res, _$StacEdgeInsetsImpl> - implements _$$StacEdgeInsetsImplCopyWith<$Res> { - __$$StacEdgeInsetsImplCopyWithImpl( - _$StacEdgeInsetsImpl _value, $Res Function(_$StacEdgeInsetsImpl) _then) - : super(_value, _then); +class _$StacEdgeInsetsCopyWithImpl<$Res> + implements $StacEdgeInsetsCopyWith<$Res> { + _$StacEdgeInsetsCopyWithImpl(this._self, this._then); + + final StacEdgeInsets _self; + final $Res Function(StacEdgeInsets) _then; /// Create a copy of StacEdgeInsets /// with the given fields replaced by the non-null parameter values. @@ -114,21 +79,21 @@ class __$$StacEdgeInsetsImplCopyWithImpl<$Res> Object? right = freezed, Object? bottom = freezed, }) { - return _then(_$StacEdgeInsetsImpl( + return _then(_self.copyWith( left: freezed == left - ? _value.left + ? _self.left : left // ignore: cast_nullable_to_non_nullable as double?, top: freezed == top - ? _value.top + ? _self.top : top // ignore: cast_nullable_to_non_nullable as double?, right: freezed == right - ? _value.right + ? _self.right : right // ignore: cast_nullable_to_non_nullable as double?, bottom: freezed == bottom - ? _value.bottom + ? _self.bottom : bottom // ignore: cast_nullable_to_non_nullable as double?, )); @@ -137,11 +102,10 @@ class __$$StacEdgeInsetsImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacEdgeInsetsImpl implements _StacEdgeInsets { - const _$StacEdgeInsetsImpl({this.left, this.top, this.right, this.bottom}); - - factory _$StacEdgeInsetsImpl.fromJson(Map json) => - _$$StacEdgeInsetsImplFromJson(json); +class _StacEdgeInsets implements StacEdgeInsets { + const _StacEdgeInsets({this.left, this.top, this.right, this.bottom}); + factory _StacEdgeInsets.fromJson(Map json) => + _$StacEdgeInsetsFromJson(json); @override final double? left; @@ -152,16 +116,26 @@ class _$StacEdgeInsetsImpl implements _StacEdgeInsets { @override final double? bottom; + /// Create a copy of StacEdgeInsets + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacEdgeInsets(left: $left, top: $top, right: $right, bottom: $bottom)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacEdgeInsetsCopyWith<_StacEdgeInsets> get copyWith => + __$StacEdgeInsetsCopyWithImpl<_StacEdgeInsets>(this, _$identity); + + @override + Map toJson() { + return _$StacEdgeInsetsToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacEdgeInsetsImpl && + other is _StacEdgeInsets && (identical(other.left, left) || other.left == left) && (identical(other.top, top) || other.top == top) && (identical(other.right, right) || other.right == right) && @@ -172,46 +146,60 @@ class _$StacEdgeInsetsImpl implements _StacEdgeInsets { @override int get hashCode => Object.hash(runtimeType, left, top, right, bottom); - /// Create a copy of StacEdgeInsets - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacEdgeInsetsImplCopyWith<_$StacEdgeInsetsImpl> get copyWith => - __$$StacEdgeInsetsImplCopyWithImpl<_$StacEdgeInsetsImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacEdgeInsetsImplToJson( - this, - ); + String toString() { + return 'StacEdgeInsets(left: $left, top: $top, right: $right, bottom: $bottom)'; } } -abstract class _StacEdgeInsets implements StacEdgeInsets { - const factory _StacEdgeInsets( - {final double? left, - final double? top, - final double? right, - final double? bottom}) = _$StacEdgeInsetsImpl; +/// @nodoc +abstract mixin class _$StacEdgeInsetsCopyWith<$Res> + implements $StacEdgeInsetsCopyWith<$Res> { + factory _$StacEdgeInsetsCopyWith( + _StacEdgeInsets value, $Res Function(_StacEdgeInsets) _then) = + __$StacEdgeInsetsCopyWithImpl; + @override + @useResult + $Res call({double? left, double? top, double? right, double? bottom}); +} - factory _StacEdgeInsets.fromJson(Map json) = - _$StacEdgeInsetsImpl.fromJson; +/// @nodoc +class __$StacEdgeInsetsCopyWithImpl<$Res> + implements _$StacEdgeInsetsCopyWith<$Res> { + __$StacEdgeInsetsCopyWithImpl(this._self, this._then); - @override - double? get left; - @override - double? get top; - @override - double? get right; - @override - double? get bottom; + final _StacEdgeInsets _self; + final $Res Function(_StacEdgeInsets) _then; /// Create a copy of StacEdgeInsets /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacEdgeInsetsImplCopyWith<_$StacEdgeInsetsImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? left = freezed, + Object? top = freezed, + Object? right = freezed, + Object? bottom = freezed, + }) { + return _then(_StacEdgeInsets( + left: freezed == left + ? _self.left + : left // ignore: cast_nullable_to_non_nullable + as double?, + top: freezed == top + ? _self.top + : top // ignore: cast_nullable_to_non_nullable + as double?, + right: freezed == right + ? _self.right + : right // ignore: cast_nullable_to_non_nullable + as double?, + bottom: freezed == bottom + ? _self.bottom + : bottom // ignore: cast_nullable_to_non_nullable + as double?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.g.dart b/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.g.dart index e115662f..dc080fbf 100644 --- a/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.g.dart +++ b/packages/stac/lib/src/parsers/stac_edge_insets/stac_edge_insets.g.dart @@ -6,16 +6,15 @@ part of 'stac_edge_insets.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacEdgeInsetsImpl _$$StacEdgeInsetsImplFromJson(Map json) => - _$StacEdgeInsetsImpl( +_StacEdgeInsets _$StacEdgeInsetsFromJson(Map json) => + _StacEdgeInsets( left: (json['left'] as num?)?.toDouble(), top: (json['top'] as num?)?.toDouble(), right: (json['right'] as num?)?.toDouble(), bottom: (json['bottom'] as num?)?.toDouble(), ); -Map _$$StacEdgeInsetsImplToJson( - _$StacEdgeInsetsImpl instance) => +Map _$StacEdgeInsetsToJson(_StacEdgeInsets instance) => { 'left': instance.left, 'top': instance.top, diff --git a/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.dart b/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.dart index 8e0023b5..39d15949 100644 --- a/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.dart +++ b/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.dart @@ -8,7 +8,7 @@ part 'stac_elevated_button.freezed.dart'; part 'stac_elevated_button.g.dart'; @freezed -class StacElevatedButton with _$StacElevatedButton { +abstract class StacElevatedButton with _$StacElevatedButton { const factory StacElevatedButton({ Map? onPressed, Map? onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.freezed.dart b/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.freezed.dart index 96044a00..806ac4d2 100644 --- a/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,41 +10,74 @@ part of 'stac_elevated_button.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacElevatedButton _$StacElevatedButtonFromJson(Map json) { - return _StacElevatedButton.fromJson(json); -} - /// @nodoc mixin _$StacElevatedButton { - Map? get onPressed => throw _privateConstructorUsedError; - Map? get onLongPress => throw _privateConstructorUsedError; - Map? get onHover => throw _privateConstructorUsedError; - Map? get onFocusChange => throw _privateConstructorUsedError; - StacButtonStyle? get style => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - - /// Serializes this StacElevatedButton to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get onPressed; + Map? get onLongPress; + Map? get onHover; + Map? get onFocusChange; + StacButtonStyle? get style; + bool get autofocus; + Clip get clipBehavior; + Map get child; /// Create a copy of StacElevatedButton /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacElevatedButtonCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacElevatedButtonCopyWithImpl( + this as StacElevatedButton, _$identity); + + /// Serializes this StacElevatedButton to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacElevatedButton && + const DeepCollectionEquality().equals(other.onPressed, onPressed) && + const DeepCollectionEquality() + .equals(other.onLongPress, onLongPress) && + const DeepCollectionEquality().equals(other.onHover, onHover) && + const DeepCollectionEquality() + .equals(other.onFocusChange, onFocusChange) && + (identical(other.style, style) || other.style == style) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + const DeepCollectionEquality().equals(other.child, child)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(onPressed), + const DeepCollectionEquality().hash(onLongPress), + const DeepCollectionEquality().hash(onHover), + const DeepCollectionEquality().hash(onFocusChange), + style, + autofocus, + clipBehavior, + const DeepCollectionEquality().hash(child)); + + @override + String toString() { + return 'StacElevatedButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + } } /// @nodoc -abstract class $StacElevatedButtonCopyWith<$Res> { +abstract mixin class $StacElevatedButtonCopyWith<$Res> { factory $StacElevatedButtonCopyWith( - StacElevatedButton value, $Res Function(StacElevatedButton) then) = - _$StacElevatedButtonCopyWithImpl<$Res, StacElevatedButton>; + StacElevatedButton value, $Res Function(StacElevatedButton) _then) = + _$StacElevatedButtonCopyWithImpl; @useResult $Res call( {Map? onPressed, @@ -59,14 +93,12 @@ abstract class $StacElevatedButtonCopyWith<$Res> { } /// @nodoc -class _$StacElevatedButtonCopyWithImpl<$Res, $Val extends StacElevatedButton> +class _$StacElevatedButtonCopyWithImpl<$Res> implements $StacElevatedButtonCopyWith<$Res> { - _$StacElevatedButtonCopyWithImpl(this._value, this._then); + _$StacElevatedButtonCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacElevatedButton _self; + final $Res Function(StacElevatedButton) _then; /// Create a copy of StacElevatedButton /// with the given fields replaced by the non-null parameter values. @@ -82,40 +114,40 @@ class _$StacElevatedButtonCopyWithImpl<$Res, $Val extends StacElevatedButton> Object? clipBehavior = null, Object? child = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( onPressed: freezed == onPressed - ? _value.onPressed + ? _self.onPressed : onPressed // ignore: cast_nullable_to_non_nullable as Map?, onLongPress: freezed == onLongPress - ? _value.onLongPress + ? _self.onLongPress : onLongPress // ignore: cast_nullable_to_non_nullable as Map?, onHover: freezed == onHover - ? _value.onHover + ? _self.onHover : onHover // ignore: cast_nullable_to_non_nullable as Map?, onFocusChange: freezed == onFocusChange - ? _value.onFocusChange + ? _self.onFocusChange : onFocusChange // ignore: cast_nullable_to_non_nullable as Map?, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, child: null == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, - ) as $Val); + )); } /// Create a copy of StacElevatedButton @@ -123,101 +155,20 @@ class _$StacElevatedButtonCopyWithImpl<$Res, $Val extends StacElevatedButton> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } } -/// @nodoc -abstract class _$$StacElevatedButtonImplCopyWith<$Res> - implements $StacElevatedButtonCopyWith<$Res> { - factory _$$StacElevatedButtonImplCopyWith(_$StacElevatedButtonImpl value, - $Res Function(_$StacElevatedButtonImpl) then) = - __$$StacElevatedButtonImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? onPressed, - Map? onLongPress, - Map? onHover, - Map? onFocusChange, - StacButtonStyle? style, - bool autofocus, - Clip clipBehavior, - Map child}); - - @override - $StacButtonStyleCopyWith<$Res>? get style; -} - -/// @nodoc -class __$$StacElevatedButtonImplCopyWithImpl<$Res> - extends _$StacElevatedButtonCopyWithImpl<$Res, _$StacElevatedButtonImpl> - implements _$$StacElevatedButtonImplCopyWith<$Res> { - __$$StacElevatedButtonImplCopyWithImpl(_$StacElevatedButtonImpl _value, - $Res Function(_$StacElevatedButtonImpl) _then) - : super(_value, _then); - - /// Create a copy of StacElevatedButton - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? onPressed = freezed, - Object? onLongPress = freezed, - Object? onHover = freezed, - Object? onFocusChange = freezed, - Object? style = freezed, - Object? autofocus = null, - Object? clipBehavior = null, - Object? child = null, - }) { - return _then(_$StacElevatedButtonImpl( - onPressed: freezed == onPressed - ? _value._onPressed - : onPressed // ignore: cast_nullable_to_non_nullable - as Map?, - onLongPress: freezed == onLongPress - ? _value._onLongPress - : onLongPress // ignore: cast_nullable_to_non_nullable - as Map?, - onHover: freezed == onHover - ? _value._onHover - : onHover // ignore: cast_nullable_to_non_nullable - as Map?, - onFocusChange: freezed == onFocusChange - ? _value._onFocusChange - : onFocusChange // ignore: cast_nullable_to_non_nullable - as Map?, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - child: null == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacElevatedButtonImpl implements _StacElevatedButton { - const _$StacElevatedButtonImpl( +class _StacElevatedButton implements StacElevatedButton { + const _StacElevatedButton( {final Map? onPressed, final Map? onLongPress, final Map? onHover, @@ -231,9 +182,8 @@ class _$StacElevatedButtonImpl implements _StacElevatedButton { _onHover = onHover, _onFocusChange = onFocusChange, _child = child; - - factory _$StacElevatedButtonImpl.fromJson(Map json) => - _$$StacElevatedButtonImplFromJson(json); + factory _StacElevatedButton.fromJson(Map json) => + _$StacElevatedButtonFromJson(json); final Map? _onPressed; @override @@ -291,16 +241,26 @@ class _$StacElevatedButtonImpl implements _StacElevatedButton { return EqualUnmodifiableMapView(_child); } + /// Create a copy of StacElevatedButton + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacElevatedButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacElevatedButtonCopyWith<_StacElevatedButton> get copyWith => + __$StacElevatedButtonCopyWithImpl<_StacElevatedButton>(this, _$identity); + + @override + Map toJson() { + return _$StacElevatedButtonToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacElevatedButtonImpl && + other is _StacElevatedButton && const DeepCollectionEquality() .equals(other._onPressed, _onPressed) && const DeepCollectionEquality() @@ -329,58 +289,105 @@ class _$StacElevatedButtonImpl implements _StacElevatedButton { clipBehavior, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacElevatedButton - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacElevatedButtonImplCopyWith<_$StacElevatedButtonImpl> get copyWith => - __$$StacElevatedButtonImplCopyWithImpl<_$StacElevatedButtonImpl>( - this, _$identity); + String toString() { + return 'StacElevatedButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + } +} +/// @nodoc +abstract mixin class _$StacElevatedButtonCopyWith<$Res> + implements $StacElevatedButtonCopyWith<$Res> { + factory _$StacElevatedButtonCopyWith( + _StacElevatedButton value, $Res Function(_StacElevatedButton) _then) = + __$StacElevatedButtonCopyWithImpl; @override - Map toJson() { - return _$$StacElevatedButtonImplToJson( - this, - ); - } + @useResult + $Res call( + {Map? onPressed, + Map? onLongPress, + Map? onHover, + Map? onFocusChange, + StacButtonStyle? style, + bool autofocus, + Clip clipBehavior, + Map child}); + + @override + $StacButtonStyleCopyWith<$Res>? get style; } -abstract class _StacElevatedButton implements StacElevatedButton { - const factory _StacElevatedButton( - {final Map? onPressed, - final Map? onLongPress, - final Map? onHover, - final Map? onFocusChange, - final StacButtonStyle? style, - final bool autofocus, - final Clip clipBehavior, - required final Map child}) = _$StacElevatedButtonImpl; +/// @nodoc +class __$StacElevatedButtonCopyWithImpl<$Res> + implements _$StacElevatedButtonCopyWith<$Res> { + __$StacElevatedButtonCopyWithImpl(this._self, this._then); - factory _StacElevatedButton.fromJson(Map json) = - _$StacElevatedButtonImpl.fromJson; + final _StacElevatedButton _self; + final $Res Function(_StacElevatedButton) _then; + /// Create a copy of StacElevatedButton + /// with the given fields replaced by the non-null parameter values. @override - Map? get onPressed; - @override - Map? get onLongPress; - @override - Map? get onHover; - @override - Map? get onFocusChange; - @override - StacButtonStyle? get style; - @override - bool get autofocus; - @override - Clip get clipBehavior; - @override - Map get child; + @pragma('vm:prefer-inline') + $Res call({ + Object? onPressed = freezed, + Object? onLongPress = freezed, + Object? onHover = freezed, + Object? onFocusChange = freezed, + Object? style = freezed, + Object? autofocus = null, + Object? clipBehavior = null, + Object? child = null, + }) { + return _then(_StacElevatedButton( + onPressed: freezed == onPressed + ? _self._onPressed + : onPressed // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPress: freezed == onLongPress + ? _self._onLongPress + : onLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onHover: freezed == onHover + ? _self._onHover + : onHover // ignore: cast_nullable_to_non_nullable + as Map?, + onFocusChange: freezed == onFocusChange + ? _self._onFocusChange + : onFocusChange // ignore: cast_nullable_to_non_nullable + as Map?, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + )); + } /// Create a copy of StacElevatedButton /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacElevatedButtonImplCopyWith<_$StacElevatedButtonImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.g.dart b/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.g.dart index 7acdf8e9..13a773be 100644 --- a/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.g.dart +++ b/packages/stac/lib/src/parsers/stac_elevated_button/stac_elevated_button.g.dart @@ -6,9 +6,8 @@ part of 'stac_elevated_button.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacElevatedButtonImpl _$$StacElevatedButtonImplFromJson( - Map json) => - _$StacElevatedButtonImpl( +_StacElevatedButton _$StacElevatedButtonFromJson(Map json) => + _StacElevatedButton( onPressed: json['onPressed'] as Map?, onLongPress: json['onLongPress'] as Map?, onHover: json['onHover'] as Map?, @@ -22,8 +21,7 @@ _$StacElevatedButtonImpl _$$StacElevatedButtonImplFromJson( child: json['child'] as Map, ); -Map _$$StacElevatedButtonImplToJson( - _$StacElevatedButtonImpl instance) => +Map _$StacElevatedButtonToJson(_StacElevatedButton instance) => { 'onPressed': instance.onPressed, 'onLongPress': instance.onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.dart b/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.dart index 376076b5..e35eaef1 100644 --- a/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.dart +++ b/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.dart @@ -6,7 +6,7 @@ part 'stac_expanded.freezed.dart'; part 'stac_expanded.g.dart'; @freezed -class StacExpanded with _$StacExpanded { +abstract class StacExpanded with _$StacExpanded { const factory StacExpanded({ @Default(1) int flex, Map? child, diff --git a/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.freezed.dart b/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.freezed.dart index 64adee78..d5b1690f 100644 --- a/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,60 @@ part of 'stac_expanded.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacExpanded _$StacExpandedFromJson(Map json) { - return _StacExpanded.fromJson(json); -} - /// @nodoc mixin _$StacExpanded { - int get flex => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacExpanded to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get flex; + Map? get child; /// Create a copy of StacExpanded /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacExpandedCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacExpandedCopyWithImpl( + this as StacExpanded, _$identity); -/// @nodoc -abstract class $StacExpandedCopyWith<$Res> { - factory $StacExpandedCopyWith( - StacExpanded value, $Res Function(StacExpanded) then) = - _$StacExpandedCopyWithImpl<$Res, StacExpanded>; - @useResult - $Res call({int flex, Map? child}); -} + /// Serializes this StacExpanded to a JSON map. + Map toJson(); -/// @nodoc -class _$StacExpandedCopyWithImpl<$Res, $Val extends StacExpanded> - implements $StacExpandedCopyWith<$Res> { - _$StacExpandedCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacExpanded && + (identical(other.flex, flex) || other.flex == flex) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, flex, const DeepCollectionEquality().hash(child)); - /// Create a copy of StacExpanded - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? flex = null, - Object? child = freezed, - }) { - return _then(_value.copyWith( - flex: null == flex - ? _value.flex - : flex // ignore: cast_nullable_to_non_nullable - as int, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacExpanded(flex: $flex, child: $child)'; } } /// @nodoc -abstract class _$$StacExpandedImplCopyWith<$Res> - implements $StacExpandedCopyWith<$Res> { - factory _$$StacExpandedImplCopyWith( - _$StacExpandedImpl value, $Res Function(_$StacExpandedImpl) then) = - __$$StacExpandedImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacExpandedCopyWith<$Res> { + factory $StacExpandedCopyWith( + StacExpanded value, $Res Function(StacExpanded) _then) = + _$StacExpandedCopyWithImpl; @useResult $Res call({int flex, Map? child}); } /// @nodoc -class __$$StacExpandedImplCopyWithImpl<$Res> - extends _$StacExpandedCopyWithImpl<$Res, _$StacExpandedImpl> - implements _$$StacExpandedImplCopyWith<$Res> { - __$$StacExpandedImplCopyWithImpl( - _$StacExpandedImpl _value, $Res Function(_$StacExpandedImpl) _then) - : super(_value, _then); +class _$StacExpandedCopyWithImpl<$Res> implements $StacExpandedCopyWith<$Res> { + _$StacExpandedCopyWithImpl(this._self, this._then); + + final StacExpanded _self; + final $Res Function(StacExpanded) _then; /// Create a copy of StacExpanded /// with the given fields replaced by the non-null parameter values. @@ -100,13 +73,13 @@ class __$$StacExpandedImplCopyWithImpl<$Res> Object? flex = null, Object? child = freezed, }) { - return _then(_$StacExpandedImpl( + return _then(_self.copyWith( flex: null == flex - ? _value.flex + ? _self.flex : flex // ignore: cast_nullable_to_non_nullable as int, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -115,12 +88,11 @@ class __$$StacExpandedImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacExpandedImpl implements _StacExpanded { - const _$StacExpandedImpl({this.flex = 1, final Map? child}) +class _StacExpanded implements StacExpanded { + const _StacExpanded({this.flex = 1, final Map? child}) : _child = child; - - factory _$StacExpandedImpl.fromJson(Map json) => - _$$StacExpandedImplFromJson(json); + factory _StacExpanded.fromJson(Map json) => + _$StacExpandedFromJson(json); @override @JsonKey() @@ -135,16 +107,26 @@ class _$StacExpandedImpl implements _StacExpanded { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacExpanded + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacExpandedCopyWith<_StacExpanded> get copyWith => + __$StacExpandedCopyWithImpl<_StacExpanded>(this, _$identity); + @override - String toString() { - return 'StacExpanded(flex: $flex, child: $child)'; + Map toJson() { + return _$StacExpandedToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacExpandedImpl && + other is _StacExpanded && (identical(other.flex, flex) || other.flex == flex) && const DeepCollectionEquality().equals(other._child, _child)); } @@ -154,38 +136,50 @@ class _$StacExpandedImpl implements _StacExpanded { int get hashCode => Object.hash( runtimeType, flex, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacExpanded - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacExpandedImplCopyWith<_$StacExpandedImpl> get copyWith => - __$$StacExpandedImplCopyWithImpl<_$StacExpandedImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacExpandedImplToJson( - this, - ); + String toString() { + return 'StacExpanded(flex: $flex, child: $child)'; } } -abstract class _StacExpanded implements StacExpanded { - const factory _StacExpanded( - {final int flex, final Map? child}) = _$StacExpandedImpl; +/// @nodoc +abstract mixin class _$StacExpandedCopyWith<$Res> + implements $StacExpandedCopyWith<$Res> { + factory _$StacExpandedCopyWith( + _StacExpanded value, $Res Function(_StacExpanded) _then) = + __$StacExpandedCopyWithImpl; + @override + @useResult + $Res call({int flex, Map? child}); +} - factory _StacExpanded.fromJson(Map json) = - _$StacExpandedImpl.fromJson; +/// @nodoc +class __$StacExpandedCopyWithImpl<$Res> + implements _$StacExpandedCopyWith<$Res> { + __$StacExpandedCopyWithImpl(this._self, this._then); - @override - int get flex; - @override - Map? get child; + final _StacExpanded _self; + final $Res Function(_StacExpanded) _then; /// Create a copy of StacExpanded /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacExpandedImplCopyWith<_$StacExpandedImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? flex = null, + Object? child = freezed, + }) { + return _then(_StacExpanded( + flex: null == flex + ? _self.flex + : flex // ignore: cast_nullable_to_non_nullable + as int, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.g.dart b/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.g.dart index 07fcf309..a3978947 100644 --- a/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.g.dart +++ b/packages/stac/lib/src/parsers/stac_expanded/stac_expanded.g.dart @@ -6,13 +6,13 @@ part of 'stac_expanded.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacExpandedImpl _$$StacExpandedImplFromJson(Map json) => - _$StacExpandedImpl( +_StacExpanded _$StacExpandedFromJson(Map json) => + _StacExpanded( flex: (json['flex'] as num?)?.toInt() ?? 1, child: json['child'] as Map?, ); -Map _$$StacExpandedImplToJson(_$StacExpandedImpl instance) => +Map _$StacExpandedToJson(_StacExpanded instance) => { 'flex': instance.flex, 'child': instance.child, diff --git a/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.dart b/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.dart index 49ffa3c7..cf69c6f8 100644 --- a/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.dart +++ b/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.dart @@ -8,7 +8,7 @@ part 'stac_filled_button.freezed.dart'; part 'stac_filled_button.g.dart'; @freezed -class StacFilledButton with _$StacFilledButton { +abstract class StacFilledButton with _$StacFilledButton { const factory StacFilledButton({ Map? onPressed, Map? onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.freezed.dart b/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.freezed.dart index 29bb1960..4de76ead 100644 --- a/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,41 +10,74 @@ part of 'stac_filled_button.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacFilledButton _$StacFilledButtonFromJson(Map json) { - return _StacFilledButton.fromJson(json); -} - /// @nodoc mixin _$StacFilledButton { - Map? get onPressed => throw _privateConstructorUsedError; - Map? get onLongPress => throw _privateConstructorUsedError; - Map? get onHover => throw _privateConstructorUsedError; - Map? get onFocusChange => throw _privateConstructorUsedError; - StacButtonStyle? get style => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacFilledButton to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get onPressed; + Map? get onLongPress; + Map? get onHover; + Map? get onFocusChange; + StacButtonStyle? get style; + bool get autofocus; + Clip get clipBehavior; + Map? get child; /// Create a copy of StacFilledButton /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFilledButtonCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacFilledButtonCopyWithImpl( + this as StacFilledButton, _$identity); + + /// Serializes this StacFilledButton to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacFilledButton && + const DeepCollectionEquality().equals(other.onPressed, onPressed) && + const DeepCollectionEquality() + .equals(other.onLongPress, onLongPress) && + const DeepCollectionEquality().equals(other.onHover, onHover) && + const DeepCollectionEquality() + .equals(other.onFocusChange, onFocusChange) && + (identical(other.style, style) || other.style == style) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + const DeepCollectionEquality().equals(other.child, child)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(onPressed), + const DeepCollectionEquality().hash(onLongPress), + const DeepCollectionEquality().hash(onHover), + const DeepCollectionEquality().hash(onFocusChange), + style, + autofocus, + clipBehavior, + const DeepCollectionEquality().hash(child)); + + @override + String toString() { + return 'StacFilledButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + } } /// @nodoc -abstract class $StacFilledButtonCopyWith<$Res> { +abstract mixin class $StacFilledButtonCopyWith<$Res> { factory $StacFilledButtonCopyWith( - StacFilledButton value, $Res Function(StacFilledButton) then) = - _$StacFilledButtonCopyWithImpl<$Res, StacFilledButton>; + StacFilledButton value, $Res Function(StacFilledButton) _then) = + _$StacFilledButtonCopyWithImpl; @useResult $Res call( {Map? onPressed, @@ -59,14 +93,12 @@ abstract class $StacFilledButtonCopyWith<$Res> { } /// @nodoc -class _$StacFilledButtonCopyWithImpl<$Res, $Val extends StacFilledButton> +class _$StacFilledButtonCopyWithImpl<$Res> implements $StacFilledButtonCopyWith<$Res> { - _$StacFilledButtonCopyWithImpl(this._value, this._then); + _$StacFilledButtonCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacFilledButton _self; + final $Res Function(StacFilledButton) _then; /// Create a copy of StacFilledButton /// with the given fields replaced by the non-null parameter values. @@ -82,40 +114,40 @@ class _$StacFilledButtonCopyWithImpl<$Res, $Val extends StacFilledButton> Object? clipBehavior = null, Object? child = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( onPressed: freezed == onPressed - ? _value.onPressed + ? _self.onPressed : onPressed // ignore: cast_nullable_to_non_nullable as Map?, onLongPress: freezed == onLongPress - ? _value.onLongPress + ? _self.onLongPress : onLongPress // ignore: cast_nullable_to_non_nullable as Map?, onHover: freezed == onHover - ? _value.onHover + ? _self.onHover : onHover // ignore: cast_nullable_to_non_nullable as Map?, onFocusChange: freezed == onFocusChange - ? _value.onFocusChange + ? _self.onFocusChange : onFocusChange // ignore: cast_nullable_to_non_nullable as Map?, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, child: freezed == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, - ) as $Val); + )); } /// Create a copy of StacFilledButton @@ -123,101 +155,20 @@ class _$StacFilledButtonCopyWithImpl<$Res, $Val extends StacFilledButton> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } } -/// @nodoc -abstract class _$$StacFilledButtonImplCopyWith<$Res> - implements $StacFilledButtonCopyWith<$Res> { - factory _$$StacFilledButtonImplCopyWith(_$StacFilledButtonImpl value, - $Res Function(_$StacFilledButtonImpl) then) = - __$$StacFilledButtonImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? onPressed, - Map? onLongPress, - Map? onHover, - Map? onFocusChange, - StacButtonStyle? style, - bool autofocus, - Clip clipBehavior, - Map? child}); - - @override - $StacButtonStyleCopyWith<$Res>? get style; -} - -/// @nodoc -class __$$StacFilledButtonImplCopyWithImpl<$Res> - extends _$StacFilledButtonCopyWithImpl<$Res, _$StacFilledButtonImpl> - implements _$$StacFilledButtonImplCopyWith<$Res> { - __$$StacFilledButtonImplCopyWithImpl(_$StacFilledButtonImpl _value, - $Res Function(_$StacFilledButtonImpl) _then) - : super(_value, _then); - - /// Create a copy of StacFilledButton - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? onPressed = freezed, - Object? onLongPress = freezed, - Object? onHover = freezed, - Object? onFocusChange = freezed, - Object? style = freezed, - Object? autofocus = null, - Object? clipBehavior = null, - Object? child = freezed, - }) { - return _then(_$StacFilledButtonImpl( - onPressed: freezed == onPressed - ? _value._onPressed - : onPressed // ignore: cast_nullable_to_non_nullable - as Map?, - onLongPress: freezed == onLongPress - ? _value._onLongPress - : onLongPress // ignore: cast_nullable_to_non_nullable - as Map?, - onHover: freezed == onHover - ? _value._onHover - : onHover // ignore: cast_nullable_to_non_nullable - as Map?, - onFocusChange: freezed == onFocusChange - ? _value._onFocusChange - : onFocusChange // ignore: cast_nullable_to_non_nullable - as Map?, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - child: freezed == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacFilledButtonImpl implements _StacFilledButton { - const _$StacFilledButtonImpl( +class _StacFilledButton implements StacFilledButton { + const _StacFilledButton( {final Map? onPressed, final Map? onLongPress, final Map? onHover, @@ -231,9 +182,8 @@ class _$StacFilledButtonImpl implements _StacFilledButton { _onHover = onHover, _onFocusChange = onFocusChange, _child = child; - - factory _$StacFilledButtonImpl.fromJson(Map json) => - _$$StacFilledButtonImplFromJson(json); + factory _StacFilledButton.fromJson(Map json) => + _$StacFilledButtonFromJson(json); final Map? _onPressed; @override @@ -293,16 +243,26 @@ class _$StacFilledButtonImpl implements _StacFilledButton { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacFilledButton + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacFilledButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFilledButtonCopyWith<_StacFilledButton> get copyWith => + __$StacFilledButtonCopyWithImpl<_StacFilledButton>(this, _$identity); + + @override + Map toJson() { + return _$StacFilledButtonToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFilledButtonImpl && + other is _StacFilledButton && const DeepCollectionEquality() .equals(other._onPressed, _onPressed) && const DeepCollectionEquality() @@ -331,58 +291,105 @@ class _$StacFilledButtonImpl implements _StacFilledButton { clipBehavior, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacFilledButton - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacFilledButtonImplCopyWith<_$StacFilledButtonImpl> get copyWith => - __$$StacFilledButtonImplCopyWithImpl<_$StacFilledButtonImpl>( - this, _$identity); + String toString() { + return 'StacFilledButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + } +} +/// @nodoc +abstract mixin class _$StacFilledButtonCopyWith<$Res> + implements $StacFilledButtonCopyWith<$Res> { + factory _$StacFilledButtonCopyWith( + _StacFilledButton value, $Res Function(_StacFilledButton) _then) = + __$StacFilledButtonCopyWithImpl; @override - Map toJson() { - return _$$StacFilledButtonImplToJson( - this, - ); - } + @useResult + $Res call( + {Map? onPressed, + Map? onLongPress, + Map? onHover, + Map? onFocusChange, + StacButtonStyle? style, + bool autofocus, + Clip clipBehavior, + Map? child}); + + @override + $StacButtonStyleCopyWith<$Res>? get style; } -abstract class _StacFilledButton implements StacFilledButton { - const factory _StacFilledButton( - {final Map? onPressed, - final Map? onLongPress, - final Map? onHover, - final Map? onFocusChange, - final StacButtonStyle? style, - final bool autofocus, - final Clip clipBehavior, - final Map? child}) = _$StacFilledButtonImpl; +/// @nodoc +class __$StacFilledButtonCopyWithImpl<$Res> + implements _$StacFilledButtonCopyWith<$Res> { + __$StacFilledButtonCopyWithImpl(this._self, this._then); - factory _StacFilledButton.fromJson(Map json) = - _$StacFilledButtonImpl.fromJson; + final _StacFilledButton _self; + final $Res Function(_StacFilledButton) _then; + /// Create a copy of StacFilledButton + /// with the given fields replaced by the non-null parameter values. @override - Map? get onPressed; - @override - Map? get onLongPress; - @override - Map? get onHover; - @override - Map? get onFocusChange; - @override - StacButtonStyle? get style; - @override - bool get autofocus; - @override - Clip get clipBehavior; - @override - Map? get child; + @pragma('vm:prefer-inline') + $Res call({ + Object? onPressed = freezed, + Object? onLongPress = freezed, + Object? onHover = freezed, + Object? onFocusChange = freezed, + Object? style = freezed, + Object? autofocus = null, + Object? clipBehavior = null, + Object? child = freezed, + }) { + return _then(_StacFilledButton( + onPressed: freezed == onPressed + ? _self._onPressed + : onPressed // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPress: freezed == onLongPress + ? _self._onLongPress + : onLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onHover: freezed == onHover + ? _self._onHover + : onHover // ignore: cast_nullable_to_non_nullable + as Map?, + onFocusChange: freezed == onFocusChange + ? _self._onFocusChange + : onFocusChange // ignore: cast_nullable_to_non_nullable + as Map?, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } /// Create a copy of StacFilledButton /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFilledButtonImplCopyWith<_$StacFilledButtonImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.g.dart b/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.g.dart index f560d80a..d32a66c8 100644 --- a/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.g.dart +++ b/packages/stac/lib/src/parsers/stac_filled_button/stac_filled_button.g.dart @@ -6,9 +6,8 @@ part of 'stac_filled_button.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFilledButtonImpl _$$StacFilledButtonImplFromJson( - Map json) => - _$StacFilledButtonImpl( +_StacFilledButton _$StacFilledButtonFromJson(Map json) => + _StacFilledButton( onPressed: json['onPressed'] as Map?, onLongPress: json['onLongPress'] as Map?, onHover: json['onHover'] as Map?, @@ -22,8 +21,7 @@ _$StacFilledButtonImpl _$$StacFilledButtonImplFromJson( child: json['child'] as Map?, ); -Map _$$StacFilledButtonImplToJson( - _$StacFilledButtonImpl instance) => +Map _$StacFilledButtonToJson(_StacFilledButton instance) => { 'onPressed': instance.onPressed, 'onLongPress': instance.onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.dart b/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.dart index 6d729730..019a1506 100644 --- a/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.dart +++ b/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.dart @@ -8,7 +8,7 @@ part 'stac_fitted_box.freezed.dart'; part 'stac_fitted_box.g.dart'; @freezed -class StacFittedBox with _$StacFittedBox { +abstract class StacFittedBox with _$StacFittedBox { const factory StacFittedBox({ @Default(BoxFit.contain) BoxFit fit, @Default(StacAlignmentDirectional.center) diff --git a/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.freezed.dart b/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.freezed.dart index 8aef0a38..4eac595a 100644 --- a/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,93 +10,56 @@ part of 'stac_fitted_box.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacFittedBox _$StacFittedBoxFromJson(Map json) { - return _StacFittedBox.fromJson(json); -} - /// @nodoc mixin _$StacFittedBox { - BoxFit get fit => throw _privateConstructorUsedError; - StacAlignmentDirectional get alignment => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacFittedBox to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + BoxFit get fit; + StacAlignmentDirectional get alignment; + Clip get clipBehavior; + Map? get child; /// Create a copy of StacFittedBox /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFittedBoxCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacFittedBoxCopyWithImpl( + this as StacFittedBox, _$identity); -/// @nodoc -abstract class $StacFittedBoxCopyWith<$Res> { - factory $StacFittedBoxCopyWith( - StacFittedBox value, $Res Function(StacFittedBox) then) = - _$StacFittedBoxCopyWithImpl<$Res, StacFittedBox>; - @useResult - $Res call( - {BoxFit fit, - StacAlignmentDirectional alignment, - Clip clipBehavior, - Map? child}); -} + /// Serializes this StacFittedBox to a JSON map. + Map toJson(); -/// @nodoc -class _$StacFittedBoxCopyWithImpl<$Res, $Val extends StacFittedBox> - implements $StacFittedBoxCopyWith<$Res> { - _$StacFittedBoxCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacFittedBox && + (identical(other.fit, fit) || other.fit == fit) && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, fit, alignment, clipBehavior, + const DeepCollectionEquality().hash(child)); - /// Create a copy of StacFittedBox - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? fit = null, - Object? alignment = null, - Object? clipBehavior = null, - Object? child = freezed, - }) { - return _then(_value.copyWith( - fit: null == fit - ? _value.fit - : fit // ignore: cast_nullable_to_non_nullable - as BoxFit, - alignment: null == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignmentDirectional, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacFittedBox(fit: $fit, alignment: $alignment, clipBehavior: $clipBehavior, child: $child)'; } } /// @nodoc -abstract class _$$StacFittedBoxImplCopyWith<$Res> - implements $StacFittedBoxCopyWith<$Res> { - factory _$$StacFittedBoxImplCopyWith( - _$StacFittedBoxImpl value, $Res Function(_$StacFittedBoxImpl) then) = - __$$StacFittedBoxImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacFittedBoxCopyWith<$Res> { + factory $StacFittedBoxCopyWith( + StacFittedBox value, $Res Function(StacFittedBox) _then) = + _$StacFittedBoxCopyWithImpl; @useResult $Res call( {BoxFit fit, @@ -105,12 +69,12 @@ abstract class _$$StacFittedBoxImplCopyWith<$Res> } /// @nodoc -class __$$StacFittedBoxImplCopyWithImpl<$Res> - extends _$StacFittedBoxCopyWithImpl<$Res, _$StacFittedBoxImpl> - implements _$$StacFittedBoxImplCopyWith<$Res> { - __$$StacFittedBoxImplCopyWithImpl( - _$StacFittedBoxImpl _value, $Res Function(_$StacFittedBoxImpl) _then) - : super(_value, _then); +class _$StacFittedBoxCopyWithImpl<$Res> + implements $StacFittedBoxCopyWith<$Res> { + _$StacFittedBoxCopyWithImpl(this._self, this._then); + + final StacFittedBox _self; + final $Res Function(StacFittedBox) _then; /// Create a copy of StacFittedBox /// with the given fields replaced by the non-null parameter values. @@ -122,21 +86,21 @@ class __$$StacFittedBoxImplCopyWithImpl<$Res> Object? clipBehavior = null, Object? child = freezed, }) { - return _then(_$StacFittedBoxImpl( + return _then(_self.copyWith( fit: null == fit - ? _value.fit + ? _self.fit : fit // ignore: cast_nullable_to_non_nullable as BoxFit, alignment: null == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignmentDirectional, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -145,16 +109,15 @@ class __$$StacFittedBoxImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacFittedBoxImpl implements _StacFittedBox { - const _$StacFittedBoxImpl( +class _StacFittedBox implements StacFittedBox { + const _StacFittedBox( {this.fit = BoxFit.contain, this.alignment = StacAlignmentDirectional.center, this.clipBehavior = Clip.none, final Map? child}) : _child = child; - - factory _$StacFittedBoxImpl.fromJson(Map json) => - _$$StacFittedBoxImplFromJson(json); + factory _StacFittedBox.fromJson(Map json) => + _$StacFittedBoxFromJson(json); @override @JsonKey() @@ -175,16 +138,26 @@ class _$StacFittedBoxImpl implements _StacFittedBox { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacFittedBox + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacFittedBox(fit: $fit, alignment: $alignment, clipBehavior: $clipBehavior, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFittedBoxCopyWith<_StacFittedBox> get copyWith => + __$StacFittedBoxCopyWithImpl<_StacFittedBox>(this, _$identity); + + @override + Map toJson() { + return _$StacFittedBoxToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFittedBoxImpl && + other is _StacFittedBox && (identical(other.fit, fit) || other.fit == fit) && (identical(other.alignment, alignment) || other.alignment == alignment) && @@ -198,45 +171,64 @@ class _$StacFittedBoxImpl implements _StacFittedBox { int get hashCode => Object.hash(runtimeType, fit, alignment, clipBehavior, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacFittedBox - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacFittedBoxImplCopyWith<_$StacFittedBoxImpl> get copyWith => - __$$StacFittedBoxImplCopyWithImpl<_$StacFittedBoxImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacFittedBoxImplToJson( - this, - ); + String toString() { + return 'StacFittedBox(fit: $fit, alignment: $alignment, clipBehavior: $clipBehavior, child: $child)'; } } -abstract class _StacFittedBox implements StacFittedBox { - const factory _StacFittedBox( - {final BoxFit fit, - final StacAlignmentDirectional alignment, - final Clip clipBehavior, - final Map? child}) = _$StacFittedBoxImpl; +/// @nodoc +abstract mixin class _$StacFittedBoxCopyWith<$Res> + implements $StacFittedBoxCopyWith<$Res> { + factory _$StacFittedBoxCopyWith( + _StacFittedBox value, $Res Function(_StacFittedBox) _then) = + __$StacFittedBoxCopyWithImpl; + @override + @useResult + $Res call( + {BoxFit fit, + StacAlignmentDirectional alignment, + Clip clipBehavior, + Map? child}); +} - factory _StacFittedBox.fromJson(Map json) = - _$StacFittedBoxImpl.fromJson; +/// @nodoc +class __$StacFittedBoxCopyWithImpl<$Res> + implements _$StacFittedBoxCopyWith<$Res> { + __$StacFittedBoxCopyWithImpl(this._self, this._then); - @override - BoxFit get fit; - @override - StacAlignmentDirectional get alignment; - @override - Clip get clipBehavior; - @override - Map? get child; + final _StacFittedBox _self; + final $Res Function(_StacFittedBox) _then; /// Create a copy of StacFittedBox /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFittedBoxImplCopyWith<_$StacFittedBoxImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? fit = null, + Object? alignment = null, + Object? clipBehavior = null, + Object? child = freezed, + }) { + return _then(_StacFittedBox( + fit: null == fit + ? _self.fit + : fit // ignore: cast_nullable_to_non_nullable + as BoxFit, + alignment: null == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignmentDirectional, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.g.dart b/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.g.dart index 569954b6..fd6bb186 100644 --- a/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.g.dart +++ b/packages/stac/lib/src/parsers/stac_fitted_box/stac_fitted_box.g.dart @@ -6,8 +6,8 @@ part of 'stac_fitted_box.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFittedBoxImpl _$$StacFittedBoxImplFromJson(Map json) => - _$StacFittedBoxImpl( +_StacFittedBox _$StacFittedBoxFromJson(Map json) => + _StacFittedBox( fit: $enumDecodeNullable(_$BoxFitEnumMap, json['fit']) ?? BoxFit.contain, alignment: $enumDecodeNullable( _$StacAlignmentDirectionalEnumMap, json['alignment']) ?? @@ -17,7 +17,7 @@ _$StacFittedBoxImpl _$$StacFittedBoxImplFromJson(Map json) => child: json['child'] as Map?, ); -Map _$$StacFittedBoxImplToJson(_$StacFittedBoxImpl instance) => +Map _$StacFittedBoxToJson(_StacFittedBox instance) => { 'fit': _$BoxFitEnumMap[instance.fit]!, 'alignment': _$StacAlignmentDirectionalEnumMap[instance.alignment]!, diff --git a/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.dart b/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.dart index 237965cf..24289d37 100644 --- a/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.dart +++ b/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.dart @@ -7,7 +7,7 @@ part 'stac_flexible.freezed.dart'; part 'stac_flexible.g.dart'; @freezed -class StacFlexible with _$StacFlexible { +abstract class StacFlexible with _$StacFlexible { const factory StacFlexible({ Map? child, @Default(1) int flex, diff --git a/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.freezed.dart b/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.freezed.dart index f6dd6e23..a014200b 100644 --- a/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,94 +10,62 @@ part of 'stac_flexible.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacFlexible _$StacFlexibleFromJson(Map json) { - return _StacFlexible.fromJson(json); -} - /// @nodoc mixin _$StacFlexible { - Map? get child => throw _privateConstructorUsedError; - int get flex => throw _privateConstructorUsedError; - FlexFit get fit => throw _privateConstructorUsedError; - - /// Serializes this StacFlexible to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get child; + int get flex; + FlexFit get fit; /// Create a copy of StacFlexible /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFlexibleCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacFlexibleCopyWithImpl( + this as StacFlexible, _$identity); -/// @nodoc -abstract class $StacFlexibleCopyWith<$Res> { - factory $StacFlexibleCopyWith( - StacFlexible value, $Res Function(StacFlexible) then) = - _$StacFlexibleCopyWithImpl<$Res, StacFlexible>; - @useResult - $Res call({Map? child, int flex, FlexFit fit}); -} + /// Serializes this StacFlexible to a JSON map. + Map toJson(); -/// @nodoc -class _$StacFlexibleCopyWithImpl<$Res, $Val extends StacFlexible> - implements $StacFlexibleCopyWith<$Res> { - _$StacFlexibleCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacFlexible && + const DeepCollectionEquality().equals(other.child, child) && + (identical(other.flex, flex) || other.flex == flex) && + (identical(other.fit, fit) || other.fit == fit)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(child), flex, fit); - /// Create a copy of StacFlexible - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? child = freezed, - Object? flex = null, - Object? fit = null, - }) { - return _then(_value.copyWith( - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - flex: null == flex - ? _value.flex - : flex // ignore: cast_nullable_to_non_nullable - as int, - fit: null == fit - ? _value.fit - : fit // ignore: cast_nullable_to_non_nullable - as FlexFit, - ) as $Val); + String toString() { + return 'StacFlexible(child: $child, flex: $flex, fit: $fit)'; } } /// @nodoc -abstract class _$$StacFlexibleImplCopyWith<$Res> - implements $StacFlexibleCopyWith<$Res> { - factory _$$StacFlexibleImplCopyWith( - _$StacFlexibleImpl value, $Res Function(_$StacFlexibleImpl) then) = - __$$StacFlexibleImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacFlexibleCopyWith<$Res> { + factory $StacFlexibleCopyWith( + StacFlexible value, $Res Function(StacFlexible) _then) = + _$StacFlexibleCopyWithImpl; @useResult $Res call({Map? child, int flex, FlexFit fit}); } /// @nodoc -class __$$StacFlexibleImplCopyWithImpl<$Res> - extends _$StacFlexibleCopyWithImpl<$Res, _$StacFlexibleImpl> - implements _$$StacFlexibleImplCopyWith<$Res> { - __$$StacFlexibleImplCopyWithImpl( - _$StacFlexibleImpl _value, $Res Function(_$StacFlexibleImpl) _then) - : super(_value, _then); +class _$StacFlexibleCopyWithImpl<$Res> implements $StacFlexibleCopyWith<$Res> { + _$StacFlexibleCopyWithImpl(this._self, this._then); + + final StacFlexible _self; + final $Res Function(StacFlexible) _then; /// Create a copy of StacFlexible /// with the given fields replaced by the non-null parameter values. @@ -107,17 +76,17 @@ class __$$StacFlexibleImplCopyWithImpl<$Res> Object? flex = null, Object? fit = null, }) { - return _then(_$StacFlexibleImpl( + return _then(_self.copyWith( child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, flex: null == flex - ? _value.flex + ? _self.flex : flex // ignore: cast_nullable_to_non_nullable as int, fit: null == fit - ? _value.fit + ? _self.fit : fit // ignore: cast_nullable_to_non_nullable as FlexFit, )); @@ -126,15 +95,14 @@ class __$$StacFlexibleImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacFlexibleImpl implements _StacFlexible { - const _$StacFlexibleImpl( +class _StacFlexible implements StacFlexible { + const _StacFlexible( {final Map? child, this.flex = 1, this.fit = FlexFit.loose}) : _child = child; - - factory _$StacFlexibleImpl.fromJson(Map json) => - _$$StacFlexibleImplFromJson(json); + factory _StacFlexible.fromJson(Map json) => + _$StacFlexibleFromJson(json); final Map? _child; @override @@ -153,16 +121,26 @@ class _$StacFlexibleImpl implements _StacFlexible { @JsonKey() final FlexFit fit; + /// Create a copy of StacFlexible + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacFlexible(child: $child, flex: $flex, fit: $fit)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFlexibleCopyWith<_StacFlexible> get copyWith => + __$StacFlexibleCopyWithImpl<_StacFlexible>(this, _$identity); + + @override + Map toJson() { + return _$StacFlexibleToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFlexibleImpl && + other is _StacFlexible && const DeepCollectionEquality().equals(other._child, _child) && (identical(other.flex, flex) || other.flex == flex) && (identical(other.fit, fit) || other.fit == fit)); @@ -173,42 +151,55 @@ class _$StacFlexibleImpl implements _StacFlexible { int get hashCode => Object.hash( runtimeType, const DeepCollectionEquality().hash(_child), flex, fit); - /// Create a copy of StacFlexible - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacFlexibleImplCopyWith<_$StacFlexibleImpl> get copyWith => - __$$StacFlexibleImplCopyWithImpl<_$StacFlexibleImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacFlexibleImplToJson( - this, - ); + String toString() { + return 'StacFlexible(child: $child, flex: $flex, fit: $fit)'; } } -abstract class _StacFlexible implements StacFlexible { - const factory _StacFlexible( - {final Map? child, - final int flex, - final FlexFit fit}) = _$StacFlexibleImpl; +/// @nodoc +abstract mixin class _$StacFlexibleCopyWith<$Res> + implements $StacFlexibleCopyWith<$Res> { + factory _$StacFlexibleCopyWith( + _StacFlexible value, $Res Function(_StacFlexible) _then) = + __$StacFlexibleCopyWithImpl; + @override + @useResult + $Res call({Map? child, int flex, FlexFit fit}); +} - factory _StacFlexible.fromJson(Map json) = - _$StacFlexibleImpl.fromJson; +/// @nodoc +class __$StacFlexibleCopyWithImpl<$Res> + implements _$StacFlexibleCopyWith<$Res> { + __$StacFlexibleCopyWithImpl(this._self, this._then); - @override - Map? get child; - @override - int get flex; - @override - FlexFit get fit; + final _StacFlexible _self; + final $Res Function(_StacFlexible) _then; /// Create a copy of StacFlexible /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFlexibleImplCopyWith<_$StacFlexibleImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? child = freezed, + Object? flex = null, + Object? fit = null, + }) { + return _then(_StacFlexible( + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + flex: null == flex + ? _self.flex + : flex // ignore: cast_nullable_to_non_nullable + as int, + fit: null == fit + ? _self.fit + : fit // ignore: cast_nullable_to_non_nullable + as FlexFit, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.g.dart b/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.g.dart index 7433da59..2c36c27c 100644 --- a/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.g.dart +++ b/packages/stac/lib/src/parsers/stac_flexible/stac_flexible.g.dart @@ -6,14 +6,14 @@ part of 'stac_flexible.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFlexibleImpl _$$StacFlexibleImplFromJson(Map json) => - _$StacFlexibleImpl( +_StacFlexible _$StacFlexibleFromJson(Map json) => + _StacFlexible( child: json['child'] as Map?, flex: (json['flex'] as num?)?.toInt() ?? 1, fit: $enumDecodeNullable(_$FlexFitEnumMap, json['fit']) ?? FlexFit.loose, ); -Map _$$StacFlexibleImplToJson(_$StacFlexibleImpl instance) => +Map _$StacFlexibleToJson(_StacFlexible instance) => { 'child': instance.child, 'flex': instance.flex, diff --git a/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.dart b/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.dart index eca6b935..a3ee9135 100644 --- a/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.dart +++ b/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.dart @@ -8,7 +8,7 @@ part 'stac_floating_action_button.freezed.dart'; part 'stac_floating_action_button.g.dart'; @freezed -class StacFloatingActionButton with _$StacFloatingActionButton { +abstract class StacFloatingActionButton with _$StacFloatingActionButton { const factory StacFloatingActionButton({ Map? onPressed, StacTextStyle? textStyle, diff --git a/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.freezed.dart b/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.freezed.dart index c2d9d8b7..631b30a6 100644 --- a/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,55 +10,127 @@ part of 'stac_floating_action_button.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacFloatingActionButton _$StacFloatingActionButtonFromJson( - Map json) { - return _StacFloatingActionButton.fromJson(json); -} - /// @nodoc mixin _$StacFloatingActionButton { - Map? get onPressed => throw _privateConstructorUsedError; - StacTextStyle? get textStyle => throw _privateConstructorUsedError; - FloatingActionButtonType get buttonType => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - Map? get icon => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get foregroundColor => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - String? get splashColor => throw _privateConstructorUsedError; - StacTextStyle? get extendedTextStyle => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - double? get focusElevation => throw _privateConstructorUsedError; - double? get hoverElevation => throw _privateConstructorUsedError; - double? get disabledElevation => throw _privateConstructorUsedError; - double? get highlightElevation => throw _privateConstructorUsedError; - double? get extendedIconLabelSpacing => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - String? get tooltip => throw _privateConstructorUsedError; - Object? get heroTag => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - - /// Serializes this StacFloatingActionButton to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get onPressed; + StacTextStyle? get textStyle; + FloatingActionButtonType get buttonType; + bool get autofocus; + Map? get icon; + String? get backgroundColor; + String? get foregroundColor; + String? get focusColor; + String? get hoverColor; + String? get splashColor; + StacTextStyle? get extendedTextStyle; + double? get elevation; + double? get focusElevation; + double? get hoverElevation; + double? get disabledElevation; + double? get highlightElevation; + double? get extendedIconLabelSpacing; + bool? get enableFeedback; + String? get tooltip; + Object? get heroTag; + Map get child; /// Create a copy of StacFloatingActionButton /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFloatingActionButtonCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacFloatingActionButtonCopyWithImpl( + this as StacFloatingActionButton, _$identity); + + /// Serializes this StacFloatingActionButton to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacFloatingActionButton && + const DeepCollectionEquality().equals(other.onPressed, onPressed) && + (identical(other.textStyle, textStyle) || + other.textStyle == textStyle) && + (identical(other.buttonType, buttonType) || + other.buttonType == buttonType) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + const DeepCollectionEquality().equals(other.icon, icon) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.foregroundColor, foregroundColor) || + other.foregroundColor == foregroundColor) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.splashColor, splashColor) || + other.splashColor == splashColor) && + (identical(other.extendedTextStyle, extendedTextStyle) || + other.extendedTextStyle == extendedTextStyle) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.focusElevation, focusElevation) || + other.focusElevation == focusElevation) && + (identical(other.hoverElevation, hoverElevation) || + other.hoverElevation == hoverElevation) && + (identical(other.disabledElevation, disabledElevation) || + other.disabledElevation == disabledElevation) && + (identical(other.highlightElevation, highlightElevation) || + other.highlightElevation == highlightElevation) && + (identical( + other.extendedIconLabelSpacing, extendedIconLabelSpacing) || + other.extendedIconLabelSpacing == extendedIconLabelSpacing) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.tooltip, tooltip) || other.tooltip == tooltip) && + const DeepCollectionEquality().equals(other.heroTag, heroTag) && + const DeepCollectionEquality().equals(other.child, child)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(onPressed), + textStyle, + buttonType, + autofocus, + const DeepCollectionEquality().hash(icon), + backgroundColor, + foregroundColor, + focusColor, + hoverColor, + splashColor, + extendedTextStyle, + elevation, + focusElevation, + hoverElevation, + disabledElevation, + highlightElevation, + extendedIconLabelSpacing, + enableFeedback, + tooltip, + const DeepCollectionEquality().hash(heroTag), + const DeepCollectionEquality().hash(child) + ]); + + @override + String toString() { + return 'StacFloatingActionButton(onPressed: $onPressed, textStyle: $textStyle, buttonType: $buttonType, autofocus: $autofocus, icon: $icon, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, focusColor: $focusColor, hoverColor: $hoverColor, splashColor: $splashColor, extendedTextStyle: $extendedTextStyle, elevation: $elevation, focusElevation: $focusElevation, hoverElevation: $hoverElevation, disabledElevation: $disabledElevation, highlightElevation: $highlightElevation, extendedIconLabelSpacing: $extendedIconLabelSpacing, enableFeedback: $enableFeedback, tooltip: $tooltip, heroTag: $heroTag, child: $child)'; + } } /// @nodoc -abstract class $StacFloatingActionButtonCopyWith<$Res> { +abstract mixin class $StacFloatingActionButtonCopyWith<$Res> { factory $StacFloatingActionButtonCopyWith(StacFloatingActionButton value, - $Res Function(StacFloatingActionButton) then) = - _$StacFloatingActionButtonCopyWithImpl<$Res, StacFloatingActionButton>; + $Res Function(StacFloatingActionButton) _then) = + _$StacFloatingActionButtonCopyWithImpl; @useResult $Res call( {Map? onPressed, @@ -87,15 +160,12 @@ abstract class $StacFloatingActionButtonCopyWith<$Res> { } /// @nodoc -class _$StacFloatingActionButtonCopyWithImpl<$Res, - $Val extends StacFloatingActionButton> +class _$StacFloatingActionButtonCopyWithImpl<$Res> implements $StacFloatingActionButtonCopyWith<$Res> { - _$StacFloatingActionButtonCopyWithImpl(this._value, this._then); + _$StacFloatingActionButtonCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacFloatingActionButton _self; + final $Res Function(StacFloatingActionButton) _then; /// Create a copy of StacFloatingActionButton /// with the given fields replaced by the non-null parameter values. @@ -124,89 +194,89 @@ class _$StacFloatingActionButtonCopyWithImpl<$Res, Object? heroTag = freezed, Object? child = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( onPressed: freezed == onPressed - ? _value.onPressed + ? _self.onPressed : onPressed // ignore: cast_nullable_to_non_nullable as Map?, textStyle: freezed == textStyle - ? _value.textStyle + ? _self.textStyle : textStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, buttonType: null == buttonType - ? _value.buttonType + ? _self.buttonType : buttonType // ignore: cast_nullable_to_non_nullable as FloatingActionButtonType, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, icon: freezed == icon - ? _value.icon + ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as Map?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, foregroundColor: freezed == foregroundColor - ? _value.foregroundColor + ? _self.foregroundColor : foregroundColor // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, splashColor: freezed == splashColor - ? _value.splashColor + ? _self.splashColor : splashColor // ignore: cast_nullable_to_non_nullable as String?, extendedTextStyle: freezed == extendedTextStyle - ? _value.extendedTextStyle + ? _self.extendedTextStyle : extendedTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, focusElevation: freezed == focusElevation - ? _value.focusElevation + ? _self.focusElevation : focusElevation // ignore: cast_nullable_to_non_nullable as double?, hoverElevation: freezed == hoverElevation - ? _value.hoverElevation + ? _self.hoverElevation : hoverElevation // ignore: cast_nullable_to_non_nullable as double?, disabledElevation: freezed == disabledElevation - ? _value.disabledElevation + ? _self.disabledElevation : disabledElevation // ignore: cast_nullable_to_non_nullable as double?, highlightElevation: freezed == highlightElevation - ? _value.highlightElevation + ? _self.highlightElevation : highlightElevation // ignore: cast_nullable_to_non_nullable as double?, extendedIconLabelSpacing: freezed == extendedIconLabelSpacing - ? _value.extendedIconLabelSpacing + ? _self.extendedIconLabelSpacing : extendedIconLabelSpacing // ignore: cast_nullable_to_non_nullable as double?, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, tooltip: freezed == tooltip - ? _value.tooltip + ? _self.tooltip : tooltip // ignore: cast_nullable_to_non_nullable as String?, - heroTag: freezed == heroTag ? _value.heroTag : heroTag, + heroTag: freezed == heroTag ? _self.heroTag : heroTag, child: null == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, - ) as $Val); + )); } /// Create a copy of StacFloatingActionButton @@ -214,12 +284,12 @@ class _$StacFloatingActionButtonCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get textStyle { - if (_value.textStyle == null) { + if (_self.textStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.textStyle!, (value) { - return _then(_value.copyWith(textStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.textStyle!, (value) { + return _then(_self.copyWith(textStyle: value)); }); } @@ -228,181 +298,20 @@ class _$StacFloatingActionButtonCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get extendedTextStyle { - if (_value.extendedTextStyle == null) { + if (_self.extendedTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.extendedTextStyle!, (value) { - return _then(_value.copyWith(extendedTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.extendedTextStyle!, (value) { + return _then(_self.copyWith(extendedTextStyle: value)); }); } } -/// @nodoc -abstract class _$$StacFloatingActionButtonImplCopyWith<$Res> - implements $StacFloatingActionButtonCopyWith<$Res> { - factory _$$StacFloatingActionButtonImplCopyWith( - _$StacFloatingActionButtonImpl value, - $Res Function(_$StacFloatingActionButtonImpl) then) = - __$$StacFloatingActionButtonImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? onPressed, - StacTextStyle? textStyle, - FloatingActionButtonType buttonType, - bool autofocus, - Map? icon, - String? backgroundColor, - String? foregroundColor, - String? focusColor, - String? hoverColor, - String? splashColor, - StacTextStyle? extendedTextStyle, - double? elevation, - double? focusElevation, - double? hoverElevation, - double? disabledElevation, - double? highlightElevation, - double? extendedIconLabelSpacing, - bool? enableFeedback, - String? tooltip, - Object? heroTag, - Map child}); - - @override - $StacTextStyleCopyWith<$Res>? get textStyle; - @override - $StacTextStyleCopyWith<$Res>? get extendedTextStyle; -} - -/// @nodoc -class __$$StacFloatingActionButtonImplCopyWithImpl<$Res> - extends _$StacFloatingActionButtonCopyWithImpl<$Res, - _$StacFloatingActionButtonImpl> - implements _$$StacFloatingActionButtonImplCopyWith<$Res> { - __$$StacFloatingActionButtonImplCopyWithImpl( - _$StacFloatingActionButtonImpl _value, - $Res Function(_$StacFloatingActionButtonImpl) _then) - : super(_value, _then); - - /// Create a copy of StacFloatingActionButton - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? onPressed = freezed, - Object? textStyle = freezed, - Object? buttonType = null, - Object? autofocus = null, - Object? icon = freezed, - Object? backgroundColor = freezed, - Object? foregroundColor = freezed, - Object? focusColor = freezed, - Object? hoverColor = freezed, - Object? splashColor = freezed, - Object? extendedTextStyle = freezed, - Object? elevation = freezed, - Object? focusElevation = freezed, - Object? hoverElevation = freezed, - Object? disabledElevation = freezed, - Object? highlightElevation = freezed, - Object? extendedIconLabelSpacing = freezed, - Object? enableFeedback = freezed, - Object? tooltip = freezed, - Object? heroTag = freezed, - Object? child = null, - }) { - return _then(_$StacFloatingActionButtonImpl( - onPressed: freezed == onPressed - ? _value._onPressed - : onPressed // ignore: cast_nullable_to_non_nullable - as Map?, - textStyle: freezed == textStyle - ? _value.textStyle - : textStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - buttonType: null == buttonType - ? _value.buttonType - : buttonType // ignore: cast_nullable_to_non_nullable - as FloatingActionButtonType, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - icon: freezed == icon - ? _value._icon - : icon // ignore: cast_nullable_to_non_nullable - as Map?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - foregroundColor: freezed == foregroundColor - ? _value.foregroundColor - : foregroundColor // ignore: cast_nullable_to_non_nullable - as String?, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - splashColor: freezed == splashColor - ? _value.splashColor - : splashColor // ignore: cast_nullable_to_non_nullable - as String?, - extendedTextStyle: freezed == extendedTextStyle - ? _value.extendedTextStyle - : extendedTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - focusElevation: freezed == focusElevation - ? _value.focusElevation - : focusElevation // ignore: cast_nullable_to_non_nullable - as double?, - hoverElevation: freezed == hoverElevation - ? _value.hoverElevation - : hoverElevation // ignore: cast_nullable_to_non_nullable - as double?, - disabledElevation: freezed == disabledElevation - ? _value.disabledElevation - : disabledElevation // ignore: cast_nullable_to_non_nullable - as double?, - highlightElevation: freezed == highlightElevation - ? _value.highlightElevation - : highlightElevation // ignore: cast_nullable_to_non_nullable - as double?, - extendedIconLabelSpacing: freezed == extendedIconLabelSpacing - ? _value.extendedIconLabelSpacing - : extendedIconLabelSpacing // ignore: cast_nullable_to_non_nullable - as double?, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - tooltip: freezed == tooltip - ? _value.tooltip - : tooltip // ignore: cast_nullable_to_non_nullable - as String?, - heroTag: freezed == heroTag ? _value.heroTag : heroTag, - child: null == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacFloatingActionButtonImpl implements _StacFloatingActionButton { - const _$StacFloatingActionButtonImpl( +class _StacFloatingActionButton implements StacFloatingActionButton { + const _StacFloatingActionButton( {final Map? onPressed, this.textStyle, this.buttonType = FloatingActionButtonType.small, @@ -427,9 +336,8 @@ class _$StacFloatingActionButtonImpl implements _StacFloatingActionButton { : _onPressed = onPressed, _icon = icon, _child = child; - - factory _$StacFloatingActionButtonImpl.fromJson(Map json) => - _$$StacFloatingActionButtonImplFromJson(json); + factory _StacFloatingActionButton.fromJson(Map json) => + _$StacFloatingActionButtonFromJson(json); final Map? _onPressed; @override @@ -497,16 +405,27 @@ class _$StacFloatingActionButtonImpl implements _StacFloatingActionButton { return EqualUnmodifiableMapView(_child); } + /// Create a copy of StacFloatingActionButton + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacFloatingActionButton(onPressed: $onPressed, textStyle: $textStyle, buttonType: $buttonType, autofocus: $autofocus, icon: $icon, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, focusColor: $focusColor, hoverColor: $hoverColor, splashColor: $splashColor, extendedTextStyle: $extendedTextStyle, elevation: $elevation, focusElevation: $focusElevation, hoverElevation: $hoverElevation, disabledElevation: $disabledElevation, highlightElevation: $highlightElevation, extendedIconLabelSpacing: $extendedIconLabelSpacing, enableFeedback: $enableFeedback, tooltip: $tooltip, heroTag: $heroTag, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFloatingActionButtonCopyWith<_StacFloatingActionButton> get copyWith => + __$StacFloatingActionButtonCopyWithImpl<_StacFloatingActionButton>( + this, _$identity); + + @override + Map toJson() { + return _$StacFloatingActionButtonToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFloatingActionButtonImpl && + other is _StacFloatingActionButton && const DeepCollectionEquality() .equals(other._onPressed, _onPressed) && (identical(other.textStyle, textStyle) || @@ -575,98 +494,196 @@ class _$StacFloatingActionButtonImpl implements _StacFloatingActionButton { const DeepCollectionEquality().hash(_child) ]); - /// Create a copy of StacFloatingActionButton - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacFloatingActionButtonImplCopyWith<_$StacFloatingActionButtonImpl> - get copyWith => __$$StacFloatingActionButtonImplCopyWithImpl< - _$StacFloatingActionButtonImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacFloatingActionButtonImplToJson( - this, - ); + String toString() { + return 'StacFloatingActionButton(onPressed: $onPressed, textStyle: $textStyle, buttonType: $buttonType, autofocus: $autofocus, icon: $icon, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, focusColor: $focusColor, hoverColor: $hoverColor, splashColor: $splashColor, extendedTextStyle: $extendedTextStyle, elevation: $elevation, focusElevation: $focusElevation, hoverElevation: $hoverElevation, disabledElevation: $disabledElevation, highlightElevation: $highlightElevation, extendedIconLabelSpacing: $extendedIconLabelSpacing, enableFeedback: $enableFeedback, tooltip: $tooltip, heroTag: $heroTag, child: $child)'; } } -abstract class _StacFloatingActionButton implements StacFloatingActionButton { - const factory _StacFloatingActionButton( - {final Map? onPressed, - final StacTextStyle? textStyle, - final FloatingActionButtonType buttonType, - final bool autofocus, - final Map? icon, - final String? backgroundColor, - final String? foregroundColor, - final String? focusColor, - final String? hoverColor, - final String? splashColor, - final StacTextStyle? extendedTextStyle, - final double? elevation, - final double? focusElevation, - final double? hoverElevation, - final double? disabledElevation, - final double? highlightElevation, - final double? extendedIconLabelSpacing, - final bool? enableFeedback, - final String? tooltip, - final Object? heroTag, - required final Map child}) = - _$StacFloatingActionButtonImpl; - - factory _StacFloatingActionButton.fromJson(Map json) = - _$StacFloatingActionButtonImpl.fromJson; - - @override - Map? get onPressed; - @override - StacTextStyle? get textStyle; - @override - FloatingActionButtonType get buttonType; - @override - bool get autofocus; - @override - Map? get icon; - @override - String? get backgroundColor; - @override - String? get foregroundColor; - @override - String? get focusColor; - @override - String? get hoverColor; - @override - String? get splashColor; - @override - StacTextStyle? get extendedTextStyle; - @override - double? get elevation; - @override - double? get focusElevation; - @override - double? get hoverElevation; - @override - double? get disabledElevation; - @override - double? get highlightElevation; +/// @nodoc +abstract mixin class _$StacFloatingActionButtonCopyWith<$Res> + implements $StacFloatingActionButtonCopyWith<$Res> { + factory _$StacFloatingActionButtonCopyWith(_StacFloatingActionButton value, + $Res Function(_StacFloatingActionButton) _then) = + __$StacFloatingActionButtonCopyWithImpl; @override - double? get extendedIconLabelSpacing; + @useResult + $Res call( + {Map? onPressed, + StacTextStyle? textStyle, + FloatingActionButtonType buttonType, + bool autofocus, + Map? icon, + String? backgroundColor, + String? foregroundColor, + String? focusColor, + String? hoverColor, + String? splashColor, + StacTextStyle? extendedTextStyle, + double? elevation, + double? focusElevation, + double? hoverElevation, + double? disabledElevation, + double? highlightElevation, + double? extendedIconLabelSpacing, + bool? enableFeedback, + String? tooltip, + Object? heroTag, + Map child}); + @override - bool? get enableFeedback; + $StacTextStyleCopyWith<$Res>? get textStyle; @override - String? get tooltip; + $StacTextStyleCopyWith<$Res>? get extendedTextStyle; +} + +/// @nodoc +class __$StacFloatingActionButtonCopyWithImpl<$Res> + implements _$StacFloatingActionButtonCopyWith<$Res> { + __$StacFloatingActionButtonCopyWithImpl(this._self, this._then); + + final _StacFloatingActionButton _self; + final $Res Function(_StacFloatingActionButton) _then; + + /// Create a copy of StacFloatingActionButton + /// with the given fields replaced by the non-null parameter values. @override - Object? get heroTag; + @pragma('vm:prefer-inline') + $Res call({ + Object? onPressed = freezed, + Object? textStyle = freezed, + Object? buttonType = null, + Object? autofocus = null, + Object? icon = freezed, + Object? backgroundColor = freezed, + Object? foregroundColor = freezed, + Object? focusColor = freezed, + Object? hoverColor = freezed, + Object? splashColor = freezed, + Object? extendedTextStyle = freezed, + Object? elevation = freezed, + Object? focusElevation = freezed, + Object? hoverElevation = freezed, + Object? disabledElevation = freezed, + Object? highlightElevation = freezed, + Object? extendedIconLabelSpacing = freezed, + Object? enableFeedback = freezed, + Object? tooltip = freezed, + Object? heroTag = freezed, + Object? child = null, + }) { + return _then(_StacFloatingActionButton( + onPressed: freezed == onPressed + ? _self._onPressed + : onPressed // ignore: cast_nullable_to_non_nullable + as Map?, + textStyle: freezed == textStyle + ? _self.textStyle + : textStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + buttonType: null == buttonType + ? _self.buttonType + : buttonType // ignore: cast_nullable_to_non_nullable + as FloatingActionButtonType, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + icon: freezed == icon + ? _self._icon + : icon // ignore: cast_nullable_to_non_nullable + as Map?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + foregroundColor: freezed == foregroundColor + ? _self.foregroundColor + : foregroundColor // ignore: cast_nullable_to_non_nullable + as String?, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + splashColor: freezed == splashColor + ? _self.splashColor + : splashColor // ignore: cast_nullable_to_non_nullable + as String?, + extendedTextStyle: freezed == extendedTextStyle + ? _self.extendedTextStyle + : extendedTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + focusElevation: freezed == focusElevation + ? _self.focusElevation + : focusElevation // ignore: cast_nullable_to_non_nullable + as double?, + hoverElevation: freezed == hoverElevation + ? _self.hoverElevation + : hoverElevation // ignore: cast_nullable_to_non_nullable + as double?, + disabledElevation: freezed == disabledElevation + ? _self.disabledElevation + : disabledElevation // ignore: cast_nullable_to_non_nullable + as double?, + highlightElevation: freezed == highlightElevation + ? _self.highlightElevation + : highlightElevation // ignore: cast_nullable_to_non_nullable + as double?, + extendedIconLabelSpacing: freezed == extendedIconLabelSpacing + ? _self.extendedIconLabelSpacing + : extendedIconLabelSpacing // ignore: cast_nullable_to_non_nullable + as double?, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + tooltip: freezed == tooltip + ? _self.tooltip + : tooltip // ignore: cast_nullable_to_non_nullable + as String?, + heroTag: freezed == heroTag ? _self.heroTag : heroTag, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + )); + } + + /// Create a copy of StacFloatingActionButton + /// with the given fields replaced by the non-null parameter values. @override - Map get child; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get textStyle { + if (_self.textStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.textStyle!, (value) { + return _then(_self.copyWith(textStyle: value)); + }); + } /// Create a copy of StacFloatingActionButton /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFloatingActionButtonImplCopyWith<_$StacFloatingActionButtonImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get extendedTextStyle { + if (_self.extendedTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.extendedTextStyle!, (value) { + return _then(_self.copyWith(extendedTextStyle: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.g.dart b/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.g.dart index 9c47d329..2d30ff1c 100644 --- a/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.g.dart +++ b/packages/stac/lib/src/parsers/stac_floating_action_button/stac_floating_action_button.g.dart @@ -6,9 +6,9 @@ part of 'stac_floating_action_button.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFloatingActionButtonImpl _$$StacFloatingActionButtonImplFromJson( +_StacFloatingActionButton _$StacFloatingActionButtonFromJson( Map json) => - _$StacFloatingActionButtonImpl( + _StacFloatingActionButton( onPressed: json['onPressed'] as Map?, textStyle: json['textStyle'] == null ? null @@ -39,8 +39,8 @@ _$StacFloatingActionButtonImpl _$$StacFloatingActionButtonImplFromJson( child: json['child'] as Map, ); -Map _$$StacFloatingActionButtonImplToJson( - _$StacFloatingActionButtonImpl instance) => +Map _$StacFloatingActionButtonToJson( + _StacFloatingActionButton instance) => { 'onPressed': instance.onPressed, 'textStyle': instance.textStyle, diff --git a/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.dart b/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.dart index 6fde70c7..feb4c597 100644 --- a/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.dart +++ b/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.dart @@ -8,7 +8,7 @@ part 'stac_floating_action_button_theme_data.freezed.dart'; part 'stac_floating_action_button_theme_data.g.dart'; @freezed -class StacFloatingActionButtonThemeData +abstract class StacFloatingActionButtonThemeData with _$StacFloatingActionButtonThemeData { const factory StacFloatingActionButtonThemeData({ String? foregroundColor, diff --git a/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.freezed.dart b/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.freezed.dart index 7ad0aadf..e2b0a15a 100644 --- a/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,51 +10,109 @@ part of 'stac_floating_action_button_theme_data.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacFloatingActionButtonThemeData _$StacFloatingActionButtonThemeDataFromJson( - Map json) { - return _StacFloatingActionButtonThemeData.fromJson(json); -} - /// @nodoc mixin _$StacFloatingActionButtonThemeData { - String? get foregroundColor => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - String? get splashColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - double? get focusElevation => throw _privateConstructorUsedError; - double? get hoverElevation => throw _privateConstructorUsedError; - double? get disabledElevation => throw _privateConstructorUsedError; - double? get highlightElevation => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - double? get iconSize => throw _privateConstructorUsedError; - double? get extendedIconLabelSpacing => throw _privateConstructorUsedError; - StacEdgeInsets? get extendedPadding => throw _privateConstructorUsedError; - StacTextStyle? get extendedTextStyle => throw _privateConstructorUsedError; - - /// Serializes this StacFloatingActionButtonThemeData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get foregroundColor; + String? get backgroundColor; + String? get focusColor; + String? get hoverColor; + String? get splashColor; + double? get elevation; + double? get focusElevation; + double? get hoverElevation; + double? get disabledElevation; + double? get highlightElevation; + bool? get enableFeedback; + double? get iconSize; + double? get extendedIconLabelSpacing; + StacEdgeInsets? get extendedPadding; + StacTextStyle? get extendedTextStyle; /// Create a copy of StacFloatingActionButtonThemeData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFloatingActionButtonThemeDataCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => _$StacFloatingActionButtonThemeDataCopyWithImpl< + StacFloatingActionButtonThemeData>( + this as StacFloatingActionButtonThemeData, _$identity); + + /// Serializes this StacFloatingActionButtonThemeData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacFloatingActionButtonThemeData && + (identical(other.foregroundColor, foregroundColor) || + other.foregroundColor == foregroundColor) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.splashColor, splashColor) || + other.splashColor == splashColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.focusElevation, focusElevation) || + other.focusElevation == focusElevation) && + (identical(other.hoverElevation, hoverElevation) || + other.hoverElevation == hoverElevation) && + (identical(other.disabledElevation, disabledElevation) || + other.disabledElevation == disabledElevation) && + (identical(other.highlightElevation, highlightElevation) || + other.highlightElevation == highlightElevation) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.iconSize, iconSize) || + other.iconSize == iconSize) && + (identical( + other.extendedIconLabelSpacing, extendedIconLabelSpacing) || + other.extendedIconLabelSpacing == extendedIconLabelSpacing) && + (identical(other.extendedPadding, extendedPadding) || + other.extendedPadding == extendedPadding) && + (identical(other.extendedTextStyle, extendedTextStyle) || + other.extendedTextStyle == extendedTextStyle)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + foregroundColor, + backgroundColor, + focusColor, + hoverColor, + splashColor, + elevation, + focusElevation, + hoverElevation, + disabledElevation, + highlightElevation, + enableFeedback, + iconSize, + extendedIconLabelSpacing, + extendedPadding, + extendedTextStyle); + + @override + String toString() { + return 'StacFloatingActionButtonThemeData(foregroundColor: $foregroundColor, backgroundColor: $backgroundColor, focusColor: $focusColor, hoverColor: $hoverColor, splashColor: $splashColor, elevation: $elevation, focusElevation: $focusElevation, hoverElevation: $hoverElevation, disabledElevation: $disabledElevation, highlightElevation: $highlightElevation, enableFeedback: $enableFeedback, iconSize: $iconSize, extendedIconLabelSpacing: $extendedIconLabelSpacing, extendedPadding: $extendedPadding, extendedTextStyle: $extendedTextStyle)'; + } } /// @nodoc -abstract class $StacFloatingActionButtonThemeDataCopyWith<$Res> { +abstract mixin class $StacFloatingActionButtonThemeDataCopyWith<$Res> { factory $StacFloatingActionButtonThemeDataCopyWith( StacFloatingActionButtonThemeData value, - $Res Function(StacFloatingActionButtonThemeData) then) = - _$StacFloatingActionButtonThemeDataCopyWithImpl<$Res, - StacFloatingActionButtonThemeData>; + $Res Function(StacFloatingActionButtonThemeData) _then) = + _$StacFloatingActionButtonThemeDataCopyWithImpl; @useResult $Res call( {String? foregroundColor, @@ -77,15 +136,12 @@ abstract class $StacFloatingActionButtonThemeDataCopyWith<$Res> { } /// @nodoc -class _$StacFloatingActionButtonThemeDataCopyWithImpl<$Res, - $Val extends StacFloatingActionButtonThemeData> +class _$StacFloatingActionButtonThemeDataCopyWithImpl<$Res> implements $StacFloatingActionButtonThemeDataCopyWith<$Res> { - _$StacFloatingActionButtonThemeDataCopyWithImpl(this._value, this._then); + _$StacFloatingActionButtonThemeDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacFloatingActionButtonThemeData _self; + final $Res Function(StacFloatingActionButtonThemeData) _then; /// Create a copy of StacFloatingActionButtonThemeData /// with the given fields replaced by the non-null parameter values. @@ -108,68 +164,68 @@ class _$StacFloatingActionButtonThemeDataCopyWithImpl<$Res, Object? extendedPadding = freezed, Object? extendedTextStyle = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( foregroundColor: freezed == foregroundColor - ? _value.foregroundColor + ? _self.foregroundColor : foregroundColor // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, splashColor: freezed == splashColor - ? _value.splashColor + ? _self.splashColor : splashColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, focusElevation: freezed == focusElevation - ? _value.focusElevation + ? _self.focusElevation : focusElevation // ignore: cast_nullable_to_non_nullable as double?, hoverElevation: freezed == hoverElevation - ? _value.hoverElevation + ? _self.hoverElevation : hoverElevation // ignore: cast_nullable_to_non_nullable as double?, disabledElevation: freezed == disabledElevation - ? _value.disabledElevation + ? _self.disabledElevation : disabledElevation // ignore: cast_nullable_to_non_nullable as double?, highlightElevation: freezed == highlightElevation - ? _value.highlightElevation + ? _self.highlightElevation : highlightElevation // ignore: cast_nullable_to_non_nullable as double?, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, iconSize: freezed == iconSize - ? _value.iconSize + ? _self.iconSize : iconSize // ignore: cast_nullable_to_non_nullable as double?, extendedIconLabelSpacing: freezed == extendedIconLabelSpacing - ? _value.extendedIconLabelSpacing + ? _self.extendedIconLabelSpacing : extendedIconLabelSpacing // ignore: cast_nullable_to_non_nullable as double?, extendedPadding: freezed == extendedPadding - ? _value.extendedPadding + ? _self.extendedPadding : extendedPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, extendedTextStyle: freezed == extendedTextStyle - ? _value.extendedTextStyle + ? _self.extendedTextStyle : extendedTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, - ) as $Val); + )); } /// Create a copy of StacFloatingActionButtonThemeData @@ -177,12 +233,12 @@ class _$StacFloatingActionButtonThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get extendedPadding { - if (_value.extendedPadding == null) { + if (_self.extendedPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.extendedPadding!, (value) { - return _then(_value.copyWith(extendedPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.extendedPadding!, (value) { + return _then(_self.copyWith(extendedPadding: value)); }); } @@ -191,149 +247,21 @@ class _$StacFloatingActionButtonThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get extendedTextStyle { - if (_value.extendedTextStyle == null) { + if (_self.extendedTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.extendedTextStyle!, (value) { - return _then(_value.copyWith(extendedTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.extendedTextStyle!, (value) { + return _then(_self.copyWith(extendedTextStyle: value)); }); } } -/// @nodoc -abstract class _$$StacFloatingActionButtonThemeDataImplCopyWith<$Res> - implements $StacFloatingActionButtonThemeDataCopyWith<$Res> { - factory _$$StacFloatingActionButtonThemeDataImplCopyWith( - _$StacFloatingActionButtonThemeDataImpl value, - $Res Function(_$StacFloatingActionButtonThemeDataImpl) then) = - __$$StacFloatingActionButtonThemeDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? foregroundColor, - String? backgroundColor, - String? focusColor, - String? hoverColor, - String? splashColor, - double? elevation, - double? focusElevation, - double? hoverElevation, - double? disabledElevation, - double? highlightElevation, - bool? enableFeedback, - double? iconSize, - double? extendedIconLabelSpacing, - StacEdgeInsets? extendedPadding, - StacTextStyle? extendedTextStyle}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get extendedPadding; - @override - $StacTextStyleCopyWith<$Res>? get extendedTextStyle; -} - -/// @nodoc -class __$$StacFloatingActionButtonThemeDataImplCopyWithImpl<$Res> - extends _$StacFloatingActionButtonThemeDataCopyWithImpl<$Res, - _$StacFloatingActionButtonThemeDataImpl> - implements _$$StacFloatingActionButtonThemeDataImplCopyWith<$Res> { - __$$StacFloatingActionButtonThemeDataImplCopyWithImpl( - _$StacFloatingActionButtonThemeDataImpl _value, - $Res Function(_$StacFloatingActionButtonThemeDataImpl) _then) - : super(_value, _then); - - /// Create a copy of StacFloatingActionButtonThemeData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? foregroundColor = freezed, - Object? backgroundColor = freezed, - Object? focusColor = freezed, - Object? hoverColor = freezed, - Object? splashColor = freezed, - Object? elevation = freezed, - Object? focusElevation = freezed, - Object? hoverElevation = freezed, - Object? disabledElevation = freezed, - Object? highlightElevation = freezed, - Object? enableFeedback = freezed, - Object? iconSize = freezed, - Object? extendedIconLabelSpacing = freezed, - Object? extendedPadding = freezed, - Object? extendedTextStyle = freezed, - }) { - return _then(_$StacFloatingActionButtonThemeDataImpl( - foregroundColor: freezed == foregroundColor - ? _value.foregroundColor - : foregroundColor // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - splashColor: freezed == splashColor - ? _value.splashColor - : splashColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - focusElevation: freezed == focusElevation - ? _value.focusElevation - : focusElevation // ignore: cast_nullable_to_non_nullable - as double?, - hoverElevation: freezed == hoverElevation - ? _value.hoverElevation - : hoverElevation // ignore: cast_nullable_to_non_nullable - as double?, - disabledElevation: freezed == disabledElevation - ? _value.disabledElevation - : disabledElevation // ignore: cast_nullable_to_non_nullable - as double?, - highlightElevation: freezed == highlightElevation - ? _value.highlightElevation - : highlightElevation // ignore: cast_nullable_to_non_nullable - as double?, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - iconSize: freezed == iconSize - ? _value.iconSize - : iconSize // ignore: cast_nullable_to_non_nullable - as double?, - extendedIconLabelSpacing: freezed == extendedIconLabelSpacing - ? _value.extendedIconLabelSpacing - : extendedIconLabelSpacing // ignore: cast_nullable_to_non_nullable - as double?, - extendedPadding: freezed == extendedPadding - ? _value.extendedPadding - : extendedPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - extendedTextStyle: freezed == extendedTextStyle - ? _value.extendedTextStyle - : extendedTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacFloatingActionButtonThemeDataImpl - implements _StacFloatingActionButtonThemeData { - const _$StacFloatingActionButtonThemeDataImpl( +class _StacFloatingActionButtonThemeData + implements StacFloatingActionButtonThemeData { + const _StacFloatingActionButtonThemeData( {this.foregroundColor, this.backgroundColor, this.focusColor, @@ -349,10 +277,9 @@ class _$StacFloatingActionButtonThemeDataImpl this.extendedIconLabelSpacing, this.extendedPadding, this.extendedTextStyle}); - - factory _$StacFloatingActionButtonThemeDataImpl.fromJson( + factory _StacFloatingActionButtonThemeData.fromJson( Map json) => - _$$StacFloatingActionButtonThemeDataImplFromJson(json); + _$StacFloatingActionButtonThemeDataFromJson(json); @override final String? foregroundColor; @@ -385,16 +312,28 @@ class _$StacFloatingActionButtonThemeDataImpl @override final StacTextStyle? extendedTextStyle; + /// Create a copy of StacFloatingActionButtonThemeData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacFloatingActionButtonThemeData(foregroundColor: $foregroundColor, backgroundColor: $backgroundColor, focusColor: $focusColor, hoverColor: $hoverColor, splashColor: $splashColor, elevation: $elevation, focusElevation: $focusElevation, hoverElevation: $hoverElevation, disabledElevation: $disabledElevation, highlightElevation: $highlightElevation, enableFeedback: $enableFeedback, iconSize: $iconSize, extendedIconLabelSpacing: $extendedIconLabelSpacing, extendedPadding: $extendedPadding, extendedTextStyle: $extendedTextStyle)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFloatingActionButtonThemeDataCopyWith< + _StacFloatingActionButtonThemeData> + get copyWith => __$StacFloatingActionButtonThemeDataCopyWithImpl< + _StacFloatingActionButtonThemeData>(this, _$identity); + + @override + Map toJson() { + return _$StacFloatingActionButtonThemeDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFloatingActionButtonThemeDataImpl && + other is _StacFloatingActionButtonThemeData && (identical(other.foregroundColor, foregroundColor) || other.foregroundColor == foregroundColor) && (identical(other.backgroundColor, backgroundColor) || @@ -448,84 +387,164 @@ class _$StacFloatingActionButtonThemeDataImpl extendedPadding, extendedTextStyle); - /// Create a copy of StacFloatingActionButtonThemeData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacFloatingActionButtonThemeDataImplCopyWith< - _$StacFloatingActionButtonThemeDataImpl> - get copyWith => __$$StacFloatingActionButtonThemeDataImplCopyWithImpl< - _$StacFloatingActionButtonThemeDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacFloatingActionButtonThemeDataImplToJson( - this, - ); + String toString() { + return 'StacFloatingActionButtonThemeData(foregroundColor: $foregroundColor, backgroundColor: $backgroundColor, focusColor: $focusColor, hoverColor: $hoverColor, splashColor: $splashColor, elevation: $elevation, focusElevation: $focusElevation, hoverElevation: $hoverElevation, disabledElevation: $disabledElevation, highlightElevation: $highlightElevation, enableFeedback: $enableFeedback, iconSize: $iconSize, extendedIconLabelSpacing: $extendedIconLabelSpacing, extendedPadding: $extendedPadding, extendedTextStyle: $extendedTextStyle)'; } } -abstract class _StacFloatingActionButtonThemeData - implements StacFloatingActionButtonThemeData { - const factory _StacFloatingActionButtonThemeData( - {final String? foregroundColor, - final String? backgroundColor, - final String? focusColor, - final String? hoverColor, - final String? splashColor, - final double? elevation, - final double? focusElevation, - final double? hoverElevation, - final double? disabledElevation, - final double? highlightElevation, - final bool? enableFeedback, - final double? iconSize, - final double? extendedIconLabelSpacing, - final StacEdgeInsets? extendedPadding, - final StacTextStyle? extendedTextStyle}) = - _$StacFloatingActionButtonThemeDataImpl; - - factory _StacFloatingActionButtonThemeData.fromJson( - Map json) = - _$StacFloatingActionButtonThemeDataImpl.fromJson; - - @override - String? get foregroundColor; - @override - String? get backgroundColor; - @override - String? get focusColor; - @override - String? get hoverColor; - @override - String? get splashColor; - @override - double? get elevation; - @override - double? get focusElevation; - @override - double? get hoverElevation; - @override - double? get disabledElevation; - @override - double? get highlightElevation; +/// @nodoc +abstract mixin class _$StacFloatingActionButtonThemeDataCopyWith<$Res> + implements $StacFloatingActionButtonThemeDataCopyWith<$Res> { + factory _$StacFloatingActionButtonThemeDataCopyWith( + _StacFloatingActionButtonThemeData value, + $Res Function(_StacFloatingActionButtonThemeData) _then) = + __$StacFloatingActionButtonThemeDataCopyWithImpl; @override - bool? get enableFeedback; + @useResult + $Res call( + {String? foregroundColor, + String? backgroundColor, + String? focusColor, + String? hoverColor, + String? splashColor, + double? elevation, + double? focusElevation, + double? hoverElevation, + double? disabledElevation, + double? highlightElevation, + bool? enableFeedback, + double? iconSize, + double? extendedIconLabelSpacing, + StacEdgeInsets? extendedPadding, + StacTextStyle? extendedTextStyle}); + @override - double? get iconSize; + $StacEdgeInsetsCopyWith<$Res>? get extendedPadding; @override - double? get extendedIconLabelSpacing; + $StacTextStyleCopyWith<$Res>? get extendedTextStyle; +} + +/// @nodoc +class __$StacFloatingActionButtonThemeDataCopyWithImpl<$Res> + implements _$StacFloatingActionButtonThemeDataCopyWith<$Res> { + __$StacFloatingActionButtonThemeDataCopyWithImpl(this._self, this._then); + + final _StacFloatingActionButtonThemeData _self; + final $Res Function(_StacFloatingActionButtonThemeData) _then; + + /// Create a copy of StacFloatingActionButtonThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacEdgeInsets? get extendedPadding; + @pragma('vm:prefer-inline') + $Res call({ + Object? foregroundColor = freezed, + Object? backgroundColor = freezed, + Object? focusColor = freezed, + Object? hoverColor = freezed, + Object? splashColor = freezed, + Object? elevation = freezed, + Object? focusElevation = freezed, + Object? hoverElevation = freezed, + Object? disabledElevation = freezed, + Object? highlightElevation = freezed, + Object? enableFeedback = freezed, + Object? iconSize = freezed, + Object? extendedIconLabelSpacing = freezed, + Object? extendedPadding = freezed, + Object? extendedTextStyle = freezed, + }) { + return _then(_StacFloatingActionButtonThemeData( + foregroundColor: freezed == foregroundColor + ? _self.foregroundColor + : foregroundColor // ignore: cast_nullable_to_non_nullable + as String?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + splashColor: freezed == splashColor + ? _self.splashColor + : splashColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + focusElevation: freezed == focusElevation + ? _self.focusElevation + : focusElevation // ignore: cast_nullable_to_non_nullable + as double?, + hoverElevation: freezed == hoverElevation + ? _self.hoverElevation + : hoverElevation // ignore: cast_nullable_to_non_nullable + as double?, + disabledElevation: freezed == disabledElevation + ? _self.disabledElevation + : disabledElevation // ignore: cast_nullable_to_non_nullable + as double?, + highlightElevation: freezed == highlightElevation + ? _self.highlightElevation + : highlightElevation // ignore: cast_nullable_to_non_nullable + as double?, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + iconSize: freezed == iconSize + ? _self.iconSize + : iconSize // ignore: cast_nullable_to_non_nullable + as double?, + extendedIconLabelSpacing: freezed == extendedIconLabelSpacing + ? _self.extendedIconLabelSpacing + : extendedIconLabelSpacing // ignore: cast_nullable_to_non_nullable + as double?, + extendedPadding: freezed == extendedPadding + ? _self.extendedPadding + : extendedPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + extendedTextStyle: freezed == extendedTextStyle + ? _self.extendedTextStyle + : extendedTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + )); + } + + /// Create a copy of StacFloatingActionButtonThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get extendedTextStyle; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get extendedPadding { + if (_self.extendedPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.extendedPadding!, (value) { + return _then(_self.copyWith(extendedPadding: value)); + }); + } /// Create a copy of StacFloatingActionButtonThemeData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFloatingActionButtonThemeDataImplCopyWith< - _$StacFloatingActionButtonThemeDataImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get extendedTextStyle { + if (_self.extendedTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.extendedTextStyle!, (value) { + return _then(_self.copyWith(extendedTextStyle: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.g.dart b/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.g.dart index 696ec39d..16bbee49 100644 --- a/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.g.dart +++ b/packages/stac/lib/src/parsers/stac_floating_action_button_theme_data/stac_floating_action_button_theme_data.g.dart @@ -6,34 +6,33 @@ part of 'stac_floating_action_button_theme_data.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFloatingActionButtonThemeDataImpl - _$$StacFloatingActionButtonThemeDataImplFromJson( - Map json) => - _$StacFloatingActionButtonThemeDataImpl( - foregroundColor: json['foregroundColor'] as String?, - backgroundColor: json['backgroundColor'] as String?, - focusColor: json['focusColor'] as String?, - hoverColor: json['hoverColor'] as String?, - splashColor: json['splashColor'] as String?, - elevation: (json['elevation'] as num?)?.toDouble(), - focusElevation: (json['focusElevation'] as num?)?.toDouble(), - hoverElevation: (json['hoverElevation'] as num?)?.toDouble(), - disabledElevation: (json['disabledElevation'] as num?)?.toDouble(), - highlightElevation: (json['highlightElevation'] as num?)?.toDouble(), - enableFeedback: json['enableFeedback'] as bool?, - iconSize: (json['iconSize'] as num?)?.toDouble(), - extendedIconLabelSpacing: - (json['extendedIconLabelSpacing'] as num?)?.toDouble(), - extendedPadding: json['extendedPadding'] == null - ? null - : StacEdgeInsets.fromJson(json['extendedPadding']), - extendedTextStyle: json['extendedTextStyle'] == null - ? null - : StacTextStyle.fromJson(json['extendedTextStyle']), - ); +_StacFloatingActionButtonThemeData _$StacFloatingActionButtonThemeDataFromJson( + Map json) => + _StacFloatingActionButtonThemeData( + foregroundColor: json['foregroundColor'] as String?, + backgroundColor: json['backgroundColor'] as String?, + focusColor: json['focusColor'] as String?, + hoverColor: json['hoverColor'] as String?, + splashColor: json['splashColor'] as String?, + elevation: (json['elevation'] as num?)?.toDouble(), + focusElevation: (json['focusElevation'] as num?)?.toDouble(), + hoverElevation: (json['hoverElevation'] as num?)?.toDouble(), + disabledElevation: (json['disabledElevation'] as num?)?.toDouble(), + highlightElevation: (json['highlightElevation'] as num?)?.toDouble(), + enableFeedback: json['enableFeedback'] as bool?, + iconSize: (json['iconSize'] as num?)?.toDouble(), + extendedIconLabelSpacing: + (json['extendedIconLabelSpacing'] as num?)?.toDouble(), + extendedPadding: json['extendedPadding'] == null + ? null + : StacEdgeInsets.fromJson(json['extendedPadding']), + extendedTextStyle: json['extendedTextStyle'] == null + ? null + : StacTextStyle.fromJson(json['extendedTextStyle']), + ); -Map _$$StacFloatingActionButtonThemeDataImplToJson( - _$StacFloatingActionButtonThemeDataImpl instance) => +Map _$StacFloatingActionButtonThemeDataToJson( + _StacFloatingActionButtonThemeData instance) => { 'foregroundColor': instance.foregroundColor, 'backgroundColor': instance.backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_form/stac_form.dart b/packages/stac/lib/src/parsers/stac_form/stac_form.dart index aa588a08..ce5f8dce 100644 --- a/packages/stac/lib/src/parsers/stac_form/stac_form.dart +++ b/packages/stac/lib/src/parsers/stac_form/stac_form.dart @@ -7,7 +7,7 @@ part 'stac_form.freezed.dart'; part 'stac_form.g.dart'; @freezed -class StacForm with _$StacForm { +abstract class StacForm with _$StacForm { const factory StacForm({ AutovalidateMode? autovalidateMode, required Map child, diff --git a/packages/stac/lib/src/parsers/stac_form/stac_form.freezed.dart b/packages/stac/lib/src/parsers/stac_form/stac_form.freezed.dart index 0a3ff4f5..cfcd0ed5 100644 --- a/packages/stac/lib/src/parsers/stac_form/stac_form.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_form/stac_form.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,87 +10,59 @@ part of 'stac_form.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacForm _$StacFormFromJson(Map json) { - return _StacForm.fromJson(json); -} - /// @nodoc mixin _$StacForm { - AutovalidateMode? get autovalidateMode => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - - /// Serializes this StacForm to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + AutovalidateMode? get autovalidateMode; + Map get child; /// Create a copy of StacForm /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFormCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacFormCopyWithImpl(this as StacForm, _$identity); -/// @nodoc -abstract class $StacFormCopyWith<$Res> { - factory $StacFormCopyWith(StacForm value, $Res Function(StacForm) then) = - _$StacFormCopyWithImpl<$Res, StacForm>; - @useResult - $Res call({AutovalidateMode? autovalidateMode, Map child}); -} + /// Serializes this StacForm to a JSON map. + Map toJson(); -/// @nodoc -class _$StacFormCopyWithImpl<$Res, $Val extends StacForm> - implements $StacFormCopyWith<$Res> { - _$StacFormCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacForm && + (identical(other.autovalidateMode, autovalidateMode) || + other.autovalidateMode == autovalidateMode) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, autovalidateMode, + const DeepCollectionEquality().hash(child)); - /// Create a copy of StacForm - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? autovalidateMode = freezed, - Object? child = null, - }) { - return _then(_value.copyWith( - autovalidateMode: freezed == autovalidateMode - ? _value.autovalidateMode - : autovalidateMode // ignore: cast_nullable_to_non_nullable - as AutovalidateMode?, - child: null == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + String toString() { + return 'StacForm(autovalidateMode: $autovalidateMode, child: $child)'; } } /// @nodoc -abstract class _$$StacFormImplCopyWith<$Res> - implements $StacFormCopyWith<$Res> { - factory _$$StacFormImplCopyWith( - _$StacFormImpl value, $Res Function(_$StacFormImpl) then) = - __$$StacFormImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacFormCopyWith<$Res> { + factory $StacFormCopyWith(StacForm value, $Res Function(StacForm) _then) = + _$StacFormCopyWithImpl; @useResult $Res call({AutovalidateMode? autovalidateMode, Map child}); } /// @nodoc -class __$$StacFormImplCopyWithImpl<$Res> - extends _$StacFormCopyWithImpl<$Res, _$StacFormImpl> - implements _$$StacFormImplCopyWith<$Res> { - __$$StacFormImplCopyWithImpl( - _$StacFormImpl _value, $Res Function(_$StacFormImpl) _then) - : super(_value, _then); +class _$StacFormCopyWithImpl<$Res> implements $StacFormCopyWith<$Res> { + _$StacFormCopyWithImpl(this._self, this._then); + + final StacForm _self; + final $Res Function(StacForm) _then; /// Create a copy of StacForm /// with the given fields replaced by the non-null parameter values. @@ -99,13 +72,13 @@ class __$$StacFormImplCopyWithImpl<$Res> Object? autovalidateMode = freezed, Object? child = null, }) { - return _then(_$StacFormImpl( + return _then(_self.copyWith( autovalidateMode: freezed == autovalidateMode - ? _value.autovalidateMode + ? _self.autovalidateMode : autovalidateMode // ignore: cast_nullable_to_non_nullable as AutovalidateMode?, child: null == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, )); @@ -114,13 +87,12 @@ class __$$StacFormImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacFormImpl implements _StacForm { - const _$StacFormImpl( +class _StacForm implements StacForm { + const _StacForm( {this.autovalidateMode, required final Map child}) : _child = child; - - factory _$StacFormImpl.fromJson(Map json) => - _$$StacFormImplFromJson(json); + factory _StacForm.fromJson(Map json) => + _$StacFormFromJson(json); @override final AutovalidateMode? autovalidateMode; @@ -132,16 +104,26 @@ class _$StacFormImpl implements _StacForm { return EqualUnmodifiableMapView(_child); } + /// Create a copy of StacForm + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacForm(autovalidateMode: $autovalidateMode, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFormCopyWith<_StacForm> get copyWith => + __$StacFormCopyWithImpl<_StacForm>(this, _$identity); + + @override + Map toJson() { + return _$StacFormToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFormImpl && + other is _StacForm && (identical(other.autovalidateMode, autovalidateMode) || other.autovalidateMode == autovalidateMode) && const DeepCollectionEquality().equals(other._child, _child)); @@ -152,39 +134,48 @@ class _$StacFormImpl implements _StacForm { int get hashCode => Object.hash(runtimeType, autovalidateMode, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacForm - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacFormImplCopyWith<_$StacFormImpl> get copyWith => - __$$StacFormImplCopyWithImpl<_$StacFormImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacFormImplToJson( - this, - ); + String toString() { + return 'StacForm(autovalidateMode: $autovalidateMode, child: $child)'; } } -abstract class _StacForm implements StacForm { - const factory _StacForm( - {final AutovalidateMode? autovalidateMode, - required final Map child}) = _$StacFormImpl; +/// @nodoc +abstract mixin class _$StacFormCopyWith<$Res> + implements $StacFormCopyWith<$Res> { + factory _$StacFormCopyWith(_StacForm value, $Res Function(_StacForm) _then) = + __$StacFormCopyWithImpl; + @override + @useResult + $Res call({AutovalidateMode? autovalidateMode, Map child}); +} - factory _StacForm.fromJson(Map json) = - _$StacFormImpl.fromJson; +/// @nodoc +class __$StacFormCopyWithImpl<$Res> implements _$StacFormCopyWith<$Res> { + __$StacFormCopyWithImpl(this._self, this._then); - @override - AutovalidateMode? get autovalidateMode; - @override - Map get child; + final _StacForm _self; + final $Res Function(_StacForm) _then; /// Create a copy of StacForm /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFormImplCopyWith<_$StacFormImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? autovalidateMode = freezed, + Object? child = null, + }) { + return _then(_StacForm( + autovalidateMode: freezed == autovalidateMode + ? _self.autovalidateMode + : autovalidateMode // ignore: cast_nullable_to_non_nullable + as AutovalidateMode?, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_form/stac_form.g.dart b/packages/stac/lib/src/parsers/stac_form/stac_form.g.dart index c26579f2..ca7c8baa 100644 --- a/packages/stac/lib/src/parsers/stac_form/stac_form.g.dart +++ b/packages/stac/lib/src/parsers/stac_form/stac_form.g.dart @@ -6,15 +6,13 @@ part of 'stac_form.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFormImpl _$$StacFormImplFromJson(Map json) => - _$StacFormImpl( +_StacForm _$StacFormFromJson(Map json) => _StacForm( autovalidateMode: $enumDecodeNullable( _$AutovalidateModeEnumMap, json['autovalidateMode']), child: json['child'] as Map, ); -Map _$$StacFormImplToJson(_$StacFormImpl instance) => - { +Map _$StacFormToJson(_StacForm instance) => { 'autovalidateMode': _$AutovalidateModeEnumMap[instance.autovalidateMode], 'child': instance.child, }; diff --git a/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.dart b/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.dart index b8634930..df00f4d9 100644 --- a/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.dart +++ b/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.dart @@ -4,7 +4,7 @@ part 'stac_form_validator.freezed.dart'; part 'stac_form_validator.g.dart'; @freezed -class StacFormFieldValidator with _$StacFormFieldValidator { +abstract class StacFormFieldValidator with _$StacFormFieldValidator { const factory StacFormFieldValidator({ required String rule, String? message, diff --git a/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.freezed.dart b/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.freezed.dart index 7230f015..6824c37f 100644 --- a/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,93 +10,60 @@ part of 'stac_form_validator.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacFormFieldValidator _$StacFormFieldValidatorFromJson( - Map json) { - return _StacFormFieldValidator.fromJson(json); -} - /// @nodoc mixin _$StacFormFieldValidator { - String get rule => throw _privateConstructorUsedError; - String? get message => throw _privateConstructorUsedError; - - /// Serializes this StacFormFieldValidator to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get rule; + String? get message; /// Create a copy of StacFormFieldValidator /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFormFieldValidatorCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacFormFieldValidatorCopyWithImpl( + this as StacFormFieldValidator, _$identity); -/// @nodoc -abstract class $StacFormFieldValidatorCopyWith<$Res> { - factory $StacFormFieldValidatorCopyWith(StacFormFieldValidator value, - $Res Function(StacFormFieldValidator) then) = - _$StacFormFieldValidatorCopyWithImpl<$Res, StacFormFieldValidator>; - @useResult - $Res call({String rule, String? message}); -} + /// Serializes this StacFormFieldValidator to a JSON map. + Map toJson(); -/// @nodoc -class _$StacFormFieldValidatorCopyWithImpl<$Res, - $Val extends StacFormFieldValidator> - implements $StacFormFieldValidatorCopyWith<$Res> { - _$StacFormFieldValidatorCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacFormFieldValidator && + (identical(other.rule, rule) || other.rule == rule) && + (identical(other.message, message) || other.message == message)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, rule, message); - /// Create a copy of StacFormFieldValidator - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? rule = null, - Object? message = freezed, - }) { - return _then(_value.copyWith( - rule: null == rule - ? _value.rule - : rule // ignore: cast_nullable_to_non_nullable - as String, - message: freezed == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + String toString() { + return 'StacFormFieldValidator(rule: $rule, message: $message)'; } } /// @nodoc -abstract class _$$StacFormFieldValidatorImplCopyWith<$Res> - implements $StacFormFieldValidatorCopyWith<$Res> { - factory _$$StacFormFieldValidatorImplCopyWith( - _$StacFormFieldValidatorImpl value, - $Res Function(_$StacFormFieldValidatorImpl) then) = - __$$StacFormFieldValidatorImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacFormFieldValidatorCopyWith<$Res> { + factory $StacFormFieldValidatorCopyWith(StacFormFieldValidator value, + $Res Function(StacFormFieldValidator) _then) = + _$StacFormFieldValidatorCopyWithImpl; @useResult $Res call({String rule, String? message}); } /// @nodoc -class __$$StacFormFieldValidatorImplCopyWithImpl<$Res> - extends _$StacFormFieldValidatorCopyWithImpl<$Res, - _$StacFormFieldValidatorImpl> - implements _$$StacFormFieldValidatorImplCopyWith<$Res> { - __$$StacFormFieldValidatorImplCopyWithImpl( - _$StacFormFieldValidatorImpl _value, - $Res Function(_$StacFormFieldValidatorImpl) _then) - : super(_value, _then); +class _$StacFormFieldValidatorCopyWithImpl<$Res> + implements $StacFormFieldValidatorCopyWith<$Res> { + _$StacFormFieldValidatorCopyWithImpl(this._self, this._then); + + final StacFormFieldValidator _self; + final $Res Function(StacFormFieldValidator) _then; /// Create a copy of StacFormFieldValidator /// with the given fields replaced by the non-null parameter values. @@ -105,13 +73,13 @@ class __$$StacFormFieldValidatorImplCopyWithImpl<$Res> Object? rule = null, Object? message = freezed, }) { - return _then(_$StacFormFieldValidatorImpl( + return _then(_self.copyWith( rule: null == rule - ? _value.rule + ? _self.rule : rule // ignore: cast_nullable_to_non_nullable as String, message: freezed == message - ? _value.message + ? _self.message : message // ignore: cast_nullable_to_non_nullable as String?, )); @@ -120,27 +88,37 @@ class __$$StacFormFieldValidatorImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacFormFieldValidatorImpl implements _StacFormFieldValidator { - const _$StacFormFieldValidatorImpl({required this.rule, this.message}); - - factory _$StacFormFieldValidatorImpl.fromJson(Map json) => - _$$StacFormFieldValidatorImplFromJson(json); +class _StacFormFieldValidator implements StacFormFieldValidator { + const _StacFormFieldValidator({required this.rule, this.message}); + factory _StacFormFieldValidator.fromJson(Map json) => + _$StacFormFieldValidatorFromJson(json); @override final String rule; @override final String? message; + /// Create a copy of StacFormFieldValidator + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacFormFieldValidator(rule: $rule, message: $message)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFormFieldValidatorCopyWith<_StacFormFieldValidator> get copyWith => + __$StacFormFieldValidatorCopyWithImpl<_StacFormFieldValidator>( + this, _$identity); + + @override + Map toJson() { + return _$StacFormFieldValidatorToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFormFieldValidatorImpl && + other is _StacFormFieldValidator && (identical(other.rule, rule) || other.rule == rule) && (identical(other.message, message) || other.message == message)); } @@ -149,40 +127,50 @@ class _$StacFormFieldValidatorImpl implements _StacFormFieldValidator { @override int get hashCode => Object.hash(runtimeType, rule, message); - /// Create a copy of StacFormFieldValidator - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacFormFieldValidatorImplCopyWith<_$StacFormFieldValidatorImpl> - get copyWith => __$$StacFormFieldValidatorImplCopyWithImpl< - _$StacFormFieldValidatorImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacFormFieldValidatorImplToJson( - this, - ); + String toString() { + return 'StacFormFieldValidator(rule: $rule, message: $message)'; } } -abstract class _StacFormFieldValidator implements StacFormFieldValidator { - const factory _StacFormFieldValidator( - {required final String rule, - final String? message}) = _$StacFormFieldValidatorImpl; +/// @nodoc +abstract mixin class _$StacFormFieldValidatorCopyWith<$Res> + implements $StacFormFieldValidatorCopyWith<$Res> { + factory _$StacFormFieldValidatorCopyWith(_StacFormFieldValidator value, + $Res Function(_StacFormFieldValidator) _then) = + __$StacFormFieldValidatorCopyWithImpl; + @override + @useResult + $Res call({String rule, String? message}); +} - factory _StacFormFieldValidator.fromJson(Map json) = - _$StacFormFieldValidatorImpl.fromJson; +/// @nodoc +class __$StacFormFieldValidatorCopyWithImpl<$Res> + implements _$StacFormFieldValidatorCopyWith<$Res> { + __$StacFormFieldValidatorCopyWithImpl(this._self, this._then); - @override - String get rule; - @override - String? get message; + final _StacFormFieldValidator _self; + final $Res Function(_StacFormFieldValidator) _then; /// Create a copy of StacFormFieldValidator /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFormFieldValidatorImplCopyWith<_$StacFormFieldValidatorImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? rule = null, + Object? message = freezed, + }) { + return _then(_StacFormFieldValidator( + rule: null == rule + ? _self.rule + : rule // ignore: cast_nullable_to_non_nullable + as String, + message: freezed == message + ? _self.message + : message // ignore: cast_nullable_to_non_nullable + as String?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.g.dart b/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.g.dart index 0010c53e..e6fd61d2 100644 --- a/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.g.dart +++ b/packages/stac/lib/src/parsers/stac_form_field_validator/stac_form_validator.g.dart @@ -6,15 +6,15 @@ part of 'stac_form_validator.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFormFieldValidatorImpl _$$StacFormFieldValidatorImplFromJson( +_StacFormFieldValidator _$StacFormFieldValidatorFromJson( Map json) => - _$StacFormFieldValidatorImpl( + _StacFormFieldValidator( rule: json['rule'] as String, message: json['message'] as String?, ); -Map _$$StacFormFieldValidatorImplToJson( - _$StacFormFieldValidatorImpl instance) => +Map _$StacFormFieldValidatorToJson( + _StacFormFieldValidator instance) => { 'rule': instance.rule, 'message': instance.message, diff --git a/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.dart b/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.dart index cbad6005..e862a8cb 100644 --- a/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.dart +++ b/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.dart @@ -7,7 +7,7 @@ part 'stac_fractionally_sized_box.freezed.dart'; part 'stac_fractionally_sized_box.g.dart'; @freezed -class StacFractionallySizedBox with _$StacFractionallySizedBox { +abstract class StacFractionallySizedBox with _$StacFractionallySizedBox { const factory StacFractionallySizedBox({ StacAlignment? alignment, double? widthFactor, diff --git a/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.freezed.dart b/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.freezed.dart index 3a50cd47..51c52d75 100644 --- a/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,96 +10,57 @@ part of 'stac_fractionally_sized_box.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacFractionallySizedBox _$StacFractionallySizedBoxFromJson( - Map json) { - return _StacFractionallySizedBox.fromJson(json); -} - /// @nodoc mixin _$StacFractionallySizedBox { - StacAlignment? get alignment => throw _privateConstructorUsedError; - double? get widthFactor => throw _privateConstructorUsedError; - double? get heightFactor => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacFractionallySizedBox to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacAlignment? get alignment; + double? get widthFactor; + double? get heightFactor; + Map? get child; /// Create a copy of StacFractionallySizedBox /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacFractionallySizedBoxCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacFractionallySizedBoxCopyWithImpl( + this as StacFractionallySizedBox, _$identity); -/// @nodoc -abstract class $StacFractionallySizedBoxCopyWith<$Res> { - factory $StacFractionallySizedBoxCopyWith(StacFractionallySizedBox value, - $Res Function(StacFractionallySizedBox) then) = - _$StacFractionallySizedBoxCopyWithImpl<$Res, StacFractionallySizedBox>; - @useResult - $Res call( - {StacAlignment? alignment, - double? widthFactor, - double? heightFactor, - Map? child}); -} + /// Serializes this StacFractionallySizedBox to a JSON map. + Map toJson(); -/// @nodoc -class _$StacFractionallySizedBoxCopyWithImpl<$Res, - $Val extends StacFractionallySizedBox> - implements $StacFractionallySizedBoxCopyWith<$Res> { - _$StacFractionallySizedBoxCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacFractionallySizedBox && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.widthFactor, widthFactor) || + other.widthFactor == widthFactor) && + (identical(other.heightFactor, heightFactor) || + other.heightFactor == heightFactor) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, alignment, widthFactor, + heightFactor, const DeepCollectionEquality().hash(child)); - /// Create a copy of StacFractionallySizedBox - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? alignment = freezed, - Object? widthFactor = freezed, - Object? heightFactor = freezed, - Object? child = freezed, - }) { - return _then(_value.copyWith( - alignment: freezed == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignment?, - widthFactor: freezed == widthFactor - ? _value.widthFactor - : widthFactor // ignore: cast_nullable_to_non_nullable - as double?, - heightFactor: freezed == heightFactor - ? _value.heightFactor - : heightFactor // ignore: cast_nullable_to_non_nullable - as double?, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacFractionallySizedBox(alignment: $alignment, widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; } } /// @nodoc -abstract class _$$StacFractionallySizedBoxImplCopyWith<$Res> - implements $StacFractionallySizedBoxCopyWith<$Res> { - factory _$$StacFractionallySizedBoxImplCopyWith( - _$StacFractionallySizedBoxImpl value, - $Res Function(_$StacFractionallySizedBoxImpl) then) = - __$$StacFractionallySizedBoxImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacFractionallySizedBoxCopyWith<$Res> { + factory $StacFractionallySizedBoxCopyWith(StacFractionallySizedBox value, + $Res Function(StacFractionallySizedBox) _then) = + _$StacFractionallySizedBoxCopyWithImpl; @useResult $Res call( {StacAlignment? alignment, @@ -108,14 +70,12 @@ abstract class _$$StacFractionallySizedBoxImplCopyWith<$Res> } /// @nodoc -class __$$StacFractionallySizedBoxImplCopyWithImpl<$Res> - extends _$StacFractionallySizedBoxCopyWithImpl<$Res, - _$StacFractionallySizedBoxImpl> - implements _$$StacFractionallySizedBoxImplCopyWith<$Res> { - __$$StacFractionallySizedBoxImplCopyWithImpl( - _$StacFractionallySizedBoxImpl _value, - $Res Function(_$StacFractionallySizedBoxImpl) _then) - : super(_value, _then); +class _$StacFractionallySizedBoxCopyWithImpl<$Res> + implements $StacFractionallySizedBoxCopyWith<$Res> { + _$StacFractionallySizedBoxCopyWithImpl(this._self, this._then); + + final StacFractionallySizedBox _self; + final $Res Function(StacFractionallySizedBox) _then; /// Create a copy of StacFractionallySizedBox /// with the given fields replaced by the non-null parameter values. @@ -127,21 +87,21 @@ class __$$StacFractionallySizedBoxImplCopyWithImpl<$Res> Object? heightFactor = freezed, Object? child = freezed, }) { - return _then(_$StacFractionallySizedBoxImpl( + return _then(_self.copyWith( alignment: freezed == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignment?, widthFactor: freezed == widthFactor - ? _value.widthFactor + ? _self.widthFactor : widthFactor // ignore: cast_nullable_to_non_nullable as double?, heightFactor: freezed == heightFactor - ? _value.heightFactor + ? _self.heightFactor : heightFactor // ignore: cast_nullable_to_non_nullable as double?, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -150,16 +110,15 @@ class __$$StacFractionallySizedBoxImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacFractionallySizedBoxImpl implements _StacFractionallySizedBox { - const _$StacFractionallySizedBoxImpl( +class _StacFractionallySizedBox implements StacFractionallySizedBox { + const _StacFractionallySizedBox( {this.alignment, this.widthFactor, this.heightFactor, final Map? child}) : _child = child; - - factory _$StacFractionallySizedBoxImpl.fromJson(Map json) => - _$$StacFractionallySizedBoxImplFromJson(json); + factory _StacFractionallySizedBox.fromJson(Map json) => + _$StacFractionallySizedBoxFromJson(json); @override final StacAlignment? alignment; @@ -177,16 +136,27 @@ class _$StacFractionallySizedBoxImpl implements _StacFractionallySizedBox { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacFractionallySizedBox + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacFractionallySizedBox(alignment: $alignment, widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacFractionallySizedBoxCopyWith<_StacFractionallySizedBox> get copyWith => + __$StacFractionallySizedBoxCopyWithImpl<_StacFractionallySizedBox>( + this, _$identity); + + @override + Map toJson() { + return _$StacFractionallySizedBoxToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacFractionallySizedBoxImpl && + other is _StacFractionallySizedBox && (identical(other.alignment, alignment) || other.alignment == alignment) && (identical(other.widthFactor, widthFactor) || @@ -201,46 +171,64 @@ class _$StacFractionallySizedBoxImpl implements _StacFractionallySizedBox { int get hashCode => Object.hash(runtimeType, alignment, widthFactor, heightFactor, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacFractionallySizedBox - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacFractionallySizedBoxImplCopyWith<_$StacFractionallySizedBoxImpl> - get copyWith => __$$StacFractionallySizedBoxImplCopyWithImpl< - _$StacFractionallySizedBoxImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacFractionallySizedBoxImplToJson( - this, - ); + String toString() { + return 'StacFractionallySizedBox(alignment: $alignment, widthFactor: $widthFactor, heightFactor: $heightFactor, child: $child)'; } } -abstract class _StacFractionallySizedBox implements StacFractionallySizedBox { - const factory _StacFractionallySizedBox( - {final StacAlignment? alignment, - final double? widthFactor, - final double? heightFactor, - final Map? child}) = _$StacFractionallySizedBoxImpl; +/// @nodoc +abstract mixin class _$StacFractionallySizedBoxCopyWith<$Res> + implements $StacFractionallySizedBoxCopyWith<$Res> { + factory _$StacFractionallySizedBoxCopyWith(_StacFractionallySizedBox value, + $Res Function(_StacFractionallySizedBox) _then) = + __$StacFractionallySizedBoxCopyWithImpl; + @override + @useResult + $Res call( + {StacAlignment? alignment, + double? widthFactor, + double? heightFactor, + Map? child}); +} - factory _StacFractionallySizedBox.fromJson(Map json) = - _$StacFractionallySizedBoxImpl.fromJson; +/// @nodoc +class __$StacFractionallySizedBoxCopyWithImpl<$Res> + implements _$StacFractionallySizedBoxCopyWith<$Res> { + __$StacFractionallySizedBoxCopyWithImpl(this._self, this._then); - @override - StacAlignment? get alignment; - @override - double? get widthFactor; - @override - double? get heightFactor; - @override - Map? get child; + final _StacFractionallySizedBox _self; + final $Res Function(_StacFractionallySizedBox) _then; /// Create a copy of StacFractionallySizedBox /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacFractionallySizedBoxImplCopyWith<_$StacFractionallySizedBoxImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? alignment = freezed, + Object? widthFactor = freezed, + Object? heightFactor = freezed, + Object? child = freezed, + }) { + return _then(_StacFractionallySizedBox( + alignment: freezed == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignment?, + widthFactor: freezed == widthFactor + ? _self.widthFactor + : widthFactor // ignore: cast_nullable_to_non_nullable + as double?, + heightFactor: freezed == heightFactor + ? _self.heightFactor + : heightFactor // ignore: cast_nullable_to_non_nullable + as double?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.g.dart b/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.g.dart index 24e4afab..dc765e04 100644 --- a/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.g.dart +++ b/packages/stac/lib/src/parsers/stac_fractionally_sized_box/stac_fractionally_sized_box.g.dart @@ -6,17 +6,17 @@ part of 'stac_fractionally_sized_box.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacFractionallySizedBoxImpl _$$StacFractionallySizedBoxImplFromJson( +_StacFractionallySizedBox _$StacFractionallySizedBoxFromJson( Map json) => - _$StacFractionallySizedBoxImpl( + _StacFractionallySizedBox( alignment: $enumDecodeNullable(_$StacAlignmentEnumMap, json['alignment']), widthFactor: (json['widthFactor'] as num?)?.toDouble(), heightFactor: (json['heightFactor'] as num?)?.toDouble(), child: json['child'] as Map?, ); -Map _$$StacFractionallySizedBoxImplToJson( - _$StacFractionallySizedBoxImpl instance) => +Map _$StacFractionallySizedBoxToJson( + _StacFractionallySizedBox instance) => { 'alignment': _$StacAlignmentEnumMap[instance.alignment], 'widthFactor': instance.widthFactor, diff --git a/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.dart b/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.dart index 3a53589d..871cc6bd 100644 --- a/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.dart +++ b/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.dart @@ -11,7 +11,7 @@ part 'stac_gradient.g.dart'; enum StacGradientType { linear, radial, sweep } @freezed -class StacGradient with _$StacGradient { +abstract class StacGradient with _$StacGradient { const factory StacGradient({ required List colors, List? stops, diff --git a/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.freezed.dart b/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.freezed.dart index 87415c34..d415c5ea 100644 --- a/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,45 +10,87 @@ part of 'stac_gradient.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacGradient _$StacGradientFromJson(Map json) { - return _StacGradient.fromJson(json); -} - /// @nodoc mixin _$StacGradient { - List get colors => throw _privateConstructorUsedError; - List? get stops => throw _privateConstructorUsedError; - StacAlignment get begin => throw _privateConstructorUsedError; - StacAlignment get end => throw _privateConstructorUsedError; - StacAlignment get center => throw _privateConstructorUsedError; - StacGradientType get gradientType => throw _privateConstructorUsedError; - StacAlignmentGeometry? get focal => throw _privateConstructorUsedError; - TileMode get tileMode => throw _privateConstructorUsedError; - double get focalRadius => throw _privateConstructorUsedError; - double get radius => throw _privateConstructorUsedError; - double get startAngle => throw _privateConstructorUsedError; - double get endAngle => throw _privateConstructorUsedError; - - /// Serializes this StacGradient to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List get colors; + List? get stops; + StacAlignment get begin; + StacAlignment get end; + StacAlignment get center; + StacGradientType get gradientType; + StacAlignmentGeometry? get focal; + TileMode get tileMode; + double get focalRadius; + double get radius; + double get startAngle; + double get endAngle; /// Create a copy of StacGradient /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacGradientCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacGradientCopyWithImpl( + this as StacGradient, _$identity); + + /// Serializes this StacGradient to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacGradient && + const DeepCollectionEquality().equals(other.colors, colors) && + const DeepCollectionEquality().equals(other.stops, stops) && + (identical(other.begin, begin) || other.begin == begin) && + (identical(other.end, end) || other.end == end) && + (identical(other.center, center) || other.center == center) && + (identical(other.gradientType, gradientType) || + other.gradientType == gradientType) && + (identical(other.focal, focal) || other.focal == focal) && + (identical(other.tileMode, tileMode) || + other.tileMode == tileMode) && + (identical(other.focalRadius, focalRadius) || + other.focalRadius == focalRadius) && + (identical(other.radius, radius) || other.radius == radius) && + (identical(other.startAngle, startAngle) || + other.startAngle == startAngle) && + (identical(other.endAngle, endAngle) || + other.endAngle == endAngle)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(colors), + const DeepCollectionEquality().hash(stops), + begin, + end, + center, + gradientType, + focal, + tileMode, + focalRadius, + radius, + startAngle, + endAngle); + + @override + String toString() { + return 'StacGradient(colors: $colors, stops: $stops, begin: $begin, end: $end, center: $center, gradientType: $gradientType, focal: $focal, tileMode: $tileMode, focalRadius: $focalRadius, radius: $radius, startAngle: $startAngle, endAngle: $endAngle)'; + } } /// @nodoc -abstract class $StacGradientCopyWith<$Res> { +abstract mixin class $StacGradientCopyWith<$Res> { factory $StacGradientCopyWith( - StacGradient value, $Res Function(StacGradient) then) = - _$StacGradientCopyWithImpl<$Res, StacGradient>; + StacGradient value, $Res Function(StacGradient) _then) = + _$StacGradientCopyWithImpl; @useResult $Res call( {List colors, @@ -67,14 +110,11 @@ abstract class $StacGradientCopyWith<$Res> { } /// @nodoc -class _$StacGradientCopyWithImpl<$Res, $Val extends StacGradient> - implements $StacGradientCopyWith<$Res> { - _$StacGradientCopyWithImpl(this._value, this._then); +class _$StacGradientCopyWithImpl<$Res> implements $StacGradientCopyWith<$Res> { + _$StacGradientCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacGradient _self; + final $Res Function(StacGradient) _then; /// Create a copy of StacGradient /// with the given fields replaced by the non-null parameter values. @@ -94,56 +134,56 @@ class _$StacGradientCopyWithImpl<$Res, $Val extends StacGradient> Object? startAngle = null, Object? endAngle = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( colors: null == colors - ? _value.colors + ? _self.colors : colors // ignore: cast_nullable_to_non_nullable as List, stops: freezed == stops - ? _value.stops + ? _self.stops : stops // ignore: cast_nullable_to_non_nullable as List?, begin: null == begin - ? _value.begin + ? _self.begin : begin // ignore: cast_nullable_to_non_nullable as StacAlignment, end: null == end - ? _value.end + ? _self.end : end // ignore: cast_nullable_to_non_nullable as StacAlignment, center: null == center - ? _value.center + ? _self.center : center // ignore: cast_nullable_to_non_nullable as StacAlignment, gradientType: null == gradientType - ? _value.gradientType + ? _self.gradientType : gradientType // ignore: cast_nullable_to_non_nullable as StacGradientType, focal: freezed == focal - ? _value.focal + ? _self.focal : focal // ignore: cast_nullable_to_non_nullable as StacAlignmentGeometry?, tileMode: null == tileMode - ? _value.tileMode + ? _self.tileMode : tileMode // ignore: cast_nullable_to_non_nullable as TileMode, focalRadius: null == focalRadius - ? _value.focalRadius + ? _self.focalRadius : focalRadius // ignore: cast_nullable_to_non_nullable as double, radius: null == radius - ? _value.radius + ? _self.radius : radius // ignore: cast_nullable_to_non_nullable as double, startAngle: null == startAngle - ? _value.startAngle + ? _self.startAngle : startAngle // ignore: cast_nullable_to_non_nullable as double, endAngle: null == endAngle - ? _value.endAngle + ? _self.endAngle : endAngle // ignore: cast_nullable_to_non_nullable as double, - ) as $Val); + )); } /// Create a copy of StacGradient @@ -151,125 +191,20 @@ class _$StacGradientCopyWithImpl<$Res, $Val extends StacGradient> @override @pragma('vm:prefer-inline') $StacAlignmentGeometryCopyWith<$Res>? get focal { - if (_value.focal == null) { + if (_self.focal == null) { return null; } - return $StacAlignmentGeometryCopyWith<$Res>(_value.focal!, (value) { - return _then(_value.copyWith(focal: value) as $Val); + return $StacAlignmentGeometryCopyWith<$Res>(_self.focal!, (value) { + return _then(_self.copyWith(focal: value)); }); } } -/// @nodoc -abstract class _$$StacGradientImplCopyWith<$Res> - implements $StacGradientCopyWith<$Res> { - factory _$$StacGradientImplCopyWith( - _$StacGradientImpl value, $Res Function(_$StacGradientImpl) then) = - __$$StacGradientImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {List colors, - List? stops, - StacAlignment begin, - StacAlignment end, - StacAlignment center, - StacGradientType gradientType, - StacAlignmentGeometry? focal, - TileMode tileMode, - double focalRadius, - double radius, - double startAngle, - double endAngle}); - - @override - $StacAlignmentGeometryCopyWith<$Res>? get focal; -} - -/// @nodoc -class __$$StacGradientImplCopyWithImpl<$Res> - extends _$StacGradientCopyWithImpl<$Res, _$StacGradientImpl> - implements _$$StacGradientImplCopyWith<$Res> { - __$$StacGradientImplCopyWithImpl( - _$StacGradientImpl _value, $Res Function(_$StacGradientImpl) _then) - : super(_value, _then); - - /// Create a copy of StacGradient - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? colors = null, - Object? stops = freezed, - Object? begin = null, - Object? end = null, - Object? center = null, - Object? gradientType = null, - Object? focal = freezed, - Object? tileMode = null, - Object? focalRadius = null, - Object? radius = null, - Object? startAngle = null, - Object? endAngle = null, - }) { - return _then(_$StacGradientImpl( - colors: null == colors - ? _value._colors - : colors // ignore: cast_nullable_to_non_nullable - as List, - stops: freezed == stops - ? _value._stops - : stops // ignore: cast_nullable_to_non_nullable - as List?, - begin: null == begin - ? _value.begin - : begin // ignore: cast_nullable_to_non_nullable - as StacAlignment, - end: null == end - ? _value.end - : end // ignore: cast_nullable_to_non_nullable - as StacAlignment, - center: null == center - ? _value.center - : center // ignore: cast_nullable_to_non_nullable - as StacAlignment, - gradientType: null == gradientType - ? _value.gradientType - : gradientType // ignore: cast_nullable_to_non_nullable - as StacGradientType, - focal: freezed == focal - ? _value.focal - : focal // ignore: cast_nullable_to_non_nullable - as StacAlignmentGeometry?, - tileMode: null == tileMode - ? _value.tileMode - : tileMode // ignore: cast_nullable_to_non_nullable - as TileMode, - focalRadius: null == focalRadius - ? _value.focalRadius - : focalRadius // ignore: cast_nullable_to_non_nullable - as double, - radius: null == radius - ? _value.radius - : radius // ignore: cast_nullable_to_non_nullable - as double, - startAngle: null == startAngle - ? _value.startAngle - : startAngle // ignore: cast_nullable_to_non_nullable - as double, - endAngle: null == endAngle - ? _value.endAngle - : endAngle // ignore: cast_nullable_to_non_nullable - as double, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacGradientImpl implements _StacGradient { - const _$StacGradientImpl( +class _StacGradient implements StacGradient { + const _StacGradient( {required final List colors, final List? stops, this.begin = StacAlignment.centerLeft, @@ -284,9 +219,8 @@ class _$StacGradientImpl implements _StacGradient { this.endAngle = math.pi * 2}) : _colors = colors, _stops = stops; - - factory _$StacGradientImpl.fromJson(Map json) => - _$$StacGradientImplFromJson(json); + factory _StacGradient.fromJson(Map json) => + _$StacGradientFromJson(json); final List _colors; @override @@ -336,16 +270,26 @@ class _$StacGradientImpl implements _StacGradient { @JsonKey() final double endAngle; + /// Create a copy of StacGradient + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacGradient(colors: $colors, stops: $stops, begin: $begin, end: $end, center: $center, gradientType: $gradientType, focal: $focal, tileMode: $tileMode, focalRadius: $focalRadius, radius: $radius, startAngle: $startAngle, endAngle: $endAngle)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacGradientCopyWith<_StacGradient> get copyWith => + __$StacGradientCopyWithImpl<_StacGradient>(this, _$identity); + + @override + Map toJson() { + return _$StacGradientToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacGradientImpl && + other is _StacGradient && const DeepCollectionEquality().equals(other._colors, _colors) && const DeepCollectionEquality().equals(other._stops, _stops) && (identical(other.begin, begin) || other.begin == begin) && @@ -382,69 +326,129 @@ class _$StacGradientImpl implements _StacGradient { startAngle, endAngle); - /// Create a copy of StacGradient - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacGradientImplCopyWith<_$StacGradientImpl> get copyWith => - __$$StacGradientImplCopyWithImpl<_$StacGradientImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacGradientImplToJson( - this, - ); + String toString() { + return 'StacGradient(colors: $colors, stops: $stops, begin: $begin, end: $end, center: $center, gradientType: $gradientType, focal: $focal, tileMode: $tileMode, focalRadius: $focalRadius, radius: $radius, startAngle: $startAngle, endAngle: $endAngle)'; } } -abstract class _StacGradient implements StacGradient { - const factory _StacGradient( - {required final List colors, - final List? stops, - final StacAlignment begin, - final StacAlignment end, - final StacAlignment center, - final StacGradientType gradientType, - final StacAlignmentGeometry? focal, - final TileMode tileMode, - final double focalRadius, - final double radius, - final double startAngle, - final double endAngle}) = _$StacGradientImpl; - - factory _StacGradient.fromJson(Map json) = - _$StacGradientImpl.fromJson; - - @override - List get colors; - @override - List? get stops; - @override - StacAlignment get begin; - @override - StacAlignment get end; - @override - StacAlignment get center; - @override - StacGradientType get gradientType; - @override - StacAlignmentGeometry? get focal; - @override - TileMode get tileMode; - @override - double get focalRadius; +/// @nodoc +abstract mixin class _$StacGradientCopyWith<$Res> + implements $StacGradientCopyWith<$Res> { + factory _$StacGradientCopyWith( + _StacGradient value, $Res Function(_StacGradient) _then) = + __$StacGradientCopyWithImpl; @override - double get radius; + @useResult + $Res call( + {List colors, + List? stops, + StacAlignment begin, + StacAlignment end, + StacAlignment center, + StacGradientType gradientType, + StacAlignmentGeometry? focal, + TileMode tileMode, + double focalRadius, + double radius, + double startAngle, + double endAngle}); + @override - double get startAngle; + $StacAlignmentGeometryCopyWith<$Res>? get focal; +} + +/// @nodoc +class __$StacGradientCopyWithImpl<$Res> + implements _$StacGradientCopyWith<$Res> { + __$StacGradientCopyWithImpl(this._self, this._then); + + final _StacGradient _self; + final $Res Function(_StacGradient) _then; + + /// Create a copy of StacGradient + /// with the given fields replaced by the non-null parameter values. @override - double get endAngle; + @pragma('vm:prefer-inline') + $Res call({ + Object? colors = null, + Object? stops = freezed, + Object? begin = null, + Object? end = null, + Object? center = null, + Object? gradientType = null, + Object? focal = freezed, + Object? tileMode = null, + Object? focalRadius = null, + Object? radius = null, + Object? startAngle = null, + Object? endAngle = null, + }) { + return _then(_StacGradient( + colors: null == colors + ? _self._colors + : colors // ignore: cast_nullable_to_non_nullable + as List, + stops: freezed == stops + ? _self._stops + : stops // ignore: cast_nullable_to_non_nullable + as List?, + begin: null == begin + ? _self.begin + : begin // ignore: cast_nullable_to_non_nullable + as StacAlignment, + end: null == end + ? _self.end + : end // ignore: cast_nullable_to_non_nullable + as StacAlignment, + center: null == center + ? _self.center + : center // ignore: cast_nullable_to_non_nullable + as StacAlignment, + gradientType: null == gradientType + ? _self.gradientType + : gradientType // ignore: cast_nullable_to_non_nullable + as StacGradientType, + focal: freezed == focal + ? _self.focal + : focal // ignore: cast_nullable_to_non_nullable + as StacAlignmentGeometry?, + tileMode: null == tileMode + ? _self.tileMode + : tileMode // ignore: cast_nullable_to_non_nullable + as TileMode, + focalRadius: null == focalRadius + ? _self.focalRadius + : focalRadius // ignore: cast_nullable_to_non_nullable + as double, + radius: null == radius + ? _self.radius + : radius // ignore: cast_nullable_to_non_nullable + as double, + startAngle: null == startAngle + ? _self.startAngle + : startAngle // ignore: cast_nullable_to_non_nullable + as double, + endAngle: null == endAngle + ? _self.endAngle + : endAngle // ignore: cast_nullable_to_non_nullable + as double, + )); + } /// Create a copy of StacGradient /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacGradientImplCopyWith<_$StacGradientImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacAlignmentGeometryCopyWith<$Res>? get focal { + if (_self.focal == null) { + return null; + } + + return $StacAlignmentGeometryCopyWith<$Res>(_self.focal!, (value) { + return _then(_self.copyWith(focal: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.g.dart b/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.g.dart index db637ab1..aa11457a 100644 --- a/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.g.dart +++ b/packages/stac/lib/src/parsers/stac_gradient/stac_gradient.g.dart @@ -6,8 +6,8 @@ part of 'stac_gradient.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacGradientImpl _$$StacGradientImplFromJson(Map json) => - _$StacGradientImpl( +_StacGradient _$StacGradientFromJson(Map json) => + _StacGradient( colors: (json['colors'] as List).map((e) => e as String).toList(), stops: (json['stops'] as List?) @@ -34,7 +34,7 @@ _$StacGradientImpl _$$StacGradientImplFromJson(Map json) => endAngle: (json['endAngle'] as num?)?.toDouble() ?? math.pi * 2, ); -Map _$$StacGradientImplToJson(_$StacGradientImpl instance) => +Map _$StacGradientToJson(_StacGradient instance) => { 'colors': instance.colors, 'stops': instance.stops, diff --git a/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.dart b/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.dart index 51cb1c74..fa42bc13 100644 --- a/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.dart +++ b/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.dart @@ -9,7 +9,7 @@ part 'stac_grid_view.freezed.dart'; part 'stac_grid_view.g.dart'; @freezed -class StacGridView with _$StacGridView { +abstract class StacGridView with _$StacGridView { const factory StacGridView({ @Default(Axis.vertical) Axis scrollDirection, @Default(false) bool reverse, diff --git a/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.freezed.dart b/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.freezed.dart index 066b2396..5c3dee9c 100644 --- a/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,55 +10,127 @@ part of 'stac_grid_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacGridView _$StacGridViewFromJson(Map json) { - return _StacGridView.fromJson(json); -} - /// @nodoc mixin _$StacGridView { - Axis get scrollDirection => throw _privateConstructorUsedError; - bool get reverse => throw _privateConstructorUsedError; - bool get primary => throw _privateConstructorUsedError; - StacScrollPhysics? get physics => throw _privateConstructorUsedError; - bool get shrinkWrap => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - int? get crossAxisCount => throw _privateConstructorUsedError; - double get mainAxisSpacing => throw _privateConstructorUsedError; - double get crossAxisSpacing => throw _privateConstructorUsedError; - double get childAspectRatio => throw _privateConstructorUsedError; - double? get mainAxisExtent => throw _privateConstructorUsedError; - bool get addAutomaticKeepAlives => throw _privateConstructorUsedError; - bool get addRepaintBoundaries => throw _privateConstructorUsedError; - bool get addSemanticIndexes => throw _privateConstructorUsedError; - double? get cacheExtent => throw _privateConstructorUsedError; - List> get children => throw _privateConstructorUsedError; - int? get semanticChildCount => throw _privateConstructorUsedError; - DragStartBehavior get dragStartBehavior => throw _privateConstructorUsedError; - ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior => - throw _privateConstructorUsedError; - String? get restorationId => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - - /// Serializes this StacGridView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Axis get scrollDirection; + bool get reverse; + bool get primary; + StacScrollPhysics? get physics; + bool get shrinkWrap; + StacEdgeInsets? get padding; + int? get crossAxisCount; + double get mainAxisSpacing; + double get crossAxisSpacing; + double get childAspectRatio; + double? get mainAxisExtent; + bool get addAutomaticKeepAlives; + bool get addRepaintBoundaries; + bool get addSemanticIndexes; + double? get cacheExtent; + List> get children; + int? get semanticChildCount; + DragStartBehavior get dragStartBehavior; + ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; + String? get restorationId; + Clip get clipBehavior; /// Create a copy of StacGridView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacGridViewCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacGridViewCopyWithImpl( + this as StacGridView, _$identity); + + /// Serializes this StacGridView to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacGridView && + (identical(other.scrollDirection, scrollDirection) || + other.scrollDirection == scrollDirection) && + (identical(other.reverse, reverse) || other.reverse == reverse) && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.physics, physics) || other.physics == physics) && + (identical(other.shrinkWrap, shrinkWrap) || + other.shrinkWrap == shrinkWrap) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.crossAxisCount, crossAxisCount) || + other.crossAxisCount == crossAxisCount) && + (identical(other.mainAxisSpacing, mainAxisSpacing) || + other.mainAxisSpacing == mainAxisSpacing) && + (identical(other.crossAxisSpacing, crossAxisSpacing) || + other.crossAxisSpacing == crossAxisSpacing) && + (identical(other.childAspectRatio, childAspectRatio) || + other.childAspectRatio == childAspectRatio) && + (identical(other.mainAxisExtent, mainAxisExtent) || + other.mainAxisExtent == mainAxisExtent) && + (identical(other.addAutomaticKeepAlives, addAutomaticKeepAlives) || + other.addAutomaticKeepAlives == addAutomaticKeepAlives) && + (identical(other.addRepaintBoundaries, addRepaintBoundaries) || + other.addRepaintBoundaries == addRepaintBoundaries) && + (identical(other.addSemanticIndexes, addSemanticIndexes) || + other.addSemanticIndexes == addSemanticIndexes) && + (identical(other.cacheExtent, cacheExtent) || + other.cacheExtent == cacheExtent) && + const DeepCollectionEquality().equals(other.children, children) && + (identical(other.semanticChildCount, semanticChildCount) || + other.semanticChildCount == semanticChildCount) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical( + other.keyboardDismissBehavior, keyboardDismissBehavior) || + other.keyboardDismissBehavior == keyboardDismissBehavior) && + (identical(other.restorationId, restorationId) || + other.restorationId == restorationId) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + scrollDirection, + reverse, + primary, + physics, + shrinkWrap, + padding, + crossAxisCount, + mainAxisSpacing, + crossAxisSpacing, + childAspectRatio, + mainAxisExtent, + addAutomaticKeepAlives, + addRepaintBoundaries, + addSemanticIndexes, + cacheExtent, + const DeepCollectionEquality().hash(children), + semanticChildCount, + dragStartBehavior, + keyboardDismissBehavior, + restorationId, + clipBehavior + ]); + + @override + String toString() { + return 'StacGridView(scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, padding: $padding, crossAxisCount: $crossAxisCount, mainAxisSpacing: $mainAxisSpacing, crossAxisSpacing: $crossAxisSpacing, childAspectRatio: $childAspectRatio, mainAxisExtent: $mainAxisExtent, addAutomaticKeepAlives: $addAutomaticKeepAlives, addRepaintBoundaries: $addRepaintBoundaries, addSemanticIndexes: $addSemanticIndexes, cacheExtent: $cacheExtent, children: $children, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior)'; + } } /// @nodoc -abstract class $StacGridViewCopyWith<$Res> { +abstract mixin class $StacGridViewCopyWith<$Res> { factory $StacGridViewCopyWith( - StacGridView value, $Res Function(StacGridView) then) = - _$StacGridViewCopyWithImpl<$Res, StacGridView>; + StacGridView value, $Res Function(StacGridView) _then) = + _$StacGridViewCopyWithImpl; @useResult $Res call( {Axis scrollDirection, @@ -86,14 +159,11 @@ abstract class $StacGridViewCopyWith<$Res> { } /// @nodoc -class _$StacGridViewCopyWithImpl<$Res, $Val extends StacGridView> - implements $StacGridViewCopyWith<$Res> { - _$StacGridViewCopyWithImpl(this._value, this._then); +class _$StacGridViewCopyWithImpl<$Res> implements $StacGridViewCopyWith<$Res> { + _$StacGridViewCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacGridView _self; + final $Res Function(StacGridView) _then; /// Create a copy of StacGridView /// with the given fields replaced by the non-null parameter values. @@ -122,92 +192,92 @@ class _$StacGridViewCopyWithImpl<$Res, $Val extends StacGridView> Object? restorationId = freezed, Object? clipBehavior = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( scrollDirection: null == scrollDirection - ? _value.scrollDirection + ? _self.scrollDirection : scrollDirection // ignore: cast_nullable_to_non_nullable as Axis, reverse: null == reverse - ? _value.reverse + ? _self.reverse : reverse // ignore: cast_nullable_to_non_nullable as bool, primary: null == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as bool, physics: freezed == physics - ? _value.physics + ? _self.physics : physics // ignore: cast_nullable_to_non_nullable as StacScrollPhysics?, shrinkWrap: null == shrinkWrap - ? _value.shrinkWrap + ? _self.shrinkWrap : shrinkWrap // ignore: cast_nullable_to_non_nullable as bool, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, crossAxisCount: freezed == crossAxisCount - ? _value.crossAxisCount + ? _self.crossAxisCount : crossAxisCount // ignore: cast_nullable_to_non_nullable as int?, mainAxisSpacing: null == mainAxisSpacing - ? _value.mainAxisSpacing + ? _self.mainAxisSpacing : mainAxisSpacing // ignore: cast_nullable_to_non_nullable as double, crossAxisSpacing: null == crossAxisSpacing - ? _value.crossAxisSpacing + ? _self.crossAxisSpacing : crossAxisSpacing // ignore: cast_nullable_to_non_nullable as double, childAspectRatio: null == childAspectRatio - ? _value.childAspectRatio + ? _self.childAspectRatio : childAspectRatio // ignore: cast_nullable_to_non_nullable as double, mainAxisExtent: freezed == mainAxisExtent - ? _value.mainAxisExtent + ? _self.mainAxisExtent : mainAxisExtent // ignore: cast_nullable_to_non_nullable as double?, addAutomaticKeepAlives: null == addAutomaticKeepAlives - ? _value.addAutomaticKeepAlives + ? _self.addAutomaticKeepAlives : addAutomaticKeepAlives // ignore: cast_nullable_to_non_nullable as bool, addRepaintBoundaries: null == addRepaintBoundaries - ? _value.addRepaintBoundaries + ? _self.addRepaintBoundaries : addRepaintBoundaries // ignore: cast_nullable_to_non_nullable as bool, addSemanticIndexes: null == addSemanticIndexes - ? _value.addSemanticIndexes + ? _self.addSemanticIndexes : addSemanticIndexes // ignore: cast_nullable_to_non_nullable as bool, cacheExtent: freezed == cacheExtent - ? _value.cacheExtent + ? _self.cacheExtent : cacheExtent // ignore: cast_nullable_to_non_nullable as double?, children: null == children - ? _value.children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, semanticChildCount: freezed == semanticChildCount - ? _value.semanticChildCount + ? _self.semanticChildCount : semanticChildCount // ignore: cast_nullable_to_non_nullable as int?, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, keyboardDismissBehavior: null == keyboardDismissBehavior - ? _value.keyboardDismissBehavior + ? _self.keyboardDismissBehavior : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable as ScrollViewKeyboardDismissBehavior, restorationId: freezed == restorationId - ? _value.restorationId + ? _self.restorationId : restorationId // ignore: cast_nullable_to_non_nullable as String?, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, - ) as $Val); + )); } /// Create a copy of StacGridView @@ -215,179 +285,20 @@ class _$StacGridViewCopyWithImpl<$Res, $Val extends StacGridView> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } } -/// @nodoc -abstract class _$$StacGridViewImplCopyWith<$Res> - implements $StacGridViewCopyWith<$Res> { - factory _$$StacGridViewImplCopyWith( - _$StacGridViewImpl value, $Res Function(_$StacGridViewImpl) then) = - __$$StacGridViewImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Axis scrollDirection, - bool reverse, - bool primary, - StacScrollPhysics? physics, - bool shrinkWrap, - StacEdgeInsets? padding, - int? crossAxisCount, - double mainAxisSpacing, - double crossAxisSpacing, - double childAspectRatio, - double? mainAxisExtent, - bool addAutomaticKeepAlives, - bool addRepaintBoundaries, - bool addSemanticIndexes, - double? cacheExtent, - List> children, - int? semanticChildCount, - DragStartBehavior dragStartBehavior, - ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, - String? restorationId, - Clip clipBehavior}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; -} - -/// @nodoc -class __$$StacGridViewImplCopyWithImpl<$Res> - extends _$StacGridViewCopyWithImpl<$Res, _$StacGridViewImpl> - implements _$$StacGridViewImplCopyWith<$Res> { - __$$StacGridViewImplCopyWithImpl( - _$StacGridViewImpl _value, $Res Function(_$StacGridViewImpl) _then) - : super(_value, _then); - - /// Create a copy of StacGridView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? scrollDirection = null, - Object? reverse = null, - Object? primary = null, - Object? physics = freezed, - Object? shrinkWrap = null, - Object? padding = freezed, - Object? crossAxisCount = freezed, - Object? mainAxisSpacing = null, - Object? crossAxisSpacing = null, - Object? childAspectRatio = null, - Object? mainAxisExtent = freezed, - Object? addAutomaticKeepAlives = null, - Object? addRepaintBoundaries = null, - Object? addSemanticIndexes = null, - Object? cacheExtent = freezed, - Object? children = null, - Object? semanticChildCount = freezed, - Object? dragStartBehavior = null, - Object? keyboardDismissBehavior = null, - Object? restorationId = freezed, - Object? clipBehavior = null, - }) { - return _then(_$StacGridViewImpl( - scrollDirection: null == scrollDirection - ? _value.scrollDirection - : scrollDirection // ignore: cast_nullable_to_non_nullable - as Axis, - reverse: null == reverse - ? _value.reverse - : reverse // ignore: cast_nullable_to_non_nullable - as bool, - primary: null == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as bool, - physics: freezed == physics - ? _value.physics - : physics // ignore: cast_nullable_to_non_nullable - as StacScrollPhysics?, - shrinkWrap: null == shrinkWrap - ? _value.shrinkWrap - : shrinkWrap // ignore: cast_nullable_to_non_nullable - as bool, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - crossAxisCount: freezed == crossAxisCount - ? _value.crossAxisCount - : crossAxisCount // ignore: cast_nullable_to_non_nullable - as int?, - mainAxisSpacing: null == mainAxisSpacing - ? _value.mainAxisSpacing - : mainAxisSpacing // ignore: cast_nullable_to_non_nullable - as double, - crossAxisSpacing: null == crossAxisSpacing - ? _value.crossAxisSpacing - : crossAxisSpacing // ignore: cast_nullable_to_non_nullable - as double, - childAspectRatio: null == childAspectRatio - ? _value.childAspectRatio - : childAspectRatio // ignore: cast_nullable_to_non_nullable - as double, - mainAxisExtent: freezed == mainAxisExtent - ? _value.mainAxisExtent - : mainAxisExtent // ignore: cast_nullable_to_non_nullable - as double?, - addAutomaticKeepAlives: null == addAutomaticKeepAlives - ? _value.addAutomaticKeepAlives - : addAutomaticKeepAlives // ignore: cast_nullable_to_non_nullable - as bool, - addRepaintBoundaries: null == addRepaintBoundaries - ? _value.addRepaintBoundaries - : addRepaintBoundaries // ignore: cast_nullable_to_non_nullable - as bool, - addSemanticIndexes: null == addSemanticIndexes - ? _value.addSemanticIndexes - : addSemanticIndexes // ignore: cast_nullable_to_non_nullable - as bool, - cacheExtent: freezed == cacheExtent - ? _value.cacheExtent - : cacheExtent // ignore: cast_nullable_to_non_nullable - as double?, - children: null == children - ? _value._children - : children // ignore: cast_nullable_to_non_nullable - as List>, - semanticChildCount: freezed == semanticChildCount - ? _value.semanticChildCount - : semanticChildCount // ignore: cast_nullable_to_non_nullable - as int?, - dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior - : dragStartBehavior // ignore: cast_nullable_to_non_nullable - as DragStartBehavior, - keyboardDismissBehavior: null == keyboardDismissBehavior - ? _value.keyboardDismissBehavior - : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable - as ScrollViewKeyboardDismissBehavior, - restorationId: freezed == restorationId - ? _value.restorationId - : restorationId // ignore: cast_nullable_to_non_nullable - as String?, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacGridViewImpl implements _StacGridView { - const _$StacGridViewImpl( +class _StacGridView implements StacGridView { + const _StacGridView( {this.scrollDirection = Axis.vertical, this.reverse = false, this.primary = false, @@ -410,9 +321,8 @@ class _$StacGridViewImpl implements _StacGridView { this.restorationId, this.clipBehavior = Clip.hardEdge}) : _children = children; - - factory _$StacGridViewImpl.fromJson(Map json) => - _$$StacGridViewImplFromJson(json); + factory _StacGridView.fromJson(Map json) => + _$StacGridViewFromJson(json); @override @JsonKey() @@ -477,16 +387,26 @@ class _$StacGridViewImpl implements _StacGridView { @JsonKey() final Clip clipBehavior; + /// Create a copy of StacGridView + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacGridView(scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, padding: $padding, crossAxisCount: $crossAxisCount, mainAxisSpacing: $mainAxisSpacing, crossAxisSpacing: $crossAxisSpacing, childAspectRatio: $childAspectRatio, mainAxisExtent: $mainAxisExtent, addAutomaticKeepAlives: $addAutomaticKeepAlives, addRepaintBoundaries: $addRepaintBoundaries, addSemanticIndexes: $addSemanticIndexes, cacheExtent: $cacheExtent, children: $children, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacGridViewCopyWith<_StacGridView> get copyWith => + __$StacGridViewCopyWithImpl<_StacGridView>(this, _$identity); + + @override + Map toJson() { + return _$StacGridViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacGridViewImpl && + other is _StacGridView && (identical(other.scrollDirection, scrollDirection) || other.scrollDirection == scrollDirection) && (identical(other.reverse, reverse) || other.reverse == reverse) && @@ -554,96 +474,183 @@ class _$StacGridViewImpl implements _StacGridView { clipBehavior ]); - /// Create a copy of StacGridView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacGridViewImplCopyWith<_$StacGridViewImpl> get copyWith => - __$$StacGridViewImplCopyWithImpl<_$StacGridViewImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacGridViewImplToJson( - this, - ); + String toString() { + return 'StacGridView(scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, padding: $padding, crossAxisCount: $crossAxisCount, mainAxisSpacing: $mainAxisSpacing, crossAxisSpacing: $crossAxisSpacing, childAspectRatio: $childAspectRatio, mainAxisExtent: $mainAxisExtent, addAutomaticKeepAlives: $addAutomaticKeepAlives, addRepaintBoundaries: $addRepaintBoundaries, addSemanticIndexes: $addSemanticIndexes, cacheExtent: $cacheExtent, children: $children, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior)'; } } -abstract class _StacGridView implements StacGridView { - const factory _StacGridView( - {final Axis scrollDirection, - final bool reverse, - final bool primary, - final StacScrollPhysics? physics, - final bool shrinkWrap, - final StacEdgeInsets? padding, - final int? crossAxisCount, - final double mainAxisSpacing, - final double crossAxisSpacing, - final double childAspectRatio, - final double? mainAxisExtent, - final bool addAutomaticKeepAlives, - final bool addRepaintBoundaries, - final bool addSemanticIndexes, - final double? cacheExtent, - final List> children, - final int? semanticChildCount, - final DragStartBehavior dragStartBehavior, - final ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, - final String? restorationId, - final Clip clipBehavior}) = _$StacGridViewImpl; - - factory _StacGridView.fromJson(Map json) = - _$StacGridViewImpl.fromJson; - - @override - Axis get scrollDirection; - @override - bool get reverse; - @override - bool get primary; - @override - StacScrollPhysics? get physics; - @override - bool get shrinkWrap; - @override - StacEdgeInsets? get padding; - @override - int? get crossAxisCount; - @override - double get mainAxisSpacing; - @override - double get crossAxisSpacing; - @override - double get childAspectRatio; - @override - double? get mainAxisExtent; - @override - bool get addAutomaticKeepAlives; - @override - bool get addRepaintBoundaries; - @override - bool get addSemanticIndexes; - @override - double? get cacheExtent; - @override - List> get children; - @override - int? get semanticChildCount; - @override - DragStartBehavior get dragStartBehavior; +/// @nodoc +abstract mixin class _$StacGridViewCopyWith<$Res> + implements $StacGridViewCopyWith<$Res> { + factory _$StacGridViewCopyWith( + _StacGridView value, $Res Function(_StacGridView) _then) = + __$StacGridViewCopyWithImpl; @override - ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; + @useResult + $Res call( + {Axis scrollDirection, + bool reverse, + bool primary, + StacScrollPhysics? physics, + bool shrinkWrap, + StacEdgeInsets? padding, + int? crossAxisCount, + double mainAxisSpacing, + double crossAxisSpacing, + double childAspectRatio, + double? mainAxisExtent, + bool addAutomaticKeepAlives, + bool addRepaintBoundaries, + bool addSemanticIndexes, + double? cacheExtent, + List> children, + int? semanticChildCount, + DragStartBehavior dragStartBehavior, + ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, + String? restorationId, + Clip clipBehavior}); + @override - String? get restorationId; + $StacEdgeInsetsCopyWith<$Res>? get padding; +} + +/// @nodoc +class __$StacGridViewCopyWithImpl<$Res> + implements _$StacGridViewCopyWith<$Res> { + __$StacGridViewCopyWithImpl(this._self, this._then); + + final _StacGridView _self; + final $Res Function(_StacGridView) _then; + + /// Create a copy of StacGridView + /// with the given fields replaced by the non-null parameter values. @override - Clip get clipBehavior; + @pragma('vm:prefer-inline') + $Res call({ + Object? scrollDirection = null, + Object? reverse = null, + Object? primary = null, + Object? physics = freezed, + Object? shrinkWrap = null, + Object? padding = freezed, + Object? crossAxisCount = freezed, + Object? mainAxisSpacing = null, + Object? crossAxisSpacing = null, + Object? childAspectRatio = null, + Object? mainAxisExtent = freezed, + Object? addAutomaticKeepAlives = null, + Object? addRepaintBoundaries = null, + Object? addSemanticIndexes = null, + Object? cacheExtent = freezed, + Object? children = null, + Object? semanticChildCount = freezed, + Object? dragStartBehavior = null, + Object? keyboardDismissBehavior = null, + Object? restorationId = freezed, + Object? clipBehavior = null, + }) { + return _then(_StacGridView( + scrollDirection: null == scrollDirection + ? _self.scrollDirection + : scrollDirection // ignore: cast_nullable_to_non_nullable + as Axis, + reverse: null == reverse + ? _self.reverse + : reverse // ignore: cast_nullable_to_non_nullable + as bool, + primary: null == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as bool, + physics: freezed == physics + ? _self.physics + : physics // ignore: cast_nullable_to_non_nullable + as StacScrollPhysics?, + shrinkWrap: null == shrinkWrap + ? _self.shrinkWrap + : shrinkWrap // ignore: cast_nullable_to_non_nullable + as bool, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + crossAxisCount: freezed == crossAxisCount + ? _self.crossAxisCount + : crossAxisCount // ignore: cast_nullable_to_non_nullable + as int?, + mainAxisSpacing: null == mainAxisSpacing + ? _self.mainAxisSpacing + : mainAxisSpacing // ignore: cast_nullable_to_non_nullable + as double, + crossAxisSpacing: null == crossAxisSpacing + ? _self.crossAxisSpacing + : crossAxisSpacing // ignore: cast_nullable_to_non_nullable + as double, + childAspectRatio: null == childAspectRatio + ? _self.childAspectRatio + : childAspectRatio // ignore: cast_nullable_to_non_nullable + as double, + mainAxisExtent: freezed == mainAxisExtent + ? _self.mainAxisExtent + : mainAxisExtent // ignore: cast_nullable_to_non_nullable + as double?, + addAutomaticKeepAlives: null == addAutomaticKeepAlives + ? _self.addAutomaticKeepAlives + : addAutomaticKeepAlives // ignore: cast_nullable_to_non_nullable + as bool, + addRepaintBoundaries: null == addRepaintBoundaries + ? _self.addRepaintBoundaries + : addRepaintBoundaries // ignore: cast_nullable_to_non_nullable + as bool, + addSemanticIndexes: null == addSemanticIndexes + ? _self.addSemanticIndexes + : addSemanticIndexes // ignore: cast_nullable_to_non_nullable + as bool, + cacheExtent: freezed == cacheExtent + ? _self.cacheExtent + : cacheExtent // ignore: cast_nullable_to_non_nullable + as double?, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + semanticChildCount: freezed == semanticChildCount + ? _self.semanticChildCount + : semanticChildCount // ignore: cast_nullable_to_non_nullable + as int?, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + keyboardDismissBehavior: null == keyboardDismissBehavior + ? _self.keyboardDismissBehavior + : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable + as ScrollViewKeyboardDismissBehavior, + restorationId: freezed == restorationId + ? _self.restorationId + : restorationId // ignore: cast_nullable_to_non_nullable + as String?, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + )); + } /// Create a copy of StacGridView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacGridViewImplCopyWith<_$StacGridViewImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.g.dart b/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.g.dart index bae9544f..3db11d79 100644 --- a/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_grid_view/stac_grid_view.g.dart @@ -6,8 +6,8 @@ part of 'stac_grid_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacGridViewImpl _$$StacGridViewImplFromJson(Map json) => - _$StacGridViewImpl( +_StacGridView _$StacGridViewFromJson(Map json) => + _StacGridView( scrollDirection: $enumDecodeNullable(_$AxisEnumMap, json['scrollDirection']) ?? Axis.vertical, @@ -44,7 +44,7 @@ _$StacGridViewImpl _$$StacGridViewImplFromJson(Map json) => Clip.hardEdge, ); -Map _$$StacGridViewImplToJson(_$StacGridViewImpl instance) => +Map _$StacGridViewToJson(_StacGridView instance) => { 'scrollDirection': _$AxisEnumMap[instance.scrollDirection]!, 'reverse': instance.reverse, diff --git a/packages/stac/lib/src/parsers/stac_hero/stac_hero.dart b/packages/stac/lib/src/parsers/stac_hero/stac_hero.dart index 18a443b0..007ea070 100644 --- a/packages/stac/lib/src/parsers/stac_hero/stac_hero.dart +++ b/packages/stac/lib/src/parsers/stac_hero/stac_hero.dart @@ -6,7 +6,7 @@ part 'stac_hero.freezed.dart'; part 'stac_hero.g.dart'; @freezed -class StacHero with _$StacHero { +abstract class StacHero with _$StacHero { const factory StacHero({ required Object tag, required Map child, diff --git a/packages/stac/lib/src/parsers/stac_hero/stac_hero.freezed.dart b/packages/stac/lib/src/parsers/stac_hero/stac_hero.freezed.dart index a9279fb1..d363274f 100644 --- a/packages/stac/lib/src/parsers/stac_hero/stac_hero.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_hero/stac_hero.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,40 +10,67 @@ part of 'stac_hero.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacHero _$StacHeroFromJson(Map json) { - return _StacHero.fromJson(json); -} - /// @nodoc mixin _$StacHero { - Object get tag => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - StacRectTween? get createRectTween => throw _privateConstructorUsedError; - Map? get flightShuttleBuilder => - throw _privateConstructorUsedError; - Map? get placeholderBuilder => - throw _privateConstructorUsedError; - bool get transitionOnUserGestures => throw _privateConstructorUsedError; - - /// Serializes this StacHero to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Object get tag; + Map get child; + StacRectTween? get createRectTween; + Map? get flightShuttleBuilder; + Map? get placeholderBuilder; + bool get transitionOnUserGestures; /// Create a copy of StacHero /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacHeroCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacHeroCopyWithImpl(this as StacHero, _$identity); + + /// Serializes this StacHero to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacHero && + const DeepCollectionEquality().equals(other.tag, tag) && + const DeepCollectionEquality().equals(other.child, child) && + (identical(other.createRectTween, createRectTween) || + other.createRectTween == createRectTween) && + const DeepCollectionEquality() + .equals(other.flightShuttleBuilder, flightShuttleBuilder) && + const DeepCollectionEquality() + .equals(other.placeholderBuilder, placeholderBuilder) && + (identical( + other.transitionOnUserGestures, transitionOnUserGestures) || + other.transitionOnUserGestures == transitionOnUserGestures)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(tag), + const DeepCollectionEquality().hash(child), + createRectTween, + const DeepCollectionEquality().hash(flightShuttleBuilder), + const DeepCollectionEquality().hash(placeholderBuilder), + transitionOnUserGestures); + + @override + String toString() { + return 'StacHero(tag: $tag, child: $child, createRectTween: $createRectTween, flightShuttleBuilder: $flightShuttleBuilder, placeholderBuilder: $placeholderBuilder, transitionOnUserGestures: $transitionOnUserGestures)'; + } } /// @nodoc -abstract class $StacHeroCopyWith<$Res> { - factory $StacHeroCopyWith(StacHero value, $Res Function(StacHero) then) = - _$StacHeroCopyWithImpl<$Res, StacHero>; +abstract mixin class $StacHeroCopyWith<$Res> { + factory $StacHeroCopyWith(StacHero value, $Res Function(StacHero) _then) = + _$StacHeroCopyWithImpl; @useResult $Res call( {Object tag, @@ -56,14 +84,11 @@ abstract class $StacHeroCopyWith<$Res> { } /// @nodoc -class _$StacHeroCopyWithImpl<$Res, $Val extends StacHero> - implements $StacHeroCopyWith<$Res> { - _$StacHeroCopyWithImpl(this._value, this._then); +class _$StacHeroCopyWithImpl<$Res> implements $StacHeroCopyWith<$Res> { + _$StacHeroCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacHero _self; + final $Res Function(StacHero) _then; /// Create a copy of StacHero /// with the given fields replaced by the non-null parameter values. @@ -77,29 +102,29 @@ class _$StacHeroCopyWithImpl<$Res, $Val extends StacHero> Object? placeholderBuilder = freezed, Object? transitionOnUserGestures = null, }) { - return _then(_value.copyWith( - tag: null == tag ? _value.tag : tag, + return _then(_self.copyWith( + tag: null == tag ? _self.tag : tag, child: null == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, createRectTween: freezed == createRectTween - ? _value.createRectTween + ? _self.createRectTween : createRectTween // ignore: cast_nullable_to_non_nullable as StacRectTween?, flightShuttleBuilder: freezed == flightShuttleBuilder - ? _value.flightShuttleBuilder + ? _self.flightShuttleBuilder : flightShuttleBuilder // ignore: cast_nullable_to_non_nullable as Map?, placeholderBuilder: freezed == placeholderBuilder - ? _value.placeholderBuilder + ? _self.placeholderBuilder : placeholderBuilder // ignore: cast_nullable_to_non_nullable as Map?, transitionOnUserGestures: null == transitionOnUserGestures - ? _value.transitionOnUserGestures + ? _self.transitionOnUserGestures : transitionOnUserGestures // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of StacHero @@ -107,86 +132,20 @@ class _$StacHeroCopyWithImpl<$Res, $Val extends StacHero> @override @pragma('vm:prefer-inline') $StacRectTweenCopyWith<$Res>? get createRectTween { - if (_value.createRectTween == null) { + if (_self.createRectTween == null) { return null; } - return $StacRectTweenCopyWith<$Res>(_value.createRectTween!, (value) { - return _then(_value.copyWith(createRectTween: value) as $Val); + return $StacRectTweenCopyWith<$Res>(_self.createRectTween!, (value) { + return _then(_self.copyWith(createRectTween: value)); }); } } -/// @nodoc -abstract class _$$StacHeroImplCopyWith<$Res> - implements $StacHeroCopyWith<$Res> { - factory _$$StacHeroImplCopyWith( - _$StacHeroImpl value, $Res Function(_$StacHeroImpl) then) = - __$$StacHeroImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Object tag, - Map child, - StacRectTween? createRectTween, - Map? flightShuttleBuilder, - Map? placeholderBuilder, - bool transitionOnUserGestures}); - - @override - $StacRectTweenCopyWith<$Res>? get createRectTween; -} - -/// @nodoc -class __$$StacHeroImplCopyWithImpl<$Res> - extends _$StacHeroCopyWithImpl<$Res, _$StacHeroImpl> - implements _$$StacHeroImplCopyWith<$Res> { - __$$StacHeroImplCopyWithImpl( - _$StacHeroImpl _value, $Res Function(_$StacHeroImpl) _then) - : super(_value, _then); - - /// Create a copy of StacHero - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tag = null, - Object? child = null, - Object? createRectTween = freezed, - Object? flightShuttleBuilder = freezed, - Object? placeholderBuilder = freezed, - Object? transitionOnUserGestures = null, - }) { - return _then(_$StacHeroImpl( - tag: null == tag ? _value.tag : tag, - child: null == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map, - createRectTween: freezed == createRectTween - ? _value.createRectTween - : createRectTween // ignore: cast_nullable_to_non_nullable - as StacRectTween?, - flightShuttleBuilder: freezed == flightShuttleBuilder - ? _value._flightShuttleBuilder - : flightShuttleBuilder // ignore: cast_nullable_to_non_nullable - as Map?, - placeholderBuilder: freezed == placeholderBuilder - ? _value._placeholderBuilder - : placeholderBuilder // ignore: cast_nullable_to_non_nullable - as Map?, - transitionOnUserGestures: null == transitionOnUserGestures - ? _value.transitionOnUserGestures - : transitionOnUserGestures // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacHeroImpl implements _StacHero { - const _$StacHeroImpl( +class _StacHero implements StacHero { + const _StacHero( {required this.tag, required final Map child, this.createRectTween, @@ -196,9 +155,8 @@ class _$StacHeroImpl implements _StacHero { : _child = child, _flightShuttleBuilder = flightShuttleBuilder, _placeholderBuilder = placeholderBuilder; - - factory _$StacHeroImpl.fromJson(Map json) => - _$$StacHeroImplFromJson(json); + factory _StacHero.fromJson(Map json) => + _$StacHeroFromJson(json); @override final Object tag; @@ -238,16 +196,26 @@ class _$StacHeroImpl implements _StacHero { @JsonKey() final bool transitionOnUserGestures; + /// Create a copy of StacHero + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacHero(tag: $tag, child: $child, createRectTween: $createRectTween, flightShuttleBuilder: $flightShuttleBuilder, placeholderBuilder: $placeholderBuilder, transitionOnUserGestures: $transitionOnUserGestures)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacHeroCopyWith<_StacHero> get copyWith => + __$StacHeroCopyWithImpl<_StacHero>(this, _$identity); + + @override + Map toJson() { + return _$StacHeroToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacHeroImpl && + other is _StacHero && const DeepCollectionEquality().equals(other.tag, tag) && const DeepCollectionEquality().equals(other._child, _child) && (identical(other.createRectTween, createRectTween) || @@ -272,51 +240,88 @@ class _$StacHeroImpl implements _StacHero { const DeepCollectionEquality().hash(_placeholderBuilder), transitionOnUserGestures); - /// Create a copy of StacHero - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacHeroImplCopyWith<_$StacHeroImpl> get copyWith => - __$$StacHeroImplCopyWithImpl<_$StacHeroImpl>(this, _$identity); + String toString() { + return 'StacHero(tag: $tag, child: $child, createRectTween: $createRectTween, flightShuttleBuilder: $flightShuttleBuilder, placeholderBuilder: $placeholderBuilder, transitionOnUserGestures: $transitionOnUserGestures)'; + } +} +/// @nodoc +abstract mixin class _$StacHeroCopyWith<$Res> + implements $StacHeroCopyWith<$Res> { + factory _$StacHeroCopyWith(_StacHero value, $Res Function(_StacHero) _then) = + __$StacHeroCopyWithImpl; @override - Map toJson() { - return _$$StacHeroImplToJson( - this, - ); - } + @useResult + $Res call( + {Object tag, + Map child, + StacRectTween? createRectTween, + Map? flightShuttleBuilder, + Map? placeholderBuilder, + bool transitionOnUserGestures}); + + @override + $StacRectTweenCopyWith<$Res>? get createRectTween; } -abstract class _StacHero implements StacHero { - const factory _StacHero( - {required final Object tag, - required final Map child, - final StacRectTween? createRectTween, - final Map? flightShuttleBuilder, - final Map? placeholderBuilder, - final bool transitionOnUserGestures}) = _$StacHeroImpl; +/// @nodoc +class __$StacHeroCopyWithImpl<$Res> implements _$StacHeroCopyWith<$Res> { + __$StacHeroCopyWithImpl(this._self, this._then); - factory _StacHero.fromJson(Map json) = - _$StacHeroImpl.fromJson; + final _StacHero _self; + final $Res Function(_StacHero) _then; + /// Create a copy of StacHero + /// with the given fields replaced by the non-null parameter values. @override - Object get tag; - @override - Map get child; - @override - StacRectTween? get createRectTween; - @override - Map? get flightShuttleBuilder; - @override - Map? get placeholderBuilder; - @override - bool get transitionOnUserGestures; + @pragma('vm:prefer-inline') + $Res call({ + Object? tag = null, + Object? child = null, + Object? createRectTween = freezed, + Object? flightShuttleBuilder = freezed, + Object? placeholderBuilder = freezed, + Object? transitionOnUserGestures = null, + }) { + return _then(_StacHero( + tag: null == tag ? _self.tag : tag, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + createRectTween: freezed == createRectTween + ? _self.createRectTween + : createRectTween // ignore: cast_nullable_to_non_nullable + as StacRectTween?, + flightShuttleBuilder: freezed == flightShuttleBuilder + ? _self._flightShuttleBuilder + : flightShuttleBuilder // ignore: cast_nullable_to_non_nullable + as Map?, + placeholderBuilder: freezed == placeholderBuilder + ? _self._placeholderBuilder + : placeholderBuilder // ignore: cast_nullable_to_non_nullable + as Map?, + transitionOnUserGestures: null == transitionOnUserGestures + ? _self.transitionOnUserGestures + : transitionOnUserGestures // ignore: cast_nullable_to_non_nullable + as bool, + )); + } /// Create a copy of StacHero /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacHeroImplCopyWith<_$StacHeroImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacRectTweenCopyWith<$Res>? get createRectTween { + if (_self.createRectTween == null) { + return null; + } + + return $StacRectTweenCopyWith<$Res>(_self.createRectTween!, (value) { + return _then(_self.copyWith(createRectTween: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_hero/stac_hero.g.dart b/packages/stac/lib/src/parsers/stac_hero/stac_hero.g.dart index c5d1e636..c4a3a3a1 100644 --- a/packages/stac/lib/src/parsers/stac_hero/stac_hero.g.dart +++ b/packages/stac/lib/src/parsers/stac_hero/stac_hero.g.dart @@ -6,8 +6,7 @@ part of 'stac_hero.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacHeroImpl _$$StacHeroImplFromJson(Map json) => - _$StacHeroImpl( +_StacHero _$StacHeroFromJson(Map json) => _StacHero( tag: json['tag'] as Object, child: json['child'] as Map, createRectTween: json['createRectTween'] == null @@ -21,8 +20,7 @@ _$StacHeroImpl _$$StacHeroImplFromJson(Map json) => json['transitionOnUserGestures'] as bool? ?? false, ); -Map _$$StacHeroImplToJson(_$StacHeroImpl instance) => - { +Map _$StacHeroToJson(_StacHero instance) => { 'tag': instance.tag, 'child': instance.child, 'createRectTween': instance.createRectTween, diff --git a/packages/stac/lib/src/parsers/stac_icon/stac_icon.dart b/packages/stac/lib/src/parsers/stac_icon/stac_icon.dart index 7748ac1d..8660b158 100644 --- a/packages/stac/lib/src/parsers/stac_icon/stac_icon.dart +++ b/packages/stac/lib/src/parsers/stac_icon/stac_icon.dart @@ -10,7 +10,7 @@ part 'stac_icon.freezed.dart'; part 'stac_icon.g.dart'; @freezed -class StacIcon with _$StacIcon { +abstract class StacIcon with _$StacIcon { const factory StacIcon({ required String icon, @Default(IconType.material) IconType iconType, diff --git a/packages/stac/lib/src/parsers/stac_icon/stac_icon.freezed.dart b/packages/stac/lib/src/parsers/stac_icon/stac_icon.freezed.dart index 1c7e9e64..2be605ef 100644 --- a/packages/stac/lib/src/parsers/stac_icon/stac_icon.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_icon/stac_icon.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,106 +10,59 @@ part of 'stac_icon.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacIcon _$StacIconFromJson(Map json) { - return _StacIcon.fromJson(json); -} - /// @nodoc mixin _$StacIcon { - String get icon => throw _privateConstructorUsedError; - IconType get iconType => throw _privateConstructorUsedError; - double? get size => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - String? get semanticLabel => throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - - /// Serializes this StacIcon to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get icon; + IconType get iconType; + double? get size; + String? get color; + String? get semanticLabel; + TextDirection? get textDirection; /// Create a copy of StacIcon /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacIconCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacIconCopyWithImpl(this as StacIcon, _$identity); -/// @nodoc -abstract class $StacIconCopyWith<$Res> { - factory $StacIconCopyWith(StacIcon value, $Res Function(StacIcon) then) = - _$StacIconCopyWithImpl<$Res, StacIcon>; - @useResult - $Res call( - {String icon, - IconType iconType, - double? size, - String? color, - String? semanticLabel, - TextDirection? textDirection}); -} + /// Serializes this StacIcon to a JSON map. + Map toJson(); -/// @nodoc -class _$StacIconCopyWithImpl<$Res, $Val extends StacIcon> - implements $StacIconCopyWith<$Res> { - _$StacIconCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacIcon && + (identical(other.icon, icon) || other.icon == icon) && + (identical(other.iconType, iconType) || + other.iconType == iconType) && + (identical(other.size, size) || other.size == size) && + (identical(other.color, color) || other.color == color) && + (identical(other.semanticLabel, semanticLabel) || + other.semanticLabel == semanticLabel) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, icon, iconType, size, color, semanticLabel, textDirection); - /// Create a copy of StacIcon - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? icon = null, - Object? iconType = null, - Object? size = freezed, - Object? color = freezed, - Object? semanticLabel = freezed, - Object? textDirection = freezed, - }) { - return _then(_value.copyWith( - icon: null == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String, - iconType: null == iconType - ? _value.iconType - : iconType // ignore: cast_nullable_to_non_nullable - as IconType, - size: freezed == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as double?, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - semanticLabel: freezed == semanticLabel - ? _value.semanticLabel - : semanticLabel // ignore: cast_nullable_to_non_nullable - as String?, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - ) as $Val); + String toString() { + return 'StacIcon(icon: $icon, iconType: $iconType, size: $size, color: $color, semanticLabel: $semanticLabel, textDirection: $textDirection)'; } } /// @nodoc -abstract class _$$StacIconImplCopyWith<$Res> - implements $StacIconCopyWith<$Res> { - factory _$$StacIconImplCopyWith( - _$StacIconImpl value, $Res Function(_$StacIconImpl) then) = - __$$StacIconImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacIconCopyWith<$Res> { + factory $StacIconCopyWith(StacIcon value, $Res Function(StacIcon) _then) = + _$StacIconCopyWithImpl; @useResult $Res call( {String icon, @@ -120,12 +74,11 @@ abstract class _$$StacIconImplCopyWith<$Res> } /// @nodoc -class __$$StacIconImplCopyWithImpl<$Res> - extends _$StacIconCopyWithImpl<$Res, _$StacIconImpl> - implements _$$StacIconImplCopyWith<$Res> { - __$$StacIconImplCopyWithImpl( - _$StacIconImpl _value, $Res Function(_$StacIconImpl) _then) - : super(_value, _then); +class _$StacIconCopyWithImpl<$Res> implements $StacIconCopyWith<$Res> { + _$StacIconCopyWithImpl(this._self, this._then); + + final StacIcon _self; + final $Res Function(StacIcon) _then; /// Create a copy of StacIcon /// with the given fields replaced by the non-null parameter values. @@ -139,29 +92,29 @@ class __$$StacIconImplCopyWithImpl<$Res> Object? semanticLabel = freezed, Object? textDirection = freezed, }) { - return _then(_$StacIconImpl( + return _then(_self.copyWith( icon: null == icon - ? _value.icon + ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as String, iconType: null == iconType - ? _value.iconType + ? _self.iconType : iconType // ignore: cast_nullable_to_non_nullable as IconType, size: freezed == size - ? _value.size + ? _self.size : size // ignore: cast_nullable_to_non_nullable as double?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, semanticLabel: freezed == semanticLabel - ? _value.semanticLabel + ? _self.semanticLabel : semanticLabel // ignore: cast_nullable_to_non_nullable as String?, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, )); @@ -170,17 +123,16 @@ class __$$StacIconImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacIconImpl implements _StacIcon { - const _$StacIconImpl( +class _StacIcon implements StacIcon { + const _StacIcon( {required this.icon, this.iconType = IconType.material, this.size, this.color, this.semanticLabel, this.textDirection}); - - factory _$StacIconImpl.fromJson(Map json) => - _$$StacIconImplFromJson(json); + factory _StacIcon.fromJson(Map json) => + _$StacIconFromJson(json); @override final String icon; @@ -196,16 +148,26 @@ class _$StacIconImpl implements _StacIcon { @override final TextDirection? textDirection; + /// Create a copy of StacIcon + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacIcon(icon: $icon, iconType: $iconType, size: $size, color: $color, semanticLabel: $semanticLabel, textDirection: $textDirection)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacIconCopyWith<_StacIcon> get copyWith => + __$StacIconCopyWithImpl<_StacIcon>(this, _$identity); + + @override + Map toJson() { + return _$StacIconToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacIconImpl && + other is _StacIcon && (identical(other.icon, icon) || other.icon == icon) && (identical(other.iconType, iconType) || other.iconType == iconType) && @@ -222,51 +184,74 @@ class _$StacIconImpl implements _StacIcon { int get hashCode => Object.hash( runtimeType, icon, iconType, size, color, semanticLabel, textDirection); - /// Create a copy of StacIcon - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacIconImplCopyWith<_$StacIconImpl> get copyWith => - __$$StacIconImplCopyWithImpl<_$StacIconImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacIconImplToJson( - this, - ); + String toString() { + return 'StacIcon(icon: $icon, iconType: $iconType, size: $size, color: $color, semanticLabel: $semanticLabel, textDirection: $textDirection)'; } } -abstract class _StacIcon implements StacIcon { - const factory _StacIcon( - {required final String icon, - final IconType iconType, - final double? size, - final String? color, - final String? semanticLabel, - final TextDirection? textDirection}) = _$StacIconImpl; +/// @nodoc +abstract mixin class _$StacIconCopyWith<$Res> + implements $StacIconCopyWith<$Res> { + factory _$StacIconCopyWith(_StacIcon value, $Res Function(_StacIcon) _then) = + __$StacIconCopyWithImpl; + @override + @useResult + $Res call( + {String icon, + IconType iconType, + double? size, + String? color, + String? semanticLabel, + TextDirection? textDirection}); +} - factory _StacIcon.fromJson(Map json) = - _$StacIconImpl.fromJson; +/// @nodoc +class __$StacIconCopyWithImpl<$Res> implements _$StacIconCopyWith<$Res> { + __$StacIconCopyWithImpl(this._self, this._then); - @override - String get icon; - @override - IconType get iconType; - @override - double? get size; - @override - String? get color; - @override - String? get semanticLabel; - @override - TextDirection? get textDirection; + final _StacIcon _self; + final $Res Function(_StacIcon) _then; /// Create a copy of StacIcon /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacIconImplCopyWith<_$StacIconImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? icon = null, + Object? iconType = null, + Object? size = freezed, + Object? color = freezed, + Object? semanticLabel = freezed, + Object? textDirection = freezed, + }) { + return _then(_StacIcon( + icon: null == icon + ? _self.icon + : icon // ignore: cast_nullable_to_non_nullable + as String, + iconType: null == iconType + ? _self.iconType + : iconType // ignore: cast_nullable_to_non_nullable + as IconType, + size: freezed == size + ? _self.size + : size // ignore: cast_nullable_to_non_nullable + as double?, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + semanticLabel: freezed == semanticLabel + ? _self.semanticLabel + : semanticLabel // ignore: cast_nullable_to_non_nullable + as String?, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_icon/stac_icon.g.dart b/packages/stac/lib/src/parsers/stac_icon/stac_icon.g.dart index eacfd5e2..d537fcf1 100644 --- a/packages/stac/lib/src/parsers/stac_icon/stac_icon.g.dart +++ b/packages/stac/lib/src/parsers/stac_icon/stac_icon.g.dart @@ -6,8 +6,7 @@ part of 'stac_icon.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacIconImpl _$$StacIconImplFromJson(Map json) => - _$StacIconImpl( +_StacIcon _$StacIconFromJson(Map json) => _StacIcon( icon: json['icon'] as String, iconType: $enumDecodeNullable(_$IconTypeEnumMap, json['iconType']) ?? IconType.material, @@ -18,8 +17,7 @@ _$StacIconImpl _$$StacIconImplFromJson(Map json) => $enumDecodeNullable(_$TextDirectionEnumMap, json['textDirection']), ); -Map _$$StacIconImplToJson(_$StacIconImpl instance) => - { +Map _$StacIconToJson(_StacIcon instance) => { 'icon': instance.icon, 'iconType': _$IconTypeEnumMap[instance.iconType]!, 'size': instance.size, diff --git a/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.dart b/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.dart index 6d2e1153..9b640a3c 100644 --- a/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.dart +++ b/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.dart @@ -10,7 +10,7 @@ part 'stac_icon_button.freezed.dart'; part 'stac_icon_button.g.dart'; @freezed -class StacIconButton with _$StacIconButton { +abstract class StacIconButton with _$StacIconButton { const factory StacIconButton({ double? iconSize, StacEdgeInsets? padding, diff --git a/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.freezed.dart b/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.freezed.dart index a25d9cff..8b7cf54e 100644 --- a/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,52 +10,117 @@ part of 'stac_icon_button.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacIconButton _$StacIconButtonFromJson(Map json) { - return _StacIconButton.fromJson(json); -} - /// @nodoc mixin _$StacIconButton { - double? get iconSize => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - StacAlignment? get alignment => throw _privateConstructorUsedError; - double? get splashRadius => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - String? get highlightColor => throw _privateConstructorUsedError; - String? get splashColor => throw _privateConstructorUsedError; - String? get disabledColor => throw _privateConstructorUsedError; - Map? get onPressed => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - String? get tooltip => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - StacBoxConstraints? get constraints => throw _privateConstructorUsedError; - StacButtonStyle? get style => throw _privateConstructorUsedError; - bool? get isSelected => throw _privateConstructorUsedError; - Map? get selectedIcon => throw _privateConstructorUsedError; - Map? get icon => throw _privateConstructorUsedError; - - /// Serializes this StacIconButton to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get iconSize; + StacEdgeInsets? get padding; + StacAlignment? get alignment; + double? get splashRadius; + String? get color; + String? get focusColor; + String? get hoverColor; + String? get highlightColor; + String? get splashColor; + String? get disabledColor; + Map? get onPressed; + bool get autofocus; + String? get tooltip; + bool? get enableFeedback; + StacBoxConstraints? get constraints; + StacButtonStyle? get style; + bool? get isSelected; + Map? get selectedIcon; + Map? get icon; /// Create a copy of StacIconButton /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacIconButtonCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacIconButtonCopyWithImpl( + this as StacIconButton, _$identity); + + /// Serializes this StacIconButton to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacIconButton && + (identical(other.iconSize, iconSize) || + other.iconSize == iconSize) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.splashRadius, splashRadius) || + other.splashRadius == splashRadius) && + (identical(other.color, color) || other.color == color) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.highlightColor, highlightColor) || + other.highlightColor == highlightColor) && + (identical(other.splashColor, splashColor) || + other.splashColor == splashColor) && + (identical(other.disabledColor, disabledColor) || + other.disabledColor == disabledColor) && + const DeepCollectionEquality().equals(other.onPressed, onPressed) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.tooltip, tooltip) || other.tooltip == tooltip) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.constraints, constraints) || + other.constraints == constraints) && + (identical(other.style, style) || other.style == style) && + (identical(other.isSelected, isSelected) || + other.isSelected == isSelected) && + const DeepCollectionEquality() + .equals(other.selectedIcon, selectedIcon) && + const DeepCollectionEquality().equals(other.icon, icon)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + iconSize, + padding, + alignment, + splashRadius, + color, + focusColor, + hoverColor, + highlightColor, + splashColor, + disabledColor, + const DeepCollectionEquality().hash(onPressed), + autofocus, + tooltip, + enableFeedback, + constraints, + style, + isSelected, + const DeepCollectionEquality().hash(selectedIcon), + const DeepCollectionEquality().hash(icon) + ]); + + @override + String toString() { + return 'StacIconButton(iconSize: $iconSize, padding: $padding, alignment: $alignment, splashRadius: $splashRadius, color: $color, focusColor: $focusColor, hoverColor: $hoverColor, highlightColor: $highlightColor, splashColor: $splashColor, disabledColor: $disabledColor, onPressed: $onPressed, autofocus: $autofocus, tooltip: $tooltip, enableFeedback: $enableFeedback, constraints: $constraints, style: $style, isSelected: $isSelected, selectedIcon: $selectedIcon, icon: $icon)'; + } } /// @nodoc -abstract class $StacIconButtonCopyWith<$Res> { +abstract mixin class $StacIconButtonCopyWith<$Res> { factory $StacIconButtonCopyWith( - StacIconButton value, $Res Function(StacIconButton) then) = - _$StacIconButtonCopyWithImpl<$Res, StacIconButton>; + StacIconButton value, $Res Function(StacIconButton) _then) = + _$StacIconButtonCopyWithImpl; @useResult $Res call( {double? iconSize, @@ -83,14 +149,12 @@ abstract class $StacIconButtonCopyWith<$Res> { } /// @nodoc -class _$StacIconButtonCopyWithImpl<$Res, $Val extends StacIconButton> +class _$StacIconButtonCopyWithImpl<$Res> implements $StacIconButtonCopyWith<$Res> { - _$StacIconButtonCopyWithImpl(this._value, this._then); + _$StacIconButtonCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacIconButton _self; + final $Res Function(StacIconButton) _then; /// Create a copy of StacIconButton /// with the given fields replaced by the non-null parameter values. @@ -117,84 +181,84 @@ class _$StacIconButtonCopyWithImpl<$Res, $Val extends StacIconButton> Object? selectedIcon = freezed, Object? icon = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( iconSize: freezed == iconSize - ? _value.iconSize + ? _self.iconSize : iconSize // ignore: cast_nullable_to_non_nullable as double?, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, alignment: freezed == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignment?, splashRadius: freezed == splashRadius - ? _value.splashRadius + ? _self.splashRadius : splashRadius // ignore: cast_nullable_to_non_nullable as double?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, highlightColor: freezed == highlightColor - ? _value.highlightColor + ? _self.highlightColor : highlightColor // ignore: cast_nullable_to_non_nullable as String?, splashColor: freezed == splashColor - ? _value.splashColor + ? _self.splashColor : splashColor // ignore: cast_nullable_to_non_nullable as String?, disabledColor: freezed == disabledColor - ? _value.disabledColor + ? _self.disabledColor : disabledColor // ignore: cast_nullable_to_non_nullable as String?, onPressed: freezed == onPressed - ? _value.onPressed + ? _self.onPressed : onPressed // ignore: cast_nullable_to_non_nullable as Map?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, tooltip: freezed == tooltip - ? _value.tooltip + ? _self.tooltip : tooltip // ignore: cast_nullable_to_non_nullable as String?, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, constraints: freezed == constraints - ? _value.constraints + ? _self.constraints : constraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, isSelected: freezed == isSelected - ? _value.isSelected + ? _self.isSelected : isSelected // ignore: cast_nullable_to_non_nullable as bool?, selectedIcon: freezed == selectedIcon - ? _value.selectedIcon + ? _self.selectedIcon : selectedIcon // ignore: cast_nullable_to_non_nullable as Map?, icon: freezed == icon - ? _value.icon + ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as Map?, - ) as $Val); + )); } /// Create a copy of StacIconButton @@ -202,12 +266,12 @@ class _$StacIconButtonCopyWithImpl<$Res, $Val extends StacIconButton> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } @@ -216,12 +280,12 @@ class _$StacIconButtonCopyWithImpl<$Res, $Val extends StacIconButton> @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get constraints { - if (_value.constraints == null) { + if (_self.constraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.constraints!, (value) { - return _then(_value.copyWith(constraints: value) as $Val); + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); }); } @@ -230,171 +294,20 @@ class _$StacIconButtonCopyWithImpl<$Res, $Val extends StacIconButton> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } } -/// @nodoc -abstract class _$$StacIconButtonImplCopyWith<$Res> - implements $StacIconButtonCopyWith<$Res> { - factory _$$StacIconButtonImplCopyWith(_$StacIconButtonImpl value, - $Res Function(_$StacIconButtonImpl) then) = - __$$StacIconButtonImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {double? iconSize, - StacEdgeInsets? padding, - StacAlignment? alignment, - double? splashRadius, - String? color, - String? focusColor, - String? hoverColor, - String? highlightColor, - String? splashColor, - String? disabledColor, - Map? onPressed, - bool autofocus, - String? tooltip, - bool? enableFeedback, - StacBoxConstraints? constraints, - StacButtonStyle? style, - bool? isSelected, - Map? selectedIcon, - Map? icon}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; - @override - $StacBoxConstraintsCopyWith<$Res>? get constraints; - @override - $StacButtonStyleCopyWith<$Res>? get style; -} - -/// @nodoc -class __$$StacIconButtonImplCopyWithImpl<$Res> - extends _$StacIconButtonCopyWithImpl<$Res, _$StacIconButtonImpl> - implements _$$StacIconButtonImplCopyWith<$Res> { - __$$StacIconButtonImplCopyWithImpl( - _$StacIconButtonImpl _value, $Res Function(_$StacIconButtonImpl) _then) - : super(_value, _then); - - /// Create a copy of StacIconButton - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? iconSize = freezed, - Object? padding = freezed, - Object? alignment = freezed, - Object? splashRadius = freezed, - Object? color = freezed, - Object? focusColor = freezed, - Object? hoverColor = freezed, - Object? highlightColor = freezed, - Object? splashColor = freezed, - Object? disabledColor = freezed, - Object? onPressed = freezed, - Object? autofocus = null, - Object? tooltip = freezed, - Object? enableFeedback = freezed, - Object? constraints = freezed, - Object? style = freezed, - Object? isSelected = freezed, - Object? selectedIcon = freezed, - Object? icon = freezed, - }) { - return _then(_$StacIconButtonImpl( - iconSize: freezed == iconSize - ? _value.iconSize - : iconSize // ignore: cast_nullable_to_non_nullable - as double?, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - alignment: freezed == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignment?, - splashRadius: freezed == splashRadius - ? _value.splashRadius - : splashRadius // ignore: cast_nullable_to_non_nullable - as double?, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - highlightColor: freezed == highlightColor - ? _value.highlightColor - : highlightColor // ignore: cast_nullable_to_non_nullable - as String?, - splashColor: freezed == splashColor - ? _value.splashColor - : splashColor // ignore: cast_nullable_to_non_nullable - as String?, - disabledColor: freezed == disabledColor - ? _value.disabledColor - : disabledColor // ignore: cast_nullable_to_non_nullable - as String?, - onPressed: freezed == onPressed - ? _value._onPressed - : onPressed // ignore: cast_nullable_to_non_nullable - as Map?, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - tooltip: freezed == tooltip - ? _value.tooltip - : tooltip // ignore: cast_nullable_to_non_nullable - as String?, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - constraints: freezed == constraints - ? _value.constraints - : constraints // ignore: cast_nullable_to_non_nullable - as StacBoxConstraints?, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - isSelected: freezed == isSelected - ? _value.isSelected - : isSelected // ignore: cast_nullable_to_non_nullable - as bool?, - selectedIcon: freezed == selectedIcon - ? _value._selectedIcon - : selectedIcon // ignore: cast_nullable_to_non_nullable - as Map?, - icon: freezed == icon - ? _value._icon - : icon // ignore: cast_nullable_to_non_nullable - as Map?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacIconButtonImpl implements _StacIconButton { - const _$StacIconButtonImpl( +class _StacIconButton implements StacIconButton { + const _StacIconButton( {this.iconSize, this.padding, this.alignment, @@ -417,9 +330,8 @@ class _$StacIconButtonImpl implements _StacIconButton { : _onPressed = onPressed, _selectedIcon = selectedIcon, _icon = icon; - - factory _$StacIconButtonImpl.fromJson(Map json) => - _$$StacIconButtonImplFromJson(json); + factory _StacIconButton.fromJson(Map json) => + _$StacIconButtonFromJson(json); @override final double? iconSize; @@ -484,16 +396,26 @@ class _$StacIconButtonImpl implements _StacIconButton { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacIconButton + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacIconButton(iconSize: $iconSize, padding: $padding, alignment: $alignment, splashRadius: $splashRadius, color: $color, focusColor: $focusColor, hoverColor: $hoverColor, highlightColor: $highlightColor, splashColor: $splashColor, disabledColor: $disabledColor, onPressed: $onPressed, autofocus: $autofocus, tooltip: $tooltip, enableFeedback: $enableFeedback, constraints: $constraints, style: $style, isSelected: $isSelected, selectedIcon: $selectedIcon, icon: $icon)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacIconButtonCopyWith<_StacIconButton> get copyWith => + __$StacIconButtonCopyWithImpl<_StacIconButton>(this, _$identity); + + @override + Map toJson() { + return _$StacIconButtonToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacIconButtonImpl && + other is _StacIconButton && (identical(other.iconSize, iconSize) || other.iconSize == iconSize) && (identical(other.padding, padding) || other.padding == padding) && @@ -554,91 +476,203 @@ class _$StacIconButtonImpl implements _StacIconButton { const DeepCollectionEquality().hash(_icon) ]); - /// Create a copy of StacIconButton - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacIconButtonImplCopyWith<_$StacIconButtonImpl> get copyWith => - __$$StacIconButtonImplCopyWithImpl<_$StacIconButtonImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$StacIconButtonImplToJson( - this, - ); + String toString() { + return 'StacIconButton(iconSize: $iconSize, padding: $padding, alignment: $alignment, splashRadius: $splashRadius, color: $color, focusColor: $focusColor, hoverColor: $hoverColor, highlightColor: $highlightColor, splashColor: $splashColor, disabledColor: $disabledColor, onPressed: $onPressed, autofocus: $autofocus, tooltip: $tooltip, enableFeedback: $enableFeedback, constraints: $constraints, style: $style, isSelected: $isSelected, selectedIcon: $selectedIcon, icon: $icon)'; } } -abstract class _StacIconButton implements StacIconButton { - const factory _StacIconButton( - {final double? iconSize, - final StacEdgeInsets? padding, - final StacAlignment? alignment, - final double? splashRadius, - final String? color, - final String? focusColor, - final String? hoverColor, - final String? highlightColor, - final String? splashColor, - final String? disabledColor, - final Map? onPressed, - final bool autofocus, - final String? tooltip, - final bool? enableFeedback, - final StacBoxConstraints? constraints, - final StacButtonStyle? style, - final bool? isSelected, - final Map? selectedIcon, - final Map? icon}) = _$StacIconButtonImpl; - - factory _StacIconButton.fromJson(Map json) = - _$StacIconButtonImpl.fromJson; - - @override - double? get iconSize; - @override - StacEdgeInsets? get padding; - @override - StacAlignment? get alignment; - @override - double? get splashRadius; - @override - String? get color; - @override - String? get focusColor; - @override - String? get hoverColor; - @override - String? get highlightColor; - @override - String? get splashColor; - @override - String? get disabledColor; - @override - Map? get onPressed; - @override - bool get autofocus; +/// @nodoc +abstract mixin class _$StacIconButtonCopyWith<$Res> + implements $StacIconButtonCopyWith<$Res> { + factory _$StacIconButtonCopyWith( + _StacIconButton value, $Res Function(_StacIconButton) _then) = + __$StacIconButtonCopyWithImpl; @override - String? get tooltip; + @useResult + $Res call( + {double? iconSize, + StacEdgeInsets? padding, + StacAlignment? alignment, + double? splashRadius, + String? color, + String? focusColor, + String? hoverColor, + String? highlightColor, + String? splashColor, + String? disabledColor, + Map? onPressed, + bool autofocus, + String? tooltip, + bool? enableFeedback, + StacBoxConstraints? constraints, + StacButtonStyle? style, + bool? isSelected, + Map? selectedIcon, + Map? icon}); + @override - bool? get enableFeedback; + $StacEdgeInsetsCopyWith<$Res>? get padding; @override - StacBoxConstraints? get constraints; + $StacBoxConstraintsCopyWith<$Res>? get constraints; @override - StacButtonStyle? get style; + $StacButtonStyleCopyWith<$Res>? get style; +} + +/// @nodoc +class __$StacIconButtonCopyWithImpl<$Res> + implements _$StacIconButtonCopyWith<$Res> { + __$StacIconButtonCopyWithImpl(this._self, this._then); + + final _StacIconButton _self; + final $Res Function(_StacIconButton) _then; + + /// Create a copy of StacIconButton + /// with the given fields replaced by the non-null parameter values. @override - bool? get isSelected; + @pragma('vm:prefer-inline') + $Res call({ + Object? iconSize = freezed, + Object? padding = freezed, + Object? alignment = freezed, + Object? splashRadius = freezed, + Object? color = freezed, + Object? focusColor = freezed, + Object? hoverColor = freezed, + Object? highlightColor = freezed, + Object? splashColor = freezed, + Object? disabledColor = freezed, + Object? onPressed = freezed, + Object? autofocus = null, + Object? tooltip = freezed, + Object? enableFeedback = freezed, + Object? constraints = freezed, + Object? style = freezed, + Object? isSelected = freezed, + Object? selectedIcon = freezed, + Object? icon = freezed, + }) { + return _then(_StacIconButton( + iconSize: freezed == iconSize + ? _self.iconSize + : iconSize // ignore: cast_nullable_to_non_nullable + as double?, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + alignment: freezed == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignment?, + splashRadius: freezed == splashRadius + ? _self.splashRadius + : splashRadius // ignore: cast_nullable_to_non_nullable + as double?, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + highlightColor: freezed == highlightColor + ? _self.highlightColor + : highlightColor // ignore: cast_nullable_to_non_nullable + as String?, + splashColor: freezed == splashColor + ? _self.splashColor + : splashColor // ignore: cast_nullable_to_non_nullable + as String?, + disabledColor: freezed == disabledColor + ? _self.disabledColor + : disabledColor // ignore: cast_nullable_to_non_nullable + as String?, + onPressed: freezed == onPressed + ? _self._onPressed + : onPressed // ignore: cast_nullable_to_non_nullable + as Map?, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + tooltip: freezed == tooltip + ? _self.tooltip + : tooltip // ignore: cast_nullable_to_non_nullable + as String?, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + constraints: freezed == constraints + ? _self.constraints + : constraints // ignore: cast_nullable_to_non_nullable + as StacBoxConstraints?, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + isSelected: freezed == isSelected + ? _self.isSelected + : isSelected // ignore: cast_nullable_to_non_nullable + as bool?, + selectedIcon: freezed == selectedIcon + ? _self._selectedIcon + : selectedIcon // ignore: cast_nullable_to_non_nullable + as Map?, + icon: freezed == icon + ? _self._icon + : icon // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } + + /// Create a copy of StacIconButton + /// with the given fields replaced by the non-null parameter values. @override - Map? get selectedIcon; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } + + /// Create a copy of StacIconButton + /// with the given fields replaced by the non-null parameter values. @override - Map? get icon; + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get constraints { + if (_self.constraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); + }); + } /// Create a copy of StacIconButton /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacIconButtonImplCopyWith<_$StacIconButtonImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.g.dart b/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.g.dart index 6c223eee..ffd6f72a 100644 --- a/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.g.dart +++ b/packages/stac/lib/src/parsers/stac_icon_button/stac_icon_button.g.dart @@ -6,8 +6,8 @@ part of 'stac_icon_button.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacIconButtonImpl _$$StacIconButtonImplFromJson(Map json) => - _$StacIconButtonImpl( +_StacIconButton _$StacIconButtonFromJson(Map json) => + _StacIconButton( iconSize: (json['iconSize'] as num?)?.toDouble(), padding: json['padding'] == null ? null @@ -36,8 +36,7 @@ _$StacIconButtonImpl _$$StacIconButtonImplFromJson(Map json) => icon: json['icon'] as Map?, ); -Map _$$StacIconButtonImplToJson( - _$StacIconButtonImpl instance) => +Map _$StacIconButtonToJson(_StacIconButton instance) => { 'iconSize': instance.iconSize, 'padding': instance.padding, diff --git a/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.dart b/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.dart index c6d4f7f2..c978b4ab 100644 --- a/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.dart +++ b/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.dart @@ -7,7 +7,7 @@ part 'stac_icon_theme_data.freezed.dart'; part 'stac_icon_theme_data.g.dart'; @freezed -class StacIconThemeData with _$StacIconThemeData { +abstract class StacIconThemeData with _$StacIconThemeData { const factory StacIconThemeData({ double? size, double? fill, diff --git a/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.freezed.dart b/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.freezed.dart index fbbdb808..092d119c 100644 --- a/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,121 +10,71 @@ part of 'stac_icon_theme_data.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacIconThemeData _$StacIconThemeDataFromJson(Map json) { - return _StacIconThemeData.fromJson(json); -} - /// @nodoc mixin _$StacIconThemeData { - double? get size => throw _privateConstructorUsedError; - double? get fill => throw _privateConstructorUsedError; - double? get weight => throw _privateConstructorUsedError; - double? get grade => throw _privateConstructorUsedError; - double? get opticalSize => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - double? get opacity => throw _privateConstructorUsedError; - List? get shadows => throw _privateConstructorUsedError; - - /// Serializes this StacIconThemeData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get size; + double? get fill; + double? get weight; + double? get grade; + double? get opticalSize; + String? get color; + double? get opacity; + List? get shadows; /// Create a copy of StacIconThemeData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacIconThemeDataCopyWithImpl( + this as StacIconThemeData, _$identity); -/// @nodoc -abstract class $StacIconThemeDataCopyWith<$Res> { - factory $StacIconThemeDataCopyWith( - StacIconThemeData value, $Res Function(StacIconThemeData) then) = - _$StacIconThemeDataCopyWithImpl<$Res, StacIconThemeData>; - @useResult - $Res call( - {double? size, - double? fill, - double? weight, - double? grade, - double? opticalSize, - String? color, - double? opacity, - List? shadows}); -} + /// Serializes this StacIconThemeData to a JSON map. + Map toJson(); -/// @nodoc -class _$StacIconThemeDataCopyWithImpl<$Res, $Val extends StacIconThemeData> - implements $StacIconThemeDataCopyWith<$Res> { - _$StacIconThemeDataCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacIconThemeData && + (identical(other.size, size) || other.size == size) && + (identical(other.fill, fill) || other.fill == fill) && + (identical(other.weight, weight) || other.weight == weight) && + (identical(other.grade, grade) || other.grade == grade) && + (identical(other.opticalSize, opticalSize) || + other.opticalSize == opticalSize) && + (identical(other.color, color) || other.color == color) && + (identical(other.opacity, opacity) || other.opacity == opacity) && + const DeepCollectionEquality().equals(other.shadows, shadows)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + size, + fill, + weight, + grade, + opticalSize, + color, + opacity, + const DeepCollectionEquality().hash(shadows)); - /// Create a copy of StacIconThemeData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? size = freezed, - Object? fill = freezed, - Object? weight = freezed, - Object? grade = freezed, - Object? opticalSize = freezed, - Object? color = freezed, - Object? opacity = freezed, - Object? shadows = freezed, - }) { - return _then(_value.copyWith( - size: freezed == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as double?, - fill: freezed == fill - ? _value.fill - : fill // ignore: cast_nullable_to_non_nullable - as double?, - weight: freezed == weight - ? _value.weight - : weight // ignore: cast_nullable_to_non_nullable - as double?, - grade: freezed == grade - ? _value.grade - : grade // ignore: cast_nullable_to_non_nullable - as double?, - opticalSize: freezed == opticalSize - ? _value.opticalSize - : opticalSize // ignore: cast_nullable_to_non_nullable - as double?, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - opacity: freezed == opacity - ? _value.opacity - : opacity // ignore: cast_nullable_to_non_nullable - as double?, - shadows: freezed == shadows - ? _value.shadows - : shadows // ignore: cast_nullable_to_non_nullable - as List?, - ) as $Val); + String toString() { + return 'StacIconThemeData(size: $size, fill: $fill, weight: $weight, grade: $grade, opticalSize: $opticalSize, color: $color, opacity: $opacity, shadows: $shadows)'; } } /// @nodoc -abstract class _$$StacIconThemeDataImplCopyWith<$Res> - implements $StacIconThemeDataCopyWith<$Res> { - factory _$$StacIconThemeDataImplCopyWith(_$StacIconThemeDataImpl value, - $Res Function(_$StacIconThemeDataImpl) then) = - __$$StacIconThemeDataImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacIconThemeDataCopyWith<$Res> { + factory $StacIconThemeDataCopyWith( + StacIconThemeData value, $Res Function(StacIconThemeData) _then) = + _$StacIconThemeDataCopyWithImpl; @useResult $Res call( {double? size, @@ -137,12 +88,12 @@ abstract class _$$StacIconThemeDataImplCopyWith<$Res> } /// @nodoc -class __$$StacIconThemeDataImplCopyWithImpl<$Res> - extends _$StacIconThemeDataCopyWithImpl<$Res, _$StacIconThemeDataImpl> - implements _$$StacIconThemeDataImplCopyWith<$Res> { - __$$StacIconThemeDataImplCopyWithImpl(_$StacIconThemeDataImpl _value, - $Res Function(_$StacIconThemeDataImpl) _then) - : super(_value, _then); +class _$StacIconThemeDataCopyWithImpl<$Res> + implements $StacIconThemeDataCopyWith<$Res> { + _$StacIconThemeDataCopyWithImpl(this._self, this._then); + + final StacIconThemeData _self; + final $Res Function(StacIconThemeData) _then; /// Create a copy of StacIconThemeData /// with the given fields replaced by the non-null parameter values. @@ -158,37 +109,37 @@ class __$$StacIconThemeDataImplCopyWithImpl<$Res> Object? opacity = freezed, Object? shadows = freezed, }) { - return _then(_$StacIconThemeDataImpl( + return _then(_self.copyWith( size: freezed == size - ? _value.size + ? _self.size : size // ignore: cast_nullable_to_non_nullable as double?, fill: freezed == fill - ? _value.fill + ? _self.fill : fill // ignore: cast_nullable_to_non_nullable as double?, weight: freezed == weight - ? _value.weight + ? _self.weight : weight // ignore: cast_nullable_to_non_nullable as double?, grade: freezed == grade - ? _value.grade + ? _self.grade : grade // ignore: cast_nullable_to_non_nullable as double?, opticalSize: freezed == opticalSize - ? _value.opticalSize + ? _self.opticalSize : opticalSize // ignore: cast_nullable_to_non_nullable as double?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, opacity: freezed == opacity - ? _value.opacity + ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable as double?, shadows: freezed == shadows - ? _value._shadows + ? _self.shadows : shadows // ignore: cast_nullable_to_non_nullable as List?, )); @@ -197,8 +148,8 @@ class __$$StacIconThemeDataImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacIconThemeDataImpl implements _StacIconThemeData { - const _$StacIconThemeDataImpl( +class _StacIconThemeData implements StacIconThemeData { + const _StacIconThemeData( {this.size, this.fill, this.weight, @@ -208,9 +159,8 @@ class _$StacIconThemeDataImpl implements _StacIconThemeData { this.opacity, final List? shadows}) : _shadows = shadows; - - factory _$StacIconThemeDataImpl.fromJson(Map json) => - _$$StacIconThemeDataImplFromJson(json); + factory _StacIconThemeData.fromJson(Map json) => + _$StacIconThemeDataFromJson(json); @override final double? size; @@ -236,16 +186,26 @@ class _$StacIconThemeDataImpl implements _StacIconThemeData { return EqualUnmodifiableListView(value); } + /// Create a copy of StacIconThemeData + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacIconThemeDataCopyWith<_StacIconThemeData> get copyWith => + __$StacIconThemeDataCopyWithImpl<_StacIconThemeData>(this, _$identity); + @override - String toString() { - return 'StacIconThemeData(size: $size, fill: $fill, weight: $weight, grade: $grade, opticalSize: $opticalSize, color: $color, opacity: $opacity, shadows: $shadows)'; + Map toJson() { + return _$StacIconThemeDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacIconThemeDataImpl && + other is _StacIconThemeData && (identical(other.size, size) || other.size == size) && (identical(other.fill, fill) || other.fill == fill) && (identical(other.weight, weight) || other.weight == weight) && @@ -270,58 +230,88 @@ class _$StacIconThemeDataImpl implements _StacIconThemeData { opacity, const DeepCollectionEquality().hash(_shadows)); - /// Create a copy of StacIconThemeData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacIconThemeDataImplCopyWith<_$StacIconThemeDataImpl> get copyWith => - __$$StacIconThemeDataImplCopyWithImpl<_$StacIconThemeDataImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacIconThemeDataImplToJson( - this, - ); + String toString() { + return 'StacIconThemeData(size: $size, fill: $fill, weight: $weight, grade: $grade, opticalSize: $opticalSize, color: $color, opacity: $opacity, shadows: $shadows)'; } } -abstract class _StacIconThemeData implements StacIconThemeData { - const factory _StacIconThemeData( - {final double? size, - final double? fill, - final double? weight, - final double? grade, - final double? opticalSize, - final String? color, - final double? opacity, - final List? shadows}) = _$StacIconThemeDataImpl; +/// @nodoc +abstract mixin class _$StacIconThemeDataCopyWith<$Res> + implements $StacIconThemeDataCopyWith<$Res> { + factory _$StacIconThemeDataCopyWith( + _StacIconThemeData value, $Res Function(_StacIconThemeData) _then) = + __$StacIconThemeDataCopyWithImpl; + @override + @useResult + $Res call( + {double? size, + double? fill, + double? weight, + double? grade, + double? opticalSize, + String? color, + double? opacity, + List? shadows}); +} - factory _StacIconThemeData.fromJson(Map json) = - _$StacIconThemeDataImpl.fromJson; +/// @nodoc +class __$StacIconThemeDataCopyWithImpl<$Res> + implements _$StacIconThemeDataCopyWith<$Res> { + __$StacIconThemeDataCopyWithImpl(this._self, this._then); - @override - double? get size; - @override - double? get fill; - @override - double? get weight; - @override - double? get grade; - @override - double? get opticalSize; - @override - String? get color; - @override - double? get opacity; - @override - List? get shadows; + final _StacIconThemeData _self; + final $Res Function(_StacIconThemeData) _then; /// Create a copy of StacIconThemeData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacIconThemeDataImplCopyWith<_$StacIconThemeDataImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? size = freezed, + Object? fill = freezed, + Object? weight = freezed, + Object? grade = freezed, + Object? opticalSize = freezed, + Object? color = freezed, + Object? opacity = freezed, + Object? shadows = freezed, + }) { + return _then(_StacIconThemeData( + size: freezed == size + ? _self.size + : size // ignore: cast_nullable_to_non_nullable + as double?, + fill: freezed == fill + ? _self.fill + : fill // ignore: cast_nullable_to_non_nullable + as double?, + weight: freezed == weight + ? _self.weight + : weight // ignore: cast_nullable_to_non_nullable + as double?, + grade: freezed == grade + ? _self.grade + : grade // ignore: cast_nullable_to_non_nullable + as double?, + opticalSize: freezed == opticalSize + ? _self.opticalSize + : opticalSize // ignore: cast_nullable_to_non_nullable + as double?, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + opacity: freezed == opacity + ? _self.opacity + : opacity // ignore: cast_nullable_to_non_nullable + as double?, + shadows: freezed == shadows + ? _self._shadows + : shadows // ignore: cast_nullable_to_non_nullable + as List?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.g.dart b/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.g.dart index 96897549..d76c608b 100644 --- a/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.g.dart +++ b/packages/stac/lib/src/parsers/stac_icon_theme_data/stac_icon_theme_data.g.dart @@ -6,9 +6,8 @@ part of 'stac_icon_theme_data.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacIconThemeDataImpl _$$StacIconThemeDataImplFromJson( - Map json) => - _$StacIconThemeDataImpl( +_StacIconThemeData _$StacIconThemeDataFromJson(Map json) => + _StacIconThemeData( size: (json['size'] as num?)?.toDouble(), fill: (json['fill'] as num?)?.toDouble(), weight: (json['weight'] as num?)?.toDouble(), @@ -21,8 +20,7 @@ _$StacIconThemeDataImpl _$$StacIconThemeDataImplFromJson( .toList(), ); -Map _$$StacIconThemeDataImplToJson( - _$StacIconThemeDataImpl instance) => +Map _$StacIconThemeDataToJson(_StacIconThemeData instance) => { 'size': instance.size, 'fill': instance.fill, diff --git a/packages/stac/lib/src/parsers/stac_image/stac_image.dart b/packages/stac/lib/src/parsers/stac_image/stac_image.dart index 3d2e1882..9710be13 100644 --- a/packages/stac/lib/src/parsers/stac_image/stac_image.dart +++ b/packages/stac/lib/src/parsers/stac_image/stac_image.dart @@ -10,7 +10,7 @@ part 'stac_image.g.dart'; enum StacImageType { file, network, asset } @freezed -class StacImage with _$StacImage { +abstract class StacImage with _$StacImage { const factory StacImage({ required String src, @Default(StacAlignment.center) StacAlignment alignment, diff --git a/packages/stac/lib/src/parsers/stac_image/stac_image.freezed.dart b/packages/stac/lib/src/parsers/stac_image/stac_image.freezed.dart index 25e306a4..79b08c00 100644 --- a/packages/stac/lib/src/parsers/stac_image/stac_image.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_image/stac_image.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,113 +10,60 @@ part of 'stac_image.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacImage _$StacImageFromJson(Map json) { - return _StacImage.fromJson(json); -} - /// @nodoc mixin _$StacImage { - String get src => throw _privateConstructorUsedError; - StacAlignment get alignment => throw _privateConstructorUsedError; - StacImageType get imageType => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - double? get width => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - BoxFit? get fit => throw _privateConstructorUsedError; - - /// Serializes this StacImage to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get src; + StacAlignment get alignment; + StacImageType get imageType; + String? get color; + double? get width; + double? get height; + BoxFit? get fit; /// Create a copy of StacImage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacImageCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacImageCopyWithImpl(this as StacImage, _$identity); -/// @nodoc -abstract class $StacImageCopyWith<$Res> { - factory $StacImageCopyWith(StacImage value, $Res Function(StacImage) then) = - _$StacImageCopyWithImpl<$Res, StacImage>; - @useResult - $Res call( - {String src, - StacAlignment alignment, - StacImageType imageType, - String? color, - double? width, - double? height, - BoxFit? fit}); -} + /// Serializes this StacImage to a JSON map. + Map toJson(); -/// @nodoc -class _$StacImageCopyWithImpl<$Res, $Val extends StacImage> - implements $StacImageCopyWith<$Res> { - _$StacImageCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacImage && + (identical(other.src, src) || other.src == src) && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.imageType, imageType) || + other.imageType == imageType) && + (identical(other.color, color) || other.color == color) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.fit, fit) || other.fit == fit)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, src, alignment, imageType, color, width, height, fit); - /// Create a copy of StacImage - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? src = null, - Object? alignment = null, - Object? imageType = null, - Object? color = freezed, - Object? width = freezed, - Object? height = freezed, - Object? fit = freezed, - }) { - return _then(_value.copyWith( - src: null == src - ? _value.src - : src // ignore: cast_nullable_to_non_nullable - as String, - alignment: null == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignment, - imageType: null == imageType - ? _value.imageType - : imageType // ignore: cast_nullable_to_non_nullable - as StacImageType, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - width: freezed == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - fit: freezed == fit - ? _value.fit - : fit // ignore: cast_nullable_to_non_nullable - as BoxFit?, - ) as $Val); + String toString() { + return 'StacImage(src: $src, alignment: $alignment, imageType: $imageType, color: $color, width: $width, height: $height, fit: $fit)'; } } /// @nodoc -abstract class _$$StacImageImplCopyWith<$Res> - implements $StacImageCopyWith<$Res> { - factory _$$StacImageImplCopyWith( - _$StacImageImpl value, $Res Function(_$StacImageImpl) then) = - __$$StacImageImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacImageCopyWith<$Res> { + factory $StacImageCopyWith(StacImage value, $Res Function(StacImage) _then) = + _$StacImageCopyWithImpl; @useResult $Res call( {String src, @@ -128,12 +76,11 @@ abstract class _$$StacImageImplCopyWith<$Res> } /// @nodoc -class __$$StacImageImplCopyWithImpl<$Res> - extends _$StacImageCopyWithImpl<$Res, _$StacImageImpl> - implements _$$StacImageImplCopyWith<$Res> { - __$$StacImageImplCopyWithImpl( - _$StacImageImpl _value, $Res Function(_$StacImageImpl) _then) - : super(_value, _then); +class _$StacImageCopyWithImpl<$Res> implements $StacImageCopyWith<$Res> { + _$StacImageCopyWithImpl(this._self, this._then); + + final StacImage _self; + final $Res Function(StacImage) _then; /// Create a copy of StacImage /// with the given fields replaced by the non-null parameter values. @@ -148,33 +95,33 @@ class __$$StacImageImplCopyWithImpl<$Res> Object? height = freezed, Object? fit = freezed, }) { - return _then(_$StacImageImpl( + return _then(_self.copyWith( src: null == src - ? _value.src + ? _self.src : src // ignore: cast_nullable_to_non_nullable as String, alignment: null == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignment, imageType: null == imageType - ? _value.imageType + ? _self.imageType : imageType // ignore: cast_nullable_to_non_nullable as StacImageType, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, width: freezed == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, fit: freezed == fit - ? _value.fit + ? _self.fit : fit // ignore: cast_nullable_to_non_nullable as BoxFit?, )); @@ -183,8 +130,8 @@ class __$$StacImageImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacImageImpl implements _StacImage { - const _$StacImageImpl( +class _StacImage implements StacImage { + const _StacImage( {required this.src, this.alignment = StacAlignment.center, this.imageType = StacImageType.network, @@ -192,9 +139,8 @@ class _$StacImageImpl implements _StacImage { this.width, this.height, this.fit}); - - factory _$StacImageImpl.fromJson(Map json) => - _$$StacImageImplFromJson(json); + factory _StacImage.fromJson(Map json) => + _$StacImageFromJson(json); @override final String src; @@ -213,16 +159,26 @@ class _$StacImageImpl implements _StacImage { @override final BoxFit? fit; + /// Create a copy of StacImage + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacImage(src: $src, alignment: $alignment, imageType: $imageType, color: $color, width: $width, height: $height, fit: $fit)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacImageCopyWith<_StacImage> get copyWith => + __$StacImageCopyWithImpl<_StacImage>(this, _$identity); + + @override + Map toJson() { + return _$StacImageToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacImageImpl && + other is _StacImage && (identical(other.src, src) || other.src == src) && (identical(other.alignment, alignment) || other.alignment == alignment) && @@ -239,54 +195,81 @@ class _$StacImageImpl implements _StacImage { int get hashCode => Object.hash( runtimeType, src, alignment, imageType, color, width, height, fit); - /// Create a copy of StacImage - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacImageImplCopyWith<_$StacImageImpl> get copyWith => - __$$StacImageImplCopyWithImpl<_$StacImageImpl>(this, _$identity); + String toString() { + return 'StacImage(src: $src, alignment: $alignment, imageType: $imageType, color: $color, width: $width, height: $height, fit: $fit)'; + } +} +/// @nodoc +abstract mixin class _$StacImageCopyWith<$Res> + implements $StacImageCopyWith<$Res> { + factory _$StacImageCopyWith( + _StacImage value, $Res Function(_StacImage) _then) = + __$StacImageCopyWithImpl; @override - Map toJson() { - return _$$StacImageImplToJson( - this, - ); - } + @useResult + $Res call( + {String src, + StacAlignment alignment, + StacImageType imageType, + String? color, + double? width, + double? height, + BoxFit? fit}); } -abstract class _StacImage implements StacImage { - const factory _StacImage( - {required final String src, - final StacAlignment alignment, - final StacImageType imageType, - final String? color, - final double? width, - final double? height, - final BoxFit? fit}) = _$StacImageImpl; +/// @nodoc +class __$StacImageCopyWithImpl<$Res> implements _$StacImageCopyWith<$Res> { + __$StacImageCopyWithImpl(this._self, this._then); - factory _StacImage.fromJson(Map json) = - _$StacImageImpl.fromJson; - - @override - String get src; - @override - StacAlignment get alignment; - @override - StacImageType get imageType; - @override - String? get color; - @override - double? get width; - @override - double? get height; - @override - BoxFit? get fit; + final _StacImage _self; + final $Res Function(_StacImage) _then; /// Create a copy of StacImage /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacImageImplCopyWith<_$StacImageImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? src = null, + Object? alignment = null, + Object? imageType = null, + Object? color = freezed, + Object? width = freezed, + Object? height = freezed, + Object? fit = freezed, + }) { + return _then(_StacImage( + src: null == src + ? _self.src + : src // ignore: cast_nullable_to_non_nullable + as String, + alignment: null == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignment, + imageType: null == imageType + ? _self.imageType + : imageType // ignore: cast_nullable_to_non_nullable + as StacImageType, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + width: freezed == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as double?, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + fit: freezed == fit + ? _self.fit + : fit // ignore: cast_nullable_to_non_nullable + as BoxFit?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_image/stac_image.g.dart b/packages/stac/lib/src/parsers/stac_image/stac_image.g.dart index 99984dd5..64752db6 100644 --- a/packages/stac/lib/src/parsers/stac_image/stac_image.g.dart +++ b/packages/stac/lib/src/parsers/stac_image/stac_image.g.dart @@ -6,8 +6,7 @@ part of 'stac_image.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacImageImpl _$$StacImageImplFromJson(Map json) => - _$StacImageImpl( +_StacImage _$StacImageFromJson(Map json) => _StacImage( src: json['src'] as String, alignment: $enumDecodeNullable(_$StacAlignmentEnumMap, json['alignment']) ?? @@ -21,7 +20,7 @@ _$StacImageImpl _$$StacImageImplFromJson(Map json) => fit: $enumDecodeNullable(_$BoxFitEnumMap, json['fit']), ); -Map _$$StacImageImplToJson(_$StacImageImpl instance) => +Map _$StacImageToJson(_StacImage instance) => { 'src': instance.src, 'alignment': _$StacAlignmentEnumMap[instance.alignment]!, diff --git a/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.dart b/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.dart index c6777a2d..6b9d72ca 100644 --- a/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.dart +++ b/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.dart @@ -11,7 +11,7 @@ part 'stac_input_border.g.dart'; enum StacInputBorderType { none, underlineInputBorder, outlineInputBorder } @freezed -class StacInputBorder with _$StacInputBorder { +abstract class StacInputBorder with _$StacInputBorder { const factory StacInputBorder({ @Default(StacInputBorderType.underlineInputBorder) StacInputBorderType type, StacBorderRadius? borderRadius, diff --git a/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.freezed.dart b/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.freezed.dart index 5f6f022c..548f0451 100644 --- a/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,39 +10,61 @@ part of 'stac_input_border.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacInputBorder _$StacInputBorderFromJson(Map json) { - return _StacInputBorder.fromJson(json); -} - /// @nodoc mixin _$StacInputBorder { - StacInputBorderType get type => throw _privateConstructorUsedError; - StacBorderRadius? get borderRadius => throw _privateConstructorUsedError; - double get gapPadding => throw _privateConstructorUsedError; - double get width => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - StacGradient? get gradient => throw _privateConstructorUsedError; - - /// Serializes this StacInputBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacInputBorderType get type; + StacBorderRadius? get borderRadius; + double get gapPadding; + double get width; + String? get color; + StacGradient? get gradient; /// Create a copy of StacInputBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacInputBorderCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacInputBorderCopyWithImpl( + this as StacInputBorder, _$identity); + + /// Serializes this StacInputBorder to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacInputBorder && + (identical(other.type, type) || other.type == type) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius) && + (identical(other.gapPadding, gapPadding) || + other.gapPadding == gapPadding) && + (identical(other.width, width) || other.width == width) && + (identical(other.color, color) || other.color == color) && + (identical(other.gradient, gradient) || + other.gradient == gradient)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, type, borderRadius, gapPadding, width, color, gradient); + + @override + String toString() { + return 'StacInputBorder(type: $type, borderRadius: $borderRadius, gapPadding: $gapPadding, width: $width, color: $color, gradient: $gradient)'; + } } /// @nodoc -abstract class $StacInputBorderCopyWith<$Res> { +abstract mixin class $StacInputBorderCopyWith<$Res> { factory $StacInputBorderCopyWith( - StacInputBorder value, $Res Function(StacInputBorder) then) = - _$StacInputBorderCopyWithImpl<$Res, StacInputBorder>; + StacInputBorder value, $Res Function(StacInputBorder) _then) = + _$StacInputBorderCopyWithImpl; @useResult $Res call( {StacInputBorderType type, @@ -56,14 +79,12 @@ abstract class $StacInputBorderCopyWith<$Res> { } /// @nodoc -class _$StacInputBorderCopyWithImpl<$Res, $Val extends StacInputBorder> +class _$StacInputBorderCopyWithImpl<$Res> implements $StacInputBorderCopyWith<$Res> { - _$StacInputBorderCopyWithImpl(this._value, this._then); + _$StacInputBorderCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacInputBorder _self; + final $Res Function(StacInputBorder) _then; /// Create a copy of StacInputBorder /// with the given fields replaced by the non-null parameter values. @@ -77,32 +98,32 @@ class _$StacInputBorderCopyWithImpl<$Res, $Val extends StacInputBorder> Object? color = freezed, Object? gradient = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as StacInputBorderType, borderRadius: freezed == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius?, gapPadding: null == gapPadding - ? _value.gapPadding + ? _self.gapPadding : gapPadding // ignore: cast_nullable_to_non_nullable as double, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, gradient: freezed == gradient - ? _value.gradient + ? _self.gradient : gradient // ignore: cast_nullable_to_non_nullable as StacGradient?, - ) as $Val); + )); } /// Create a copy of StacInputBorder @@ -110,12 +131,12 @@ class _$StacInputBorderCopyWithImpl<$Res, $Val extends StacInputBorder> @override @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith<$Res>? get borderRadius { - if (_value.borderRadius == null) { + if (_self.borderRadius == null) { return null; } - return $StacBorderRadiusCopyWith<$Res>(_value.borderRadius!, (value) { - return _then(_value.copyWith(borderRadius: value) as $Val); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius!, (value) { + return _then(_self.copyWith(borderRadius: value)); }); } @@ -124,22 +145,93 @@ class _$StacInputBorderCopyWithImpl<$Res, $Val extends StacInputBorder> @override @pragma('vm:prefer-inline') $StacGradientCopyWith<$Res>? get gradient { - if (_value.gradient == null) { + if (_self.gradient == null) { return null; } - return $StacGradientCopyWith<$Res>(_value.gradient!, (value) { - return _then(_value.copyWith(gradient: value) as $Val); + return $StacGradientCopyWith<$Res>(_self.gradient!, (value) { + return _then(_self.copyWith(gradient: value)); }); } } /// @nodoc -abstract class _$$StacInputBorderImplCopyWith<$Res> +@JsonSerializable() +class _StacInputBorder implements StacInputBorder { + const _StacInputBorder( + {this.type = StacInputBorderType.underlineInputBorder, + this.borderRadius, + this.gapPadding = 4.0, + this.width = 0.0, + this.color, + this.gradient}); + factory _StacInputBorder.fromJson(Map json) => + _$StacInputBorderFromJson(json); + + @override + @JsonKey() + final StacInputBorderType type; + @override + final StacBorderRadius? borderRadius; + @override + @JsonKey() + final double gapPadding; + @override + @JsonKey() + final double width; + @override + final String? color; + @override + final StacGradient? gradient; + + /// Create a copy of StacInputBorder + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacInputBorderCopyWith<_StacInputBorder> get copyWith => + __$StacInputBorderCopyWithImpl<_StacInputBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacInputBorderToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacInputBorder && + (identical(other.type, type) || other.type == type) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius) && + (identical(other.gapPadding, gapPadding) || + other.gapPadding == gapPadding) && + (identical(other.width, width) || other.width == width) && + (identical(other.color, color) || other.color == color) && + (identical(other.gradient, gradient) || + other.gradient == gradient)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, type, borderRadius, gapPadding, width, color, gradient); + + @override + String toString() { + return 'StacInputBorder(type: $type, borderRadius: $borderRadius, gapPadding: $gapPadding, width: $width, color: $color, gradient: $gradient)'; + } +} + +/// @nodoc +abstract mixin class _$StacInputBorderCopyWith<$Res> implements $StacInputBorderCopyWith<$Res> { - factory _$$StacInputBorderImplCopyWith(_$StacInputBorderImpl value, - $Res Function(_$StacInputBorderImpl) then) = - __$$StacInputBorderImplCopyWithImpl<$Res>; + factory _$StacInputBorderCopyWith( + _StacInputBorder value, $Res Function(_StacInputBorder) _then) = + __$StacInputBorderCopyWithImpl; @override @useResult $Res call( @@ -157,17 +249,17 @@ abstract class _$$StacInputBorderImplCopyWith<$Res> } /// @nodoc -class __$$StacInputBorderImplCopyWithImpl<$Res> - extends _$StacInputBorderCopyWithImpl<$Res, _$StacInputBorderImpl> - implements _$$StacInputBorderImplCopyWith<$Res> { - __$$StacInputBorderImplCopyWithImpl( - _$StacInputBorderImpl _value, $Res Function(_$StacInputBorderImpl) _then) - : super(_value, _then); +class __$StacInputBorderCopyWithImpl<$Res> + implements _$StacInputBorderCopyWith<$Res> { + __$StacInputBorderCopyWithImpl(this._self, this._then); + + final _StacInputBorder _self; + final $Res Function(_StacInputBorder) _then; /// Create a copy of StacInputBorder /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ Object? type = null, Object? borderRadius = freezed, @@ -176,137 +268,61 @@ class __$$StacInputBorderImplCopyWithImpl<$Res> Object? color = freezed, Object? gradient = freezed, }) { - return _then(_$StacInputBorderImpl( + return _then(_StacInputBorder( type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as StacInputBorderType, borderRadius: freezed == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius?, gapPadding: null == gapPadding - ? _value.gapPadding + ? _self.gapPadding : gapPadding // ignore: cast_nullable_to_non_nullable as double, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, gradient: freezed == gradient - ? _value.gradient + ? _self.gradient : gradient // ignore: cast_nullable_to_non_nullable as StacGradient?, )); } -} - -/// @nodoc -@JsonSerializable() -class _$StacInputBorderImpl implements _StacInputBorder { - const _$StacInputBorderImpl( - {this.type = StacInputBorderType.underlineInputBorder, - this.borderRadius, - this.gapPadding = 4.0, - this.width = 0.0, - this.color, - this.gradient}); - - factory _$StacInputBorderImpl.fromJson(Map json) => - _$$StacInputBorderImplFromJson(json); - - @override - @JsonKey() - final StacInputBorderType type; - @override - final StacBorderRadius? borderRadius; - @override - @JsonKey() - final double gapPadding; - @override - @JsonKey() - final double width; - @override - final String? color; - @override - final StacGradient? gradient; + /// Create a copy of StacInputBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacInputBorder(type: $type, borderRadius: $borderRadius, gapPadding: $gapPadding, width: $width, color: $color, gradient: $gradient)'; - } + @pragma('vm:prefer-inline') + $StacBorderRadiusCopyWith<$Res>? get borderRadius { + if (_self.borderRadius == null) { + return null; + } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacInputBorderImpl && - (identical(other.type, type) || other.type == type) && - (identical(other.borderRadius, borderRadius) || - other.borderRadius == borderRadius) && - (identical(other.gapPadding, gapPadding) || - other.gapPadding == gapPadding) && - (identical(other.width, width) || other.width == width) && - (identical(other.color, color) || other.color == color) && - (identical(other.gradient, gradient) || - other.gradient == gradient)); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius!, (value) { + return _then(_self.copyWith(borderRadius: value)); + }); } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, type, borderRadius, gapPadding, width, color, gradient); - /// Create a copy of StacInputBorder /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacInputBorderImplCopyWith<_$StacInputBorderImpl> get copyWith => - __$$StacInputBorderImplCopyWithImpl<_$StacInputBorderImpl>( - this, _$identity); + $StacGradientCopyWith<$Res>? get gradient { + if (_self.gradient == null) { + return null; + } - @override - Map toJson() { - return _$$StacInputBorderImplToJson( - this, - ); + return $StacGradientCopyWith<$Res>(_self.gradient!, (value) { + return _then(_self.copyWith(gradient: value)); + }); } } -abstract class _StacInputBorder implements StacInputBorder { - const factory _StacInputBorder( - {final StacInputBorderType type, - final StacBorderRadius? borderRadius, - final double gapPadding, - final double width, - final String? color, - final StacGradient? gradient}) = _$StacInputBorderImpl; - - factory _StacInputBorder.fromJson(Map json) = - _$StacInputBorderImpl.fromJson; - - @override - StacInputBorderType get type; - @override - StacBorderRadius? get borderRadius; - @override - double get gapPadding; - @override - double get width; - @override - String? get color; - @override - StacGradient? get gradient; - - /// Create a copy of StacInputBorder - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacInputBorderImplCopyWith<_$StacInputBorderImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.g.dart b/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.g.dart index a8d00395..366466e1 100644 --- a/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.g.dart +++ b/packages/stac/lib/src/parsers/stac_input_border/stac_input_border.g.dart @@ -6,9 +6,8 @@ part of 'stac_input_border.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacInputBorderImpl _$$StacInputBorderImplFromJson( - Map json) => - _$StacInputBorderImpl( +_StacInputBorder _$StacInputBorderFromJson(Map json) => + _StacInputBorder( type: $enumDecodeNullable(_$StacInputBorderTypeEnumMap, json['type']) ?? StacInputBorderType.underlineInputBorder, borderRadius: json['borderRadius'] == null @@ -22,8 +21,7 @@ _$StacInputBorderImpl _$$StacInputBorderImplFromJson( : StacGradient.fromJson(json['gradient'] as Map), ); -Map _$$StacInputBorderImplToJson( - _$StacInputBorderImpl instance) => +Map _$StacInputBorderToJson(_StacInputBorder instance) => { 'type': _$StacInputBorderTypeEnumMap[instance.type]!, 'borderRadius': instance.borderRadius, diff --git a/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.dart b/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.dart index 4cddca84..f7885bf5 100644 --- a/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.dart +++ b/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.dart @@ -12,7 +12,7 @@ part 'stac_input_decoration.freezed.dart'; part 'stac_input_decoration.g.dart'; @freezed -class StacInputDecoration with _$StacInputDecoration { +abstract class StacInputDecoration with _$StacInputDecoration { const factory StacInputDecoration({ Map? icon, String? iconColor, diff --git a/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.freezed.dart b/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.freezed.dart index 7b3d49b2..3191b9d4 100644 --- a/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,87 +10,238 @@ part of 'stac_input_decoration.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacInputDecoration _$StacInputDecorationFromJson(Map json) { - return _StacInputDecoration.fromJson(json); -} - /// @nodoc mixin _$StacInputDecoration { - Map? get icon => throw _privateConstructorUsedError; - String? get iconColor => throw _privateConstructorUsedError; - Map? get label => throw _privateConstructorUsedError; - String? get labelText => throw _privateConstructorUsedError; - StacTextStyle? get labelStyle => throw _privateConstructorUsedError; - StacTextStyle? get floatingLabelStyle => throw _privateConstructorUsedError; - String? get helperText => throw _privateConstructorUsedError; - StacTextStyle? get helperStyle => throw _privateConstructorUsedError; - String? get hintText => throw _privateConstructorUsedError; - StacTextStyle? get hintStyle => throw _privateConstructorUsedError; - int? get helperMaxLines => throw _privateConstructorUsedError; - TextDirection? get hintTextDirection => throw _privateConstructorUsedError; - int? get hintMaxLines => throw _privateConstructorUsedError; - String? get errorText => throw _privateConstructorUsedError; - StacTextStyle? get errorStyle => throw _privateConstructorUsedError; - int? get errorMaxLines => throw _privateConstructorUsedError; - FloatingLabelBehavior? get floatingLabelBehavior => - throw _privateConstructorUsedError; - StacFloatingLabelAlignment? get floatingLabelAlignment => - throw _privateConstructorUsedError; - bool get isCollapsed => throw _privateConstructorUsedError; - bool get isDense => throw _privateConstructorUsedError; - StacEdgeInsets? get contentPadding => throw _privateConstructorUsedError; - Map? get prefixIcon => throw _privateConstructorUsedError; - StacBoxConstraints? get prefixIconConstraints => - throw _privateConstructorUsedError; - Map? get prefix => throw _privateConstructorUsedError; - String? get prefixText => throw _privateConstructorUsedError; - StacTextStyle? get prefixStyle => throw _privateConstructorUsedError; - String? get prefixIconColor => throw _privateConstructorUsedError; - Map? get suffix => throw _privateConstructorUsedError; - Map? get suffixIcon => throw _privateConstructorUsedError; - StacBoxConstraints? get suffixIconConstraints => - throw _privateConstructorUsedError; - String? get suffixText => throw _privateConstructorUsedError; - StacTextStyle? get suffixStyle => throw _privateConstructorUsedError; - String? get suffixIconColor => throw _privateConstructorUsedError; - Map? get counter => throw _privateConstructorUsedError; - String? get counterText => throw _privateConstructorUsedError; - StacTextStyle? get counterStyle => throw _privateConstructorUsedError; - bool? get filled => throw _privateConstructorUsedError; - String? get fillColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - StacInputBorder? get errorBorder => throw _privateConstructorUsedError; - StacInputBorder? get focusedBorder => throw _privateConstructorUsedError; - StacInputBorder? get focusedErrorBorder => throw _privateConstructorUsedError; - StacInputBorder? get disabledBorder => throw _privateConstructorUsedError; - StacInputBorder? get enabledBorder => throw _privateConstructorUsedError; - StacInputBorder? get border => throw _privateConstructorUsedError; - bool get enabled => throw _privateConstructorUsedError; - String? get semanticCounterText => throw _privateConstructorUsedError; - bool get alignLabelWithHint => throw _privateConstructorUsedError; - StacBoxConstraints? get constraints => throw _privateConstructorUsedError; - - /// Serializes this StacInputDecoration to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get icon; + String? get iconColor; + Map? get label; + String? get labelText; + StacTextStyle? get labelStyle; + StacTextStyle? get floatingLabelStyle; + String? get helperText; + StacTextStyle? get helperStyle; + String? get hintText; + StacTextStyle? get hintStyle; + int? get helperMaxLines; + TextDirection? get hintTextDirection; + int? get hintMaxLines; + String? get errorText; + StacTextStyle? get errorStyle; + int? get errorMaxLines; + FloatingLabelBehavior? get floatingLabelBehavior; + StacFloatingLabelAlignment? get floatingLabelAlignment; + bool get isCollapsed; + bool get isDense; + StacEdgeInsets? get contentPadding; + Map? get prefixIcon; + StacBoxConstraints? get prefixIconConstraints; + Map? get prefix; + String? get prefixText; + StacTextStyle? get prefixStyle; + String? get prefixIconColor; + Map? get suffix; + Map? get suffixIcon; + StacBoxConstraints? get suffixIconConstraints; + String? get suffixText; + StacTextStyle? get suffixStyle; + String? get suffixIconColor; + Map? get counter; + String? get counterText; + StacTextStyle? get counterStyle; + bool? get filled; + String? get fillColor; + String? get hoverColor; + String? get focusColor; + StacInputBorder? get errorBorder; + StacInputBorder? get focusedBorder; + StacInputBorder? get focusedErrorBorder; + StacInputBorder? get disabledBorder; + StacInputBorder? get enabledBorder; + StacInputBorder? get border; + bool get enabled; + String? get semanticCounterText; + bool get alignLabelWithHint; + StacBoxConstraints? get constraints; /// Create a copy of StacInputDecoration /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacInputDecorationCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacInputDecorationCopyWithImpl( + this as StacInputDecoration, _$identity); + + /// Serializes this StacInputDecoration to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacInputDecoration && + const DeepCollectionEquality().equals(other.icon, icon) && + (identical(other.iconColor, iconColor) || + other.iconColor == iconColor) && + const DeepCollectionEquality().equals(other.label, label) && + (identical(other.labelText, labelText) || + other.labelText == labelText) && + (identical(other.labelStyle, labelStyle) || + other.labelStyle == labelStyle) && + (identical(other.floatingLabelStyle, floatingLabelStyle) || + other.floatingLabelStyle == floatingLabelStyle) && + (identical(other.helperText, helperText) || + other.helperText == helperText) && + (identical(other.helperStyle, helperStyle) || + other.helperStyle == helperStyle) && + (identical(other.hintText, hintText) || + other.hintText == hintText) && + (identical(other.hintStyle, hintStyle) || + other.hintStyle == hintStyle) && + (identical(other.helperMaxLines, helperMaxLines) || + other.helperMaxLines == helperMaxLines) && + (identical(other.hintTextDirection, hintTextDirection) || + other.hintTextDirection == hintTextDirection) && + (identical(other.hintMaxLines, hintMaxLines) || + other.hintMaxLines == hintMaxLines) && + (identical(other.errorText, errorText) || + other.errorText == errorText) && + (identical(other.errorStyle, errorStyle) || + other.errorStyle == errorStyle) && + (identical(other.errorMaxLines, errorMaxLines) || + other.errorMaxLines == errorMaxLines) && + (identical(other.floatingLabelBehavior, floatingLabelBehavior) || + other.floatingLabelBehavior == floatingLabelBehavior) && + (identical(other.floatingLabelAlignment, floatingLabelAlignment) || + other.floatingLabelAlignment == floatingLabelAlignment) && + (identical(other.isCollapsed, isCollapsed) || + other.isCollapsed == isCollapsed) && + (identical(other.isDense, isDense) || other.isDense == isDense) && + (identical(other.contentPadding, contentPadding) || + other.contentPadding == contentPadding) && + const DeepCollectionEquality() + .equals(other.prefixIcon, prefixIcon) && + (identical(other.prefixIconConstraints, prefixIconConstraints) || + other.prefixIconConstraints == prefixIconConstraints) && + const DeepCollectionEquality().equals(other.prefix, prefix) && + (identical(other.prefixText, prefixText) || + other.prefixText == prefixText) && + (identical(other.prefixStyle, prefixStyle) || + other.prefixStyle == prefixStyle) && + (identical(other.prefixIconColor, prefixIconColor) || + other.prefixIconColor == prefixIconColor) && + const DeepCollectionEquality().equals(other.suffix, suffix) && + const DeepCollectionEquality() + .equals(other.suffixIcon, suffixIcon) && + (identical(other.suffixIconConstraints, suffixIconConstraints) || + other.suffixIconConstraints == suffixIconConstraints) && + (identical(other.suffixText, suffixText) || + other.suffixText == suffixText) && + (identical(other.suffixStyle, suffixStyle) || + other.suffixStyle == suffixStyle) && + (identical(other.suffixIconColor, suffixIconColor) || + other.suffixIconColor == suffixIconColor) && + const DeepCollectionEquality().equals(other.counter, counter) && + (identical(other.counterText, counterText) || + other.counterText == counterText) && + (identical(other.counterStyle, counterStyle) || + other.counterStyle == counterStyle) && + (identical(other.filled, filled) || other.filled == filled) && + (identical(other.fillColor, fillColor) || + other.fillColor == fillColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.errorBorder, errorBorder) || + other.errorBorder == errorBorder) && + (identical(other.focusedBorder, focusedBorder) || + other.focusedBorder == focusedBorder) && + (identical(other.focusedErrorBorder, focusedErrorBorder) || + other.focusedErrorBorder == focusedErrorBorder) && + (identical(other.disabledBorder, disabledBorder) || + other.disabledBorder == disabledBorder) && + (identical(other.enabledBorder, enabledBorder) || + other.enabledBorder == enabledBorder) && + (identical(other.border, border) || other.border == border) && + (identical(other.enabled, enabled) || other.enabled == enabled) && + (identical(other.semanticCounterText, semanticCounterText) || + other.semanticCounterText == semanticCounterText) && + (identical(other.alignLabelWithHint, alignLabelWithHint) || + other.alignLabelWithHint == alignLabelWithHint) && + (identical(other.constraints, constraints) || + other.constraints == constraints)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(icon), + iconColor, + const DeepCollectionEquality().hash(label), + labelText, + labelStyle, + floatingLabelStyle, + helperText, + helperStyle, + hintText, + hintStyle, + helperMaxLines, + hintTextDirection, + hintMaxLines, + errorText, + errorStyle, + errorMaxLines, + floatingLabelBehavior, + floatingLabelAlignment, + isCollapsed, + isDense, + contentPadding, + const DeepCollectionEquality().hash(prefixIcon), + prefixIconConstraints, + const DeepCollectionEquality().hash(prefix), + prefixText, + prefixStyle, + prefixIconColor, + const DeepCollectionEquality().hash(suffix), + const DeepCollectionEquality().hash(suffixIcon), + suffixIconConstraints, + suffixText, + suffixStyle, + suffixIconColor, + const DeepCollectionEquality().hash(counter), + counterText, + counterStyle, + filled, + fillColor, + hoverColor, + focusColor, + errorBorder, + focusedBorder, + focusedErrorBorder, + disabledBorder, + enabledBorder, + border, + enabled, + semanticCounterText, + alignLabelWithHint, + constraints + ]); + + @override + String toString() { + return 'StacInputDecoration(icon: $icon, iconColor: $iconColor, label: $label, labelText: $labelText, labelStyle: $labelStyle, floatingLabelStyle: $floatingLabelStyle, helperText: $helperText, helperStyle: $helperStyle, hintText: $hintText, hintStyle: $hintStyle, helperMaxLines: $helperMaxLines, hintTextDirection: $hintTextDirection, hintMaxLines: $hintMaxLines, errorText: $errorText, errorStyle: $errorStyle, errorMaxLines: $errorMaxLines, floatingLabelBehavior: $floatingLabelBehavior, floatingLabelAlignment: $floatingLabelAlignment, isCollapsed: $isCollapsed, isDense: $isDense, contentPadding: $contentPadding, prefixIcon: $prefixIcon, prefixIconConstraints: $prefixIconConstraints, prefix: $prefix, prefixText: $prefixText, prefixStyle: $prefixStyle, prefixIconColor: $prefixIconColor, suffix: $suffix, suffixIcon: $suffixIcon, suffixIconConstraints: $suffixIconConstraints, suffixText: $suffixText, suffixStyle: $suffixStyle, suffixIconColor: $suffixIconColor, counter: $counter, counterText: $counterText, counterStyle: $counterStyle, filled: $filled, fillColor: $fillColor, hoverColor: $hoverColor, focusColor: $focusColor, errorBorder: $errorBorder, focusedBorder: $focusedBorder, focusedErrorBorder: $focusedErrorBorder, disabledBorder: $disabledBorder, enabledBorder: $enabledBorder, border: $border, enabled: $enabled, semanticCounterText: $semanticCounterText, alignLabelWithHint: $alignLabelWithHint, constraints: $constraints)'; + } } /// @nodoc -abstract class $StacInputDecorationCopyWith<$Res> { +abstract mixin class $StacInputDecorationCopyWith<$Res> { factory $StacInputDecorationCopyWith( - StacInputDecoration value, $Res Function(StacInputDecoration) then) = - _$StacInputDecorationCopyWithImpl<$Res, StacInputDecoration>; + StacInputDecoration value, $Res Function(StacInputDecoration) _then) = + _$StacInputDecorationCopyWithImpl; @useResult $Res call( {Map? icon, @@ -164,14 +316,12 @@ abstract class $StacInputDecorationCopyWith<$Res> { } /// @nodoc -class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> +class _$StacInputDecorationCopyWithImpl<$Res> implements $StacInputDecorationCopyWith<$Res> { - _$StacInputDecorationCopyWithImpl(this._value, this._then); + _$StacInputDecorationCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacInputDecoration _self; + final $Res Function(StacInputDecoration) _then; /// Create a copy of StacInputDecoration /// with the given fields replaced by the non-null parameter values. @@ -229,208 +379,208 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> Object? alignLabelWithHint = null, Object? constraints = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( icon: freezed == icon - ? _value.icon + ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as Map?, iconColor: freezed == iconColor - ? _value.iconColor + ? _self.iconColor : iconColor // ignore: cast_nullable_to_non_nullable as String?, label: freezed == label - ? _value.label + ? _self.label : label // ignore: cast_nullable_to_non_nullable as Map?, labelText: freezed == labelText - ? _value.labelText + ? _self.labelText : labelText // ignore: cast_nullable_to_non_nullable as String?, labelStyle: freezed == labelStyle - ? _value.labelStyle + ? _self.labelStyle : labelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, floatingLabelStyle: freezed == floatingLabelStyle - ? _value.floatingLabelStyle + ? _self.floatingLabelStyle : floatingLabelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, helperText: freezed == helperText - ? _value.helperText + ? _self.helperText : helperText // ignore: cast_nullable_to_non_nullable as String?, helperStyle: freezed == helperStyle - ? _value.helperStyle + ? _self.helperStyle : helperStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, hintText: freezed == hintText - ? _value.hintText + ? _self.hintText : hintText // ignore: cast_nullable_to_non_nullable as String?, hintStyle: freezed == hintStyle - ? _value.hintStyle + ? _self.hintStyle : hintStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, helperMaxLines: freezed == helperMaxLines - ? _value.helperMaxLines + ? _self.helperMaxLines : helperMaxLines // ignore: cast_nullable_to_non_nullable as int?, hintTextDirection: freezed == hintTextDirection - ? _value.hintTextDirection + ? _self.hintTextDirection : hintTextDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, hintMaxLines: freezed == hintMaxLines - ? _value.hintMaxLines + ? _self.hintMaxLines : hintMaxLines // ignore: cast_nullable_to_non_nullable as int?, errorText: freezed == errorText - ? _value.errorText + ? _self.errorText : errorText // ignore: cast_nullable_to_non_nullable as String?, errorStyle: freezed == errorStyle - ? _value.errorStyle + ? _self.errorStyle : errorStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, errorMaxLines: freezed == errorMaxLines - ? _value.errorMaxLines + ? _self.errorMaxLines : errorMaxLines // ignore: cast_nullable_to_non_nullable as int?, floatingLabelBehavior: freezed == floatingLabelBehavior - ? _value.floatingLabelBehavior + ? _self.floatingLabelBehavior : floatingLabelBehavior // ignore: cast_nullable_to_non_nullable as FloatingLabelBehavior?, floatingLabelAlignment: freezed == floatingLabelAlignment - ? _value.floatingLabelAlignment + ? _self.floatingLabelAlignment : floatingLabelAlignment // ignore: cast_nullable_to_non_nullable as StacFloatingLabelAlignment?, isCollapsed: null == isCollapsed - ? _value.isCollapsed + ? _self.isCollapsed : isCollapsed // ignore: cast_nullable_to_non_nullable as bool, isDense: null == isDense - ? _value.isDense + ? _self.isDense : isDense // ignore: cast_nullable_to_non_nullable as bool, contentPadding: freezed == contentPadding - ? _value.contentPadding + ? _self.contentPadding : contentPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, prefixIcon: freezed == prefixIcon - ? _value.prefixIcon + ? _self.prefixIcon : prefixIcon // ignore: cast_nullable_to_non_nullable as Map?, prefixIconConstraints: freezed == prefixIconConstraints - ? _value.prefixIconConstraints + ? _self.prefixIconConstraints : prefixIconConstraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, prefix: freezed == prefix - ? _value.prefix + ? _self.prefix : prefix // ignore: cast_nullable_to_non_nullable as Map?, prefixText: freezed == prefixText - ? _value.prefixText + ? _self.prefixText : prefixText // ignore: cast_nullable_to_non_nullable as String?, prefixStyle: freezed == prefixStyle - ? _value.prefixStyle + ? _self.prefixStyle : prefixStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, prefixIconColor: freezed == prefixIconColor - ? _value.prefixIconColor + ? _self.prefixIconColor : prefixIconColor // ignore: cast_nullable_to_non_nullable as String?, suffix: freezed == suffix - ? _value.suffix + ? _self.suffix : suffix // ignore: cast_nullable_to_non_nullable as Map?, suffixIcon: freezed == suffixIcon - ? _value.suffixIcon + ? _self.suffixIcon : suffixIcon // ignore: cast_nullable_to_non_nullable as Map?, suffixIconConstraints: freezed == suffixIconConstraints - ? _value.suffixIconConstraints + ? _self.suffixIconConstraints : suffixIconConstraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, suffixText: freezed == suffixText - ? _value.suffixText + ? _self.suffixText : suffixText // ignore: cast_nullable_to_non_nullable as String?, suffixStyle: freezed == suffixStyle - ? _value.suffixStyle + ? _self.suffixStyle : suffixStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, suffixIconColor: freezed == suffixIconColor - ? _value.suffixIconColor + ? _self.suffixIconColor : suffixIconColor // ignore: cast_nullable_to_non_nullable as String?, counter: freezed == counter - ? _value.counter + ? _self.counter : counter // ignore: cast_nullable_to_non_nullable as Map?, counterText: freezed == counterText - ? _value.counterText + ? _self.counterText : counterText // ignore: cast_nullable_to_non_nullable as String?, counterStyle: freezed == counterStyle - ? _value.counterStyle + ? _self.counterStyle : counterStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, filled: freezed == filled - ? _value.filled + ? _self.filled : filled // ignore: cast_nullable_to_non_nullable as bool?, fillColor: freezed == fillColor - ? _value.fillColor + ? _self.fillColor : fillColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, errorBorder: freezed == errorBorder - ? _value.errorBorder + ? _self.errorBorder : errorBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, focusedBorder: freezed == focusedBorder - ? _value.focusedBorder + ? _self.focusedBorder : focusedBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, focusedErrorBorder: freezed == focusedErrorBorder - ? _value.focusedErrorBorder + ? _self.focusedErrorBorder : focusedErrorBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, disabledBorder: freezed == disabledBorder - ? _value.disabledBorder + ? _self.disabledBorder : disabledBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, enabledBorder: freezed == enabledBorder - ? _value.enabledBorder + ? _self.enabledBorder : enabledBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, border: freezed == border - ? _value.border + ? _self.border : border // ignore: cast_nullable_to_non_nullable as StacInputBorder?, enabled: null == enabled - ? _value.enabled + ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable as bool, semanticCounterText: freezed == semanticCounterText - ? _value.semanticCounterText + ? _self.semanticCounterText : semanticCounterText // ignore: cast_nullable_to_non_nullable as String?, alignLabelWithHint: null == alignLabelWithHint - ? _value.alignLabelWithHint + ? _self.alignLabelWithHint : alignLabelWithHint // ignore: cast_nullable_to_non_nullable as bool, constraints: freezed == constraints - ? _value.constraints + ? _self.constraints : constraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, - ) as $Val); + )); } /// Create a copy of StacInputDecoration @@ -438,12 +588,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get labelStyle { - if (_value.labelStyle == null) { + if (_self.labelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.labelStyle!, (value) { - return _then(_value.copyWith(labelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); }); } @@ -452,12 +602,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get floatingLabelStyle { - if (_value.floatingLabelStyle == null) { + if (_self.floatingLabelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.floatingLabelStyle!, (value) { - return _then(_value.copyWith(floatingLabelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.floatingLabelStyle!, (value) { + return _then(_self.copyWith(floatingLabelStyle: value)); }); } @@ -466,12 +616,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get helperStyle { - if (_value.helperStyle == null) { + if (_self.helperStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.helperStyle!, (value) { - return _then(_value.copyWith(helperStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.helperStyle!, (value) { + return _then(_self.copyWith(helperStyle: value)); }); } @@ -480,12 +630,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get hintStyle { - if (_value.hintStyle == null) { + if (_self.hintStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.hintStyle!, (value) { - return _then(_value.copyWith(hintStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.hintStyle!, (value) { + return _then(_self.copyWith(hintStyle: value)); }); } @@ -494,12 +644,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get errorStyle { - if (_value.errorStyle == null) { + if (_self.errorStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.errorStyle!, (value) { - return _then(_value.copyWith(errorStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.errorStyle!, (value) { + return _then(_self.copyWith(errorStyle: value)); }); } @@ -508,12 +658,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get contentPadding { - if (_value.contentPadding == null) { + if (_self.contentPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.contentPadding!, (value) { - return _then(_value.copyWith(contentPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); }); } @@ -522,13 +672,13 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get prefixIconConstraints { - if (_value.prefixIconConstraints == null) { + if (_self.prefixIconConstraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.prefixIconConstraints!, + return $StacBoxConstraintsCopyWith<$Res>(_self.prefixIconConstraints!, (value) { - return _then(_value.copyWith(prefixIconConstraints: value) as $Val); + return _then(_self.copyWith(prefixIconConstraints: value)); }); } @@ -537,12 +687,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get prefixStyle { - if (_value.prefixStyle == null) { + if (_self.prefixStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.prefixStyle!, (value) { - return _then(_value.copyWith(prefixStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.prefixStyle!, (value) { + return _then(_self.copyWith(prefixStyle: value)); }); } @@ -551,13 +701,13 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get suffixIconConstraints { - if (_value.suffixIconConstraints == null) { + if (_self.suffixIconConstraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.suffixIconConstraints!, + return $StacBoxConstraintsCopyWith<$Res>(_self.suffixIconConstraints!, (value) { - return _then(_value.copyWith(suffixIconConstraints: value) as $Val); + return _then(_self.copyWith(suffixIconConstraints: value)); }); } @@ -566,12 +716,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get suffixStyle { - if (_value.suffixStyle == null) { + if (_self.suffixStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.suffixStyle!, (value) { - return _then(_value.copyWith(suffixStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.suffixStyle!, (value) { + return _then(_self.copyWith(suffixStyle: value)); }); } @@ -580,12 +730,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get counterStyle { - if (_value.counterStyle == null) { + if (_self.counterStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.counterStyle!, (value) { - return _then(_value.copyWith(counterStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.counterStyle!, (value) { + return _then(_self.copyWith(counterStyle: value)); }); } @@ -594,12 +744,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get errorBorder { - if (_value.errorBorder == null) { + if (_self.errorBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.errorBorder!, (value) { - return _then(_value.copyWith(errorBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.errorBorder!, (value) { + return _then(_self.copyWith(errorBorder: value)); }); } @@ -608,12 +758,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get focusedBorder { - if (_value.focusedBorder == null) { + if (_self.focusedBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.focusedBorder!, (value) { - return _then(_value.copyWith(focusedBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.focusedBorder!, (value) { + return _then(_self.copyWith(focusedBorder: value)); }); } @@ -622,12 +772,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get focusedErrorBorder { - if (_value.focusedErrorBorder == null) { + if (_self.focusedErrorBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.focusedErrorBorder!, (value) { - return _then(_value.copyWith(focusedErrorBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.focusedErrorBorder!, (value) { + return _then(_self.copyWith(focusedErrorBorder: value)); }); } @@ -636,12 +786,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get disabledBorder { - if (_value.disabledBorder == null) { + if (_self.disabledBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.disabledBorder!, (value) { - return _then(_value.copyWith(disabledBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.disabledBorder!, (value) { + return _then(_self.copyWith(disabledBorder: value)); }); } @@ -650,12 +800,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get enabledBorder { - if (_value.enabledBorder == null) { + if (_self.enabledBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.enabledBorder!, (value) { - return _then(_value.copyWith(enabledBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.enabledBorder!, (value) { + return _then(_self.copyWith(enabledBorder: value)); }); } @@ -664,12 +814,12 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get border { - if (_value.border == null) { + if (_self.border == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.border!, (value) { - return _then(_value.copyWith(border: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.border!, (value) { + return _then(_self.copyWith(border: value)); }); } @@ -678,387 +828,20 @@ class _$StacInputDecorationCopyWithImpl<$Res, $Val extends StacInputDecoration> @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get constraints { - if (_value.constraints == null) { + if (_self.constraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.constraints!, (value) { - return _then(_value.copyWith(constraints: value) as $Val); + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); }); } } -/// @nodoc -abstract class _$$StacInputDecorationImplCopyWith<$Res> - implements $StacInputDecorationCopyWith<$Res> { - factory _$$StacInputDecorationImplCopyWith(_$StacInputDecorationImpl value, - $Res Function(_$StacInputDecorationImpl) then) = - __$$StacInputDecorationImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? icon, - String? iconColor, - Map? label, - String? labelText, - StacTextStyle? labelStyle, - StacTextStyle? floatingLabelStyle, - String? helperText, - StacTextStyle? helperStyle, - String? hintText, - StacTextStyle? hintStyle, - int? helperMaxLines, - TextDirection? hintTextDirection, - int? hintMaxLines, - String? errorText, - StacTextStyle? errorStyle, - int? errorMaxLines, - FloatingLabelBehavior? floatingLabelBehavior, - StacFloatingLabelAlignment? floatingLabelAlignment, - bool isCollapsed, - bool isDense, - StacEdgeInsets? contentPadding, - Map? prefixIcon, - StacBoxConstraints? prefixIconConstraints, - Map? prefix, - String? prefixText, - StacTextStyle? prefixStyle, - String? prefixIconColor, - Map? suffix, - Map? suffixIcon, - StacBoxConstraints? suffixIconConstraints, - String? suffixText, - StacTextStyle? suffixStyle, - String? suffixIconColor, - Map? counter, - String? counterText, - StacTextStyle? counterStyle, - bool? filled, - String? fillColor, - String? hoverColor, - String? focusColor, - StacInputBorder? errorBorder, - StacInputBorder? focusedBorder, - StacInputBorder? focusedErrorBorder, - StacInputBorder? disabledBorder, - StacInputBorder? enabledBorder, - StacInputBorder? border, - bool enabled, - String? semanticCounterText, - bool alignLabelWithHint, - StacBoxConstraints? constraints}); - - @override - $StacTextStyleCopyWith<$Res>? get labelStyle; - @override - $StacTextStyleCopyWith<$Res>? get floatingLabelStyle; - @override - $StacTextStyleCopyWith<$Res>? get helperStyle; - @override - $StacTextStyleCopyWith<$Res>? get hintStyle; - @override - $StacTextStyleCopyWith<$Res>? get errorStyle; - @override - $StacEdgeInsetsCopyWith<$Res>? get contentPadding; - @override - $StacBoxConstraintsCopyWith<$Res>? get prefixIconConstraints; - @override - $StacTextStyleCopyWith<$Res>? get prefixStyle; - @override - $StacBoxConstraintsCopyWith<$Res>? get suffixIconConstraints; - @override - $StacTextStyleCopyWith<$Res>? get suffixStyle; - @override - $StacTextStyleCopyWith<$Res>? get counterStyle; - @override - $StacInputBorderCopyWith<$Res>? get errorBorder; - @override - $StacInputBorderCopyWith<$Res>? get focusedBorder; - @override - $StacInputBorderCopyWith<$Res>? get focusedErrorBorder; - @override - $StacInputBorderCopyWith<$Res>? get disabledBorder; - @override - $StacInputBorderCopyWith<$Res>? get enabledBorder; - @override - $StacInputBorderCopyWith<$Res>? get border; - @override - $StacBoxConstraintsCopyWith<$Res>? get constraints; -} - -/// @nodoc -class __$$StacInputDecorationImplCopyWithImpl<$Res> - extends _$StacInputDecorationCopyWithImpl<$Res, _$StacInputDecorationImpl> - implements _$$StacInputDecorationImplCopyWith<$Res> { - __$$StacInputDecorationImplCopyWithImpl(_$StacInputDecorationImpl _value, - $Res Function(_$StacInputDecorationImpl) _then) - : super(_value, _then); - - /// Create a copy of StacInputDecoration - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? icon = freezed, - Object? iconColor = freezed, - Object? label = freezed, - Object? labelText = freezed, - Object? labelStyle = freezed, - Object? floatingLabelStyle = freezed, - Object? helperText = freezed, - Object? helperStyle = freezed, - Object? hintText = freezed, - Object? hintStyle = freezed, - Object? helperMaxLines = freezed, - Object? hintTextDirection = freezed, - Object? hintMaxLines = freezed, - Object? errorText = freezed, - Object? errorStyle = freezed, - Object? errorMaxLines = freezed, - Object? floatingLabelBehavior = freezed, - Object? floatingLabelAlignment = freezed, - Object? isCollapsed = null, - Object? isDense = null, - Object? contentPadding = freezed, - Object? prefixIcon = freezed, - Object? prefixIconConstraints = freezed, - Object? prefix = freezed, - Object? prefixText = freezed, - Object? prefixStyle = freezed, - Object? prefixIconColor = freezed, - Object? suffix = freezed, - Object? suffixIcon = freezed, - Object? suffixIconConstraints = freezed, - Object? suffixText = freezed, - Object? suffixStyle = freezed, - Object? suffixIconColor = freezed, - Object? counter = freezed, - Object? counterText = freezed, - Object? counterStyle = freezed, - Object? filled = freezed, - Object? fillColor = freezed, - Object? hoverColor = freezed, - Object? focusColor = freezed, - Object? errorBorder = freezed, - Object? focusedBorder = freezed, - Object? focusedErrorBorder = freezed, - Object? disabledBorder = freezed, - Object? enabledBorder = freezed, - Object? border = freezed, - Object? enabled = null, - Object? semanticCounterText = freezed, - Object? alignLabelWithHint = null, - Object? constraints = freezed, - }) { - return _then(_$StacInputDecorationImpl( - icon: freezed == icon - ? _value._icon - : icon // ignore: cast_nullable_to_non_nullable - as Map?, - iconColor: freezed == iconColor - ? _value.iconColor - : iconColor // ignore: cast_nullable_to_non_nullable - as String?, - label: freezed == label - ? _value._label - : label // ignore: cast_nullable_to_non_nullable - as Map?, - labelText: freezed == labelText - ? _value.labelText - : labelText // ignore: cast_nullable_to_non_nullable - as String?, - labelStyle: freezed == labelStyle - ? _value.labelStyle - : labelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - floatingLabelStyle: freezed == floatingLabelStyle - ? _value.floatingLabelStyle - : floatingLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - helperText: freezed == helperText - ? _value.helperText - : helperText // ignore: cast_nullable_to_non_nullable - as String?, - helperStyle: freezed == helperStyle - ? _value.helperStyle - : helperStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - hintText: freezed == hintText - ? _value.hintText - : hintText // ignore: cast_nullable_to_non_nullable - as String?, - hintStyle: freezed == hintStyle - ? _value.hintStyle - : hintStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - helperMaxLines: freezed == helperMaxLines - ? _value.helperMaxLines - : helperMaxLines // ignore: cast_nullable_to_non_nullable - as int?, - hintTextDirection: freezed == hintTextDirection - ? _value.hintTextDirection - : hintTextDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - hintMaxLines: freezed == hintMaxLines - ? _value.hintMaxLines - : hintMaxLines // ignore: cast_nullable_to_non_nullable - as int?, - errorText: freezed == errorText - ? _value.errorText - : errorText // ignore: cast_nullable_to_non_nullable - as String?, - errorStyle: freezed == errorStyle - ? _value.errorStyle - : errorStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - errorMaxLines: freezed == errorMaxLines - ? _value.errorMaxLines - : errorMaxLines // ignore: cast_nullable_to_non_nullable - as int?, - floatingLabelBehavior: freezed == floatingLabelBehavior - ? _value.floatingLabelBehavior - : floatingLabelBehavior // ignore: cast_nullable_to_non_nullable - as FloatingLabelBehavior?, - floatingLabelAlignment: freezed == floatingLabelAlignment - ? _value.floatingLabelAlignment - : floatingLabelAlignment // ignore: cast_nullable_to_non_nullable - as StacFloatingLabelAlignment?, - isCollapsed: null == isCollapsed - ? _value.isCollapsed - : isCollapsed // ignore: cast_nullable_to_non_nullable - as bool, - isDense: null == isDense - ? _value.isDense - : isDense // ignore: cast_nullable_to_non_nullable - as bool, - contentPadding: freezed == contentPadding - ? _value.contentPadding - : contentPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - prefixIcon: freezed == prefixIcon - ? _value._prefixIcon - : prefixIcon // ignore: cast_nullable_to_non_nullable - as Map?, - prefixIconConstraints: freezed == prefixIconConstraints - ? _value.prefixIconConstraints - : prefixIconConstraints // ignore: cast_nullable_to_non_nullable - as StacBoxConstraints?, - prefix: freezed == prefix - ? _value._prefix - : prefix // ignore: cast_nullable_to_non_nullable - as Map?, - prefixText: freezed == prefixText - ? _value.prefixText - : prefixText // ignore: cast_nullable_to_non_nullable - as String?, - prefixStyle: freezed == prefixStyle - ? _value.prefixStyle - : prefixStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - prefixIconColor: freezed == prefixIconColor - ? _value.prefixIconColor - : prefixIconColor // ignore: cast_nullable_to_non_nullable - as String?, - suffix: freezed == suffix - ? _value._suffix - : suffix // ignore: cast_nullable_to_non_nullable - as Map?, - suffixIcon: freezed == suffixIcon - ? _value._suffixIcon - : suffixIcon // ignore: cast_nullable_to_non_nullable - as Map?, - suffixIconConstraints: freezed == suffixIconConstraints - ? _value.suffixIconConstraints - : suffixIconConstraints // ignore: cast_nullable_to_non_nullable - as StacBoxConstraints?, - suffixText: freezed == suffixText - ? _value.suffixText - : suffixText // ignore: cast_nullable_to_non_nullable - as String?, - suffixStyle: freezed == suffixStyle - ? _value.suffixStyle - : suffixStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - suffixIconColor: freezed == suffixIconColor - ? _value.suffixIconColor - : suffixIconColor // ignore: cast_nullable_to_non_nullable - as String?, - counter: freezed == counter - ? _value._counter - : counter // ignore: cast_nullable_to_non_nullable - as Map?, - counterText: freezed == counterText - ? _value.counterText - : counterText // ignore: cast_nullable_to_non_nullable - as String?, - counterStyle: freezed == counterStyle - ? _value.counterStyle - : counterStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - filled: freezed == filled - ? _value.filled - : filled // ignore: cast_nullable_to_non_nullable - as bool?, - fillColor: freezed == fillColor - ? _value.fillColor - : fillColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - errorBorder: freezed == errorBorder - ? _value.errorBorder - : errorBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - focusedBorder: freezed == focusedBorder - ? _value.focusedBorder - : focusedBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - focusedErrorBorder: freezed == focusedErrorBorder - ? _value.focusedErrorBorder - : focusedErrorBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - disabledBorder: freezed == disabledBorder - ? _value.disabledBorder - : disabledBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - enabledBorder: freezed == enabledBorder - ? _value.enabledBorder - : enabledBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - border: freezed == border - ? _value.border - : border // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - enabled: null == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - semanticCounterText: freezed == semanticCounterText - ? _value.semanticCounterText - : semanticCounterText // ignore: cast_nullable_to_non_nullable - as String?, - alignLabelWithHint: null == alignLabelWithHint - ? _value.alignLabelWithHint - : alignLabelWithHint // ignore: cast_nullable_to_non_nullable - as bool, - constraints: freezed == constraints - ? _value.constraints - : constraints // ignore: cast_nullable_to_non_nullable - as StacBoxConstraints?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacInputDecorationImpl implements _StacInputDecoration { - const _$StacInputDecorationImpl( +class _StacInputDecoration implements StacInputDecoration { + const _StacInputDecoration( {final Map? icon, this.iconColor, final Map? label, @@ -1116,9 +899,8 @@ class _$StacInputDecorationImpl implements _StacInputDecoration { _suffix = suffix, _suffixIcon = suffixIcon, _counter = counter; - - factory _$StacInputDecorationImpl.fromJson(Map json) => - _$$StacInputDecorationImplFromJson(json); + factory _StacInputDecoration.fromJson(Map json) => + _$StacInputDecorationFromJson(json); final Map? _icon; @override @@ -1281,16 +1063,27 @@ class _$StacInputDecorationImpl implements _StacInputDecoration { @override final StacBoxConstraints? constraints; + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacInputDecoration(icon: $icon, iconColor: $iconColor, label: $label, labelText: $labelText, labelStyle: $labelStyle, floatingLabelStyle: $floatingLabelStyle, helperText: $helperText, helperStyle: $helperStyle, hintText: $hintText, hintStyle: $hintStyle, helperMaxLines: $helperMaxLines, hintTextDirection: $hintTextDirection, hintMaxLines: $hintMaxLines, errorText: $errorText, errorStyle: $errorStyle, errorMaxLines: $errorMaxLines, floatingLabelBehavior: $floatingLabelBehavior, floatingLabelAlignment: $floatingLabelAlignment, isCollapsed: $isCollapsed, isDense: $isDense, contentPadding: $contentPadding, prefixIcon: $prefixIcon, prefixIconConstraints: $prefixIconConstraints, prefix: $prefix, prefixText: $prefixText, prefixStyle: $prefixStyle, prefixIconColor: $prefixIconColor, suffix: $suffix, suffixIcon: $suffixIcon, suffixIconConstraints: $suffixIconConstraints, suffixText: $suffixText, suffixStyle: $suffixStyle, suffixIconColor: $suffixIconColor, counter: $counter, counterText: $counterText, counterStyle: $counterStyle, filled: $filled, fillColor: $fillColor, hoverColor: $hoverColor, focusColor: $focusColor, errorBorder: $errorBorder, focusedBorder: $focusedBorder, focusedErrorBorder: $focusedErrorBorder, disabledBorder: $disabledBorder, enabledBorder: $enabledBorder, border: $border, enabled: $enabled, semanticCounterText: $semanticCounterText, alignLabelWithHint: $alignLabelWithHint, constraints: $constraints)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacInputDecorationCopyWith<_StacInputDecoration> get copyWith => + __$StacInputDecorationCopyWithImpl<_StacInputDecoration>( + this, _$identity); + + @override + Map toJson() { + return _$StacInputDecorationToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacInputDecorationImpl && + other is _StacInputDecoration && const DeepCollectionEquality().equals(other._icon, _icon) && (identical(other.iconColor, iconColor) || other.iconColor == iconColor) && @@ -1440,184 +1233,631 @@ class _$StacInputDecorationImpl implements _StacInputDecoration { constraints ]); - /// Create a copy of StacInputDecoration - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacInputDecorationImplCopyWith<_$StacInputDecorationImpl> get copyWith => - __$$StacInputDecorationImplCopyWithImpl<_$StacInputDecorationImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacInputDecorationImplToJson( - this, - ); + String toString() { + return 'StacInputDecoration(icon: $icon, iconColor: $iconColor, label: $label, labelText: $labelText, labelStyle: $labelStyle, floatingLabelStyle: $floatingLabelStyle, helperText: $helperText, helperStyle: $helperStyle, hintText: $hintText, hintStyle: $hintStyle, helperMaxLines: $helperMaxLines, hintTextDirection: $hintTextDirection, hintMaxLines: $hintMaxLines, errorText: $errorText, errorStyle: $errorStyle, errorMaxLines: $errorMaxLines, floatingLabelBehavior: $floatingLabelBehavior, floatingLabelAlignment: $floatingLabelAlignment, isCollapsed: $isCollapsed, isDense: $isDense, contentPadding: $contentPadding, prefixIcon: $prefixIcon, prefixIconConstraints: $prefixIconConstraints, prefix: $prefix, prefixText: $prefixText, prefixStyle: $prefixStyle, prefixIconColor: $prefixIconColor, suffix: $suffix, suffixIcon: $suffixIcon, suffixIconConstraints: $suffixIconConstraints, suffixText: $suffixText, suffixStyle: $suffixStyle, suffixIconColor: $suffixIconColor, counter: $counter, counterText: $counterText, counterStyle: $counterStyle, filled: $filled, fillColor: $fillColor, hoverColor: $hoverColor, focusColor: $focusColor, errorBorder: $errorBorder, focusedBorder: $focusedBorder, focusedErrorBorder: $focusedErrorBorder, disabledBorder: $disabledBorder, enabledBorder: $enabledBorder, border: $border, enabled: $enabled, semanticCounterText: $semanticCounterText, alignLabelWithHint: $alignLabelWithHint, constraints: $constraints)'; } } -abstract class _StacInputDecoration implements StacInputDecoration { - const factory _StacInputDecoration( - {final Map? icon, - final String? iconColor, - final Map? label, - final String? labelText, - final StacTextStyle? labelStyle, - final StacTextStyle? floatingLabelStyle, - final String? helperText, - final StacTextStyle? helperStyle, - final String? hintText, - final StacTextStyle? hintStyle, - final int? helperMaxLines, - final TextDirection? hintTextDirection, - final int? hintMaxLines, - final String? errorText, - final StacTextStyle? errorStyle, - final int? errorMaxLines, - final FloatingLabelBehavior? floatingLabelBehavior, - final StacFloatingLabelAlignment? floatingLabelAlignment, - final bool isCollapsed, - final bool isDense, - final StacEdgeInsets? contentPadding, - final Map? prefixIcon, - final StacBoxConstraints? prefixIconConstraints, - final Map? prefix, - final String? prefixText, - final StacTextStyle? prefixStyle, - final String? prefixIconColor, - final Map? suffix, - final Map? suffixIcon, - final StacBoxConstraints? suffixIconConstraints, - final String? suffixText, - final StacTextStyle? suffixStyle, - final String? suffixIconColor, - final Map? counter, - final String? counterText, - final StacTextStyle? counterStyle, - final bool? filled, - final String? fillColor, - final String? hoverColor, - final String? focusColor, - final StacInputBorder? errorBorder, - final StacInputBorder? focusedBorder, - final StacInputBorder? focusedErrorBorder, - final StacInputBorder? disabledBorder, - final StacInputBorder? enabledBorder, - final StacInputBorder? border, - final bool enabled, - final String? semanticCounterText, - final bool alignLabelWithHint, - final StacBoxConstraints? constraints}) = _$StacInputDecorationImpl; - - factory _StacInputDecoration.fromJson(Map json) = - _$StacInputDecorationImpl.fromJson; - - @override - Map? get icon; - @override - String? get iconColor; - @override - Map? get label; - @override - String? get labelText; - @override - StacTextStyle? get labelStyle; - @override - StacTextStyle? get floatingLabelStyle; - @override - String? get helperText; - @override - StacTextStyle? get helperStyle; - @override - String? get hintText; - @override - StacTextStyle? get hintStyle; - @override - int? get helperMaxLines; - @override - TextDirection? get hintTextDirection; - @override - int? get hintMaxLines; - @override - String? get errorText; - @override - StacTextStyle? get errorStyle; - @override - int? get errorMaxLines; - @override - FloatingLabelBehavior? get floatingLabelBehavior; - @override - StacFloatingLabelAlignment? get floatingLabelAlignment; - @override - bool get isCollapsed; - @override - bool get isDense; - @override - StacEdgeInsets? get contentPadding; - @override - Map? get prefixIcon; - @override - StacBoxConstraints? get prefixIconConstraints; - @override - Map? get prefix; - @override - String? get prefixText; - @override - StacTextStyle? get prefixStyle; - @override - String? get prefixIconColor; - @override - Map? get suffix; - @override - Map? get suffixIcon; - @override - StacBoxConstraints? get suffixIconConstraints; - @override - String? get suffixText; +/// @nodoc +abstract mixin class _$StacInputDecorationCopyWith<$Res> + implements $StacInputDecorationCopyWith<$Res> { + factory _$StacInputDecorationCopyWith(_StacInputDecoration value, + $Res Function(_StacInputDecoration) _then) = + __$StacInputDecorationCopyWithImpl; @override - StacTextStyle? get suffixStyle; + @useResult + $Res call( + {Map? icon, + String? iconColor, + Map? label, + String? labelText, + StacTextStyle? labelStyle, + StacTextStyle? floatingLabelStyle, + String? helperText, + StacTextStyle? helperStyle, + String? hintText, + StacTextStyle? hintStyle, + int? helperMaxLines, + TextDirection? hintTextDirection, + int? hintMaxLines, + String? errorText, + StacTextStyle? errorStyle, + int? errorMaxLines, + FloatingLabelBehavior? floatingLabelBehavior, + StacFloatingLabelAlignment? floatingLabelAlignment, + bool isCollapsed, + bool isDense, + StacEdgeInsets? contentPadding, + Map? prefixIcon, + StacBoxConstraints? prefixIconConstraints, + Map? prefix, + String? prefixText, + StacTextStyle? prefixStyle, + String? prefixIconColor, + Map? suffix, + Map? suffixIcon, + StacBoxConstraints? suffixIconConstraints, + String? suffixText, + StacTextStyle? suffixStyle, + String? suffixIconColor, + Map? counter, + String? counterText, + StacTextStyle? counterStyle, + bool? filled, + String? fillColor, + String? hoverColor, + String? focusColor, + StacInputBorder? errorBorder, + StacInputBorder? focusedBorder, + StacInputBorder? focusedErrorBorder, + StacInputBorder? disabledBorder, + StacInputBorder? enabledBorder, + StacInputBorder? border, + bool enabled, + String? semanticCounterText, + bool alignLabelWithHint, + StacBoxConstraints? constraints}); + @override - String? get suffixIconColor; + $StacTextStyleCopyWith<$Res>? get labelStyle; @override - Map? get counter; + $StacTextStyleCopyWith<$Res>? get floatingLabelStyle; @override - String? get counterText; + $StacTextStyleCopyWith<$Res>? get helperStyle; @override - StacTextStyle? get counterStyle; + $StacTextStyleCopyWith<$Res>? get hintStyle; @override - bool? get filled; + $StacTextStyleCopyWith<$Res>? get errorStyle; @override - String? get fillColor; + $StacEdgeInsetsCopyWith<$Res>? get contentPadding; @override - String? get hoverColor; + $StacBoxConstraintsCopyWith<$Res>? get prefixIconConstraints; @override - String? get focusColor; + $StacTextStyleCopyWith<$Res>? get prefixStyle; @override - StacInputBorder? get errorBorder; + $StacBoxConstraintsCopyWith<$Res>? get suffixIconConstraints; @override - StacInputBorder? get focusedBorder; + $StacTextStyleCopyWith<$Res>? get suffixStyle; @override - StacInputBorder? get focusedErrorBorder; + $StacTextStyleCopyWith<$Res>? get counterStyle; @override - StacInputBorder? get disabledBorder; + $StacInputBorderCopyWith<$Res>? get errorBorder; @override - StacInputBorder? get enabledBorder; + $StacInputBorderCopyWith<$Res>? get focusedBorder; @override - StacInputBorder? get border; + $StacInputBorderCopyWith<$Res>? get focusedErrorBorder; @override - bool get enabled; + $StacInputBorderCopyWith<$Res>? get disabledBorder; @override - String? get semanticCounterText; + $StacInputBorderCopyWith<$Res>? get enabledBorder; @override - bool get alignLabelWithHint; + $StacInputBorderCopyWith<$Res>? get border; @override - StacBoxConstraints? get constraints; + $StacBoxConstraintsCopyWith<$Res>? get constraints; +} + +/// @nodoc +class __$StacInputDecorationCopyWithImpl<$Res> + implements _$StacInputDecorationCopyWith<$Res> { + __$StacInputDecorationCopyWithImpl(this._self, this._then); + + final _StacInputDecoration _self; + final $Res Function(_StacInputDecoration) _then; /// Create a copy of StacInputDecoration /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacInputDecorationImplCopyWith<_$StacInputDecorationImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? icon = freezed, + Object? iconColor = freezed, + Object? label = freezed, + Object? labelText = freezed, + Object? labelStyle = freezed, + Object? floatingLabelStyle = freezed, + Object? helperText = freezed, + Object? helperStyle = freezed, + Object? hintText = freezed, + Object? hintStyle = freezed, + Object? helperMaxLines = freezed, + Object? hintTextDirection = freezed, + Object? hintMaxLines = freezed, + Object? errorText = freezed, + Object? errorStyle = freezed, + Object? errorMaxLines = freezed, + Object? floatingLabelBehavior = freezed, + Object? floatingLabelAlignment = freezed, + Object? isCollapsed = null, + Object? isDense = null, + Object? contentPadding = freezed, + Object? prefixIcon = freezed, + Object? prefixIconConstraints = freezed, + Object? prefix = freezed, + Object? prefixText = freezed, + Object? prefixStyle = freezed, + Object? prefixIconColor = freezed, + Object? suffix = freezed, + Object? suffixIcon = freezed, + Object? suffixIconConstraints = freezed, + Object? suffixText = freezed, + Object? suffixStyle = freezed, + Object? suffixIconColor = freezed, + Object? counter = freezed, + Object? counterText = freezed, + Object? counterStyle = freezed, + Object? filled = freezed, + Object? fillColor = freezed, + Object? hoverColor = freezed, + Object? focusColor = freezed, + Object? errorBorder = freezed, + Object? focusedBorder = freezed, + Object? focusedErrorBorder = freezed, + Object? disabledBorder = freezed, + Object? enabledBorder = freezed, + Object? border = freezed, + Object? enabled = null, + Object? semanticCounterText = freezed, + Object? alignLabelWithHint = null, + Object? constraints = freezed, + }) { + return _then(_StacInputDecoration( + icon: freezed == icon + ? _self._icon + : icon // ignore: cast_nullable_to_non_nullable + as Map?, + iconColor: freezed == iconColor + ? _self.iconColor + : iconColor // ignore: cast_nullable_to_non_nullable + as String?, + label: freezed == label + ? _self._label + : label // ignore: cast_nullable_to_non_nullable + as Map?, + labelText: freezed == labelText + ? _self.labelText + : labelText // ignore: cast_nullable_to_non_nullable + as String?, + labelStyle: freezed == labelStyle + ? _self.labelStyle + : labelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + floatingLabelStyle: freezed == floatingLabelStyle + ? _self.floatingLabelStyle + : floatingLabelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + helperText: freezed == helperText + ? _self.helperText + : helperText // ignore: cast_nullable_to_non_nullable + as String?, + helperStyle: freezed == helperStyle + ? _self.helperStyle + : helperStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + hintText: freezed == hintText + ? _self.hintText + : hintText // ignore: cast_nullable_to_non_nullable + as String?, + hintStyle: freezed == hintStyle + ? _self.hintStyle + : hintStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + helperMaxLines: freezed == helperMaxLines + ? _self.helperMaxLines + : helperMaxLines // ignore: cast_nullable_to_non_nullable + as int?, + hintTextDirection: freezed == hintTextDirection + ? _self.hintTextDirection + : hintTextDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + hintMaxLines: freezed == hintMaxLines + ? _self.hintMaxLines + : hintMaxLines // ignore: cast_nullable_to_non_nullable + as int?, + errorText: freezed == errorText + ? _self.errorText + : errorText // ignore: cast_nullable_to_non_nullable + as String?, + errorStyle: freezed == errorStyle + ? _self.errorStyle + : errorStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + errorMaxLines: freezed == errorMaxLines + ? _self.errorMaxLines + : errorMaxLines // ignore: cast_nullable_to_non_nullable + as int?, + floatingLabelBehavior: freezed == floatingLabelBehavior + ? _self.floatingLabelBehavior + : floatingLabelBehavior // ignore: cast_nullable_to_non_nullable + as FloatingLabelBehavior?, + floatingLabelAlignment: freezed == floatingLabelAlignment + ? _self.floatingLabelAlignment + : floatingLabelAlignment // ignore: cast_nullable_to_non_nullable + as StacFloatingLabelAlignment?, + isCollapsed: null == isCollapsed + ? _self.isCollapsed + : isCollapsed // ignore: cast_nullable_to_non_nullable + as bool, + isDense: null == isDense + ? _self.isDense + : isDense // ignore: cast_nullable_to_non_nullable + as bool, + contentPadding: freezed == contentPadding + ? _self.contentPadding + : contentPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + prefixIcon: freezed == prefixIcon + ? _self._prefixIcon + : prefixIcon // ignore: cast_nullable_to_non_nullable + as Map?, + prefixIconConstraints: freezed == prefixIconConstraints + ? _self.prefixIconConstraints + : prefixIconConstraints // ignore: cast_nullable_to_non_nullable + as StacBoxConstraints?, + prefix: freezed == prefix + ? _self._prefix + : prefix // ignore: cast_nullable_to_non_nullable + as Map?, + prefixText: freezed == prefixText + ? _self.prefixText + : prefixText // ignore: cast_nullable_to_non_nullable + as String?, + prefixStyle: freezed == prefixStyle + ? _self.prefixStyle + : prefixStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + prefixIconColor: freezed == prefixIconColor + ? _self.prefixIconColor + : prefixIconColor // ignore: cast_nullable_to_non_nullable + as String?, + suffix: freezed == suffix + ? _self._suffix + : suffix // ignore: cast_nullable_to_non_nullable + as Map?, + suffixIcon: freezed == suffixIcon + ? _self._suffixIcon + : suffixIcon // ignore: cast_nullable_to_non_nullable + as Map?, + suffixIconConstraints: freezed == suffixIconConstraints + ? _self.suffixIconConstraints + : suffixIconConstraints // ignore: cast_nullable_to_non_nullable + as StacBoxConstraints?, + suffixText: freezed == suffixText + ? _self.suffixText + : suffixText // ignore: cast_nullable_to_non_nullable + as String?, + suffixStyle: freezed == suffixStyle + ? _self.suffixStyle + : suffixStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + suffixIconColor: freezed == suffixIconColor + ? _self.suffixIconColor + : suffixIconColor // ignore: cast_nullable_to_non_nullable + as String?, + counter: freezed == counter + ? _self._counter + : counter // ignore: cast_nullable_to_non_nullable + as Map?, + counterText: freezed == counterText + ? _self.counterText + : counterText // ignore: cast_nullable_to_non_nullable + as String?, + counterStyle: freezed == counterStyle + ? _self.counterStyle + : counterStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + filled: freezed == filled + ? _self.filled + : filled // ignore: cast_nullable_to_non_nullable + as bool?, + fillColor: freezed == fillColor + ? _self.fillColor + : fillColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + errorBorder: freezed == errorBorder + ? _self.errorBorder + : errorBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + focusedBorder: freezed == focusedBorder + ? _self.focusedBorder + : focusedBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + focusedErrorBorder: freezed == focusedErrorBorder + ? _self.focusedErrorBorder + : focusedErrorBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + disabledBorder: freezed == disabledBorder + ? _self.disabledBorder + : disabledBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + enabledBorder: freezed == enabledBorder + ? _self.enabledBorder + : enabledBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + border: freezed == border + ? _self.border + : border // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + enabled: null == enabled + ? _self.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool, + semanticCounterText: freezed == semanticCounterText + ? _self.semanticCounterText + : semanticCounterText // ignore: cast_nullable_to_non_nullable + as String?, + alignLabelWithHint: null == alignLabelWithHint + ? _self.alignLabelWithHint + : alignLabelWithHint // ignore: cast_nullable_to_non_nullable + as bool, + constraints: freezed == constraints + ? _self.constraints + : constraints // ignore: cast_nullable_to_non_nullable + as StacBoxConstraints?, + )); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get labelStyle { + if (_self.labelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get floatingLabelStyle { + if (_self.floatingLabelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.floatingLabelStyle!, (value) { + return _then(_self.copyWith(floatingLabelStyle: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get helperStyle { + if (_self.helperStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.helperStyle!, (value) { + return _then(_self.copyWith(helperStyle: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get hintStyle { + if (_self.hintStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.hintStyle!, (value) { + return _then(_self.copyWith(hintStyle: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get errorStyle { + if (_self.errorStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.errorStyle!, (value) { + return _then(_self.copyWith(errorStyle: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get contentPadding { + if (_self.contentPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get prefixIconConstraints { + if (_self.prefixIconConstraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.prefixIconConstraints!, + (value) { + return _then(_self.copyWith(prefixIconConstraints: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get prefixStyle { + if (_self.prefixStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.prefixStyle!, (value) { + return _then(_self.copyWith(prefixStyle: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get suffixIconConstraints { + if (_self.suffixIconConstraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.suffixIconConstraints!, + (value) { + return _then(_self.copyWith(suffixIconConstraints: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get suffixStyle { + if (_self.suffixStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.suffixStyle!, (value) { + return _then(_self.copyWith(suffixStyle: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get counterStyle { + if (_self.counterStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.counterStyle!, (value) { + return _then(_self.copyWith(counterStyle: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get errorBorder { + if (_self.errorBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.errorBorder!, (value) { + return _then(_self.copyWith(errorBorder: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get focusedBorder { + if (_self.focusedBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.focusedBorder!, (value) { + return _then(_self.copyWith(focusedBorder: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get focusedErrorBorder { + if (_self.focusedErrorBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.focusedErrorBorder!, (value) { + return _then(_self.copyWith(focusedErrorBorder: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get disabledBorder { + if (_self.disabledBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.disabledBorder!, (value) { + return _then(_self.copyWith(disabledBorder: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get enabledBorder { + if (_self.enabledBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.enabledBorder!, (value) { + return _then(_self.copyWith(enabledBorder: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get border { + if (_self.border == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.border!, (value) { + return _then(_self.copyWith(border: value)); + }); + } + + /// Create a copy of StacInputDecoration + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get constraints { + if (_self.constraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); + }); + } +} + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.g.dart b/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.g.dart index 55f0a4f3..a8917c9e 100644 --- a/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.g.dart +++ b/packages/stac/lib/src/parsers/stac_input_decoration/stac_input_decoration.g.dart @@ -6,9 +6,8 @@ part of 'stac_input_decoration.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacInputDecorationImpl _$$StacInputDecorationImplFromJson( - Map json) => - _$StacInputDecorationImpl( +_StacInputDecoration _$StacInputDecorationFromJson(Map json) => + _StacInputDecoration( icon: json['icon'] as Map?, iconColor: json['iconColor'] as String?, label: json['label'] as Map?, @@ -108,8 +107,8 @@ _$StacInputDecorationImpl _$$StacInputDecorationImplFromJson( json['constraints'] as Map), ); -Map _$$StacInputDecorationImplToJson( - _$StacInputDecorationImpl instance) => +Map _$StacInputDecorationToJson( + _StacInputDecoration instance) => { 'icon': instance.icon, 'iconColor': instance.iconColor, diff --git a/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.dart b/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.dart index cbf7b97e..53537684 100644 --- a/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.dart +++ b/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.dart @@ -25,7 +25,7 @@ enum StacFloatingLabelAlignment { } @freezed -class StacInputDecorationTheme with _$StacInputDecorationTheme { +abstract class StacInputDecorationTheme with _$StacInputDecorationTheme { const factory StacInputDecorationTheme({ StacTextStyle? labelStyle, StacTextStyle? floatingLabelStyle, diff --git a/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.freezed.dart b/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.freezed.dart index 9258e921..8ef8ebb5 100644 --- a/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,69 +10,172 @@ part of 'stac_input_decoration_theme.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacInputDecorationTheme _$StacInputDecorationThemeFromJson( - Map json) { - return _StacInputDecorationTheme.fromJson(json); -} - /// @nodoc mixin _$StacInputDecorationTheme { - StacTextStyle? get labelStyle => throw _privateConstructorUsedError; - StacTextStyle? get floatingLabelStyle => throw _privateConstructorUsedError; - StacTextStyle? get helperStyle => throw _privateConstructorUsedError; - int? get helperMaxLines => throw _privateConstructorUsedError; - StacTextStyle? get hintStyle => throw _privateConstructorUsedError; - StacTextStyle? get errorStyle => throw _privateConstructorUsedError; - int? get errorMaxLines => throw _privateConstructorUsedError; - FloatingLabelBehavior? get floatingLabelBehavior => - throw _privateConstructorUsedError; - StacFloatingLabelAlignment? get floatingLabelAlignment => - throw _privateConstructorUsedError; - bool get isDense => throw _privateConstructorUsedError; - StacEdgeInsets? get contentPadding => throw _privateConstructorUsedError; - bool get isCollapsed => throw _privateConstructorUsedError; - String? get iconColor => throw _privateConstructorUsedError; - StacTextStyle? get prefixStyle => throw _privateConstructorUsedError; - String? get prefixIconColor => throw _privateConstructorUsedError; - StacTextStyle? get suffixStyle => throw _privateConstructorUsedError; - String? get suffixIconColor => throw _privateConstructorUsedError; - StacTextStyle? get counterStyle => throw _privateConstructorUsedError; - bool get filled => throw _privateConstructorUsedError; - String? get fillColor => throw _privateConstructorUsedError; - StacBorderSide? get activeIndicatorBorder => - throw _privateConstructorUsedError; - StacBorderSide? get outlineBorder => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - StacInputBorder? get errorBorder => throw _privateConstructorUsedError; - StacInputBorder? get focusedBorder => throw _privateConstructorUsedError; - StacInputBorder? get focusedErrorBorder => throw _privateConstructorUsedError; - StacInputBorder? get disabledBorder => throw _privateConstructorUsedError; - StacInputBorder? get enabledBorder => throw _privateConstructorUsedError; - StacInputBorder? get border => throw _privateConstructorUsedError; - bool get alignLabelWithHint => throw _privateConstructorUsedError; - StacBoxConstraints? get constraints => throw _privateConstructorUsedError; - - /// Serializes this StacInputDecorationTheme to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacTextStyle? get labelStyle; + StacTextStyle? get floatingLabelStyle; + StacTextStyle? get helperStyle; + int? get helperMaxLines; + StacTextStyle? get hintStyle; + StacTextStyle? get errorStyle; + int? get errorMaxLines; + FloatingLabelBehavior? get floatingLabelBehavior; + StacFloatingLabelAlignment? get floatingLabelAlignment; + bool get isDense; + StacEdgeInsets? get contentPadding; + bool get isCollapsed; + String? get iconColor; + StacTextStyle? get prefixStyle; + String? get prefixIconColor; + StacTextStyle? get suffixStyle; + String? get suffixIconColor; + StacTextStyle? get counterStyle; + bool get filled; + String? get fillColor; + StacBorderSide? get activeIndicatorBorder; + StacBorderSide? get outlineBorder; + String? get focusColor; + String? get hoverColor; + StacInputBorder? get errorBorder; + StacInputBorder? get focusedBorder; + StacInputBorder? get focusedErrorBorder; + StacInputBorder? get disabledBorder; + StacInputBorder? get enabledBorder; + StacInputBorder? get border; + bool get alignLabelWithHint; + StacBoxConstraints? get constraints; /// Create a copy of StacInputDecorationTheme /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacInputDecorationThemeCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacInputDecorationThemeCopyWithImpl( + this as StacInputDecorationTheme, _$identity); + + /// Serializes this StacInputDecorationTheme to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacInputDecorationTheme && + (identical(other.labelStyle, labelStyle) || + other.labelStyle == labelStyle) && + (identical(other.floatingLabelStyle, floatingLabelStyle) || + other.floatingLabelStyle == floatingLabelStyle) && + (identical(other.helperStyle, helperStyle) || + other.helperStyle == helperStyle) && + (identical(other.helperMaxLines, helperMaxLines) || + other.helperMaxLines == helperMaxLines) && + (identical(other.hintStyle, hintStyle) || + other.hintStyle == hintStyle) && + (identical(other.errorStyle, errorStyle) || + other.errorStyle == errorStyle) && + (identical(other.errorMaxLines, errorMaxLines) || + other.errorMaxLines == errorMaxLines) && + (identical(other.floatingLabelBehavior, floatingLabelBehavior) || + other.floatingLabelBehavior == floatingLabelBehavior) && + (identical(other.floatingLabelAlignment, floatingLabelAlignment) || + other.floatingLabelAlignment == floatingLabelAlignment) && + (identical(other.isDense, isDense) || other.isDense == isDense) && + (identical(other.contentPadding, contentPadding) || + other.contentPadding == contentPadding) && + (identical(other.isCollapsed, isCollapsed) || + other.isCollapsed == isCollapsed) && + (identical(other.iconColor, iconColor) || + other.iconColor == iconColor) && + (identical(other.prefixStyle, prefixStyle) || + other.prefixStyle == prefixStyle) && + (identical(other.prefixIconColor, prefixIconColor) || + other.prefixIconColor == prefixIconColor) && + (identical(other.suffixStyle, suffixStyle) || + other.suffixStyle == suffixStyle) && + (identical(other.suffixIconColor, suffixIconColor) || + other.suffixIconColor == suffixIconColor) && + (identical(other.counterStyle, counterStyle) || + other.counterStyle == counterStyle) && + (identical(other.filled, filled) || other.filled == filled) && + (identical(other.fillColor, fillColor) || + other.fillColor == fillColor) && + (identical(other.activeIndicatorBorder, activeIndicatorBorder) || + other.activeIndicatorBorder == activeIndicatorBorder) && + (identical(other.outlineBorder, outlineBorder) || + other.outlineBorder == outlineBorder) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.errorBorder, errorBorder) || + other.errorBorder == errorBorder) && + (identical(other.focusedBorder, focusedBorder) || + other.focusedBorder == focusedBorder) && + (identical(other.focusedErrorBorder, focusedErrorBorder) || + other.focusedErrorBorder == focusedErrorBorder) && + (identical(other.disabledBorder, disabledBorder) || + other.disabledBorder == disabledBorder) && + (identical(other.enabledBorder, enabledBorder) || + other.enabledBorder == enabledBorder) && + (identical(other.border, border) || other.border == border) && + (identical(other.alignLabelWithHint, alignLabelWithHint) || + other.alignLabelWithHint == alignLabelWithHint) && + (identical(other.constraints, constraints) || + other.constraints == constraints)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + labelStyle, + floatingLabelStyle, + helperStyle, + helperMaxLines, + hintStyle, + errorStyle, + errorMaxLines, + floatingLabelBehavior, + floatingLabelAlignment, + isDense, + contentPadding, + isCollapsed, + iconColor, + prefixStyle, + prefixIconColor, + suffixStyle, + suffixIconColor, + counterStyle, + filled, + fillColor, + activeIndicatorBorder, + outlineBorder, + focusColor, + hoverColor, + errorBorder, + focusedBorder, + focusedErrorBorder, + disabledBorder, + enabledBorder, + border, + alignLabelWithHint, + constraints + ]); + + @override + String toString() { + return 'StacInputDecorationTheme(labelStyle: $labelStyle, floatingLabelStyle: $floatingLabelStyle, helperStyle: $helperStyle, helperMaxLines: $helperMaxLines, hintStyle: $hintStyle, errorStyle: $errorStyle, errorMaxLines: $errorMaxLines, floatingLabelBehavior: $floatingLabelBehavior, floatingLabelAlignment: $floatingLabelAlignment, isDense: $isDense, contentPadding: $contentPadding, isCollapsed: $isCollapsed, iconColor: $iconColor, prefixStyle: $prefixStyle, prefixIconColor: $prefixIconColor, suffixStyle: $suffixStyle, suffixIconColor: $suffixIconColor, counterStyle: $counterStyle, filled: $filled, fillColor: $fillColor, activeIndicatorBorder: $activeIndicatorBorder, outlineBorder: $outlineBorder, focusColor: $focusColor, hoverColor: $hoverColor, errorBorder: $errorBorder, focusedBorder: $focusedBorder, focusedErrorBorder: $focusedErrorBorder, disabledBorder: $disabledBorder, enabledBorder: $enabledBorder, border: $border, alignLabelWithHint: $alignLabelWithHint, constraints: $constraints)'; + } } /// @nodoc -abstract class $StacInputDecorationThemeCopyWith<$Res> { +abstract mixin class $StacInputDecorationThemeCopyWith<$Res> { factory $StacInputDecorationThemeCopyWith(StacInputDecorationTheme value, - $Res Function(StacInputDecorationTheme) then) = - _$StacInputDecorationThemeCopyWithImpl<$Res, StacInputDecorationTheme>; + $Res Function(StacInputDecorationTheme) _then) = + _$StacInputDecorationThemeCopyWithImpl; @useResult $Res call( {StacTextStyle? labelStyle, @@ -128,15 +232,12 @@ abstract class $StacInputDecorationThemeCopyWith<$Res> { } /// @nodoc -class _$StacInputDecorationThemeCopyWithImpl<$Res, - $Val extends StacInputDecorationTheme> +class _$StacInputDecorationThemeCopyWithImpl<$Res> implements $StacInputDecorationThemeCopyWith<$Res> { - _$StacInputDecorationThemeCopyWithImpl(this._value, this._then); + _$StacInputDecorationThemeCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacInputDecorationTheme _self; + final $Res Function(StacInputDecorationTheme) _then; /// Create a copy of StacInputDecorationTheme /// with the given fields replaced by the non-null parameter values. @@ -176,136 +277,136 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, Object? alignLabelWithHint = null, Object? constraints = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( labelStyle: freezed == labelStyle - ? _value.labelStyle + ? _self.labelStyle : labelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, floatingLabelStyle: freezed == floatingLabelStyle - ? _value.floatingLabelStyle + ? _self.floatingLabelStyle : floatingLabelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, helperStyle: freezed == helperStyle - ? _value.helperStyle + ? _self.helperStyle : helperStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, helperMaxLines: freezed == helperMaxLines - ? _value.helperMaxLines + ? _self.helperMaxLines : helperMaxLines // ignore: cast_nullable_to_non_nullable as int?, hintStyle: freezed == hintStyle - ? _value.hintStyle + ? _self.hintStyle : hintStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, errorStyle: freezed == errorStyle - ? _value.errorStyle + ? _self.errorStyle : errorStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, errorMaxLines: freezed == errorMaxLines - ? _value.errorMaxLines + ? _self.errorMaxLines : errorMaxLines // ignore: cast_nullable_to_non_nullable as int?, floatingLabelBehavior: freezed == floatingLabelBehavior - ? _value.floatingLabelBehavior + ? _self.floatingLabelBehavior : floatingLabelBehavior // ignore: cast_nullable_to_non_nullable as FloatingLabelBehavior?, floatingLabelAlignment: freezed == floatingLabelAlignment - ? _value.floatingLabelAlignment + ? _self.floatingLabelAlignment : floatingLabelAlignment // ignore: cast_nullable_to_non_nullable as StacFloatingLabelAlignment?, isDense: null == isDense - ? _value.isDense + ? _self.isDense : isDense // ignore: cast_nullable_to_non_nullable as bool, contentPadding: freezed == contentPadding - ? _value.contentPadding + ? _self.contentPadding : contentPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, isCollapsed: null == isCollapsed - ? _value.isCollapsed + ? _self.isCollapsed : isCollapsed // ignore: cast_nullable_to_non_nullable as bool, iconColor: freezed == iconColor - ? _value.iconColor + ? _self.iconColor : iconColor // ignore: cast_nullable_to_non_nullable as String?, prefixStyle: freezed == prefixStyle - ? _value.prefixStyle + ? _self.prefixStyle : prefixStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, prefixIconColor: freezed == prefixIconColor - ? _value.prefixIconColor + ? _self.prefixIconColor : prefixIconColor // ignore: cast_nullable_to_non_nullable as String?, suffixStyle: freezed == suffixStyle - ? _value.suffixStyle + ? _self.suffixStyle : suffixStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, suffixIconColor: freezed == suffixIconColor - ? _value.suffixIconColor + ? _self.suffixIconColor : suffixIconColor // ignore: cast_nullable_to_non_nullable as String?, counterStyle: freezed == counterStyle - ? _value.counterStyle + ? _self.counterStyle : counterStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, filled: null == filled - ? _value.filled + ? _self.filled : filled // ignore: cast_nullable_to_non_nullable as bool, fillColor: freezed == fillColor - ? _value.fillColor + ? _self.fillColor : fillColor // ignore: cast_nullable_to_non_nullable as String?, activeIndicatorBorder: freezed == activeIndicatorBorder - ? _value.activeIndicatorBorder + ? _self.activeIndicatorBorder : activeIndicatorBorder // ignore: cast_nullable_to_non_nullable as StacBorderSide?, outlineBorder: freezed == outlineBorder - ? _value.outlineBorder + ? _self.outlineBorder : outlineBorder // ignore: cast_nullable_to_non_nullable as StacBorderSide?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, errorBorder: freezed == errorBorder - ? _value.errorBorder + ? _self.errorBorder : errorBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, focusedBorder: freezed == focusedBorder - ? _value.focusedBorder + ? _self.focusedBorder : focusedBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, focusedErrorBorder: freezed == focusedErrorBorder - ? _value.focusedErrorBorder + ? _self.focusedErrorBorder : focusedErrorBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, disabledBorder: freezed == disabledBorder - ? _value.disabledBorder + ? _self.disabledBorder : disabledBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, enabledBorder: freezed == enabledBorder - ? _value.enabledBorder + ? _self.enabledBorder : enabledBorder // ignore: cast_nullable_to_non_nullable as StacInputBorder?, border: freezed == border - ? _value.border + ? _self.border : border // ignore: cast_nullable_to_non_nullable as StacInputBorder?, alignLabelWithHint: null == alignLabelWithHint - ? _value.alignLabelWithHint + ? _self.alignLabelWithHint : alignLabelWithHint // ignore: cast_nullable_to_non_nullable as bool, constraints: freezed == constraints - ? _value.constraints + ? _self.constraints : constraints // ignore: cast_nullable_to_non_nullable as StacBoxConstraints?, - ) as $Val); + )); } /// Create a copy of StacInputDecorationTheme @@ -313,12 +414,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get labelStyle { - if (_value.labelStyle == null) { + if (_self.labelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.labelStyle!, (value) { - return _then(_value.copyWith(labelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); }); } @@ -327,12 +428,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get floatingLabelStyle { - if (_value.floatingLabelStyle == null) { + if (_self.floatingLabelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.floatingLabelStyle!, (value) { - return _then(_value.copyWith(floatingLabelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.floatingLabelStyle!, (value) { + return _then(_self.copyWith(floatingLabelStyle: value)); }); } @@ -341,12 +442,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get helperStyle { - if (_value.helperStyle == null) { + if (_self.helperStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.helperStyle!, (value) { - return _then(_value.copyWith(helperStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.helperStyle!, (value) { + return _then(_self.copyWith(helperStyle: value)); }); } @@ -355,12 +456,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get hintStyle { - if (_value.hintStyle == null) { + if (_self.hintStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.hintStyle!, (value) { - return _then(_value.copyWith(hintStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.hintStyle!, (value) { + return _then(_self.copyWith(hintStyle: value)); }); } @@ -369,12 +470,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get errorStyle { - if (_value.errorStyle == null) { + if (_self.errorStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.errorStyle!, (value) { - return _then(_value.copyWith(errorStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.errorStyle!, (value) { + return _then(_self.copyWith(errorStyle: value)); }); } @@ -383,12 +484,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get contentPadding { - if (_value.contentPadding == null) { + if (_self.contentPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.contentPadding!, (value) { - return _then(_value.copyWith(contentPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); }); } @@ -397,12 +498,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get prefixStyle { - if (_value.prefixStyle == null) { + if (_self.prefixStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.prefixStyle!, (value) { - return _then(_value.copyWith(prefixStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.prefixStyle!, (value) { + return _then(_self.copyWith(prefixStyle: value)); }); } @@ -411,12 +512,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get suffixStyle { - if (_value.suffixStyle == null) { + if (_self.suffixStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.suffixStyle!, (value) { - return _then(_value.copyWith(suffixStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.suffixStyle!, (value) { + return _then(_self.copyWith(suffixStyle: value)); }); } @@ -425,12 +526,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get counterStyle { - if (_value.counterStyle == null) { + if (_self.counterStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.counterStyle!, (value) { - return _then(_value.copyWith(counterStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.counterStyle!, (value) { + return _then(_self.copyWith(counterStyle: value)); }); } @@ -439,13 +540,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res>? get activeIndicatorBorder { - if (_value.activeIndicatorBorder == null) { + if (_self.activeIndicatorBorder == null) { return null; } - return $StacBorderSideCopyWith<$Res>(_value.activeIndicatorBorder!, - (value) { - return _then(_value.copyWith(activeIndicatorBorder: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.activeIndicatorBorder!, (value) { + return _then(_self.copyWith(activeIndicatorBorder: value)); }); } @@ -454,12 +554,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res>? get outlineBorder { - if (_value.outlineBorder == null) { + if (_self.outlineBorder == null) { return null; } - return $StacBorderSideCopyWith<$Res>(_value.outlineBorder!, (value) { - return _then(_value.copyWith(outlineBorder: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.outlineBorder!, (value) { + return _then(_self.copyWith(outlineBorder: value)); }); } @@ -468,12 +568,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get errorBorder { - if (_value.errorBorder == null) { + if (_self.errorBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.errorBorder!, (value) { - return _then(_value.copyWith(errorBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.errorBorder!, (value) { + return _then(_self.copyWith(errorBorder: value)); }); } @@ -482,12 +582,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get focusedBorder { - if (_value.focusedBorder == null) { + if (_self.focusedBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.focusedBorder!, (value) { - return _then(_value.copyWith(focusedBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.focusedBorder!, (value) { + return _then(_self.copyWith(focusedBorder: value)); }); } @@ -496,12 +596,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get focusedErrorBorder { - if (_value.focusedErrorBorder == null) { + if (_self.focusedErrorBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.focusedErrorBorder!, (value) { - return _then(_value.copyWith(focusedErrorBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.focusedErrorBorder!, (value) { + return _then(_self.copyWith(focusedErrorBorder: value)); }); } @@ -510,12 +610,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get disabledBorder { - if (_value.disabledBorder == null) { + if (_self.disabledBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.disabledBorder!, (value) { - return _then(_value.copyWith(disabledBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.disabledBorder!, (value) { + return _then(_self.copyWith(disabledBorder: value)); }); } @@ -524,12 +624,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get enabledBorder { - if (_value.enabledBorder == null) { + if (_self.enabledBorder == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.enabledBorder!, (value) { - return _then(_value.copyWith(enabledBorder: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.enabledBorder!, (value) { + return _then(_self.copyWith(enabledBorder: value)); }); } @@ -538,12 +638,12 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacInputBorderCopyWith<$Res>? get border { - if (_value.border == null) { + if (_self.border == null) { return null; } - return $StacInputBorderCopyWith<$Res>(_value.border!, (value) { - return _then(_value.copyWith(border: value) as $Val); + return $StacInputBorderCopyWith<$Res>(_self.border!, (value) { + return _then(_self.copyWith(border: value)); }); } @@ -552,354 +652,91 @@ class _$StacInputDecorationThemeCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBoxConstraintsCopyWith<$Res>? get constraints { - if (_value.constraints == null) { + if (_self.constraints == null) { return null; } - return $StacBoxConstraintsCopyWith<$Res>(_value.constraints!, (value) { - return _then(_value.copyWith(constraints: value) as $Val); + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); }); } } /// @nodoc -abstract class _$$StacInputDecorationThemeImplCopyWith<$Res> - implements $StacInputDecorationThemeCopyWith<$Res> { - factory _$$StacInputDecorationThemeImplCopyWith( - _$StacInputDecorationThemeImpl value, - $Res Function(_$StacInputDecorationThemeImpl) then) = - __$$StacInputDecorationThemeImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacTextStyle? labelStyle, - StacTextStyle? floatingLabelStyle, - StacTextStyle? helperStyle, - int? helperMaxLines, - StacTextStyle? hintStyle, - StacTextStyle? errorStyle, - int? errorMaxLines, - FloatingLabelBehavior? floatingLabelBehavior, - StacFloatingLabelAlignment? floatingLabelAlignment, - bool isDense, - StacEdgeInsets? contentPadding, - bool isCollapsed, - String? iconColor, - StacTextStyle? prefixStyle, - String? prefixIconColor, - StacTextStyle? suffixStyle, - String? suffixIconColor, - StacTextStyle? counterStyle, - bool filled, - String? fillColor, - StacBorderSide? activeIndicatorBorder, - StacBorderSide? outlineBorder, - String? focusColor, - String? hoverColor, - StacInputBorder? errorBorder, - StacInputBorder? focusedBorder, - StacInputBorder? focusedErrorBorder, - StacInputBorder? disabledBorder, - StacInputBorder? enabledBorder, - StacInputBorder? border, - bool alignLabelWithHint, - StacBoxConstraints? constraints}); +@JsonSerializable() +class _StacInputDecorationTheme implements StacInputDecorationTheme { + const _StacInputDecorationTheme( + {this.labelStyle, + this.floatingLabelStyle, + this.helperStyle, + this.helperMaxLines, + this.hintStyle, + this.errorStyle, + this.errorMaxLines, + this.floatingLabelBehavior, + this.floatingLabelAlignment, + this.isDense = false, + this.contentPadding, + this.isCollapsed = false, + this.iconColor, + this.prefixStyle, + this.prefixIconColor, + this.suffixStyle, + this.suffixIconColor, + this.counterStyle, + this.filled = false, + this.fillColor, + this.activeIndicatorBorder, + this.outlineBorder, + this.focusColor, + this.hoverColor, + this.errorBorder, + this.focusedBorder, + this.focusedErrorBorder, + this.disabledBorder, + this.enabledBorder, + this.border, + this.alignLabelWithHint = false, + this.constraints}); + factory _StacInputDecorationTheme.fromJson(Map json) => + _$StacInputDecorationThemeFromJson(json); @override - $StacTextStyleCopyWith<$Res>? get labelStyle; + final StacTextStyle? labelStyle; @override - $StacTextStyleCopyWith<$Res>? get floatingLabelStyle; + final StacTextStyle? floatingLabelStyle; @override - $StacTextStyleCopyWith<$Res>? get helperStyle; + final StacTextStyle? helperStyle; @override - $StacTextStyleCopyWith<$Res>? get hintStyle; + final int? helperMaxLines; @override - $StacTextStyleCopyWith<$Res>? get errorStyle; + final StacTextStyle? hintStyle; @override - $StacEdgeInsetsCopyWith<$Res>? get contentPadding; + final StacTextStyle? errorStyle; @override - $StacTextStyleCopyWith<$Res>? get prefixStyle; + final int? errorMaxLines; @override - $StacTextStyleCopyWith<$Res>? get suffixStyle; + final FloatingLabelBehavior? floatingLabelBehavior; @override - $StacTextStyleCopyWith<$Res>? get counterStyle; + final StacFloatingLabelAlignment? floatingLabelAlignment; @override - $StacBorderSideCopyWith<$Res>? get activeIndicatorBorder; + @JsonKey() + final bool isDense; @override - $StacBorderSideCopyWith<$Res>? get outlineBorder; + final StacEdgeInsets? contentPadding; @override - $StacInputBorderCopyWith<$Res>? get errorBorder; + @JsonKey() + final bool isCollapsed; @override - $StacInputBorderCopyWith<$Res>? get focusedBorder; + final String? iconColor; @override - $StacInputBorderCopyWith<$Res>? get focusedErrorBorder; + final StacTextStyle? prefixStyle; @override - $StacInputBorderCopyWith<$Res>? get disabledBorder; + final String? prefixIconColor; @override - $StacInputBorderCopyWith<$Res>? get enabledBorder; + final StacTextStyle? suffixStyle; @override - $StacInputBorderCopyWith<$Res>? get border; - @override - $StacBoxConstraintsCopyWith<$Res>? get constraints; -} - -/// @nodoc -class __$$StacInputDecorationThemeImplCopyWithImpl<$Res> - extends _$StacInputDecorationThemeCopyWithImpl<$Res, - _$StacInputDecorationThemeImpl> - implements _$$StacInputDecorationThemeImplCopyWith<$Res> { - __$$StacInputDecorationThemeImplCopyWithImpl( - _$StacInputDecorationThemeImpl _value, - $Res Function(_$StacInputDecorationThemeImpl) _then) - : super(_value, _then); - - /// Create a copy of StacInputDecorationTheme - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? labelStyle = freezed, - Object? floatingLabelStyle = freezed, - Object? helperStyle = freezed, - Object? helperMaxLines = freezed, - Object? hintStyle = freezed, - Object? errorStyle = freezed, - Object? errorMaxLines = freezed, - Object? floatingLabelBehavior = freezed, - Object? floatingLabelAlignment = freezed, - Object? isDense = null, - Object? contentPadding = freezed, - Object? isCollapsed = null, - Object? iconColor = freezed, - Object? prefixStyle = freezed, - Object? prefixIconColor = freezed, - Object? suffixStyle = freezed, - Object? suffixIconColor = freezed, - Object? counterStyle = freezed, - Object? filled = null, - Object? fillColor = freezed, - Object? activeIndicatorBorder = freezed, - Object? outlineBorder = freezed, - Object? focusColor = freezed, - Object? hoverColor = freezed, - Object? errorBorder = freezed, - Object? focusedBorder = freezed, - Object? focusedErrorBorder = freezed, - Object? disabledBorder = freezed, - Object? enabledBorder = freezed, - Object? border = freezed, - Object? alignLabelWithHint = null, - Object? constraints = freezed, - }) { - return _then(_$StacInputDecorationThemeImpl( - labelStyle: freezed == labelStyle - ? _value.labelStyle - : labelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - floatingLabelStyle: freezed == floatingLabelStyle - ? _value.floatingLabelStyle - : floatingLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - helperStyle: freezed == helperStyle - ? _value.helperStyle - : helperStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - helperMaxLines: freezed == helperMaxLines - ? _value.helperMaxLines - : helperMaxLines // ignore: cast_nullable_to_non_nullable - as int?, - hintStyle: freezed == hintStyle - ? _value.hintStyle - : hintStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - errorStyle: freezed == errorStyle - ? _value.errorStyle - : errorStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - errorMaxLines: freezed == errorMaxLines - ? _value.errorMaxLines - : errorMaxLines // ignore: cast_nullable_to_non_nullable - as int?, - floatingLabelBehavior: freezed == floatingLabelBehavior - ? _value.floatingLabelBehavior - : floatingLabelBehavior // ignore: cast_nullable_to_non_nullable - as FloatingLabelBehavior?, - floatingLabelAlignment: freezed == floatingLabelAlignment - ? _value.floatingLabelAlignment - : floatingLabelAlignment // ignore: cast_nullable_to_non_nullable - as StacFloatingLabelAlignment?, - isDense: null == isDense - ? _value.isDense - : isDense // ignore: cast_nullable_to_non_nullable - as bool, - contentPadding: freezed == contentPadding - ? _value.contentPadding - : contentPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - isCollapsed: null == isCollapsed - ? _value.isCollapsed - : isCollapsed // ignore: cast_nullable_to_non_nullable - as bool, - iconColor: freezed == iconColor - ? _value.iconColor - : iconColor // ignore: cast_nullable_to_non_nullable - as String?, - prefixStyle: freezed == prefixStyle - ? _value.prefixStyle - : prefixStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - prefixIconColor: freezed == prefixIconColor - ? _value.prefixIconColor - : prefixIconColor // ignore: cast_nullable_to_non_nullable - as String?, - suffixStyle: freezed == suffixStyle - ? _value.suffixStyle - : suffixStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - suffixIconColor: freezed == suffixIconColor - ? _value.suffixIconColor - : suffixIconColor // ignore: cast_nullable_to_non_nullable - as String?, - counterStyle: freezed == counterStyle - ? _value.counterStyle - : counterStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - filled: null == filled - ? _value.filled - : filled // ignore: cast_nullable_to_non_nullable - as bool, - fillColor: freezed == fillColor - ? _value.fillColor - : fillColor // ignore: cast_nullable_to_non_nullable - as String?, - activeIndicatorBorder: freezed == activeIndicatorBorder - ? _value.activeIndicatorBorder - : activeIndicatorBorder // ignore: cast_nullable_to_non_nullable - as StacBorderSide?, - outlineBorder: freezed == outlineBorder - ? _value.outlineBorder - : outlineBorder // ignore: cast_nullable_to_non_nullable - as StacBorderSide?, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - errorBorder: freezed == errorBorder - ? _value.errorBorder - : errorBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - focusedBorder: freezed == focusedBorder - ? _value.focusedBorder - : focusedBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - focusedErrorBorder: freezed == focusedErrorBorder - ? _value.focusedErrorBorder - : focusedErrorBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - disabledBorder: freezed == disabledBorder - ? _value.disabledBorder - : disabledBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - enabledBorder: freezed == enabledBorder - ? _value.enabledBorder - : enabledBorder // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - border: freezed == border - ? _value.border - : border // ignore: cast_nullable_to_non_nullable - as StacInputBorder?, - alignLabelWithHint: null == alignLabelWithHint - ? _value.alignLabelWithHint - : alignLabelWithHint // ignore: cast_nullable_to_non_nullable - as bool, - constraints: freezed == constraints - ? _value.constraints - : constraints // ignore: cast_nullable_to_non_nullable - as StacBoxConstraints?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$StacInputDecorationThemeImpl implements _StacInputDecorationTheme { - const _$StacInputDecorationThemeImpl( - {this.labelStyle, - this.floatingLabelStyle, - this.helperStyle, - this.helperMaxLines, - this.hintStyle, - this.errorStyle, - this.errorMaxLines, - this.floatingLabelBehavior, - this.floatingLabelAlignment, - this.isDense = false, - this.contentPadding, - this.isCollapsed = false, - this.iconColor, - this.prefixStyle, - this.prefixIconColor, - this.suffixStyle, - this.suffixIconColor, - this.counterStyle, - this.filled = false, - this.fillColor, - this.activeIndicatorBorder, - this.outlineBorder, - this.focusColor, - this.hoverColor, - this.errorBorder, - this.focusedBorder, - this.focusedErrorBorder, - this.disabledBorder, - this.enabledBorder, - this.border, - this.alignLabelWithHint = false, - this.constraints}); - - factory _$StacInputDecorationThemeImpl.fromJson(Map json) => - _$$StacInputDecorationThemeImplFromJson(json); - - @override - final StacTextStyle? labelStyle; - @override - final StacTextStyle? floatingLabelStyle; - @override - final StacTextStyle? helperStyle; - @override - final int? helperMaxLines; - @override - final StacTextStyle? hintStyle; - @override - final StacTextStyle? errorStyle; - @override - final int? errorMaxLines; - @override - final FloatingLabelBehavior? floatingLabelBehavior; - @override - final StacFloatingLabelAlignment? floatingLabelAlignment; - @override - @JsonKey() - final bool isDense; - @override - final StacEdgeInsets? contentPadding; - @override - @JsonKey() - final bool isCollapsed; - @override - final String? iconColor; - @override - final StacTextStyle? prefixStyle; - @override - final String? prefixIconColor; - @override - final StacTextStyle? suffixStyle; - @override - final String? suffixIconColor; + final String? suffixIconColor; @override final StacTextStyle? counterStyle; @override @@ -933,16 +770,27 @@ class _$StacInputDecorationThemeImpl implements _StacInputDecorationTheme { @override final StacBoxConstraints? constraints; + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacInputDecorationTheme(labelStyle: $labelStyle, floatingLabelStyle: $floatingLabelStyle, helperStyle: $helperStyle, helperMaxLines: $helperMaxLines, hintStyle: $hintStyle, errorStyle: $errorStyle, errorMaxLines: $errorMaxLines, floatingLabelBehavior: $floatingLabelBehavior, floatingLabelAlignment: $floatingLabelAlignment, isDense: $isDense, contentPadding: $contentPadding, isCollapsed: $isCollapsed, iconColor: $iconColor, prefixStyle: $prefixStyle, prefixIconColor: $prefixIconColor, suffixStyle: $suffixStyle, suffixIconColor: $suffixIconColor, counterStyle: $counterStyle, filled: $filled, fillColor: $fillColor, activeIndicatorBorder: $activeIndicatorBorder, outlineBorder: $outlineBorder, focusColor: $focusColor, hoverColor: $hoverColor, errorBorder: $errorBorder, focusedBorder: $focusedBorder, focusedErrorBorder: $focusedErrorBorder, disabledBorder: $disabledBorder, enabledBorder: $enabledBorder, border: $border, alignLabelWithHint: $alignLabelWithHint, constraints: $constraints)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacInputDecorationThemeCopyWith<_StacInputDecorationTheme> get copyWith => + __$StacInputDecorationThemeCopyWithImpl<_StacInputDecorationTheme>( + this, _$identity); + + @override + Map toJson() { + return _$StacInputDecorationThemeToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacInputDecorationThemeImpl && + other is _StacInputDecorationTheme && (identical(other.labelStyle, labelStyle) || other.labelStyle == labelStyle) && (identical(other.floatingLabelStyle, floatingLabelStyle) || @@ -1044,130 +892,521 @@ class _$StacInputDecorationThemeImpl implements _StacInputDecorationTheme { constraints ]); - /// Create a copy of StacInputDecorationTheme - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacInputDecorationThemeImplCopyWith<_$StacInputDecorationThemeImpl> - get copyWith => __$$StacInputDecorationThemeImplCopyWithImpl< - _$StacInputDecorationThemeImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacInputDecorationThemeImplToJson( - this, - ); + String toString() { + return 'StacInputDecorationTheme(labelStyle: $labelStyle, floatingLabelStyle: $floatingLabelStyle, helperStyle: $helperStyle, helperMaxLines: $helperMaxLines, hintStyle: $hintStyle, errorStyle: $errorStyle, errorMaxLines: $errorMaxLines, floatingLabelBehavior: $floatingLabelBehavior, floatingLabelAlignment: $floatingLabelAlignment, isDense: $isDense, contentPadding: $contentPadding, isCollapsed: $isCollapsed, iconColor: $iconColor, prefixStyle: $prefixStyle, prefixIconColor: $prefixIconColor, suffixStyle: $suffixStyle, suffixIconColor: $suffixIconColor, counterStyle: $counterStyle, filled: $filled, fillColor: $fillColor, activeIndicatorBorder: $activeIndicatorBorder, outlineBorder: $outlineBorder, focusColor: $focusColor, hoverColor: $hoverColor, errorBorder: $errorBorder, focusedBorder: $focusedBorder, focusedErrorBorder: $focusedErrorBorder, disabledBorder: $disabledBorder, enabledBorder: $enabledBorder, border: $border, alignLabelWithHint: $alignLabelWithHint, constraints: $constraints)'; } } -abstract class _StacInputDecorationTheme implements StacInputDecorationTheme { - const factory _StacInputDecorationTheme( - {final StacTextStyle? labelStyle, - final StacTextStyle? floatingLabelStyle, - final StacTextStyle? helperStyle, - final int? helperMaxLines, - final StacTextStyle? hintStyle, - final StacTextStyle? errorStyle, - final int? errorMaxLines, - final FloatingLabelBehavior? floatingLabelBehavior, - final StacFloatingLabelAlignment? floatingLabelAlignment, - final bool isDense, - final StacEdgeInsets? contentPadding, - final bool isCollapsed, - final String? iconColor, - final StacTextStyle? prefixStyle, - final String? prefixIconColor, - final StacTextStyle? suffixStyle, - final String? suffixIconColor, - final StacTextStyle? counterStyle, - final bool filled, - final String? fillColor, - final StacBorderSide? activeIndicatorBorder, - final StacBorderSide? outlineBorder, - final String? focusColor, - final String? hoverColor, - final StacInputBorder? errorBorder, - final StacInputBorder? focusedBorder, - final StacInputBorder? focusedErrorBorder, - final StacInputBorder? disabledBorder, - final StacInputBorder? enabledBorder, - final StacInputBorder? border, - final bool alignLabelWithHint, - final StacBoxConstraints? constraints}) = _$StacInputDecorationThemeImpl; - - factory _StacInputDecorationTheme.fromJson(Map json) = - _$StacInputDecorationThemeImpl.fromJson; - - @override - StacTextStyle? get labelStyle; - @override - StacTextStyle? get floatingLabelStyle; - @override - StacTextStyle? get helperStyle; - @override - int? get helperMaxLines; - @override - StacTextStyle? get hintStyle; - @override - StacTextStyle? get errorStyle; - @override - int? get errorMaxLines; +/// @nodoc +abstract mixin class _$StacInputDecorationThemeCopyWith<$Res> + implements $StacInputDecorationThemeCopyWith<$Res> { + factory _$StacInputDecorationThemeCopyWith(_StacInputDecorationTheme value, + $Res Function(_StacInputDecorationTheme) _then) = + __$StacInputDecorationThemeCopyWithImpl; @override - FloatingLabelBehavior? get floatingLabelBehavior; + @useResult + $Res call( + {StacTextStyle? labelStyle, + StacTextStyle? floatingLabelStyle, + StacTextStyle? helperStyle, + int? helperMaxLines, + StacTextStyle? hintStyle, + StacTextStyle? errorStyle, + int? errorMaxLines, + FloatingLabelBehavior? floatingLabelBehavior, + StacFloatingLabelAlignment? floatingLabelAlignment, + bool isDense, + StacEdgeInsets? contentPadding, + bool isCollapsed, + String? iconColor, + StacTextStyle? prefixStyle, + String? prefixIconColor, + StacTextStyle? suffixStyle, + String? suffixIconColor, + StacTextStyle? counterStyle, + bool filled, + String? fillColor, + StacBorderSide? activeIndicatorBorder, + StacBorderSide? outlineBorder, + String? focusColor, + String? hoverColor, + StacInputBorder? errorBorder, + StacInputBorder? focusedBorder, + StacInputBorder? focusedErrorBorder, + StacInputBorder? disabledBorder, + StacInputBorder? enabledBorder, + StacInputBorder? border, + bool alignLabelWithHint, + StacBoxConstraints? constraints}); + @override - StacFloatingLabelAlignment? get floatingLabelAlignment; + $StacTextStyleCopyWith<$Res>? get labelStyle; @override - bool get isDense; + $StacTextStyleCopyWith<$Res>? get floatingLabelStyle; @override - StacEdgeInsets? get contentPadding; + $StacTextStyleCopyWith<$Res>? get helperStyle; @override - bool get isCollapsed; + $StacTextStyleCopyWith<$Res>? get hintStyle; @override - String? get iconColor; + $StacTextStyleCopyWith<$Res>? get errorStyle; @override - StacTextStyle? get prefixStyle; + $StacEdgeInsetsCopyWith<$Res>? get contentPadding; @override - String? get prefixIconColor; + $StacTextStyleCopyWith<$Res>? get prefixStyle; @override - StacTextStyle? get suffixStyle; + $StacTextStyleCopyWith<$Res>? get suffixStyle; @override - String? get suffixIconColor; + $StacTextStyleCopyWith<$Res>? get counterStyle; @override - StacTextStyle? get counterStyle; + $StacBorderSideCopyWith<$Res>? get activeIndicatorBorder; @override - bool get filled; + $StacBorderSideCopyWith<$Res>? get outlineBorder; @override - String? get fillColor; + $StacInputBorderCopyWith<$Res>? get errorBorder; @override - StacBorderSide? get activeIndicatorBorder; + $StacInputBorderCopyWith<$Res>? get focusedBorder; @override - StacBorderSide? get outlineBorder; + $StacInputBorderCopyWith<$Res>? get focusedErrorBorder; @override - String? get focusColor; + $StacInputBorderCopyWith<$Res>? get disabledBorder; @override - String? get hoverColor; + $StacInputBorderCopyWith<$Res>? get enabledBorder; @override - StacInputBorder? get errorBorder; + $StacInputBorderCopyWith<$Res>? get border; @override - StacInputBorder? get focusedBorder; + $StacBoxConstraintsCopyWith<$Res>? get constraints; +} + +/// @nodoc +class __$StacInputDecorationThemeCopyWithImpl<$Res> + implements _$StacInputDecorationThemeCopyWith<$Res> { + __$StacInputDecorationThemeCopyWithImpl(this._self, this._then); + + final _StacInputDecorationTheme _self; + final $Res Function(_StacInputDecorationTheme) _then; + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. @override - StacInputBorder? get focusedErrorBorder; + @pragma('vm:prefer-inline') + $Res call({ + Object? labelStyle = freezed, + Object? floatingLabelStyle = freezed, + Object? helperStyle = freezed, + Object? helperMaxLines = freezed, + Object? hintStyle = freezed, + Object? errorStyle = freezed, + Object? errorMaxLines = freezed, + Object? floatingLabelBehavior = freezed, + Object? floatingLabelAlignment = freezed, + Object? isDense = null, + Object? contentPadding = freezed, + Object? isCollapsed = null, + Object? iconColor = freezed, + Object? prefixStyle = freezed, + Object? prefixIconColor = freezed, + Object? suffixStyle = freezed, + Object? suffixIconColor = freezed, + Object? counterStyle = freezed, + Object? filled = null, + Object? fillColor = freezed, + Object? activeIndicatorBorder = freezed, + Object? outlineBorder = freezed, + Object? focusColor = freezed, + Object? hoverColor = freezed, + Object? errorBorder = freezed, + Object? focusedBorder = freezed, + Object? focusedErrorBorder = freezed, + Object? disabledBorder = freezed, + Object? enabledBorder = freezed, + Object? border = freezed, + Object? alignLabelWithHint = null, + Object? constraints = freezed, + }) { + return _then(_StacInputDecorationTheme( + labelStyle: freezed == labelStyle + ? _self.labelStyle + : labelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + floatingLabelStyle: freezed == floatingLabelStyle + ? _self.floatingLabelStyle + : floatingLabelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + helperStyle: freezed == helperStyle + ? _self.helperStyle + : helperStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + helperMaxLines: freezed == helperMaxLines + ? _self.helperMaxLines + : helperMaxLines // ignore: cast_nullable_to_non_nullable + as int?, + hintStyle: freezed == hintStyle + ? _self.hintStyle + : hintStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + errorStyle: freezed == errorStyle + ? _self.errorStyle + : errorStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + errorMaxLines: freezed == errorMaxLines + ? _self.errorMaxLines + : errorMaxLines // ignore: cast_nullable_to_non_nullable + as int?, + floatingLabelBehavior: freezed == floatingLabelBehavior + ? _self.floatingLabelBehavior + : floatingLabelBehavior // ignore: cast_nullable_to_non_nullable + as FloatingLabelBehavior?, + floatingLabelAlignment: freezed == floatingLabelAlignment + ? _self.floatingLabelAlignment + : floatingLabelAlignment // ignore: cast_nullable_to_non_nullable + as StacFloatingLabelAlignment?, + isDense: null == isDense + ? _self.isDense + : isDense // ignore: cast_nullable_to_non_nullable + as bool, + contentPadding: freezed == contentPadding + ? _self.contentPadding + : contentPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + isCollapsed: null == isCollapsed + ? _self.isCollapsed + : isCollapsed // ignore: cast_nullable_to_non_nullable + as bool, + iconColor: freezed == iconColor + ? _self.iconColor + : iconColor // ignore: cast_nullable_to_non_nullable + as String?, + prefixStyle: freezed == prefixStyle + ? _self.prefixStyle + : prefixStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + prefixIconColor: freezed == prefixIconColor + ? _self.prefixIconColor + : prefixIconColor // ignore: cast_nullable_to_non_nullable + as String?, + suffixStyle: freezed == suffixStyle + ? _self.suffixStyle + : suffixStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + suffixIconColor: freezed == suffixIconColor + ? _self.suffixIconColor + : suffixIconColor // ignore: cast_nullable_to_non_nullable + as String?, + counterStyle: freezed == counterStyle + ? _self.counterStyle + : counterStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + filled: null == filled + ? _self.filled + : filled // ignore: cast_nullable_to_non_nullable + as bool, + fillColor: freezed == fillColor + ? _self.fillColor + : fillColor // ignore: cast_nullable_to_non_nullable + as String?, + activeIndicatorBorder: freezed == activeIndicatorBorder + ? _self.activeIndicatorBorder + : activeIndicatorBorder // ignore: cast_nullable_to_non_nullable + as StacBorderSide?, + outlineBorder: freezed == outlineBorder + ? _self.outlineBorder + : outlineBorder // ignore: cast_nullable_to_non_nullable + as StacBorderSide?, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + errorBorder: freezed == errorBorder + ? _self.errorBorder + : errorBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + focusedBorder: freezed == focusedBorder + ? _self.focusedBorder + : focusedBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + focusedErrorBorder: freezed == focusedErrorBorder + ? _self.focusedErrorBorder + : focusedErrorBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + disabledBorder: freezed == disabledBorder + ? _self.disabledBorder + : disabledBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + enabledBorder: freezed == enabledBorder + ? _self.enabledBorder + : enabledBorder // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + border: freezed == border + ? _self.border + : border // ignore: cast_nullable_to_non_nullable + as StacInputBorder?, + alignLabelWithHint: null == alignLabelWithHint + ? _self.alignLabelWithHint + : alignLabelWithHint // ignore: cast_nullable_to_non_nullable + as bool, + constraints: freezed == constraints + ? _self.constraints + : constraints // ignore: cast_nullable_to_non_nullable + as StacBoxConstraints?, + )); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. @override - StacInputBorder? get disabledBorder; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get labelStyle { + if (_self.labelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. @override - StacInputBorder? get enabledBorder; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get floatingLabelStyle { + if (_self.floatingLabelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.floatingLabelStyle!, (value) { + return _then(_self.copyWith(floatingLabelStyle: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. @override - StacInputBorder? get border; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get helperStyle { + if (_self.helperStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.helperStyle!, (value) { + return _then(_self.copyWith(helperStyle: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. @override - bool get alignLabelWithHint; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get hintStyle { + if (_self.hintStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.hintStyle!, (value) { + return _then(_self.copyWith(hintStyle: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. @override - StacBoxConstraints? get constraints; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get errorStyle { + if (_self.errorStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.errorStyle!, (value) { + return _then(_self.copyWith(errorStyle: value)); + }); + } /// Create a copy of StacInputDecorationTheme /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacInputDecorationThemeImplCopyWith<_$StacInputDecorationThemeImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get contentPadding { + if (_self.contentPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get prefixStyle { + if (_self.prefixStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.prefixStyle!, (value) { + return _then(_self.copyWith(prefixStyle: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get suffixStyle { + if (_self.suffixStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.suffixStyle!, (value) { + return _then(_self.copyWith(suffixStyle: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get counterStyle { + if (_self.counterStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.counterStyle!, (value) { + return _then(_self.copyWith(counterStyle: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res>? get activeIndicatorBorder { + if (_self.activeIndicatorBorder == null) { + return null; + } + + return $StacBorderSideCopyWith<$Res>(_self.activeIndicatorBorder!, (value) { + return _then(_self.copyWith(activeIndicatorBorder: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res>? get outlineBorder { + if (_self.outlineBorder == null) { + return null; + } + + return $StacBorderSideCopyWith<$Res>(_self.outlineBorder!, (value) { + return _then(_self.copyWith(outlineBorder: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get errorBorder { + if (_self.errorBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.errorBorder!, (value) { + return _then(_self.copyWith(errorBorder: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get focusedBorder { + if (_self.focusedBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.focusedBorder!, (value) { + return _then(_self.copyWith(focusedBorder: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get focusedErrorBorder { + if (_self.focusedErrorBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.focusedErrorBorder!, (value) { + return _then(_self.copyWith(focusedErrorBorder: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get disabledBorder { + if (_self.disabledBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.disabledBorder!, (value) { + return _then(_self.copyWith(disabledBorder: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get enabledBorder { + if (_self.enabledBorder == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.enabledBorder!, (value) { + return _then(_self.copyWith(enabledBorder: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputBorderCopyWith<$Res>? get border { + if (_self.border == null) { + return null; + } + + return $StacInputBorderCopyWith<$Res>(_self.border!, (value) { + return _then(_self.copyWith(border: value)); + }); + } + + /// Create a copy of StacInputDecorationTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacBoxConstraintsCopyWith<$Res>? get constraints { + if (_self.constraints == null) { + return null; + } + + return $StacBoxConstraintsCopyWith<$Res>(_self.constraints!, (value) { + return _then(_self.copyWith(constraints: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.g.dart b/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.g.dart index df2301b1..a3d562a4 100644 --- a/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.g.dart +++ b/packages/stac/lib/src/parsers/stac_input_decoration_theme/stac_input_decoration_theme.g.dart @@ -6,9 +6,9 @@ part of 'stac_input_decoration_theme.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacInputDecorationThemeImpl _$$StacInputDecorationThemeImplFromJson( +_StacInputDecorationTheme _$StacInputDecorationThemeFromJson( Map json) => - _$StacInputDecorationThemeImpl( + _StacInputDecorationTheme( labelStyle: json['labelStyle'] == null ? null : StacTextStyle.fromJson(json['labelStyle']), @@ -89,8 +89,8 @@ _$StacInputDecorationThemeImpl _$$StacInputDecorationThemeImplFromJson( json['constraints'] as Map), ); -Map _$$StacInputDecorationThemeImplToJson( - _$StacInputDecorationThemeImpl instance) => +Map _$StacInputDecorationThemeToJson( + _StacInputDecorationTheme instance) => { 'labelStyle': instance.labelStyle, 'floatingLabelStyle': instance.floatingLabelStyle, diff --git a/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.dart b/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.dart index eb24e1a2..32bf0a77 100644 --- a/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.dart +++ b/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.dart @@ -5,7 +5,7 @@ part 'stac_input_formatter.freezed.dart'; part 'stac_input_formatter.g.dart'; @freezed -class StacInputFormatter with _$StacInputFormatter { +abstract class StacInputFormatter with _$StacInputFormatter { const factory StacInputFormatter({ required InputFormatterType type, String? rule, diff --git a/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.freezed.dart b/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.freezed.dart index 748fbf89..9af8a0aa 100644 --- a/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,60 @@ part of 'stac_input_formatter.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacInputFormatter _$StacInputFormatterFromJson(Map json) { - return _StacInputFormatter.fromJson(json); -} - /// @nodoc mixin _$StacInputFormatter { - InputFormatterType get type => throw _privateConstructorUsedError; - String? get rule => throw _privateConstructorUsedError; - - /// Serializes this StacInputFormatter to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + InputFormatterType get type; + String? get rule; /// Create a copy of StacInputFormatter /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacInputFormatterCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacInputFormatterCopyWithImpl( + this as StacInputFormatter, _$identity); -/// @nodoc -abstract class $StacInputFormatterCopyWith<$Res> { - factory $StacInputFormatterCopyWith( - StacInputFormatter value, $Res Function(StacInputFormatter) then) = - _$StacInputFormatterCopyWithImpl<$Res, StacInputFormatter>; - @useResult - $Res call({InputFormatterType type, String? rule}); -} + /// Serializes this StacInputFormatter to a JSON map. + Map toJson(); -/// @nodoc -class _$StacInputFormatterCopyWithImpl<$Res, $Val extends StacInputFormatter> - implements $StacInputFormatterCopyWith<$Res> { - _$StacInputFormatterCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacInputFormatter && + (identical(other.type, type) || other.type == type) && + (identical(other.rule, rule) || other.rule == rule)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, type, rule); - /// Create a copy of StacInputFormatter - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? type = null, - Object? rule = freezed, - }) { - return _then(_value.copyWith( - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as InputFormatterType, - rule: freezed == rule - ? _value.rule - : rule // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + String toString() { + return 'StacInputFormatter(type: $type, rule: $rule)'; } } /// @nodoc -abstract class _$$StacInputFormatterImplCopyWith<$Res> - implements $StacInputFormatterCopyWith<$Res> { - factory _$$StacInputFormatterImplCopyWith(_$StacInputFormatterImpl value, - $Res Function(_$StacInputFormatterImpl) then) = - __$$StacInputFormatterImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacInputFormatterCopyWith<$Res> { + factory $StacInputFormatterCopyWith( + StacInputFormatter value, $Res Function(StacInputFormatter) _then) = + _$StacInputFormatterCopyWithImpl; @useResult $Res call({InputFormatterType type, String? rule}); } /// @nodoc -class __$$StacInputFormatterImplCopyWithImpl<$Res> - extends _$StacInputFormatterCopyWithImpl<$Res, _$StacInputFormatterImpl> - implements _$$StacInputFormatterImplCopyWith<$Res> { - __$$StacInputFormatterImplCopyWithImpl(_$StacInputFormatterImpl _value, - $Res Function(_$StacInputFormatterImpl) _then) - : super(_value, _then); +class _$StacInputFormatterCopyWithImpl<$Res> + implements $StacInputFormatterCopyWith<$Res> { + _$StacInputFormatterCopyWithImpl(this._self, this._then); + + final StacInputFormatter _self; + final $Res Function(StacInputFormatter) _then; /// Create a copy of StacInputFormatter /// with the given fields replaced by the non-null parameter values. @@ -100,13 +73,13 @@ class __$$StacInputFormatterImplCopyWithImpl<$Res> Object? type = null, Object? rule = freezed, }) { - return _then(_$StacInputFormatterImpl( + return _then(_self.copyWith( type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as InputFormatterType, rule: freezed == rule - ? _value.rule + ? _self.rule : rule // ignore: cast_nullable_to_non_nullable as String?, )); @@ -115,27 +88,36 @@ class __$$StacInputFormatterImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacInputFormatterImpl implements _StacInputFormatter { - const _$StacInputFormatterImpl({required this.type, this.rule}); - - factory _$StacInputFormatterImpl.fromJson(Map json) => - _$$StacInputFormatterImplFromJson(json); +class _StacInputFormatter implements StacInputFormatter { + const _StacInputFormatter({required this.type, this.rule}); + factory _StacInputFormatter.fromJson(Map json) => + _$StacInputFormatterFromJson(json); @override final InputFormatterType type; @override final String? rule; + /// Create a copy of StacInputFormatter + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacInputFormatter(type: $type, rule: $rule)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacInputFormatterCopyWith<_StacInputFormatter> get copyWith => + __$StacInputFormatterCopyWithImpl<_StacInputFormatter>(this, _$identity); + + @override + Map toJson() { + return _$StacInputFormatterToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacInputFormatterImpl && + other is _StacInputFormatter && (identical(other.type, type) || other.type == type) && (identical(other.rule, rule) || other.rule == rule)); } @@ -144,40 +126,50 @@ class _$StacInputFormatterImpl implements _StacInputFormatter { @override int get hashCode => Object.hash(runtimeType, type, rule); - /// Create a copy of StacInputFormatter - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacInputFormatterImplCopyWith<_$StacInputFormatterImpl> get copyWith => - __$$StacInputFormatterImplCopyWithImpl<_$StacInputFormatterImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacInputFormatterImplToJson( - this, - ); + String toString() { + return 'StacInputFormatter(type: $type, rule: $rule)'; } } -abstract class _StacInputFormatter implements StacInputFormatter { - const factory _StacInputFormatter( - {required final InputFormatterType type, - final String? rule}) = _$StacInputFormatterImpl; +/// @nodoc +abstract mixin class _$StacInputFormatterCopyWith<$Res> + implements $StacInputFormatterCopyWith<$Res> { + factory _$StacInputFormatterCopyWith( + _StacInputFormatter value, $Res Function(_StacInputFormatter) _then) = + __$StacInputFormatterCopyWithImpl; + @override + @useResult + $Res call({InputFormatterType type, String? rule}); +} - factory _StacInputFormatter.fromJson(Map json) = - _$StacInputFormatterImpl.fromJson; +/// @nodoc +class __$StacInputFormatterCopyWithImpl<$Res> + implements _$StacInputFormatterCopyWith<$Res> { + __$StacInputFormatterCopyWithImpl(this._self, this._then); - @override - InputFormatterType get type; - @override - String? get rule; + final _StacInputFormatter _self; + final $Res Function(_StacInputFormatter) _then; /// Create a copy of StacInputFormatter /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacInputFormatterImplCopyWith<_$StacInputFormatterImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? type = null, + Object? rule = freezed, + }) { + return _then(_StacInputFormatter( + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as InputFormatterType, + rule: freezed == rule + ? _self.rule + : rule // ignore: cast_nullable_to_non_nullable + as String?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.g.dart b/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.g.dart index 89f52713..1c726dea 100644 --- a/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.g.dart +++ b/packages/stac/lib/src/parsers/stac_input_formatters/stac_input_formatter.g.dart @@ -6,15 +6,13 @@ part of 'stac_input_formatter.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacInputFormatterImpl _$$StacInputFormatterImplFromJson( - Map json) => - _$StacInputFormatterImpl( +_StacInputFormatter _$StacInputFormatterFromJson(Map json) => + _StacInputFormatter( type: $enumDecode(_$InputFormatterTypeEnumMap, json['type']), rule: json['rule'] as String?, ); -Map _$$StacInputFormatterImplToJson( - _$StacInputFormatterImpl instance) => +Map _$StacInputFormatterToJson(_StacInputFormatter instance) => { 'type': _$InputFormatterTypeEnumMap[instance.type]!, 'rule': instance.rule, diff --git a/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.dart b/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.dart index 31a0d70b..724abd20 100644 --- a/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.dart +++ b/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.dart @@ -6,7 +6,7 @@ part 'stac_limited_box.freezed.dart'; part 'stac_limited_box.g.dart'; @freezed -class StacLimitedBox with _$StacLimitedBox { +abstract class StacLimitedBox with _$StacLimitedBox { const factory StacLimitedBox({ @Default(double.infinity) double maxHeight, @Default(double.infinity) double maxWidth, diff --git a/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.freezed.dart b/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.freezed.dart index 75da3c51..894b884e 100644 --- a/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,94 +10,65 @@ part of 'stac_limited_box.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacLimitedBox _$StacLimitedBoxFromJson(Map json) { - return _StacLimitedBox.fromJson(json); -} - /// @nodoc mixin _$StacLimitedBox { - double get maxHeight => throw _privateConstructorUsedError; - double get maxWidth => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacLimitedBox to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get maxHeight; + double get maxWidth; + Map? get child; /// Create a copy of StacLimitedBox /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacLimitedBoxCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacLimitedBoxCopyWithImpl( + this as StacLimitedBox, _$identity); -/// @nodoc -abstract class $StacLimitedBoxCopyWith<$Res> { - factory $StacLimitedBoxCopyWith( - StacLimitedBox value, $Res Function(StacLimitedBox) then) = - _$StacLimitedBoxCopyWithImpl<$Res, StacLimitedBox>; - @useResult - $Res call({double maxHeight, double maxWidth, Map? child}); -} + /// Serializes this StacLimitedBox to a JSON map. + Map toJson(); -/// @nodoc -class _$StacLimitedBoxCopyWithImpl<$Res, $Val extends StacLimitedBox> - implements $StacLimitedBoxCopyWith<$Res> { - _$StacLimitedBoxCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacLimitedBox && + (identical(other.maxHeight, maxHeight) || + other.maxHeight == maxHeight) && + (identical(other.maxWidth, maxWidth) || + other.maxWidth == maxWidth) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, maxHeight, maxWidth, + const DeepCollectionEquality().hash(child)); - /// Create a copy of StacLimitedBox - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? maxHeight = null, - Object? maxWidth = null, - Object? child = freezed, - }) { - return _then(_value.copyWith( - maxHeight: null == maxHeight - ? _value.maxHeight - : maxHeight // ignore: cast_nullable_to_non_nullable - as double, - maxWidth: null == maxWidth - ? _value.maxWidth - : maxWidth // ignore: cast_nullable_to_non_nullable - as double, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacLimitedBox(maxHeight: $maxHeight, maxWidth: $maxWidth, child: $child)'; } } /// @nodoc -abstract class _$$StacLimitedBoxImplCopyWith<$Res> - implements $StacLimitedBoxCopyWith<$Res> { - factory _$$StacLimitedBoxImplCopyWith(_$StacLimitedBoxImpl value, - $Res Function(_$StacLimitedBoxImpl) then) = - __$$StacLimitedBoxImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacLimitedBoxCopyWith<$Res> { + factory $StacLimitedBoxCopyWith( + StacLimitedBox value, $Res Function(StacLimitedBox) _then) = + _$StacLimitedBoxCopyWithImpl; @useResult $Res call({double maxHeight, double maxWidth, Map? child}); } /// @nodoc -class __$$StacLimitedBoxImplCopyWithImpl<$Res> - extends _$StacLimitedBoxCopyWithImpl<$Res, _$StacLimitedBoxImpl> - implements _$$StacLimitedBoxImplCopyWith<$Res> { - __$$StacLimitedBoxImplCopyWithImpl( - _$StacLimitedBoxImpl _value, $Res Function(_$StacLimitedBoxImpl) _then) - : super(_value, _then); +class _$StacLimitedBoxCopyWithImpl<$Res> + implements $StacLimitedBoxCopyWith<$Res> { + _$StacLimitedBoxCopyWithImpl(this._self, this._then); + + final StacLimitedBox _self; + final $Res Function(StacLimitedBox) _then; /// Create a copy of StacLimitedBox /// with the given fields replaced by the non-null parameter values. @@ -107,17 +79,17 @@ class __$$StacLimitedBoxImplCopyWithImpl<$Res> Object? maxWidth = null, Object? child = freezed, }) { - return _then(_$StacLimitedBoxImpl( + return _then(_self.copyWith( maxHeight: null == maxHeight - ? _value.maxHeight + ? _self.maxHeight : maxHeight // ignore: cast_nullable_to_non_nullable as double, maxWidth: null == maxWidth - ? _value.maxWidth + ? _self.maxWidth : maxWidth // ignore: cast_nullable_to_non_nullable as double, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -126,15 +98,14 @@ class __$$StacLimitedBoxImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacLimitedBoxImpl implements _StacLimitedBox { - const _$StacLimitedBoxImpl( +class _StacLimitedBox implements StacLimitedBox { + const _StacLimitedBox( {this.maxHeight = double.infinity, this.maxWidth = double.infinity, final Map? child}) : _child = child; - - factory _$StacLimitedBoxImpl.fromJson(Map json) => - _$$StacLimitedBoxImplFromJson(json); + factory _StacLimitedBox.fromJson(Map json) => + _$StacLimitedBoxFromJson(json); @override @JsonKey() @@ -152,16 +123,26 @@ class _$StacLimitedBoxImpl implements _StacLimitedBox { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacLimitedBox + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacLimitedBox(maxHeight: $maxHeight, maxWidth: $maxWidth, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacLimitedBoxCopyWith<_StacLimitedBox> get copyWith => + __$StacLimitedBoxCopyWithImpl<_StacLimitedBox>(this, _$identity); + + @override + Map toJson() { + return _$StacLimitedBoxToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacLimitedBoxImpl && + other is _StacLimitedBox && (identical(other.maxHeight, maxHeight) || other.maxHeight == maxHeight) && (identical(other.maxWidth, maxWidth) || @@ -174,43 +155,55 @@ class _$StacLimitedBoxImpl implements _StacLimitedBox { int get hashCode => Object.hash(runtimeType, maxHeight, maxWidth, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacLimitedBox - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacLimitedBoxImplCopyWith<_$StacLimitedBoxImpl> get copyWith => - __$$StacLimitedBoxImplCopyWithImpl<_$StacLimitedBoxImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$StacLimitedBoxImplToJson( - this, - ); + String toString() { + return 'StacLimitedBox(maxHeight: $maxHeight, maxWidth: $maxWidth, child: $child)'; } } -abstract class _StacLimitedBox implements StacLimitedBox { - const factory _StacLimitedBox( - {final double maxHeight, - final double maxWidth, - final Map? child}) = _$StacLimitedBoxImpl; +/// @nodoc +abstract mixin class _$StacLimitedBoxCopyWith<$Res> + implements $StacLimitedBoxCopyWith<$Res> { + factory _$StacLimitedBoxCopyWith( + _StacLimitedBox value, $Res Function(_StacLimitedBox) _then) = + __$StacLimitedBoxCopyWithImpl; + @override + @useResult + $Res call({double maxHeight, double maxWidth, Map? child}); +} - factory _StacLimitedBox.fromJson(Map json) = - _$StacLimitedBoxImpl.fromJson; +/// @nodoc +class __$StacLimitedBoxCopyWithImpl<$Res> + implements _$StacLimitedBoxCopyWith<$Res> { + __$StacLimitedBoxCopyWithImpl(this._self, this._then); - @override - double get maxHeight; - @override - double get maxWidth; - @override - Map? get child; + final _StacLimitedBox _self; + final $Res Function(_StacLimitedBox) _then; /// Create a copy of StacLimitedBox /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacLimitedBoxImplCopyWith<_$StacLimitedBoxImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? maxHeight = null, + Object? maxWidth = null, + Object? child = freezed, + }) { + return _then(_StacLimitedBox( + maxHeight: null == maxHeight + ? _self.maxHeight + : maxHeight // ignore: cast_nullable_to_non_nullable + as double, + maxWidth: null == maxWidth + ? _self.maxWidth + : maxWidth // ignore: cast_nullable_to_non_nullable + as double, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.g.dart b/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.g.dart index 8143a1ed..910a4e39 100644 --- a/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.g.dart +++ b/packages/stac/lib/src/parsers/stac_limited_box/stac_limited_box.g.dart @@ -6,15 +6,14 @@ part of 'stac_limited_box.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacLimitedBoxImpl _$$StacLimitedBoxImplFromJson(Map json) => - _$StacLimitedBoxImpl( +_StacLimitedBox _$StacLimitedBoxFromJson(Map json) => + _StacLimitedBox( maxHeight: (json['maxHeight'] as num?)?.toDouble() ?? double.infinity, maxWidth: (json['maxWidth'] as num?)?.toDouble() ?? double.infinity, child: json['child'] as Map?, ); -Map _$$StacLimitedBoxImplToJson( - _$StacLimitedBoxImpl instance) => +Map _$StacLimitedBoxToJson(_StacLimitedBox instance) => { 'maxHeight': instance.maxHeight, 'maxWidth': instance.maxWidth, diff --git a/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.dart b/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.dart index a1dd1375..6ef00de8 100644 --- a/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.dart +++ b/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.dart @@ -7,7 +7,7 @@ part 'stac_linear_progress_indicator.freezed.dart'; part 'stac_linear_progress_indicator.g.dart'; @freezed -class StacLinearProgressIndicator with _$StacLinearProgressIndicator { +abstract class StacLinearProgressIndicator with _$StacLinearProgressIndicator { const factory StacLinearProgressIndicator({ double? value, String? backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.freezed.dart b/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.freezed.dart index c75c2700..3d374c9d 100644 --- a/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,43 +10,67 @@ part of 'stac_linear_progress_indicator.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacLinearProgressIndicator _$StacLinearProgressIndicatorFromJson( - Map json) { - return _StacLinearProgressIndicator.fromJson(json); -} - /// @nodoc mixin _$StacLinearProgressIndicator { - double? get value => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - double? get minHeight => throw _privateConstructorUsedError; - String? get semanticsLabel => throw _privateConstructorUsedError; - String? get semanticsValue => throw _privateConstructorUsedError; - StacBorderRadius get borderRadius => throw _privateConstructorUsedError; - - /// Serializes this StacLinearProgressIndicator to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get value; + String? get backgroundColor; + String? get color; + double? get minHeight; + String? get semanticsLabel; + String? get semanticsValue; + StacBorderRadius get borderRadius; /// Create a copy of StacLinearProgressIndicator /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacLinearProgressIndicatorCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => _$StacLinearProgressIndicatorCopyWithImpl< + StacLinearProgressIndicator>( + this as StacLinearProgressIndicator, _$identity); + + /// Serializes this StacLinearProgressIndicator to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacLinearProgressIndicator && + (identical(other.value, value) || other.value == value) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.color, color) || other.color == color) && + (identical(other.minHeight, minHeight) || + other.minHeight == minHeight) && + (identical(other.semanticsLabel, semanticsLabel) || + other.semanticsLabel == semanticsLabel) && + (identical(other.semanticsValue, semanticsValue) || + other.semanticsValue == semanticsValue) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, value, backgroundColor, color, + minHeight, semanticsLabel, semanticsValue, borderRadius); + + @override + String toString() { + return 'StacLinearProgressIndicator(value: $value, backgroundColor: $backgroundColor, color: $color, minHeight: $minHeight, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, borderRadius: $borderRadius)'; + } } /// @nodoc -abstract class $StacLinearProgressIndicatorCopyWith<$Res> { +abstract mixin class $StacLinearProgressIndicatorCopyWith<$Res> { factory $StacLinearProgressIndicatorCopyWith( StacLinearProgressIndicator value, - $Res Function(StacLinearProgressIndicator) then) = - _$StacLinearProgressIndicatorCopyWithImpl<$Res, - StacLinearProgressIndicator>; + $Res Function(StacLinearProgressIndicator) _then) = + _$StacLinearProgressIndicatorCopyWithImpl; @useResult $Res call( {double? value, @@ -60,15 +85,12 @@ abstract class $StacLinearProgressIndicatorCopyWith<$Res> { } /// @nodoc -class _$StacLinearProgressIndicatorCopyWithImpl<$Res, - $Val extends StacLinearProgressIndicator> +class _$StacLinearProgressIndicatorCopyWithImpl<$Res> implements $StacLinearProgressIndicatorCopyWith<$Res> { - _$StacLinearProgressIndicatorCopyWithImpl(this._value, this._then); + _$StacLinearProgressIndicatorCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacLinearProgressIndicator _self; + final $Res Function(StacLinearProgressIndicator) _then; /// Create a copy of StacLinearProgressIndicator /// with the given fields replaced by the non-null parameter values. @@ -83,36 +105,36 @@ class _$StacLinearProgressIndicatorCopyWithImpl<$Res, Object? semanticsValue = freezed, Object? borderRadius = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( value: freezed == value - ? _value.value + ? _self.value : value // ignore: cast_nullable_to_non_nullable as double?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, minHeight: freezed == minHeight - ? _value.minHeight + ? _self.minHeight : minHeight // ignore: cast_nullable_to_non_nullable as double?, semanticsLabel: freezed == semanticsLabel - ? _value.semanticsLabel + ? _self.semanticsLabel : semanticsLabel // ignore: cast_nullable_to_non_nullable as String?, semanticsValue: freezed == semanticsValue - ? _value.semanticsValue + ? _self.semanticsValue : semanticsValue // ignore: cast_nullable_to_non_nullable as String?, borderRadius: null == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius, - ) as $Val); + )); } /// Create a copy of StacLinearProgressIndicator @@ -120,95 +142,16 @@ class _$StacLinearProgressIndicatorCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith<$Res> get borderRadius { - return $StacBorderRadiusCopyWith<$Res>(_value.borderRadius, (value) { - return _then(_value.copyWith(borderRadius: value) as $Val); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); }); } } -/// @nodoc -abstract class _$$StacLinearProgressIndicatorImplCopyWith<$Res> - implements $StacLinearProgressIndicatorCopyWith<$Res> { - factory _$$StacLinearProgressIndicatorImplCopyWith( - _$StacLinearProgressIndicatorImpl value, - $Res Function(_$StacLinearProgressIndicatorImpl) then) = - __$$StacLinearProgressIndicatorImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {double? value, - String? backgroundColor, - String? color, - double? minHeight, - String? semanticsLabel, - String? semanticsValue, - StacBorderRadius borderRadius}); - - @override - $StacBorderRadiusCopyWith<$Res> get borderRadius; -} - -/// @nodoc -class __$$StacLinearProgressIndicatorImplCopyWithImpl<$Res> - extends _$StacLinearProgressIndicatorCopyWithImpl<$Res, - _$StacLinearProgressIndicatorImpl> - implements _$$StacLinearProgressIndicatorImplCopyWith<$Res> { - __$$StacLinearProgressIndicatorImplCopyWithImpl( - _$StacLinearProgressIndicatorImpl _value, - $Res Function(_$StacLinearProgressIndicatorImpl) _then) - : super(_value, _then); - - /// Create a copy of StacLinearProgressIndicator - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = freezed, - Object? backgroundColor = freezed, - Object? color = freezed, - Object? minHeight = freezed, - Object? semanticsLabel = freezed, - Object? semanticsValue = freezed, - Object? borderRadius = null, - }) { - return _then(_$StacLinearProgressIndicatorImpl( - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as double?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - minHeight: freezed == minHeight - ? _value.minHeight - : minHeight // ignore: cast_nullable_to_non_nullable - as double?, - semanticsLabel: freezed == semanticsLabel - ? _value.semanticsLabel - : semanticsLabel // ignore: cast_nullable_to_non_nullable - as String?, - semanticsValue: freezed == semanticsValue - ? _value.semanticsValue - : semanticsValue // ignore: cast_nullable_to_non_nullable - as String?, - borderRadius: null == borderRadius - ? _value.borderRadius - : borderRadius // ignore: cast_nullable_to_non_nullable - as StacBorderRadius, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacLinearProgressIndicatorImpl - implements _StacLinearProgressIndicator { - const _$StacLinearProgressIndicatorImpl( +class _StacLinearProgressIndicator implements StacLinearProgressIndicator { + const _StacLinearProgressIndicator( {this.value, this.backgroundColor, this.color, @@ -216,10 +159,8 @@ class _$StacLinearProgressIndicatorImpl this.semanticsLabel, this.semanticsValue, this.borderRadius = const StacBorderRadius()}); - - factory _$StacLinearProgressIndicatorImpl.fromJson( - Map json) => - _$$StacLinearProgressIndicatorImplFromJson(json); + factory _StacLinearProgressIndicator.fromJson(Map json) => + _$StacLinearProgressIndicatorFromJson(json); @override final double? value; @@ -237,16 +178,27 @@ class _$StacLinearProgressIndicatorImpl @JsonKey() final StacBorderRadius borderRadius; + /// Create a copy of StacLinearProgressIndicator + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacLinearProgressIndicator(value: $value, backgroundColor: $backgroundColor, color: $color, minHeight: $minHeight, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, borderRadius: $borderRadius)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacLinearProgressIndicatorCopyWith<_StacLinearProgressIndicator> + get copyWith => __$StacLinearProgressIndicatorCopyWithImpl< + _StacLinearProgressIndicator>(this, _$identity); + + @override + Map toJson() { + return _$StacLinearProgressIndicatorToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacLinearProgressIndicatorImpl && + other is _StacLinearProgressIndicator && (identical(other.value, value) || other.value == value) && (identical(other.backgroundColor, backgroundColor) || other.backgroundColor == backgroundColor) && @@ -266,56 +218,96 @@ class _$StacLinearProgressIndicatorImpl int get hashCode => Object.hash(runtimeType, value, backgroundColor, color, minHeight, semanticsLabel, semanticsValue, borderRadius); - /// Create a copy of StacLinearProgressIndicator - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacLinearProgressIndicatorImplCopyWith<_$StacLinearProgressIndicatorImpl> - get copyWith => __$$StacLinearProgressIndicatorImplCopyWithImpl< - _$StacLinearProgressIndicatorImpl>(this, _$identity); + String toString() { + return 'StacLinearProgressIndicator(value: $value, backgroundColor: $backgroundColor, color: $color, minHeight: $minHeight, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, borderRadius: $borderRadius)'; + } +} +/// @nodoc +abstract mixin class _$StacLinearProgressIndicatorCopyWith<$Res> + implements $StacLinearProgressIndicatorCopyWith<$Res> { + factory _$StacLinearProgressIndicatorCopyWith( + _StacLinearProgressIndicator value, + $Res Function(_StacLinearProgressIndicator) _then) = + __$StacLinearProgressIndicatorCopyWithImpl; @override - Map toJson() { - return _$$StacLinearProgressIndicatorImplToJson( - this, - ); - } + @useResult + $Res call( + {double? value, + String? backgroundColor, + String? color, + double? minHeight, + String? semanticsLabel, + String? semanticsValue, + StacBorderRadius borderRadius}); + + @override + $StacBorderRadiusCopyWith<$Res> get borderRadius; } -abstract class _StacLinearProgressIndicator - implements StacLinearProgressIndicator { - const factory _StacLinearProgressIndicator( - {final double? value, - final String? backgroundColor, - final String? color, - final double? minHeight, - final String? semanticsLabel, - final String? semanticsValue, - final StacBorderRadius borderRadius}) = _$StacLinearProgressIndicatorImpl; +/// @nodoc +class __$StacLinearProgressIndicatorCopyWithImpl<$Res> + implements _$StacLinearProgressIndicatorCopyWith<$Res> { + __$StacLinearProgressIndicatorCopyWithImpl(this._self, this._then); - factory _StacLinearProgressIndicator.fromJson(Map json) = - _$StacLinearProgressIndicatorImpl.fromJson; + final _StacLinearProgressIndicator _self; + final $Res Function(_StacLinearProgressIndicator) _then; + /// Create a copy of StacLinearProgressIndicator + /// with the given fields replaced by the non-null parameter values. @override - double? get value; - @override - String? get backgroundColor; - @override - String? get color; - @override - double? get minHeight; - @override - String? get semanticsLabel; - @override - String? get semanticsValue; - @override - StacBorderRadius get borderRadius; + @pragma('vm:prefer-inline') + $Res call({ + Object? value = freezed, + Object? backgroundColor = freezed, + Object? color = freezed, + Object? minHeight = freezed, + Object? semanticsLabel = freezed, + Object? semanticsValue = freezed, + Object? borderRadius = null, + }) { + return _then(_StacLinearProgressIndicator( + value: freezed == value + ? _self.value + : value // ignore: cast_nullable_to_non_nullable + as double?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + minHeight: freezed == minHeight + ? _self.minHeight + : minHeight // ignore: cast_nullable_to_non_nullable + as double?, + semanticsLabel: freezed == semanticsLabel + ? _self.semanticsLabel + : semanticsLabel // ignore: cast_nullable_to_non_nullable + as String?, + semanticsValue: freezed == semanticsValue + ? _self.semanticsValue + : semanticsValue // ignore: cast_nullable_to_non_nullable + as String?, + borderRadius: null == borderRadius + ? _self.borderRadius + : borderRadius // ignore: cast_nullable_to_non_nullable + as StacBorderRadius, + )); + } /// Create a copy of StacLinearProgressIndicator /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacLinearProgressIndicatorImplCopyWith<_$StacLinearProgressIndicatorImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacBorderRadiusCopyWith<$Res> get borderRadius { + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.g.dart b/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.g.dart index e6b1d00e..7e15f46e 100644 --- a/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.g.dart +++ b/packages/stac/lib/src/parsers/stac_linear_progress_indicator/stac_linear_progress_indicator.g.dart @@ -6,9 +6,9 @@ part of 'stac_linear_progress_indicator.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacLinearProgressIndicatorImpl _$$StacLinearProgressIndicatorImplFromJson( +_StacLinearProgressIndicator _$StacLinearProgressIndicatorFromJson( Map json) => - _$StacLinearProgressIndicatorImpl( + _StacLinearProgressIndicator( value: (json['value'] as num?)?.toDouble(), backgroundColor: json['backgroundColor'] as String?, color: json['color'] as String?, @@ -20,8 +20,8 @@ _$StacLinearProgressIndicatorImpl _$$StacLinearProgressIndicatorImplFromJson( : StacBorderRadius.fromJson(json['borderRadius']), ); -Map _$$StacLinearProgressIndicatorImplToJson( - _$StacLinearProgressIndicatorImpl instance) => +Map _$StacLinearProgressIndicatorToJson( + _StacLinearProgressIndicator instance) => { 'value': instance.value, 'backgroundColor': instance.backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.dart b/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.dart index f087170e..a7304708 100644 --- a/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.dart +++ b/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.dart @@ -8,7 +8,7 @@ part 'stac_list_tile.freezed.dart'; part 'stac_list_tile.g.dart'; @freezed -class StacListTile with _$StacListTile { +abstract class StacListTile with _$StacListTile { const factory StacListTile({ Map? onTap, Map? onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.freezed.dart b/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.freezed.dart index 823e73f0..f45c0c45 100644 --- a/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,57 +10,135 @@ part of 'stac_list_tile.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacListTile _$StacListTileFromJson(Map json) { - return _StacListTile.fromJson(json); -} - /// @nodoc mixin _$StacListTile { - Map? get onTap => throw _privateConstructorUsedError; - Map? get onLongPress => throw _privateConstructorUsedError; - Map? get leading => throw _privateConstructorUsedError; - Map? get title => throw _privateConstructorUsedError; - Map? get subtitle => throw _privateConstructorUsedError; - Map? get trailing => throw _privateConstructorUsedError; - bool get isThreeLine => throw _privateConstructorUsedError; - bool? get dense => throw _privateConstructorUsedError; - ListTileStyle? get style => throw _privateConstructorUsedError; - String? get selectedColor => throw _privateConstructorUsedError; - String? get iconColor => throw _privateConstructorUsedError; - String? get textColor => throw _privateConstructorUsedError; - StacEdgeInsets? get contentPadding => throw _privateConstructorUsedError; - bool get enabled => throw _privateConstructorUsedError; - bool get selected => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - String? get tileColor => throw _privateConstructorUsedError; - String? get selectedTileColor => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - double? get horizontalTitleGap => throw _privateConstructorUsedError; - double? get minVerticalPadding => throw _privateConstructorUsedError; - double? get minLeadingWidth => throw _privateConstructorUsedError; - - /// Serializes this StacListTile to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get onTap; + Map? get onLongPress; + Map? get leading; + Map? get title; + Map? get subtitle; + Map? get trailing; + bool get isThreeLine; + bool? get dense; + ListTileStyle? get style; + String? get selectedColor; + String? get iconColor; + String? get textColor; + StacEdgeInsets? get contentPadding; + bool get enabled; + bool get selected; + String? get focusColor; + String? get hoverColor; + bool get autofocus; + String? get tileColor; + String? get selectedTileColor; + bool? get enableFeedback; + double? get horizontalTitleGap; + double? get minVerticalPadding; + double? get minLeadingWidth; /// Create a copy of StacListTile /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacListTileCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacListTileCopyWithImpl( + this as StacListTile, _$identity); + + /// Serializes this StacListTile to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacListTile && + const DeepCollectionEquality().equals(other.onTap, onTap) && + const DeepCollectionEquality() + .equals(other.onLongPress, onLongPress) && + const DeepCollectionEquality().equals(other.leading, leading) && + const DeepCollectionEquality().equals(other.title, title) && + const DeepCollectionEquality().equals(other.subtitle, subtitle) && + const DeepCollectionEquality().equals(other.trailing, trailing) && + (identical(other.isThreeLine, isThreeLine) || + other.isThreeLine == isThreeLine) && + (identical(other.dense, dense) || other.dense == dense) && + (identical(other.style, style) || other.style == style) && + (identical(other.selectedColor, selectedColor) || + other.selectedColor == selectedColor) && + (identical(other.iconColor, iconColor) || + other.iconColor == iconColor) && + (identical(other.textColor, textColor) || + other.textColor == textColor) && + (identical(other.contentPadding, contentPadding) || + other.contentPadding == contentPadding) && + (identical(other.enabled, enabled) || other.enabled == enabled) && + (identical(other.selected, selected) || + other.selected == selected) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.tileColor, tileColor) || + other.tileColor == tileColor) && + (identical(other.selectedTileColor, selectedTileColor) || + other.selectedTileColor == selectedTileColor) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.horizontalTitleGap, horizontalTitleGap) || + other.horizontalTitleGap == horizontalTitleGap) && + (identical(other.minVerticalPadding, minVerticalPadding) || + other.minVerticalPadding == minVerticalPadding) && + (identical(other.minLeadingWidth, minLeadingWidth) || + other.minLeadingWidth == minLeadingWidth)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(onTap), + const DeepCollectionEquality().hash(onLongPress), + const DeepCollectionEquality().hash(leading), + const DeepCollectionEquality().hash(title), + const DeepCollectionEquality().hash(subtitle), + const DeepCollectionEquality().hash(trailing), + isThreeLine, + dense, + style, + selectedColor, + iconColor, + textColor, + contentPadding, + enabled, + selected, + focusColor, + hoverColor, + autofocus, + tileColor, + selectedTileColor, + enableFeedback, + horizontalTitleGap, + minVerticalPadding, + minLeadingWidth + ]); + + @override + String toString() { + return 'StacListTile(onTap: $onTap, onLongPress: $onLongPress, leading: $leading, title: $title, subtitle: $subtitle, trailing: $trailing, isThreeLine: $isThreeLine, dense: $dense, style: $style, selectedColor: $selectedColor, iconColor: $iconColor, textColor: $textColor, contentPadding: $contentPadding, enabled: $enabled, selected: $selected, focusColor: $focusColor, hoverColor: $hoverColor, autofocus: $autofocus, tileColor: $tileColor, selectedTileColor: $selectedTileColor, enableFeedback: $enableFeedback, horizontalTitleGap: $horizontalTitleGap, minVerticalPadding: $minVerticalPadding, minLeadingWidth: $minLeadingWidth)'; + } } /// @nodoc -abstract class $StacListTileCopyWith<$Res> { +abstract mixin class $StacListTileCopyWith<$Res> { factory $StacListTileCopyWith( - StacListTile value, $Res Function(StacListTile) then) = - _$StacListTileCopyWithImpl<$Res, StacListTile>; + StacListTile value, $Res Function(StacListTile) _then) = + _$StacListTileCopyWithImpl; @useResult $Res call( {Map? onTap, @@ -91,14 +170,11 @@ abstract class $StacListTileCopyWith<$Res> { } /// @nodoc -class _$StacListTileCopyWithImpl<$Res, $Val extends StacListTile> - implements $StacListTileCopyWith<$Res> { - _$StacListTileCopyWithImpl(this._value, this._then); +class _$StacListTileCopyWithImpl<$Res> implements $StacListTileCopyWith<$Res> { + _$StacListTileCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacListTile _self; + final $Res Function(StacListTile) _then; /// Create a copy of StacListTile /// with the given fields replaced by the non-null parameter values. @@ -130,104 +206,104 @@ class _$StacListTileCopyWithImpl<$Res, $Val extends StacListTile> Object? minVerticalPadding = freezed, Object? minLeadingWidth = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( onTap: freezed == onTap - ? _value.onTap + ? _self.onTap : onTap // ignore: cast_nullable_to_non_nullable as Map?, onLongPress: freezed == onLongPress - ? _value.onLongPress + ? _self.onLongPress : onLongPress // ignore: cast_nullable_to_non_nullable as Map?, leading: freezed == leading - ? _value.leading + ? _self.leading : leading // ignore: cast_nullable_to_non_nullable as Map?, title: freezed == title - ? _value.title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as Map?, subtitle: freezed == subtitle - ? _value.subtitle + ? _self.subtitle : subtitle // ignore: cast_nullable_to_non_nullable as Map?, trailing: freezed == trailing - ? _value.trailing + ? _self.trailing : trailing // ignore: cast_nullable_to_non_nullable as Map?, isThreeLine: null == isThreeLine - ? _value.isThreeLine + ? _self.isThreeLine : isThreeLine // ignore: cast_nullable_to_non_nullable as bool, dense: freezed == dense - ? _value.dense + ? _self.dense : dense // ignore: cast_nullable_to_non_nullable as bool?, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as ListTileStyle?, selectedColor: freezed == selectedColor - ? _value.selectedColor + ? _self.selectedColor : selectedColor // ignore: cast_nullable_to_non_nullable as String?, iconColor: freezed == iconColor - ? _value.iconColor + ? _self.iconColor : iconColor // ignore: cast_nullable_to_non_nullable as String?, textColor: freezed == textColor - ? _value.textColor + ? _self.textColor : textColor // ignore: cast_nullable_to_non_nullable as String?, contentPadding: freezed == contentPadding - ? _value.contentPadding + ? _self.contentPadding : contentPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, enabled: null == enabled - ? _value.enabled + ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable as bool, selected: null == selected - ? _value.selected + ? _self.selected : selected // ignore: cast_nullable_to_non_nullable as bool, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, tileColor: freezed == tileColor - ? _value.tileColor + ? _self.tileColor : tileColor // ignore: cast_nullable_to_non_nullable as String?, selectedTileColor: freezed == selectedTileColor - ? _value.selectedTileColor + ? _self.selectedTileColor : selectedTileColor // ignore: cast_nullable_to_non_nullable as String?, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, horizontalTitleGap: freezed == horizontalTitleGap - ? _value.horizontalTitleGap + ? _self.horizontalTitleGap : horizontalTitleGap // ignore: cast_nullable_to_non_nullable as double?, minVerticalPadding: freezed == minVerticalPadding - ? _value.minVerticalPadding + ? _self.minVerticalPadding : minVerticalPadding // ignore: cast_nullable_to_non_nullable as double?, minLeadingWidth: freezed == minLeadingWidth - ? _value.minLeadingWidth + ? _self.minLeadingWidth : minLeadingWidth // ignore: cast_nullable_to_non_nullable as double?, - ) as $Val); + )); } /// Create a copy of StacListTile @@ -235,197 +311,20 @@ class _$StacListTileCopyWithImpl<$Res, $Val extends StacListTile> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get contentPadding { - if (_value.contentPadding == null) { + if (_self.contentPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.contentPadding!, (value) { - return _then(_value.copyWith(contentPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); }); } } -/// @nodoc -abstract class _$$StacListTileImplCopyWith<$Res> - implements $StacListTileCopyWith<$Res> { - factory _$$StacListTileImplCopyWith( - _$StacListTileImpl value, $Res Function(_$StacListTileImpl) then) = - __$$StacListTileImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? onTap, - Map? onLongPress, - Map? leading, - Map? title, - Map? subtitle, - Map? trailing, - bool isThreeLine, - bool? dense, - ListTileStyle? style, - String? selectedColor, - String? iconColor, - String? textColor, - StacEdgeInsets? contentPadding, - bool enabled, - bool selected, - String? focusColor, - String? hoverColor, - bool autofocus, - String? tileColor, - String? selectedTileColor, - bool? enableFeedback, - double? horizontalTitleGap, - double? minVerticalPadding, - double? minLeadingWidth}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get contentPadding; -} - -/// @nodoc -class __$$StacListTileImplCopyWithImpl<$Res> - extends _$StacListTileCopyWithImpl<$Res, _$StacListTileImpl> - implements _$$StacListTileImplCopyWith<$Res> { - __$$StacListTileImplCopyWithImpl( - _$StacListTileImpl _value, $Res Function(_$StacListTileImpl) _then) - : super(_value, _then); - - /// Create a copy of StacListTile - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? onTap = freezed, - Object? onLongPress = freezed, - Object? leading = freezed, - Object? title = freezed, - Object? subtitle = freezed, - Object? trailing = freezed, - Object? isThreeLine = null, - Object? dense = freezed, - Object? style = freezed, - Object? selectedColor = freezed, - Object? iconColor = freezed, - Object? textColor = freezed, - Object? contentPadding = freezed, - Object? enabled = null, - Object? selected = null, - Object? focusColor = freezed, - Object? hoverColor = freezed, - Object? autofocus = null, - Object? tileColor = freezed, - Object? selectedTileColor = freezed, - Object? enableFeedback = freezed, - Object? horizontalTitleGap = freezed, - Object? minVerticalPadding = freezed, - Object? minLeadingWidth = freezed, - }) { - return _then(_$StacListTileImpl( - onTap: freezed == onTap - ? _value._onTap - : onTap // ignore: cast_nullable_to_non_nullable - as Map?, - onLongPress: freezed == onLongPress - ? _value._onLongPress - : onLongPress // ignore: cast_nullable_to_non_nullable - as Map?, - leading: freezed == leading - ? _value._leading - : leading // ignore: cast_nullable_to_non_nullable - as Map?, - title: freezed == title - ? _value._title - : title // ignore: cast_nullable_to_non_nullable - as Map?, - subtitle: freezed == subtitle - ? _value._subtitle - : subtitle // ignore: cast_nullable_to_non_nullable - as Map?, - trailing: freezed == trailing - ? _value._trailing - : trailing // ignore: cast_nullable_to_non_nullable - as Map?, - isThreeLine: null == isThreeLine - ? _value.isThreeLine - : isThreeLine // ignore: cast_nullable_to_non_nullable - as bool, - dense: freezed == dense - ? _value.dense - : dense // ignore: cast_nullable_to_non_nullable - as bool?, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as ListTileStyle?, - selectedColor: freezed == selectedColor - ? _value.selectedColor - : selectedColor // ignore: cast_nullable_to_non_nullable - as String?, - iconColor: freezed == iconColor - ? _value.iconColor - : iconColor // ignore: cast_nullable_to_non_nullable - as String?, - textColor: freezed == textColor - ? _value.textColor - : textColor // ignore: cast_nullable_to_non_nullable - as String?, - contentPadding: freezed == contentPadding - ? _value.contentPadding - : contentPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - enabled: null == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - selected: null == selected - ? _value.selected - : selected // ignore: cast_nullable_to_non_nullable - as bool, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - tileColor: freezed == tileColor - ? _value.tileColor - : tileColor // ignore: cast_nullable_to_non_nullable - as String?, - selectedTileColor: freezed == selectedTileColor - ? _value.selectedTileColor - : selectedTileColor // ignore: cast_nullable_to_non_nullable - as String?, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - horizontalTitleGap: freezed == horizontalTitleGap - ? _value.horizontalTitleGap - : horizontalTitleGap // ignore: cast_nullable_to_non_nullable - as double?, - minVerticalPadding: freezed == minVerticalPadding - ? _value.minVerticalPadding - : minVerticalPadding // ignore: cast_nullable_to_non_nullable - as double?, - minLeadingWidth: freezed == minLeadingWidth - ? _value.minLeadingWidth - : minLeadingWidth // ignore: cast_nullable_to_non_nullable - as double?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacListTileImpl implements _StacListTile { - const _$StacListTileImpl( +class _StacListTile implements StacListTile { + const _StacListTile( {final Map? onTap, final Map? onLongPress, final Map? leading, @@ -456,9 +355,8 @@ class _$StacListTileImpl implements _StacListTile { _title = title, _subtitle = subtitle, _trailing = trailing; - - factory _$StacListTileImpl.fromJson(Map json) => - _$$StacListTileImplFromJson(json); + factory _StacListTile.fromJson(Map json) => + _$StacListTileFromJson(json); final Map? _onTap; @override @@ -561,16 +459,26 @@ class _$StacListTileImpl implements _StacListTile { @override final double? minLeadingWidth; + /// Create a copy of StacListTile + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacListTile(onTap: $onTap, onLongPress: $onLongPress, leading: $leading, title: $title, subtitle: $subtitle, trailing: $trailing, isThreeLine: $isThreeLine, dense: $dense, style: $style, selectedColor: $selectedColor, iconColor: $iconColor, textColor: $textColor, contentPadding: $contentPadding, enabled: $enabled, selected: $selected, focusColor: $focusColor, hoverColor: $hoverColor, autofocus: $autofocus, tileColor: $tileColor, selectedTileColor: $selectedTileColor, enableFeedback: $enableFeedback, horizontalTitleGap: $horizontalTitleGap, minVerticalPadding: $minVerticalPadding, minLeadingWidth: $minLeadingWidth)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacListTileCopyWith<_StacListTile> get copyWith => + __$StacListTileCopyWithImpl<_StacListTile>(this, _$identity); + + @override + Map toJson() { + return _$StacListTileToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacListTileImpl && + other is _StacListTile && const DeepCollectionEquality().equals(other._onTap, _onTap) && const DeepCollectionEquality() .equals(other._onLongPress, _onLongPress) && @@ -643,105 +551,201 @@ class _$StacListTileImpl implements _StacListTile { minLeadingWidth ]); - /// Create a copy of StacListTile - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacListTileImplCopyWith<_$StacListTileImpl> get copyWith => - __$$StacListTileImplCopyWithImpl<_$StacListTileImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacListTileImplToJson( - this, - ); + String toString() { + return 'StacListTile(onTap: $onTap, onLongPress: $onLongPress, leading: $leading, title: $title, subtitle: $subtitle, trailing: $trailing, isThreeLine: $isThreeLine, dense: $dense, style: $style, selectedColor: $selectedColor, iconColor: $iconColor, textColor: $textColor, contentPadding: $contentPadding, enabled: $enabled, selected: $selected, focusColor: $focusColor, hoverColor: $hoverColor, autofocus: $autofocus, tileColor: $tileColor, selectedTileColor: $selectedTileColor, enableFeedback: $enableFeedback, horizontalTitleGap: $horizontalTitleGap, minVerticalPadding: $minVerticalPadding, minLeadingWidth: $minLeadingWidth)'; } } -abstract class _StacListTile implements StacListTile { - const factory _StacListTile( - {final Map? onTap, - final Map? onLongPress, - final Map? leading, - final Map? title, - final Map? subtitle, - final Map? trailing, - final bool isThreeLine, - final bool? dense, - final ListTileStyle? style, - final String? selectedColor, - final String? iconColor, - final String? textColor, - final StacEdgeInsets? contentPadding, - final bool enabled, - final bool selected, - final String? focusColor, - final String? hoverColor, - final bool autofocus, - final String? tileColor, - final String? selectedTileColor, - final bool? enableFeedback, - final double? horizontalTitleGap, - final double? minVerticalPadding, - final double? minLeadingWidth}) = _$StacListTileImpl; - - factory _StacListTile.fromJson(Map json) = - _$StacListTileImpl.fromJson; - - @override - Map? get onTap; - @override - Map? get onLongPress; - @override - Map? get leading; - @override - Map? get title; - @override - Map? get subtitle; - @override - Map? get trailing; - @override - bool get isThreeLine; - @override - bool? get dense; - @override - ListTileStyle? get style; - @override - String? get selectedColor; - @override - String? get iconColor; - @override - String? get textColor; - @override - StacEdgeInsets? get contentPadding; - @override - bool get enabled; - @override - bool get selected; - @override - String? get focusColor; - @override - String? get hoverColor; - @override - bool get autofocus; - @override - String? get tileColor; - @override - String? get selectedTileColor; - @override - bool? get enableFeedback; +/// @nodoc +abstract mixin class _$StacListTileCopyWith<$Res> + implements $StacListTileCopyWith<$Res> { + factory _$StacListTileCopyWith( + _StacListTile value, $Res Function(_StacListTile) _then) = + __$StacListTileCopyWithImpl; @override - double? get horizontalTitleGap; + @useResult + $Res call( + {Map? onTap, + Map? onLongPress, + Map? leading, + Map? title, + Map? subtitle, + Map? trailing, + bool isThreeLine, + bool? dense, + ListTileStyle? style, + String? selectedColor, + String? iconColor, + String? textColor, + StacEdgeInsets? contentPadding, + bool enabled, + bool selected, + String? focusColor, + String? hoverColor, + bool autofocus, + String? tileColor, + String? selectedTileColor, + bool? enableFeedback, + double? horizontalTitleGap, + double? minVerticalPadding, + double? minLeadingWidth}); + @override - double? get minVerticalPadding; + $StacEdgeInsetsCopyWith<$Res>? get contentPadding; +} + +/// @nodoc +class __$StacListTileCopyWithImpl<$Res> + implements _$StacListTileCopyWith<$Res> { + __$StacListTileCopyWithImpl(this._self, this._then); + + final _StacListTile _self; + final $Res Function(_StacListTile) _then; + + /// Create a copy of StacListTile + /// with the given fields replaced by the non-null parameter values. @override - double? get minLeadingWidth; + @pragma('vm:prefer-inline') + $Res call({ + Object? onTap = freezed, + Object? onLongPress = freezed, + Object? leading = freezed, + Object? title = freezed, + Object? subtitle = freezed, + Object? trailing = freezed, + Object? isThreeLine = null, + Object? dense = freezed, + Object? style = freezed, + Object? selectedColor = freezed, + Object? iconColor = freezed, + Object? textColor = freezed, + Object? contentPadding = freezed, + Object? enabled = null, + Object? selected = null, + Object? focusColor = freezed, + Object? hoverColor = freezed, + Object? autofocus = null, + Object? tileColor = freezed, + Object? selectedTileColor = freezed, + Object? enableFeedback = freezed, + Object? horizontalTitleGap = freezed, + Object? minVerticalPadding = freezed, + Object? minLeadingWidth = freezed, + }) { + return _then(_StacListTile( + onTap: freezed == onTap + ? _self._onTap + : onTap // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPress: freezed == onLongPress + ? _self._onLongPress + : onLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + leading: freezed == leading + ? _self._leading + : leading // ignore: cast_nullable_to_non_nullable + as Map?, + title: freezed == title + ? _self._title + : title // ignore: cast_nullable_to_non_nullable + as Map?, + subtitle: freezed == subtitle + ? _self._subtitle + : subtitle // ignore: cast_nullable_to_non_nullable + as Map?, + trailing: freezed == trailing + ? _self._trailing + : trailing // ignore: cast_nullable_to_non_nullable + as Map?, + isThreeLine: null == isThreeLine + ? _self.isThreeLine + : isThreeLine // ignore: cast_nullable_to_non_nullable + as bool, + dense: freezed == dense + ? _self.dense + : dense // ignore: cast_nullable_to_non_nullable + as bool?, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as ListTileStyle?, + selectedColor: freezed == selectedColor + ? _self.selectedColor + : selectedColor // ignore: cast_nullable_to_non_nullable + as String?, + iconColor: freezed == iconColor + ? _self.iconColor + : iconColor // ignore: cast_nullable_to_non_nullable + as String?, + textColor: freezed == textColor + ? _self.textColor + : textColor // ignore: cast_nullable_to_non_nullable + as String?, + contentPadding: freezed == contentPadding + ? _self.contentPadding + : contentPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + enabled: null == enabled + ? _self.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool, + selected: null == selected + ? _self.selected + : selected // ignore: cast_nullable_to_non_nullable + as bool, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + tileColor: freezed == tileColor + ? _self.tileColor + : tileColor // ignore: cast_nullable_to_non_nullable + as String?, + selectedTileColor: freezed == selectedTileColor + ? _self.selectedTileColor + : selectedTileColor // ignore: cast_nullable_to_non_nullable + as String?, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + horizontalTitleGap: freezed == horizontalTitleGap + ? _self.horizontalTitleGap + : horizontalTitleGap // ignore: cast_nullable_to_non_nullable + as double?, + minVerticalPadding: freezed == minVerticalPadding + ? _self.minVerticalPadding + : minVerticalPadding // ignore: cast_nullable_to_non_nullable + as double?, + minLeadingWidth: freezed == minLeadingWidth + ? _self.minLeadingWidth + : minLeadingWidth // ignore: cast_nullable_to_non_nullable + as double?, + )); + } /// Create a copy of StacListTile /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacListTileImplCopyWith<_$StacListTileImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get contentPadding { + if (_self.contentPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.g.dart b/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.g.dart index 24eea0b7..ec8020b9 100644 --- a/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.g.dart +++ b/packages/stac/lib/src/parsers/stac_list_tile/stac_list_tile.g.dart @@ -6,8 +6,8 @@ part of 'stac_list_tile.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacListTileImpl _$$StacListTileImplFromJson(Map json) => - _$StacListTileImpl( +_StacListTile _$StacListTileFromJson(Map json) => + _StacListTile( onTap: json['onTap'] as Map?, onLongPress: json['onLongPress'] as Map?, leading: json['leading'] as Map?, @@ -36,7 +36,7 @@ _$StacListTileImpl _$$StacListTileImplFromJson(Map json) => minLeadingWidth: (json['minLeadingWidth'] as num?)?.toDouble(), ); -Map _$$StacListTileImplToJson(_$StacListTileImpl instance) => +Map _$StacListTileToJson(_StacListTile instance) => { 'onTap': instance.onTap, 'onLongPress': instance.onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.dart b/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.dart index 3aba4a2b..c427cc88 100644 --- a/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.dart +++ b/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.dart @@ -13,7 +13,7 @@ part 'stac_list_tile_theme_data.freezed.dart'; part 'stac_list_tile_theme_data.g.dart'; @freezed -class StacListTileThemeData with _$StacListTileThemeData { +abstract class StacListTileThemeData with _$StacListTileThemeData { const factory StacListTileThemeData({ bool? dense, StacBorder? shape, diff --git a/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.freezed.dart b/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.freezed.dart index 1a39ee91..386d7d14 100644 --- a/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,55 +10,121 @@ part of 'stac_list_tile_theme_data.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacListTileThemeData _$StacListTileThemeDataFromJson( - Map json) { - return _StacListTileThemeData.fromJson(json); -} - /// @nodoc mixin _$StacListTileThemeData { - bool? get dense => throw _privateConstructorUsedError; - StacBorder? get shape => throw _privateConstructorUsedError; - ListTileStyle? get style => throw _privateConstructorUsedError; - String? get selectedColor => throw _privateConstructorUsedError; - String? get iconColor => throw _privateConstructorUsedError; - String? get textColor => throw _privateConstructorUsedError; - StacTextStyle? get titleTextStyle => throw _privateConstructorUsedError; - StacTextStyle? get subtitleTextStyle => throw _privateConstructorUsedError; - StacTextStyle? get leadingAndTrailingTextStyle => - throw _privateConstructorUsedError; - StacEdgeInsets? get contentPadding => throw _privateConstructorUsedError; - String? get tileColor => throw _privateConstructorUsedError; - String? get selectedTileColor => throw _privateConstructorUsedError; - double? get horizontalTitleGap => throw _privateConstructorUsedError; - double? get minVerticalPadding => throw _privateConstructorUsedError; - double? get minLeadingWidth => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - StacVisualDensity? get visualDensity => throw _privateConstructorUsedError; - ListTileTitleAlignment? get titleAlignment => - throw _privateConstructorUsedError; - List? get shadows => throw _privateConstructorUsedError; - - /// Serializes this StacListTileThemeData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + bool? get dense; + StacBorder? get shape; + ListTileStyle? get style; + String? get selectedColor; + String? get iconColor; + String? get textColor; + StacTextStyle? get titleTextStyle; + StacTextStyle? get subtitleTextStyle; + StacTextStyle? get leadingAndTrailingTextStyle; + StacEdgeInsets? get contentPadding; + String? get tileColor; + String? get selectedTileColor; + double? get horizontalTitleGap; + double? get minVerticalPadding; + double? get minLeadingWidth; + bool? get enableFeedback; + StacVisualDensity? get visualDensity; + ListTileTitleAlignment? get titleAlignment; + List? get shadows; /// Create a copy of StacListTileThemeData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacListTileThemeDataCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacListTileThemeDataCopyWithImpl( + this as StacListTileThemeData, _$identity); + + /// Serializes this StacListTileThemeData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacListTileThemeData && + (identical(other.dense, dense) || other.dense == dense) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.style, style) || other.style == style) && + (identical(other.selectedColor, selectedColor) || + other.selectedColor == selectedColor) && + (identical(other.iconColor, iconColor) || + other.iconColor == iconColor) && + (identical(other.textColor, textColor) || + other.textColor == textColor) && + (identical(other.titleTextStyle, titleTextStyle) || + other.titleTextStyle == titleTextStyle) && + (identical(other.subtitleTextStyle, subtitleTextStyle) || + other.subtitleTextStyle == subtitleTextStyle) && + (identical(other.leadingAndTrailingTextStyle, + leadingAndTrailingTextStyle) || + other.leadingAndTrailingTextStyle == + leadingAndTrailingTextStyle) && + (identical(other.contentPadding, contentPadding) || + other.contentPadding == contentPadding) && + (identical(other.tileColor, tileColor) || + other.tileColor == tileColor) && + (identical(other.selectedTileColor, selectedTileColor) || + other.selectedTileColor == selectedTileColor) && + (identical(other.horizontalTitleGap, horizontalTitleGap) || + other.horizontalTitleGap == horizontalTitleGap) && + (identical(other.minVerticalPadding, minVerticalPadding) || + other.minVerticalPadding == minVerticalPadding) && + (identical(other.minLeadingWidth, minLeadingWidth) || + other.minLeadingWidth == minLeadingWidth) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.visualDensity, visualDensity) || + other.visualDensity == visualDensity) && + (identical(other.titleAlignment, titleAlignment) || + other.titleAlignment == titleAlignment) && + const DeepCollectionEquality().equals(other.shadows, shadows)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + dense, + shape, + style, + selectedColor, + iconColor, + textColor, + titleTextStyle, + subtitleTextStyle, + leadingAndTrailingTextStyle, + contentPadding, + tileColor, + selectedTileColor, + horizontalTitleGap, + minVerticalPadding, + minLeadingWidth, + enableFeedback, + visualDensity, + titleAlignment, + const DeepCollectionEquality().hash(shadows) + ]); + + @override + String toString() { + return 'StacListTileThemeData(dense: $dense, shape: $shape, style: $style, selectedColor: $selectedColor, iconColor: $iconColor, textColor: $textColor, titleTextStyle: $titleTextStyle, subtitleTextStyle: $subtitleTextStyle, leadingAndTrailingTextStyle: $leadingAndTrailingTextStyle, contentPadding: $contentPadding, tileColor: $tileColor, selectedTileColor: $selectedTileColor, horizontalTitleGap: $horizontalTitleGap, minVerticalPadding: $minVerticalPadding, minLeadingWidth: $minLeadingWidth, enableFeedback: $enableFeedback, visualDensity: $visualDensity, titleAlignment: $titleAlignment, shadows: $shadows)'; + } } /// @nodoc -abstract class $StacListTileThemeDataCopyWith<$Res> { +abstract mixin class $StacListTileThemeDataCopyWith<$Res> { factory $StacListTileThemeDataCopyWith(StacListTileThemeData value, - $Res Function(StacListTileThemeData) then) = - _$StacListTileThemeDataCopyWithImpl<$Res, StacListTileThemeData>; + $Res Function(StacListTileThemeData) _then) = + _$StacListTileThemeDataCopyWithImpl; @useResult $Res call( {bool? dense, @@ -89,15 +156,12 @@ abstract class $StacListTileThemeDataCopyWith<$Res> { } /// @nodoc -class _$StacListTileThemeDataCopyWithImpl<$Res, - $Val extends StacListTileThemeData> +class _$StacListTileThemeDataCopyWithImpl<$Res> implements $StacListTileThemeDataCopyWith<$Res> { - _$StacListTileThemeDataCopyWithImpl(this._value, this._then); + _$StacListTileThemeDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacListTileThemeData _self; + final $Res Function(StacListTileThemeData) _then; /// Create a copy of StacListTileThemeData /// with the given fields replaced by the non-null parameter values. @@ -124,84 +188,84 @@ class _$StacListTileThemeDataCopyWithImpl<$Res, Object? titleAlignment = freezed, Object? shadows = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( dense: freezed == dense - ? _value.dense + ? _self.dense : dense // ignore: cast_nullable_to_non_nullable as bool?, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacBorder?, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as ListTileStyle?, selectedColor: freezed == selectedColor - ? _value.selectedColor + ? _self.selectedColor : selectedColor // ignore: cast_nullable_to_non_nullable as String?, iconColor: freezed == iconColor - ? _value.iconColor + ? _self.iconColor : iconColor // ignore: cast_nullable_to_non_nullable as String?, textColor: freezed == textColor - ? _value.textColor + ? _self.textColor : textColor // ignore: cast_nullable_to_non_nullable as String?, titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle + ? _self.titleTextStyle : titleTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, subtitleTextStyle: freezed == subtitleTextStyle - ? _value.subtitleTextStyle + ? _self.subtitleTextStyle : subtitleTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, leadingAndTrailingTextStyle: freezed == leadingAndTrailingTextStyle - ? _value.leadingAndTrailingTextStyle + ? _self.leadingAndTrailingTextStyle : leadingAndTrailingTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, contentPadding: freezed == contentPadding - ? _value.contentPadding + ? _self.contentPadding : contentPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, tileColor: freezed == tileColor - ? _value.tileColor + ? _self.tileColor : tileColor // ignore: cast_nullable_to_non_nullable as String?, selectedTileColor: freezed == selectedTileColor - ? _value.selectedTileColor + ? _self.selectedTileColor : selectedTileColor // ignore: cast_nullable_to_non_nullable as String?, horizontalTitleGap: freezed == horizontalTitleGap - ? _value.horizontalTitleGap + ? _self.horizontalTitleGap : horizontalTitleGap // ignore: cast_nullable_to_non_nullable as double?, minVerticalPadding: freezed == minVerticalPadding - ? _value.minVerticalPadding + ? _self.minVerticalPadding : minVerticalPadding // ignore: cast_nullable_to_non_nullable as double?, minLeadingWidth: freezed == minLeadingWidth - ? _value.minLeadingWidth + ? _self.minLeadingWidth : minLeadingWidth // ignore: cast_nullable_to_non_nullable as double?, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, visualDensity: freezed == visualDensity - ? _value.visualDensity + ? _self.visualDensity : visualDensity // ignore: cast_nullable_to_non_nullable as StacVisualDensity?, titleAlignment: freezed == titleAlignment - ? _value.titleAlignment + ? _self.titleAlignment : titleAlignment // ignore: cast_nullable_to_non_nullable as ListTileTitleAlignment?, shadows: freezed == shadows - ? _value.shadows + ? _self.shadows : shadows // ignore: cast_nullable_to_non_nullable as List?, - ) as $Val); + )); } /// Create a copy of StacListTileThemeData @@ -209,12 +273,12 @@ class _$StacListTileThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -223,12 +287,12 @@ class _$StacListTileThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get titleTextStyle { - if (_value.titleTextStyle == null) { + if (_self.titleTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.titleTextStyle!, (value) { - return _then(_value.copyWith(titleTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); }); } @@ -237,12 +301,12 @@ class _$StacListTileThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get subtitleTextStyle { - if (_value.subtitleTextStyle == null) { + if (_self.subtitleTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.subtitleTextStyle!, (value) { - return _then(_value.copyWith(subtitleTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.subtitleTextStyle!, (value) { + return _then(_self.copyWith(subtitleTextStyle: value)); }); } @@ -251,13 +315,13 @@ class _$StacListTileThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get leadingAndTrailingTextStyle { - if (_value.leadingAndTrailingTextStyle == null) { + if (_self.leadingAndTrailingTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.leadingAndTrailingTextStyle!, + return $StacTextStyleCopyWith<$Res>(_self.leadingAndTrailingTextStyle!, (value) { - return _then(_value.copyWith(leadingAndTrailingTextStyle: value) as $Val); + return _then(_self.copyWith(leadingAndTrailingTextStyle: value)); }); } @@ -266,12 +330,12 @@ class _$StacListTileThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get contentPadding { - if (_value.contentPadding == null) { + if (_self.contentPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.contentPadding!, (value) { - return _then(_value.copyWith(contentPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); }); } @@ -280,179 +344,20 @@ class _$StacListTileThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacVisualDensityCopyWith<$Res>? get visualDensity { - if (_value.visualDensity == null) { + if (_self.visualDensity == null) { return null; } - return $StacVisualDensityCopyWith<$Res>(_value.visualDensity!, (value) { - return _then(_value.copyWith(visualDensity: value) as $Val); + return $StacVisualDensityCopyWith<$Res>(_self.visualDensity!, (value) { + return _then(_self.copyWith(visualDensity: value)); }); } } -/// @nodoc -abstract class _$$StacListTileThemeDataImplCopyWith<$Res> - implements $StacListTileThemeDataCopyWith<$Res> { - factory _$$StacListTileThemeDataImplCopyWith( - _$StacListTileThemeDataImpl value, - $Res Function(_$StacListTileThemeDataImpl) then) = - __$$StacListTileThemeDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {bool? dense, - StacBorder? shape, - ListTileStyle? style, - String? selectedColor, - String? iconColor, - String? textColor, - StacTextStyle? titleTextStyle, - StacTextStyle? subtitleTextStyle, - StacTextStyle? leadingAndTrailingTextStyle, - StacEdgeInsets? contentPadding, - String? tileColor, - String? selectedTileColor, - double? horizontalTitleGap, - double? minVerticalPadding, - double? minLeadingWidth, - bool? enableFeedback, - StacVisualDensity? visualDensity, - ListTileTitleAlignment? titleAlignment, - List? shadows}); - - @override - $StacBorderCopyWith<$Res>? get shape; - @override - $StacTextStyleCopyWith<$Res>? get titleTextStyle; - @override - $StacTextStyleCopyWith<$Res>? get subtitleTextStyle; - @override - $StacTextStyleCopyWith<$Res>? get leadingAndTrailingTextStyle; - @override - $StacEdgeInsetsCopyWith<$Res>? get contentPadding; - @override - $StacVisualDensityCopyWith<$Res>? get visualDensity; -} - -/// @nodoc -class __$$StacListTileThemeDataImplCopyWithImpl<$Res> - extends _$StacListTileThemeDataCopyWithImpl<$Res, - _$StacListTileThemeDataImpl> - implements _$$StacListTileThemeDataImplCopyWith<$Res> { - __$$StacListTileThemeDataImplCopyWithImpl(_$StacListTileThemeDataImpl _value, - $Res Function(_$StacListTileThemeDataImpl) _then) - : super(_value, _then); - - /// Create a copy of StacListTileThemeData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? dense = freezed, - Object? shape = freezed, - Object? style = freezed, - Object? selectedColor = freezed, - Object? iconColor = freezed, - Object? textColor = freezed, - Object? titleTextStyle = freezed, - Object? subtitleTextStyle = freezed, - Object? leadingAndTrailingTextStyle = freezed, - Object? contentPadding = freezed, - Object? tileColor = freezed, - Object? selectedTileColor = freezed, - Object? horizontalTitleGap = freezed, - Object? minVerticalPadding = freezed, - Object? minLeadingWidth = freezed, - Object? enableFeedback = freezed, - Object? visualDensity = freezed, - Object? titleAlignment = freezed, - Object? shadows = freezed, - }) { - return _then(_$StacListTileThemeDataImpl( - dense: freezed == dense - ? _value.dense - : dense // ignore: cast_nullable_to_non_nullable - as bool?, - shape: freezed == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as StacBorder?, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as ListTileStyle?, - selectedColor: freezed == selectedColor - ? _value.selectedColor - : selectedColor // ignore: cast_nullable_to_non_nullable - as String?, - iconColor: freezed == iconColor - ? _value.iconColor - : iconColor // ignore: cast_nullable_to_non_nullable - as String?, - textColor: freezed == textColor - ? _value.textColor - : textColor // ignore: cast_nullable_to_non_nullable - as String?, - titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle - : titleTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - subtitleTextStyle: freezed == subtitleTextStyle - ? _value.subtitleTextStyle - : subtitleTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - leadingAndTrailingTextStyle: freezed == leadingAndTrailingTextStyle - ? _value.leadingAndTrailingTextStyle - : leadingAndTrailingTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - contentPadding: freezed == contentPadding - ? _value.contentPadding - : contentPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - tileColor: freezed == tileColor - ? _value.tileColor - : tileColor // ignore: cast_nullable_to_non_nullable - as String?, - selectedTileColor: freezed == selectedTileColor - ? _value.selectedTileColor - : selectedTileColor // ignore: cast_nullable_to_non_nullable - as String?, - horizontalTitleGap: freezed == horizontalTitleGap - ? _value.horizontalTitleGap - : horizontalTitleGap // ignore: cast_nullable_to_non_nullable - as double?, - minVerticalPadding: freezed == minVerticalPadding - ? _value.minVerticalPadding - : minVerticalPadding // ignore: cast_nullable_to_non_nullable - as double?, - minLeadingWidth: freezed == minLeadingWidth - ? _value.minLeadingWidth - : minLeadingWidth // ignore: cast_nullable_to_non_nullable - as double?, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - visualDensity: freezed == visualDensity - ? _value.visualDensity - : visualDensity // ignore: cast_nullable_to_non_nullable - as StacVisualDensity?, - titleAlignment: freezed == titleAlignment - ? _value.titleAlignment - : titleAlignment // ignore: cast_nullable_to_non_nullable - as ListTileTitleAlignment?, - shadows: freezed == shadows - ? _value._shadows - : shadows // ignore: cast_nullable_to_non_nullable - as List?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacListTileThemeDataImpl implements _StacListTileThemeData { - const _$StacListTileThemeDataImpl( +class _StacListTileThemeData implements StacListTileThemeData { + const _StacListTileThemeData( {this.dense, this.shape, this.style, @@ -473,9 +378,8 @@ class _$StacListTileThemeDataImpl implements _StacListTileThemeData { this.titleAlignment, final List? shadows}) : _shadows = shadows; - - factory _$StacListTileThemeDataImpl.fromJson(Map json) => - _$$StacListTileThemeDataImplFromJson(json); + factory _StacListTileThemeData.fromJson(Map json) => + _$StacListTileThemeDataFromJson(json); @override final bool? dense; @@ -523,16 +427,27 @@ class _$StacListTileThemeDataImpl implements _StacListTileThemeData { return EqualUnmodifiableListView(value); } + /// Create a copy of StacListTileThemeData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacListTileThemeData(dense: $dense, shape: $shape, style: $style, selectedColor: $selectedColor, iconColor: $iconColor, textColor: $textColor, titleTextStyle: $titleTextStyle, subtitleTextStyle: $subtitleTextStyle, leadingAndTrailingTextStyle: $leadingAndTrailingTextStyle, contentPadding: $contentPadding, tileColor: $tileColor, selectedTileColor: $selectedTileColor, horizontalTitleGap: $horizontalTitleGap, minVerticalPadding: $minVerticalPadding, minLeadingWidth: $minLeadingWidth, enableFeedback: $enableFeedback, visualDensity: $visualDensity, titleAlignment: $titleAlignment, shadows: $shadows)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacListTileThemeDataCopyWith<_StacListTileThemeData> get copyWith => + __$StacListTileThemeDataCopyWithImpl<_StacListTileThemeData>( + this, _$identity); + + @override + Map toJson() { + return _$StacListTileThemeDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacListTileThemeDataImpl && + other is _StacListTileThemeData && (identical(other.dense, dense) || other.dense == dense) && (identical(other.shape, shape) || other.shape == shape) && (identical(other.style, style) || other.style == style) && @@ -596,91 +511,252 @@ class _$StacListTileThemeDataImpl implements _StacListTileThemeData { const DeepCollectionEquality().hash(_shadows) ]); - /// Create a copy of StacListTileThemeData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacListTileThemeDataImplCopyWith<_$StacListTileThemeDataImpl> - get copyWith => __$$StacListTileThemeDataImplCopyWithImpl< - _$StacListTileThemeDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacListTileThemeDataImplToJson( - this, - ); + String toString() { + return 'StacListTileThemeData(dense: $dense, shape: $shape, style: $style, selectedColor: $selectedColor, iconColor: $iconColor, textColor: $textColor, titleTextStyle: $titleTextStyle, subtitleTextStyle: $subtitleTextStyle, leadingAndTrailingTextStyle: $leadingAndTrailingTextStyle, contentPadding: $contentPadding, tileColor: $tileColor, selectedTileColor: $selectedTileColor, horizontalTitleGap: $horizontalTitleGap, minVerticalPadding: $minVerticalPadding, minLeadingWidth: $minLeadingWidth, enableFeedback: $enableFeedback, visualDensity: $visualDensity, titleAlignment: $titleAlignment, shadows: $shadows)'; } } -abstract class _StacListTileThemeData implements StacListTileThemeData { - const factory _StacListTileThemeData( - {final bool? dense, - final StacBorder? shape, - final ListTileStyle? style, - final String? selectedColor, - final String? iconColor, - final String? textColor, - final StacTextStyle? titleTextStyle, - final StacTextStyle? subtitleTextStyle, - final StacTextStyle? leadingAndTrailingTextStyle, - final StacEdgeInsets? contentPadding, - final String? tileColor, - final String? selectedTileColor, - final double? horizontalTitleGap, - final double? minVerticalPadding, - final double? minLeadingWidth, - final bool? enableFeedback, - final StacVisualDensity? visualDensity, - final ListTileTitleAlignment? titleAlignment, - final List? shadows}) = _$StacListTileThemeDataImpl; - - factory _StacListTileThemeData.fromJson(Map json) = - _$StacListTileThemeDataImpl.fromJson; - - @override - bool? get dense; - @override - StacBorder? get shape; - @override - ListTileStyle? get style; - @override - String? get selectedColor; - @override - String? get iconColor; - @override - String? get textColor; +/// @nodoc +abstract mixin class _$StacListTileThemeDataCopyWith<$Res> + implements $StacListTileThemeDataCopyWith<$Res> { + factory _$StacListTileThemeDataCopyWith(_StacListTileThemeData value, + $Res Function(_StacListTileThemeData) _then) = + __$StacListTileThemeDataCopyWithImpl; @override - StacTextStyle? get titleTextStyle; + @useResult + $Res call( + {bool? dense, + StacBorder? shape, + ListTileStyle? style, + String? selectedColor, + String? iconColor, + String? textColor, + StacTextStyle? titleTextStyle, + StacTextStyle? subtitleTextStyle, + StacTextStyle? leadingAndTrailingTextStyle, + StacEdgeInsets? contentPadding, + String? tileColor, + String? selectedTileColor, + double? horizontalTitleGap, + double? minVerticalPadding, + double? minLeadingWidth, + bool? enableFeedback, + StacVisualDensity? visualDensity, + ListTileTitleAlignment? titleAlignment, + List? shadows}); + @override - StacTextStyle? get subtitleTextStyle; + $StacBorderCopyWith<$Res>? get shape; @override - StacTextStyle? get leadingAndTrailingTextStyle; + $StacTextStyleCopyWith<$Res>? get titleTextStyle; @override - StacEdgeInsets? get contentPadding; + $StacTextStyleCopyWith<$Res>? get subtitleTextStyle; @override - String? get tileColor; + $StacTextStyleCopyWith<$Res>? get leadingAndTrailingTextStyle; @override - String? get selectedTileColor; + $StacEdgeInsetsCopyWith<$Res>? get contentPadding; @override - double? get horizontalTitleGap; + $StacVisualDensityCopyWith<$Res>? get visualDensity; +} + +/// @nodoc +class __$StacListTileThemeDataCopyWithImpl<$Res> + implements _$StacListTileThemeDataCopyWith<$Res> { + __$StacListTileThemeDataCopyWithImpl(this._self, this._then); + + final _StacListTileThemeData _self; + final $Res Function(_StacListTileThemeData) _then; + + /// Create a copy of StacListTileThemeData + /// with the given fields replaced by the non-null parameter values. @override - double? get minVerticalPadding; + @pragma('vm:prefer-inline') + $Res call({ + Object? dense = freezed, + Object? shape = freezed, + Object? style = freezed, + Object? selectedColor = freezed, + Object? iconColor = freezed, + Object? textColor = freezed, + Object? titleTextStyle = freezed, + Object? subtitleTextStyle = freezed, + Object? leadingAndTrailingTextStyle = freezed, + Object? contentPadding = freezed, + Object? tileColor = freezed, + Object? selectedTileColor = freezed, + Object? horizontalTitleGap = freezed, + Object? minVerticalPadding = freezed, + Object? minLeadingWidth = freezed, + Object? enableFeedback = freezed, + Object? visualDensity = freezed, + Object? titleAlignment = freezed, + Object? shadows = freezed, + }) { + return _then(_StacListTileThemeData( + dense: freezed == dense + ? _self.dense + : dense // ignore: cast_nullable_to_non_nullable + as bool?, + shape: freezed == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as StacBorder?, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as ListTileStyle?, + selectedColor: freezed == selectedColor + ? _self.selectedColor + : selectedColor // ignore: cast_nullable_to_non_nullable + as String?, + iconColor: freezed == iconColor + ? _self.iconColor + : iconColor // ignore: cast_nullable_to_non_nullable + as String?, + textColor: freezed == textColor + ? _self.textColor + : textColor // ignore: cast_nullable_to_non_nullable + as String?, + titleTextStyle: freezed == titleTextStyle + ? _self.titleTextStyle + : titleTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + subtitleTextStyle: freezed == subtitleTextStyle + ? _self.subtitleTextStyle + : subtitleTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + leadingAndTrailingTextStyle: freezed == leadingAndTrailingTextStyle + ? _self.leadingAndTrailingTextStyle + : leadingAndTrailingTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + contentPadding: freezed == contentPadding + ? _self.contentPadding + : contentPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + tileColor: freezed == tileColor + ? _self.tileColor + : tileColor // ignore: cast_nullable_to_non_nullable + as String?, + selectedTileColor: freezed == selectedTileColor + ? _self.selectedTileColor + : selectedTileColor // ignore: cast_nullable_to_non_nullable + as String?, + horizontalTitleGap: freezed == horizontalTitleGap + ? _self.horizontalTitleGap + : horizontalTitleGap // ignore: cast_nullable_to_non_nullable + as double?, + minVerticalPadding: freezed == minVerticalPadding + ? _self.minVerticalPadding + : minVerticalPadding // ignore: cast_nullable_to_non_nullable + as double?, + minLeadingWidth: freezed == minLeadingWidth + ? _self.minLeadingWidth + : minLeadingWidth // ignore: cast_nullable_to_non_nullable + as double?, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + visualDensity: freezed == visualDensity + ? _self.visualDensity + : visualDensity // ignore: cast_nullable_to_non_nullable + as StacVisualDensity?, + titleAlignment: freezed == titleAlignment + ? _self.titleAlignment + : titleAlignment // ignore: cast_nullable_to_non_nullable + as ListTileTitleAlignment?, + shadows: freezed == shadows + ? _self._shadows + : shadows // ignore: cast_nullable_to_non_nullable + as List?, + )); + } + + /// Create a copy of StacListTileThemeData + /// with the given fields replaced by the non-null parameter values. @override - double? get minLeadingWidth; + @pragma('vm:prefer-inline') + $StacBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } + + return $StacBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); + } + + /// Create a copy of StacListTileThemeData + /// with the given fields replaced by the non-null parameter values. @override - bool? get enableFeedback; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get titleTextStyle { + if (_self.titleTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); + }); + } + + /// Create a copy of StacListTileThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacVisualDensity? get visualDensity; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get subtitleTextStyle { + if (_self.subtitleTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.subtitleTextStyle!, (value) { + return _then(_self.copyWith(subtitleTextStyle: value)); + }); + } + + /// Create a copy of StacListTileThemeData + /// with the given fields replaced by the non-null parameter values. @override - ListTileTitleAlignment? get titleAlignment; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get leadingAndTrailingTextStyle { + if (_self.leadingAndTrailingTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.leadingAndTrailingTextStyle!, + (value) { + return _then(_self.copyWith(leadingAndTrailingTextStyle: value)); + }); + } + + /// Create a copy of StacListTileThemeData + /// with the given fields replaced by the non-null parameter values. @override - List? get shadows; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get contentPadding { + if (_self.contentPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.contentPadding!, (value) { + return _then(_self.copyWith(contentPadding: value)); + }); + } /// Create a copy of StacListTileThemeData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacListTileThemeDataImplCopyWith<_$StacListTileThemeDataImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacVisualDensityCopyWith<$Res>? get visualDensity { + if (_self.visualDensity == null) { + return null; + } + + return $StacVisualDensityCopyWith<$Res>(_self.visualDensity!, (value) { + return _then(_self.copyWith(visualDensity: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.g.dart b/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.g.dart index 3eef66f6..b09a1f01 100644 --- a/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.g.dart +++ b/packages/stac/lib/src/parsers/stac_list_tile_theme_data/stac_list_tile_theme_data.g.dart @@ -6,9 +6,9 @@ part of 'stac_list_tile_theme_data.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacListTileThemeDataImpl _$$StacListTileThemeDataImplFromJson( +_StacListTileThemeData _$StacListTileThemeDataFromJson( Map json) => - _$StacListTileThemeDataImpl( + _StacListTileThemeData( dense: json['dense'] as bool?, shape: json['shape'] == null ? null @@ -46,8 +46,8 @@ _$StacListTileThemeDataImpl _$$StacListTileThemeDataImplFromJson( .toList(), ); -Map _$$StacListTileThemeDataImplToJson( - _$StacListTileThemeDataImpl instance) => +Map _$StacListTileThemeDataToJson( + _StacListTileThemeData instance) => { 'dense': instance.dense, 'shape': instance.shape, diff --git a/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.dart b/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.dart index f21de7e5..22805a72 100644 --- a/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.dart +++ b/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.dart @@ -10,7 +10,7 @@ part 'stac_list_view.freezed.dart'; part 'stac_list_view.g.dart'; @freezed -class StacListView with _$StacListView { +abstract class StacListView with _$StacListView { const factory StacListView({ @Default(Axis.vertical) Axis scrollDirection, @Default(false) bool reverse, diff --git a/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.freezed.dart b/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.freezed.dart index dbf6cbbf..b784175b 100644 --- a/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,51 +10,109 @@ part of 'stac_list_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacListView _$StacListViewFromJson(Map json) { - return _StacListView.fromJson(json); -} - /// @nodoc mixin _$StacListView { - Axis get scrollDirection => throw _privateConstructorUsedError; - bool get reverse => throw _privateConstructorUsedError; - bool? get primary => throw _privateConstructorUsedError; - StacScrollPhysics? get physics => throw _privateConstructorUsedError; - bool get shrinkWrap => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - bool get addAutomaticKeepAlives => throw _privateConstructorUsedError; - bool get addRepaintBoundaries => throw _privateConstructorUsedError; - bool get addSemanticIndexes => throw _privateConstructorUsedError; - double? get cacheExtent => throw _privateConstructorUsedError; - List> get children => throw _privateConstructorUsedError; - Map? get separator => throw _privateConstructorUsedError; - int? get semanticChildCount => throw _privateConstructorUsedError; - DragStartBehavior get dragStartBehavior => throw _privateConstructorUsedError; - ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior => - throw _privateConstructorUsedError; - String? get restorationId => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - - /// Serializes this StacListView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Axis get scrollDirection; + bool get reverse; + bool? get primary; + StacScrollPhysics? get physics; + bool get shrinkWrap; + StacEdgeInsets? get padding; + bool get addAutomaticKeepAlives; + bool get addRepaintBoundaries; + bool get addSemanticIndexes; + double? get cacheExtent; + List> get children; + Map? get separator; + int? get semanticChildCount; + DragStartBehavior get dragStartBehavior; + ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; + String? get restorationId; + Clip get clipBehavior; /// Create a copy of StacListView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacListViewCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacListViewCopyWithImpl( + this as StacListView, _$identity); + + /// Serializes this StacListView to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacListView && + (identical(other.scrollDirection, scrollDirection) || + other.scrollDirection == scrollDirection) && + (identical(other.reverse, reverse) || other.reverse == reverse) && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.physics, physics) || other.physics == physics) && + (identical(other.shrinkWrap, shrinkWrap) || + other.shrinkWrap == shrinkWrap) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.addAutomaticKeepAlives, addAutomaticKeepAlives) || + other.addAutomaticKeepAlives == addAutomaticKeepAlives) && + (identical(other.addRepaintBoundaries, addRepaintBoundaries) || + other.addRepaintBoundaries == addRepaintBoundaries) && + (identical(other.addSemanticIndexes, addSemanticIndexes) || + other.addSemanticIndexes == addSemanticIndexes) && + (identical(other.cacheExtent, cacheExtent) || + other.cacheExtent == cacheExtent) && + const DeepCollectionEquality().equals(other.children, children) && + const DeepCollectionEquality().equals(other.separator, separator) && + (identical(other.semanticChildCount, semanticChildCount) || + other.semanticChildCount == semanticChildCount) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical( + other.keyboardDismissBehavior, keyboardDismissBehavior) || + other.keyboardDismissBehavior == keyboardDismissBehavior) && + (identical(other.restorationId, restorationId) || + other.restorationId == restorationId) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + scrollDirection, + reverse, + primary, + physics, + shrinkWrap, + padding, + addAutomaticKeepAlives, + addRepaintBoundaries, + addSemanticIndexes, + cacheExtent, + const DeepCollectionEquality().hash(children), + const DeepCollectionEquality().hash(separator), + semanticChildCount, + dragStartBehavior, + keyboardDismissBehavior, + restorationId, + clipBehavior); + + @override + String toString() { + return 'StacListView(scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, padding: $padding, addAutomaticKeepAlives: $addAutomaticKeepAlives, addRepaintBoundaries: $addRepaintBoundaries, addSemanticIndexes: $addSemanticIndexes, cacheExtent: $cacheExtent, children: $children, separator: $separator, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior)'; + } } /// @nodoc -abstract class $StacListViewCopyWith<$Res> { +abstract mixin class $StacListViewCopyWith<$Res> { factory $StacListViewCopyWith( - StacListView value, $Res Function(StacListView) then) = - _$StacListViewCopyWithImpl<$Res, StacListView>; + StacListView value, $Res Function(StacListView) _then) = + _$StacListViewCopyWithImpl; @useResult $Res call( {Axis scrollDirection, @@ -78,14 +137,11 @@ abstract class $StacListViewCopyWith<$Res> { } /// @nodoc -class _$StacListViewCopyWithImpl<$Res, $Val extends StacListView> - implements $StacListViewCopyWith<$Res> { - _$StacListViewCopyWithImpl(this._value, this._then); +class _$StacListViewCopyWithImpl<$Res> implements $StacListViewCopyWith<$Res> { + _$StacListViewCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacListView _self; + final $Res Function(StacListView) _then; /// Create a copy of StacListView /// with the given fields replaced by the non-null parameter values. @@ -110,76 +166,76 @@ class _$StacListViewCopyWithImpl<$Res, $Val extends StacListView> Object? restorationId = freezed, Object? clipBehavior = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( scrollDirection: null == scrollDirection - ? _value.scrollDirection + ? _self.scrollDirection : scrollDirection // ignore: cast_nullable_to_non_nullable as Axis, reverse: null == reverse - ? _value.reverse + ? _self.reverse : reverse // ignore: cast_nullable_to_non_nullable as bool, primary: freezed == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as bool?, physics: freezed == physics - ? _value.physics + ? _self.physics : physics // ignore: cast_nullable_to_non_nullable as StacScrollPhysics?, shrinkWrap: null == shrinkWrap - ? _value.shrinkWrap + ? _self.shrinkWrap : shrinkWrap // ignore: cast_nullable_to_non_nullable as bool, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, addAutomaticKeepAlives: null == addAutomaticKeepAlives - ? _value.addAutomaticKeepAlives + ? _self.addAutomaticKeepAlives : addAutomaticKeepAlives // ignore: cast_nullable_to_non_nullable as bool, addRepaintBoundaries: null == addRepaintBoundaries - ? _value.addRepaintBoundaries + ? _self.addRepaintBoundaries : addRepaintBoundaries // ignore: cast_nullable_to_non_nullable as bool, addSemanticIndexes: null == addSemanticIndexes - ? _value.addSemanticIndexes + ? _self.addSemanticIndexes : addSemanticIndexes // ignore: cast_nullable_to_non_nullable as bool, cacheExtent: freezed == cacheExtent - ? _value.cacheExtent + ? _self.cacheExtent : cacheExtent // ignore: cast_nullable_to_non_nullable as double?, children: null == children - ? _value.children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, separator: freezed == separator - ? _value.separator + ? _self.separator : separator // ignore: cast_nullable_to_non_nullable as Map?, semanticChildCount: freezed == semanticChildCount - ? _value.semanticChildCount + ? _self.semanticChildCount : semanticChildCount // ignore: cast_nullable_to_non_nullable as int?, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, keyboardDismissBehavior: null == keyboardDismissBehavior - ? _value.keyboardDismissBehavior + ? _self.keyboardDismissBehavior : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable as ScrollViewKeyboardDismissBehavior, restorationId: freezed == restorationId - ? _value.restorationId + ? _self.restorationId : restorationId // ignore: cast_nullable_to_non_nullable as String?, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, - ) as $Val); + )); } /// Create a copy of StacListView @@ -187,155 +243,20 @@ class _$StacListViewCopyWithImpl<$Res, $Val extends StacListView> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } } -/// @nodoc -abstract class _$$StacListViewImplCopyWith<$Res> - implements $StacListViewCopyWith<$Res> { - factory _$$StacListViewImplCopyWith( - _$StacListViewImpl value, $Res Function(_$StacListViewImpl) then) = - __$$StacListViewImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Axis scrollDirection, - bool reverse, - bool? primary, - StacScrollPhysics? physics, - bool shrinkWrap, - StacEdgeInsets? padding, - bool addAutomaticKeepAlives, - bool addRepaintBoundaries, - bool addSemanticIndexes, - double? cacheExtent, - List> children, - Map? separator, - int? semanticChildCount, - DragStartBehavior dragStartBehavior, - ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, - String? restorationId, - Clip clipBehavior}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; -} - -/// @nodoc -class __$$StacListViewImplCopyWithImpl<$Res> - extends _$StacListViewCopyWithImpl<$Res, _$StacListViewImpl> - implements _$$StacListViewImplCopyWith<$Res> { - __$$StacListViewImplCopyWithImpl( - _$StacListViewImpl _value, $Res Function(_$StacListViewImpl) _then) - : super(_value, _then); - - /// Create a copy of StacListView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? scrollDirection = null, - Object? reverse = null, - Object? primary = freezed, - Object? physics = freezed, - Object? shrinkWrap = null, - Object? padding = freezed, - Object? addAutomaticKeepAlives = null, - Object? addRepaintBoundaries = null, - Object? addSemanticIndexes = null, - Object? cacheExtent = freezed, - Object? children = null, - Object? separator = freezed, - Object? semanticChildCount = freezed, - Object? dragStartBehavior = null, - Object? keyboardDismissBehavior = null, - Object? restorationId = freezed, - Object? clipBehavior = null, - }) { - return _then(_$StacListViewImpl( - scrollDirection: null == scrollDirection - ? _value.scrollDirection - : scrollDirection // ignore: cast_nullable_to_non_nullable - as Axis, - reverse: null == reverse - ? _value.reverse - : reverse // ignore: cast_nullable_to_non_nullable - as bool, - primary: freezed == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as bool?, - physics: freezed == physics - ? _value.physics - : physics // ignore: cast_nullable_to_non_nullable - as StacScrollPhysics?, - shrinkWrap: null == shrinkWrap - ? _value.shrinkWrap - : shrinkWrap // ignore: cast_nullable_to_non_nullable - as bool, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - addAutomaticKeepAlives: null == addAutomaticKeepAlives - ? _value.addAutomaticKeepAlives - : addAutomaticKeepAlives // ignore: cast_nullable_to_non_nullable - as bool, - addRepaintBoundaries: null == addRepaintBoundaries - ? _value.addRepaintBoundaries - : addRepaintBoundaries // ignore: cast_nullable_to_non_nullable - as bool, - addSemanticIndexes: null == addSemanticIndexes - ? _value.addSemanticIndexes - : addSemanticIndexes // ignore: cast_nullable_to_non_nullable - as bool, - cacheExtent: freezed == cacheExtent - ? _value.cacheExtent - : cacheExtent // ignore: cast_nullable_to_non_nullable - as double?, - children: null == children - ? _value._children - : children // ignore: cast_nullable_to_non_nullable - as List>, - separator: freezed == separator - ? _value._separator - : separator // ignore: cast_nullable_to_non_nullable - as Map?, - semanticChildCount: freezed == semanticChildCount - ? _value.semanticChildCount - : semanticChildCount // ignore: cast_nullable_to_non_nullable - as int?, - dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior - : dragStartBehavior // ignore: cast_nullable_to_non_nullable - as DragStartBehavior, - keyboardDismissBehavior: null == keyboardDismissBehavior - ? _value.keyboardDismissBehavior - : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable - as ScrollViewKeyboardDismissBehavior, - restorationId: freezed == restorationId - ? _value.restorationId - : restorationId // ignore: cast_nullable_to_non_nullable - as String?, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacListViewImpl implements _StacListView { - const _$StacListViewImpl( +class _StacListView implements StacListView { + const _StacListView( {this.scrollDirection = Axis.vertical, this.reverse = false, this.primary, @@ -355,9 +276,8 @@ class _$StacListViewImpl implements _StacListView { this.clipBehavior = Clip.hardEdge}) : _children = children, _separator = separator; - - factory _$StacListViewImpl.fromJson(Map json) => - _$$StacListViewImplFromJson(json); + factory _StacListView.fromJson(Map json) => + _$StacListViewFromJson(json); @override @JsonKey() @@ -418,16 +338,26 @@ class _$StacListViewImpl implements _StacListView { @JsonKey() final Clip clipBehavior; + /// Create a copy of StacListView + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacListView(scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, padding: $padding, addAutomaticKeepAlives: $addAutomaticKeepAlives, addRepaintBoundaries: $addRepaintBoundaries, addSemanticIndexes: $addSemanticIndexes, cacheExtent: $cacheExtent, children: $children, separator: $separator, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacListViewCopyWith<_StacListView> get copyWith => + __$StacListViewCopyWithImpl<_StacListView>(this, _$identity); + + @override + Map toJson() { + return _$StacListViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacListViewImpl && + other is _StacListView && (identical(other.scrollDirection, scrollDirection) || other.scrollDirection == scrollDirection) && (identical(other.reverse, reverse) || other.reverse == reverse) && @@ -482,84 +412,159 @@ class _$StacListViewImpl implements _StacListView { restorationId, clipBehavior); - /// Create a copy of StacListView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacListViewImplCopyWith<_$StacListViewImpl> get copyWith => - __$$StacListViewImplCopyWithImpl<_$StacListViewImpl>(this, _$identity); + String toString() { + return 'StacListView(scrollDirection: $scrollDirection, reverse: $reverse, primary: $primary, physics: $physics, shrinkWrap: $shrinkWrap, padding: $padding, addAutomaticKeepAlives: $addAutomaticKeepAlives, addRepaintBoundaries: $addRepaintBoundaries, addSemanticIndexes: $addSemanticIndexes, cacheExtent: $cacheExtent, children: $children, separator: $separator, semanticChildCount: $semanticChildCount, dragStartBehavior: $dragStartBehavior, keyboardDismissBehavior: $keyboardDismissBehavior, restorationId: $restorationId, clipBehavior: $clipBehavior)'; + } +} +/// @nodoc +abstract mixin class _$StacListViewCopyWith<$Res> + implements $StacListViewCopyWith<$Res> { + factory _$StacListViewCopyWith( + _StacListView value, $Res Function(_StacListView) _then) = + __$StacListViewCopyWithImpl; @override - Map toJson() { - return _$$StacListViewImplToJson( - this, - ); - } + @useResult + $Res call( + {Axis scrollDirection, + bool reverse, + bool? primary, + StacScrollPhysics? physics, + bool shrinkWrap, + StacEdgeInsets? padding, + bool addAutomaticKeepAlives, + bool addRepaintBoundaries, + bool addSemanticIndexes, + double? cacheExtent, + List> children, + Map? separator, + int? semanticChildCount, + DragStartBehavior dragStartBehavior, + ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, + String? restorationId, + Clip clipBehavior}); + + @override + $StacEdgeInsetsCopyWith<$Res>? get padding; } -abstract class _StacListView implements StacListView { - const factory _StacListView( - {final Axis scrollDirection, - final bool reverse, - final bool? primary, - final StacScrollPhysics? physics, - final bool shrinkWrap, - final StacEdgeInsets? padding, - final bool addAutomaticKeepAlives, - final bool addRepaintBoundaries, - final bool addSemanticIndexes, - final double? cacheExtent, - final List> children, - final Map? separator, - final int? semanticChildCount, - final DragStartBehavior dragStartBehavior, - final ScrollViewKeyboardDismissBehavior keyboardDismissBehavior, - final String? restorationId, - final Clip clipBehavior}) = _$StacListViewImpl; +/// @nodoc +class __$StacListViewCopyWithImpl<$Res> + implements _$StacListViewCopyWith<$Res> { + __$StacListViewCopyWithImpl(this._self, this._then); - factory _StacListView.fromJson(Map json) = - _$StacListViewImpl.fromJson; + final _StacListView _self; + final $Res Function(_StacListView) _then; + /// Create a copy of StacListView + /// with the given fields replaced by the non-null parameter values. @override - Axis get scrollDirection; - @override - bool get reverse; - @override - bool? get primary; - @override - StacScrollPhysics? get physics; - @override - bool get shrinkWrap; - @override - StacEdgeInsets? get padding; - @override - bool get addAutomaticKeepAlives; - @override - bool get addRepaintBoundaries; - @override - bool get addSemanticIndexes; - @override - double? get cacheExtent; - @override - List> get children; - @override - Map? get separator; - @override - int? get semanticChildCount; - @override - DragStartBehavior get dragStartBehavior; - @override - ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; - @override - String? get restorationId; - @override - Clip get clipBehavior; + @pragma('vm:prefer-inline') + $Res call({ + Object? scrollDirection = null, + Object? reverse = null, + Object? primary = freezed, + Object? physics = freezed, + Object? shrinkWrap = null, + Object? padding = freezed, + Object? addAutomaticKeepAlives = null, + Object? addRepaintBoundaries = null, + Object? addSemanticIndexes = null, + Object? cacheExtent = freezed, + Object? children = null, + Object? separator = freezed, + Object? semanticChildCount = freezed, + Object? dragStartBehavior = null, + Object? keyboardDismissBehavior = null, + Object? restorationId = freezed, + Object? clipBehavior = null, + }) { + return _then(_StacListView( + scrollDirection: null == scrollDirection + ? _self.scrollDirection + : scrollDirection // ignore: cast_nullable_to_non_nullable + as Axis, + reverse: null == reverse + ? _self.reverse + : reverse // ignore: cast_nullable_to_non_nullable + as bool, + primary: freezed == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as bool?, + physics: freezed == physics + ? _self.physics + : physics // ignore: cast_nullable_to_non_nullable + as StacScrollPhysics?, + shrinkWrap: null == shrinkWrap + ? _self.shrinkWrap + : shrinkWrap // ignore: cast_nullable_to_non_nullable + as bool, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + addAutomaticKeepAlives: null == addAutomaticKeepAlives + ? _self.addAutomaticKeepAlives + : addAutomaticKeepAlives // ignore: cast_nullable_to_non_nullable + as bool, + addRepaintBoundaries: null == addRepaintBoundaries + ? _self.addRepaintBoundaries + : addRepaintBoundaries // ignore: cast_nullable_to_non_nullable + as bool, + addSemanticIndexes: null == addSemanticIndexes + ? _self.addSemanticIndexes + : addSemanticIndexes // ignore: cast_nullable_to_non_nullable + as bool, + cacheExtent: freezed == cacheExtent + ? _self.cacheExtent + : cacheExtent // ignore: cast_nullable_to_non_nullable + as double?, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + separator: freezed == separator + ? _self._separator + : separator // ignore: cast_nullable_to_non_nullable + as Map?, + semanticChildCount: freezed == semanticChildCount + ? _self.semanticChildCount + : semanticChildCount // ignore: cast_nullable_to_non_nullable + as int?, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + keyboardDismissBehavior: null == keyboardDismissBehavior + ? _self.keyboardDismissBehavior + : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable + as ScrollViewKeyboardDismissBehavior, + restorationId: freezed == restorationId + ? _self.restorationId + : restorationId // ignore: cast_nullable_to_non_nullable + as String?, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + )); + } /// Create a copy of StacListView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacListViewImplCopyWith<_$StacListViewImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.g.dart b/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.g.dart index 08a48fad..0d32ff46 100644 --- a/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_list_view/stac_list_view.g.dart @@ -6,8 +6,8 @@ part of 'stac_list_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacListViewImpl _$$StacListViewImplFromJson(Map json) => - _$StacListViewImpl( +_StacListView _$StacListViewFromJson(Map json) => + _StacListView( scrollDirection: $enumDecodeNullable(_$AxisEnumMap, json['scrollDirection']) ?? Axis.vertical, @@ -40,7 +40,7 @@ _$StacListViewImpl _$$StacListViewImplFromJson(Map json) => Clip.hardEdge, ); -Map _$$StacListViewImplToJson(_$StacListViewImpl instance) => +Map _$StacListViewToJson(_StacListView instance) => { 'scrollDirection': _$AxisEnumMap[instance.scrollDirection]!, 'reverse': instance.reverse, diff --git a/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.dart b/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.dart index 090ebf16..59a21b44 100644 --- a/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.dart +++ b/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.dart @@ -6,7 +6,7 @@ part 'stac_material_color.freezed.dart'; part 'stac_material_color.g.dart'; @freezed -class StacMaterialColor with _$StacMaterialColor { +abstract class StacMaterialColor with _$StacMaterialColor { const factory StacMaterialColor({ required String primary, required String shade50, diff --git a/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.freezed.dart b/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.freezed.dart index 65169fee..59cce741 100644 --- a/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,142 +10,88 @@ part of 'stac_material_color.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacMaterialColor _$StacMaterialColorFromJson(Map json) { - return _StacMaterialColor.fromJson(json); -} - /// @nodoc mixin _$StacMaterialColor { - String get primary => throw _privateConstructorUsedError; - String get shade50 => throw _privateConstructorUsedError; - String get shade100 => throw _privateConstructorUsedError; - String get shade200 => throw _privateConstructorUsedError; - String get shade300 => throw _privateConstructorUsedError; - String get shade400 => throw _privateConstructorUsedError; - String get shade500 => throw _privateConstructorUsedError; - String get shade600 => throw _privateConstructorUsedError; - String get shade700 => throw _privateConstructorUsedError; - String get shade800 => throw _privateConstructorUsedError; - String get shade900 => throw _privateConstructorUsedError; - - /// Serializes this StacMaterialColor to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get primary; + String get shade50; + String get shade100; + String get shade200; + String get shade300; + String get shade400; + String get shade500; + String get shade600; + String get shade700; + String get shade800; + String get shade900; /// Create a copy of StacMaterialColor /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacMaterialColorCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacMaterialColorCopyWithImpl( + this as StacMaterialColor, _$identity); -/// @nodoc -abstract class $StacMaterialColorCopyWith<$Res> { - factory $StacMaterialColorCopyWith( - StacMaterialColor value, $Res Function(StacMaterialColor) then) = - _$StacMaterialColorCopyWithImpl<$Res, StacMaterialColor>; - @useResult - $Res call( - {String primary, - String shade50, - String shade100, - String shade200, - String shade300, - String shade400, - String shade500, - String shade600, - String shade700, - String shade800, - String shade900}); -} + /// Serializes this StacMaterialColor to a JSON map. + Map toJson(); -/// @nodoc -class _$StacMaterialColorCopyWithImpl<$Res, $Val extends StacMaterialColor> - implements $StacMaterialColorCopyWith<$Res> { - _$StacMaterialColorCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacMaterialColor && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.shade50, shade50) || other.shade50 == shade50) && + (identical(other.shade100, shade100) || + other.shade100 == shade100) && + (identical(other.shade200, shade200) || + other.shade200 == shade200) && + (identical(other.shade300, shade300) || + other.shade300 == shade300) && + (identical(other.shade400, shade400) || + other.shade400 == shade400) && + (identical(other.shade500, shade500) || + other.shade500 == shade500) && + (identical(other.shade600, shade600) || + other.shade600 == shade600) && + (identical(other.shade700, shade700) || + other.shade700 == shade700) && + (identical(other.shade800, shade800) || + other.shade800 == shade800) && + (identical(other.shade900, shade900) || + other.shade900 == shade900)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + primary, + shade50, + shade100, + shade200, + shade300, + shade400, + shade500, + shade600, + shade700, + shade800, + shade900); - /// Create a copy of StacMaterialColor - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? primary = null, - Object? shade50 = null, - Object? shade100 = null, - Object? shade200 = null, - Object? shade300 = null, - Object? shade400 = null, - Object? shade500 = null, - Object? shade600 = null, - Object? shade700 = null, - Object? shade800 = null, - Object? shade900 = null, - }) { - return _then(_value.copyWith( - primary: null == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as String, - shade50: null == shade50 - ? _value.shade50 - : shade50 // ignore: cast_nullable_to_non_nullable - as String, - shade100: null == shade100 - ? _value.shade100 - : shade100 // ignore: cast_nullable_to_non_nullable - as String, - shade200: null == shade200 - ? _value.shade200 - : shade200 // ignore: cast_nullable_to_non_nullable - as String, - shade300: null == shade300 - ? _value.shade300 - : shade300 // ignore: cast_nullable_to_non_nullable - as String, - shade400: null == shade400 - ? _value.shade400 - : shade400 // ignore: cast_nullable_to_non_nullable - as String, - shade500: null == shade500 - ? _value.shade500 - : shade500 // ignore: cast_nullable_to_non_nullable - as String, - shade600: null == shade600 - ? _value.shade600 - : shade600 // ignore: cast_nullable_to_non_nullable - as String, - shade700: null == shade700 - ? _value.shade700 - : shade700 // ignore: cast_nullable_to_non_nullable - as String, - shade800: null == shade800 - ? _value.shade800 - : shade800 // ignore: cast_nullable_to_non_nullable - as String, - shade900: null == shade900 - ? _value.shade900 - : shade900 // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + String toString() { + return 'StacMaterialColor(primary: $primary, shade50: $shade50, shade100: $shade100, shade200: $shade200, shade300: $shade300, shade400: $shade400, shade500: $shade500, shade600: $shade600, shade700: $shade700, shade800: $shade800, shade900: $shade900)'; } } /// @nodoc -abstract class _$$StacMaterialColorImplCopyWith<$Res> - implements $StacMaterialColorCopyWith<$Res> { - factory _$$StacMaterialColorImplCopyWith(_$StacMaterialColorImpl value, - $Res Function(_$StacMaterialColorImpl) then) = - __$$StacMaterialColorImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacMaterialColorCopyWith<$Res> { + factory $StacMaterialColorCopyWith( + StacMaterialColor value, $Res Function(StacMaterialColor) _then) = + _$StacMaterialColorCopyWithImpl; @useResult $Res call( {String primary, @@ -161,12 +108,12 @@ abstract class _$$StacMaterialColorImplCopyWith<$Res> } /// @nodoc -class __$$StacMaterialColorImplCopyWithImpl<$Res> - extends _$StacMaterialColorCopyWithImpl<$Res, _$StacMaterialColorImpl> - implements _$$StacMaterialColorImplCopyWith<$Res> { - __$$StacMaterialColorImplCopyWithImpl(_$StacMaterialColorImpl _value, - $Res Function(_$StacMaterialColorImpl) _then) - : super(_value, _then); +class _$StacMaterialColorCopyWithImpl<$Res> + implements $StacMaterialColorCopyWith<$Res> { + _$StacMaterialColorCopyWithImpl(this._self, this._then); + + final StacMaterialColor _self; + final $Res Function(StacMaterialColor) _then; /// Create a copy of StacMaterialColor /// with the given fields replaced by the non-null parameter values. @@ -185,49 +132,49 @@ class __$$StacMaterialColorImplCopyWithImpl<$Res> Object? shade800 = null, Object? shade900 = null, }) { - return _then(_$StacMaterialColorImpl( + return _then(_self.copyWith( primary: null == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as String, shade50: null == shade50 - ? _value.shade50 + ? _self.shade50 : shade50 // ignore: cast_nullable_to_non_nullable as String, shade100: null == shade100 - ? _value.shade100 + ? _self.shade100 : shade100 // ignore: cast_nullable_to_non_nullable as String, shade200: null == shade200 - ? _value.shade200 + ? _self.shade200 : shade200 // ignore: cast_nullable_to_non_nullable as String, shade300: null == shade300 - ? _value.shade300 + ? _self.shade300 : shade300 // ignore: cast_nullable_to_non_nullable as String, shade400: null == shade400 - ? _value.shade400 + ? _self.shade400 : shade400 // ignore: cast_nullable_to_non_nullable as String, shade500: null == shade500 - ? _value.shade500 + ? _self.shade500 : shade500 // ignore: cast_nullable_to_non_nullable as String, shade600: null == shade600 - ? _value.shade600 + ? _self.shade600 : shade600 // ignore: cast_nullable_to_non_nullable as String, shade700: null == shade700 - ? _value.shade700 + ? _self.shade700 : shade700 // ignore: cast_nullable_to_non_nullable as String, shade800: null == shade800 - ? _value.shade800 + ? _self.shade800 : shade800 // ignore: cast_nullable_to_non_nullable as String, shade900: null == shade900 - ? _value.shade900 + ? _self.shade900 : shade900 // ignore: cast_nullable_to_non_nullable as String, )); @@ -236,8 +183,8 @@ class __$$StacMaterialColorImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacMaterialColorImpl implements _StacMaterialColor { - const _$StacMaterialColorImpl( +class _StacMaterialColor implements StacMaterialColor { + const _StacMaterialColor( {required this.primary, required this.shade50, required this.shade100, @@ -249,9 +196,8 @@ class _$StacMaterialColorImpl implements _StacMaterialColor { required this.shade700, required this.shade800, required this.shade900}); - - factory _$StacMaterialColorImpl.fromJson(Map json) => - _$$StacMaterialColorImplFromJson(json); + factory _StacMaterialColor.fromJson(Map json) => + _$StacMaterialColorFromJson(json); @override final String primary; @@ -276,16 +222,26 @@ class _$StacMaterialColorImpl implements _StacMaterialColor { @override final String shade900; + /// Create a copy of StacMaterialColor + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacMaterialColor(primary: $primary, shade50: $shade50, shade100: $shade100, shade200: $shade200, shade300: $shade300, shade400: $shade400, shade500: $shade500, shade600: $shade600, shade700: $shade700, shade800: $shade800, shade900: $shade900)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacMaterialColorCopyWith<_StacMaterialColor> get copyWith => + __$StacMaterialColorCopyWithImpl<_StacMaterialColor>(this, _$identity); + + @override + Map toJson() { + return _$StacMaterialColorToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacMaterialColorImpl && + other is _StacMaterialColor && (identical(other.primary, primary) || other.primary == primary) && (identical(other.shade50, shade50) || other.shade50 == shade50) && (identical(other.shade100, shade100) || @@ -324,67 +280,106 @@ class _$StacMaterialColorImpl implements _StacMaterialColor { shade800, shade900); - /// Create a copy of StacMaterialColor - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacMaterialColorImplCopyWith<_$StacMaterialColorImpl> get copyWith => - __$$StacMaterialColorImplCopyWithImpl<_$StacMaterialColorImpl>( - this, _$identity); + String toString() { + return 'StacMaterialColor(primary: $primary, shade50: $shade50, shade100: $shade100, shade200: $shade200, shade300: $shade300, shade400: $shade400, shade500: $shade500, shade600: $shade600, shade700: $shade700, shade800: $shade800, shade900: $shade900)'; + } +} +/// @nodoc +abstract mixin class _$StacMaterialColorCopyWith<$Res> + implements $StacMaterialColorCopyWith<$Res> { + factory _$StacMaterialColorCopyWith( + _StacMaterialColor value, $Res Function(_StacMaterialColor) _then) = + __$StacMaterialColorCopyWithImpl; @override - Map toJson() { - return _$$StacMaterialColorImplToJson( - this, - ); - } + @useResult + $Res call( + {String primary, + String shade50, + String shade100, + String shade200, + String shade300, + String shade400, + String shade500, + String shade600, + String shade700, + String shade800, + String shade900}); } -abstract class _StacMaterialColor implements StacMaterialColor { - const factory _StacMaterialColor( - {required final String primary, - required final String shade50, - required final String shade100, - required final String shade200, - required final String shade300, - required final String shade400, - required final String shade500, - required final String shade600, - required final String shade700, - required final String shade800, - required final String shade900}) = _$StacMaterialColorImpl; +/// @nodoc +class __$StacMaterialColorCopyWithImpl<$Res> + implements _$StacMaterialColorCopyWith<$Res> { + __$StacMaterialColorCopyWithImpl(this._self, this._then); - factory _StacMaterialColor.fromJson(Map json) = - _$StacMaterialColorImpl.fromJson; - - @override - String get primary; - @override - String get shade50; - @override - String get shade100; - @override - String get shade200; - @override - String get shade300; - @override - String get shade400; - @override - String get shade500; - @override - String get shade600; - @override - String get shade700; - @override - String get shade800; - @override - String get shade900; + final _StacMaterialColor _self; + final $Res Function(_StacMaterialColor) _then; /// Create a copy of StacMaterialColor /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacMaterialColorImplCopyWith<_$StacMaterialColorImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? primary = null, + Object? shade50 = null, + Object? shade100 = null, + Object? shade200 = null, + Object? shade300 = null, + Object? shade400 = null, + Object? shade500 = null, + Object? shade600 = null, + Object? shade700 = null, + Object? shade800 = null, + Object? shade900 = null, + }) { + return _then(_StacMaterialColor( + primary: null == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as String, + shade50: null == shade50 + ? _self.shade50 + : shade50 // ignore: cast_nullable_to_non_nullable + as String, + shade100: null == shade100 + ? _self.shade100 + : shade100 // ignore: cast_nullable_to_non_nullable + as String, + shade200: null == shade200 + ? _self.shade200 + : shade200 // ignore: cast_nullable_to_non_nullable + as String, + shade300: null == shade300 + ? _self.shade300 + : shade300 // ignore: cast_nullable_to_non_nullable + as String, + shade400: null == shade400 + ? _self.shade400 + : shade400 // ignore: cast_nullable_to_non_nullable + as String, + shade500: null == shade500 + ? _self.shade500 + : shade500 // ignore: cast_nullable_to_non_nullable + as String, + shade600: null == shade600 + ? _self.shade600 + : shade600 // ignore: cast_nullable_to_non_nullable + as String, + shade700: null == shade700 + ? _self.shade700 + : shade700 // ignore: cast_nullable_to_non_nullable + as String, + shade800: null == shade800 + ? _self.shade800 + : shade800 // ignore: cast_nullable_to_non_nullable + as String, + shade900: null == shade900 + ? _self.shade900 + : shade900 // ignore: cast_nullable_to_non_nullable + as String, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.g.dart b/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.g.dart index 621f69af..403ae977 100644 --- a/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.g.dart +++ b/packages/stac/lib/src/parsers/stac_material_color/stac_material_color.g.dart @@ -6,9 +6,8 @@ part of 'stac_material_color.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacMaterialColorImpl _$$StacMaterialColorImplFromJson( - Map json) => - _$StacMaterialColorImpl( +_StacMaterialColor _$StacMaterialColorFromJson(Map json) => + _StacMaterialColor( primary: json['primary'] as String, shade50: json['shade50'] as String, shade100: json['shade100'] as String, @@ -22,8 +21,7 @@ _$StacMaterialColorImpl _$$StacMaterialColorImplFromJson( shade900: json['shade900'] as String, ); -Map _$$StacMaterialColorImplToJson( - _$StacMaterialColorImpl instance) => +Map _$StacMaterialColorToJson(_StacMaterialColor instance) => { 'primary': instance.primary, 'shade50': instance.shade50, diff --git a/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.dart b/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.dart index 180bba95..da92badc 100644 --- a/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.dart +++ b/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.dart @@ -7,7 +7,7 @@ part 'stac_bottom_navigation_bar_item.freezed.dart'; part 'stac_bottom_navigation_bar_item.g.dart'; @freezed -class StacBottomNavigationBarItem with _$StacBottomNavigationBarItem { +abstract class StacBottomNavigationBarItem with _$StacBottomNavigationBarItem { const factory StacBottomNavigationBarItem({ required Map icon, required String label, diff --git a/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.freezed.dart b/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.freezed.dart index aa0abfd9..b02f7fb9 100644 --- a/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,105 +10,65 @@ part of 'stac_bottom_navigation_bar_item.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBottomNavigationBarItem _$StacBottomNavigationBarItemFromJson( - Map json) { - return _StacBottomNavigationBarItem.fromJson(json); -} - /// @nodoc mixin _$StacBottomNavigationBarItem { - Map get icon => throw _privateConstructorUsedError; - String get label => throw _privateConstructorUsedError; - Map? get activeIcon => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get tooltip => throw _privateConstructorUsedError; - - /// Serializes this StacBottomNavigationBarItem to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map get icon; + String get label; + Map? get activeIcon; + String? get backgroundColor; + String? get tooltip; /// Create a copy of StacBottomNavigationBarItem /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBottomNavigationBarItemCopyWith - get copyWith => throw _privateConstructorUsedError; -} + get copyWith => _$StacBottomNavigationBarItemCopyWithImpl< + StacBottomNavigationBarItem>( + this as StacBottomNavigationBarItem, _$identity); -/// @nodoc -abstract class $StacBottomNavigationBarItemCopyWith<$Res> { - factory $StacBottomNavigationBarItemCopyWith( - StacBottomNavigationBarItem value, - $Res Function(StacBottomNavigationBarItem) then) = - _$StacBottomNavigationBarItemCopyWithImpl<$Res, - StacBottomNavigationBarItem>; - @useResult - $Res call( - {Map icon, - String label, - Map? activeIcon, - String? backgroundColor, - String? tooltip}); -} + /// Serializes this StacBottomNavigationBarItem to a JSON map. + Map toJson(); -/// @nodoc -class _$StacBottomNavigationBarItemCopyWithImpl<$Res, - $Val extends StacBottomNavigationBarItem> - implements $StacBottomNavigationBarItemCopyWith<$Res> { - _$StacBottomNavigationBarItemCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBottomNavigationBarItem && + const DeepCollectionEquality().equals(other.icon, icon) && + (identical(other.label, label) || other.label == label) && + const DeepCollectionEquality() + .equals(other.activeIcon, activeIcon) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.tooltip, tooltip) || other.tooltip == tooltip)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(icon), + label, + const DeepCollectionEquality().hash(activeIcon), + backgroundColor, + tooltip); - /// Create a copy of StacBottomNavigationBarItem - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? icon = null, - Object? label = null, - Object? activeIcon = freezed, - Object? backgroundColor = freezed, - Object? tooltip = freezed, - }) { - return _then(_value.copyWith( - icon: null == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as Map, - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String, - activeIcon: freezed == activeIcon - ? _value.activeIcon - : activeIcon // ignore: cast_nullable_to_non_nullable - as Map?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - tooltip: freezed == tooltip - ? _value.tooltip - : tooltip // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + String toString() { + return 'StacBottomNavigationBarItem(icon: $icon, label: $label, activeIcon: $activeIcon, backgroundColor: $backgroundColor, tooltip: $tooltip)'; } } /// @nodoc -abstract class _$$StacBottomNavigationBarItemImplCopyWith<$Res> - implements $StacBottomNavigationBarItemCopyWith<$Res> { - factory _$$StacBottomNavigationBarItemImplCopyWith( - _$StacBottomNavigationBarItemImpl value, - $Res Function(_$StacBottomNavigationBarItemImpl) then) = - __$$StacBottomNavigationBarItemImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacBottomNavigationBarItemCopyWith<$Res> { + factory $StacBottomNavigationBarItemCopyWith( + StacBottomNavigationBarItem value, + $Res Function(StacBottomNavigationBarItem) _then) = + _$StacBottomNavigationBarItemCopyWithImpl; @useResult $Res call( {Map icon, @@ -118,14 +79,12 @@ abstract class _$$StacBottomNavigationBarItemImplCopyWith<$Res> } /// @nodoc -class __$$StacBottomNavigationBarItemImplCopyWithImpl<$Res> - extends _$StacBottomNavigationBarItemCopyWithImpl<$Res, - _$StacBottomNavigationBarItemImpl> - implements _$$StacBottomNavigationBarItemImplCopyWith<$Res> { - __$$StacBottomNavigationBarItemImplCopyWithImpl( - _$StacBottomNavigationBarItemImpl _value, - $Res Function(_$StacBottomNavigationBarItemImpl) _then) - : super(_value, _then); +class _$StacBottomNavigationBarItemCopyWithImpl<$Res> + implements $StacBottomNavigationBarItemCopyWith<$Res> { + _$StacBottomNavigationBarItemCopyWithImpl(this._self, this._then); + + final StacBottomNavigationBarItem _self; + final $Res Function(StacBottomNavigationBarItem) _then; /// Create a copy of StacBottomNavigationBarItem /// with the given fields replaced by the non-null parameter values. @@ -138,25 +97,25 @@ class __$$StacBottomNavigationBarItemImplCopyWithImpl<$Res> Object? backgroundColor = freezed, Object? tooltip = freezed, }) { - return _then(_$StacBottomNavigationBarItemImpl( + return _then(_self.copyWith( icon: null == icon - ? _value._icon + ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as Map, label: null == label - ? _value.label + ? _self.label : label // ignore: cast_nullable_to_non_nullable as String, activeIcon: freezed == activeIcon - ? _value._activeIcon + ? _self.activeIcon : activeIcon // ignore: cast_nullable_to_non_nullable as Map?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, tooltip: freezed == tooltip - ? _value.tooltip + ? _self.tooltip : tooltip // ignore: cast_nullable_to_non_nullable as String?, )); @@ -165,9 +124,8 @@ class __$$StacBottomNavigationBarItemImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacBottomNavigationBarItemImpl - implements _StacBottomNavigationBarItem { - const _$StacBottomNavigationBarItemImpl( +class _StacBottomNavigationBarItem implements StacBottomNavigationBarItem { + const _StacBottomNavigationBarItem( {required final Map icon, required this.label, final Map? activeIcon, @@ -175,10 +133,8 @@ class _$StacBottomNavigationBarItemImpl this.tooltip}) : _icon = icon, _activeIcon = activeIcon; - - factory _$StacBottomNavigationBarItemImpl.fromJson( - Map json) => - _$$StacBottomNavigationBarItemImplFromJson(json); + factory _StacBottomNavigationBarItem.fromJson(Map json) => + _$StacBottomNavigationBarItemFromJson(json); final Map _icon; @override @@ -205,16 +161,27 @@ class _$StacBottomNavigationBarItemImpl @override final String? tooltip; + /// Create a copy of StacBottomNavigationBarItem + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBottomNavigationBarItem(icon: $icon, label: $label, activeIcon: $activeIcon, backgroundColor: $backgroundColor, tooltip: $tooltip)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBottomNavigationBarItemCopyWith<_StacBottomNavigationBarItem> + get copyWith => __$StacBottomNavigationBarItemCopyWithImpl< + _StacBottomNavigationBarItem>(this, _$identity); + + @override + Map toJson() { + return _$StacBottomNavigationBarItemToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBottomNavigationBarItemImpl && + other is _StacBottomNavigationBarItem && const DeepCollectionEquality().equals(other._icon, _icon) && (identical(other.label, label) || other.label == label) && const DeepCollectionEquality() @@ -234,50 +201,71 @@ class _$StacBottomNavigationBarItemImpl backgroundColor, tooltip); - /// Create a copy of StacBottomNavigationBarItem - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacBottomNavigationBarItemImplCopyWith<_$StacBottomNavigationBarItemImpl> - get copyWith => __$$StacBottomNavigationBarItemImplCopyWithImpl< - _$StacBottomNavigationBarItemImpl>(this, _$identity); + String toString() { + return 'StacBottomNavigationBarItem(icon: $icon, label: $label, activeIcon: $activeIcon, backgroundColor: $backgroundColor, tooltip: $tooltip)'; + } +} +/// @nodoc +abstract mixin class _$StacBottomNavigationBarItemCopyWith<$Res> + implements $StacBottomNavigationBarItemCopyWith<$Res> { + factory _$StacBottomNavigationBarItemCopyWith( + _StacBottomNavigationBarItem value, + $Res Function(_StacBottomNavigationBarItem) _then) = + __$StacBottomNavigationBarItemCopyWithImpl; @override - Map toJson() { - return _$$StacBottomNavigationBarItemImplToJson( - this, - ); - } + @useResult + $Res call( + {Map icon, + String label, + Map? activeIcon, + String? backgroundColor, + String? tooltip}); } -abstract class _StacBottomNavigationBarItem - implements StacBottomNavigationBarItem { - const factory _StacBottomNavigationBarItem( - {required final Map icon, - required final String label, - final Map? activeIcon, - final String? backgroundColor, - final String? tooltip}) = _$StacBottomNavigationBarItemImpl; +/// @nodoc +class __$StacBottomNavigationBarItemCopyWithImpl<$Res> + implements _$StacBottomNavigationBarItemCopyWith<$Res> { + __$StacBottomNavigationBarItemCopyWithImpl(this._self, this._then); - factory _StacBottomNavigationBarItem.fromJson(Map json) = - _$StacBottomNavigationBarItemImpl.fromJson; - - @override - Map get icon; - @override - String get label; - @override - Map? get activeIcon; - @override - String? get backgroundColor; - @override - String? get tooltip; + final _StacBottomNavigationBarItem _self; + final $Res Function(_StacBottomNavigationBarItem) _then; /// Create a copy of StacBottomNavigationBarItem /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBottomNavigationBarItemImplCopyWith<_$StacBottomNavigationBarItemImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? icon = null, + Object? label = null, + Object? activeIcon = freezed, + Object? backgroundColor = freezed, + Object? tooltip = freezed, + }) { + return _then(_StacBottomNavigationBarItem( + icon: null == icon + ? _self._icon + : icon // ignore: cast_nullable_to_non_nullable + as Map, + label: null == label + ? _self.label + : label // ignore: cast_nullable_to_non_nullable + as String, + activeIcon: freezed == activeIcon + ? _self._activeIcon + : activeIcon // ignore: cast_nullable_to_non_nullable + as Map?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + tooltip: freezed == tooltip + ? _self.tooltip + : tooltip // ignore: cast_nullable_to_non_nullable + as String?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.g.dart b/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.g.dart index b344ecf3..58268d49 100644 --- a/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.g.dart +++ b/packages/stac/lib/src/parsers/stac_navigation_bar_item/stac_bottom_navigation_bar_item.g.dart @@ -6,9 +6,9 @@ part of 'stac_bottom_navigation_bar_item.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBottomNavigationBarItemImpl _$$StacBottomNavigationBarItemImplFromJson( +_StacBottomNavigationBarItem _$StacBottomNavigationBarItemFromJson( Map json) => - _$StacBottomNavigationBarItemImpl( + _StacBottomNavigationBarItem( icon: json['icon'] as Map, label: json['label'] as String, activeIcon: json['activeIcon'] as Map?, @@ -16,8 +16,8 @@ _$StacBottomNavigationBarItemImpl _$$StacBottomNavigationBarItemImplFromJson( tooltip: json['tooltip'] as String?, ); -Map _$$StacBottomNavigationBarItemImplToJson( - _$StacBottomNavigationBarItemImpl instance) => +Map _$StacBottomNavigationBarItemToJson( + _StacBottomNavigationBarItem instance) => { 'icon': instance.icon, 'label': instance.label, diff --git a/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.dart b/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.dart index f6de8fd4..a176f075 100644 --- a/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.dart +++ b/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.dart @@ -9,7 +9,7 @@ part 'stac_navigation_bar_theme_data.freezed.dart'; part 'stac_navigation_bar_theme_data.g.dart'; @freezed -class StacNavigationBarThemeData with _$StacNavigationBarThemeData { +abstract class StacNavigationBarThemeData with _$StacNavigationBarThemeData { const factory StacNavigationBarThemeData({ double? height, String? backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.freezed.dart b/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.freezed.dart index e6b85005..7cc2a95d 100644 --- a/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,46 +10,86 @@ part of 'stac_navigation_bar_theme_data.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacNavigationBarThemeData _$StacNavigationBarThemeDataFromJson( - Map json) { - return _StacNavigationBarThemeData.fromJson(json); -} - /// @nodoc mixin _$StacNavigationBarThemeData { - double? get height => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - String? get indicatorColor => throw _privateConstructorUsedError; - StacBorder? get indicatorShape => throw _privateConstructorUsedError; - StacTextStyle? get labelTextStyle => throw _privateConstructorUsedError; - StacIconThemeData? get iconTheme => throw _privateConstructorUsedError; - NavigationDestinationLabelBehavior? get labelBehavior => - throw _privateConstructorUsedError; - - /// Serializes this StacNavigationBarThemeData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get height; + String? get backgroundColor; + double? get elevation; + String? get shadowColor; + String? get surfaceTintColor; + String? get indicatorColor; + StacBorder? get indicatorShape; + StacTextStyle? get labelTextStyle; + StacIconThemeData? get iconTheme; + NavigationDestinationLabelBehavior? get labelBehavior; /// Create a copy of StacNavigationBarThemeData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacNavigationBarThemeDataCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => + _$StacNavigationBarThemeDataCopyWithImpl( + this as StacNavigationBarThemeData, _$identity); + + /// Serializes this StacNavigationBarThemeData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacNavigationBarThemeData && + (identical(other.height, height) || other.height == height) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.indicatorColor, indicatorColor) || + other.indicatorColor == indicatorColor) && + (identical(other.indicatorShape, indicatorShape) || + other.indicatorShape == indicatorShape) && + (identical(other.labelTextStyle, labelTextStyle) || + other.labelTextStyle == labelTextStyle) && + (identical(other.iconTheme, iconTheme) || + other.iconTheme == iconTheme) && + (identical(other.labelBehavior, labelBehavior) || + other.labelBehavior == labelBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + height, + backgroundColor, + elevation, + shadowColor, + surfaceTintColor, + indicatorColor, + indicatorShape, + labelTextStyle, + iconTheme, + labelBehavior); + + @override + String toString() { + return 'StacNavigationBarThemeData(height: $height, backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, indicatorColor: $indicatorColor, indicatorShape: $indicatorShape, labelTextStyle: $labelTextStyle, iconTheme: $iconTheme, labelBehavior: $labelBehavior)'; + } } /// @nodoc -abstract class $StacNavigationBarThemeDataCopyWith<$Res> { +abstract mixin class $StacNavigationBarThemeDataCopyWith<$Res> { factory $StacNavigationBarThemeDataCopyWith(StacNavigationBarThemeData value, - $Res Function(StacNavigationBarThemeData) then) = - _$StacNavigationBarThemeDataCopyWithImpl<$Res, - StacNavigationBarThemeData>; + $Res Function(StacNavigationBarThemeData) _then) = + _$StacNavigationBarThemeDataCopyWithImpl; @useResult $Res call( {double? height, @@ -68,15 +109,12 @@ abstract class $StacNavigationBarThemeDataCopyWith<$Res> { } /// @nodoc -class _$StacNavigationBarThemeDataCopyWithImpl<$Res, - $Val extends StacNavigationBarThemeData> +class _$StacNavigationBarThemeDataCopyWithImpl<$Res> implements $StacNavigationBarThemeDataCopyWith<$Res> { - _$StacNavigationBarThemeDataCopyWithImpl(this._value, this._then); + _$StacNavigationBarThemeDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacNavigationBarThemeData _self; + final $Res Function(StacNavigationBarThemeData) _then; /// Create a copy of StacNavigationBarThemeData /// with the given fields replaced by the non-null parameter values. @@ -94,48 +132,48 @@ class _$StacNavigationBarThemeDataCopyWithImpl<$Res, Object? iconTheme = freezed, Object? labelBehavior = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, indicatorColor: freezed == indicatorColor - ? _value.indicatorColor + ? _self.indicatorColor : indicatorColor // ignore: cast_nullable_to_non_nullable as String?, indicatorShape: freezed == indicatorShape - ? _value.indicatorShape + ? _self.indicatorShape : indicatorShape // ignore: cast_nullable_to_non_nullable as StacBorder?, labelTextStyle: freezed == labelTextStyle - ? _value.labelTextStyle + ? _self.labelTextStyle : labelTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, iconTheme: freezed == iconTheme - ? _value.iconTheme + ? _self.iconTheme : iconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, labelBehavior: freezed == labelBehavior - ? _value.labelBehavior + ? _self.labelBehavior : labelBehavior // ignore: cast_nullable_to_non_nullable as NavigationDestinationLabelBehavior?, - ) as $Val); + )); } /// Create a copy of StacNavigationBarThemeData @@ -143,12 +181,12 @@ class _$StacNavigationBarThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderCopyWith<$Res>? get indicatorShape { - if (_value.indicatorShape == null) { + if (_self.indicatorShape == null) { return null; } - return $StacBorderCopyWith<$Res>(_value.indicatorShape!, (value) { - return _then(_value.copyWith(indicatorShape: value) as $Val); + return $StacBorderCopyWith<$Res>(_self.indicatorShape!, (value) { + return _then(_self.copyWith(indicatorShape: value)); }); } @@ -157,12 +195,12 @@ class _$StacNavigationBarThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get labelTextStyle { - if (_value.labelTextStyle == null) { + if (_self.labelTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.labelTextStyle!, (value) { - return _then(_value.copyWith(labelTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.labelTextStyle!, (value) { + return _then(_self.copyWith(labelTextStyle: value)); }); } @@ -171,120 +209,20 @@ class _$StacNavigationBarThemeDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get iconTheme { - if (_value.iconTheme == null) { + if (_self.iconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.iconTheme!, (value) { - return _then(_value.copyWith(iconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); }); } } -/// @nodoc -abstract class _$$StacNavigationBarThemeDataImplCopyWith<$Res> - implements $StacNavigationBarThemeDataCopyWith<$Res> { - factory _$$StacNavigationBarThemeDataImplCopyWith( - _$StacNavigationBarThemeDataImpl value, - $Res Function(_$StacNavigationBarThemeDataImpl) then) = - __$$StacNavigationBarThemeDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {double? height, - String? backgroundColor, - double? elevation, - String? shadowColor, - String? surfaceTintColor, - String? indicatorColor, - StacBorder? indicatorShape, - StacTextStyle? labelTextStyle, - StacIconThemeData? iconTheme, - NavigationDestinationLabelBehavior? labelBehavior}); - - @override - $StacBorderCopyWith<$Res>? get indicatorShape; - @override - $StacTextStyleCopyWith<$Res>? get labelTextStyle; - @override - $StacIconThemeDataCopyWith<$Res>? get iconTheme; -} - -/// @nodoc -class __$$StacNavigationBarThemeDataImplCopyWithImpl<$Res> - extends _$StacNavigationBarThemeDataCopyWithImpl<$Res, - _$StacNavigationBarThemeDataImpl> - implements _$$StacNavigationBarThemeDataImplCopyWith<$Res> { - __$$StacNavigationBarThemeDataImplCopyWithImpl( - _$StacNavigationBarThemeDataImpl _value, - $Res Function(_$StacNavigationBarThemeDataImpl) _then) - : super(_value, _then); - - /// Create a copy of StacNavigationBarThemeData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? height = freezed, - Object? backgroundColor = freezed, - Object? elevation = freezed, - Object? shadowColor = freezed, - Object? surfaceTintColor = freezed, - Object? indicatorColor = freezed, - Object? indicatorShape = freezed, - Object? labelTextStyle = freezed, - Object? iconTheme = freezed, - Object? labelBehavior = freezed, - }) { - return _then(_$StacNavigationBarThemeDataImpl( - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - indicatorColor: freezed == indicatorColor - ? _value.indicatorColor - : indicatorColor // ignore: cast_nullable_to_non_nullable - as String?, - indicatorShape: freezed == indicatorShape - ? _value.indicatorShape - : indicatorShape // ignore: cast_nullable_to_non_nullable - as StacBorder?, - labelTextStyle: freezed == labelTextStyle - ? _value.labelTextStyle - : labelTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - iconTheme: freezed == iconTheme - ? _value.iconTheme - : iconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - labelBehavior: freezed == labelBehavior - ? _value.labelBehavior - : labelBehavior // ignore: cast_nullable_to_non_nullable - as NavigationDestinationLabelBehavior?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacNavigationBarThemeDataImpl implements _StacNavigationBarThemeData { - const _$StacNavigationBarThemeDataImpl( +class _StacNavigationBarThemeData implements StacNavigationBarThemeData { + const _StacNavigationBarThemeData( {this.height, this.backgroundColor, this.elevation, @@ -295,10 +233,8 @@ class _$StacNavigationBarThemeDataImpl implements _StacNavigationBarThemeData { this.labelTextStyle, this.iconTheme, this.labelBehavior}); - - factory _$StacNavigationBarThemeDataImpl.fromJson( - Map json) => - _$$StacNavigationBarThemeDataImplFromJson(json); + factory _StacNavigationBarThemeData.fromJson(Map json) => + _$StacNavigationBarThemeDataFromJson(json); @override final double? height; @@ -321,16 +257,27 @@ class _$StacNavigationBarThemeDataImpl implements _StacNavigationBarThemeData { @override final NavigationDestinationLabelBehavior? labelBehavior; + /// Create a copy of StacNavigationBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacNavigationBarThemeData(height: $height, backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, indicatorColor: $indicatorColor, indicatorShape: $indicatorShape, labelTextStyle: $labelTextStyle, iconTheme: $iconTheme, labelBehavior: $labelBehavior)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacNavigationBarThemeDataCopyWith<_StacNavigationBarThemeData> + get copyWith => __$StacNavigationBarThemeDataCopyWithImpl< + _StacNavigationBarThemeData>(this, _$identity); + + @override + Map toJson() { + return _$StacNavigationBarThemeDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacNavigationBarThemeDataImpl && + other is _StacNavigationBarThemeData && (identical(other.height, height) || other.height == height) && (identical(other.backgroundColor, backgroundColor) || other.backgroundColor == backgroundColor) && @@ -367,66 +314,150 @@ class _$StacNavigationBarThemeDataImpl implements _StacNavigationBarThemeData { iconTheme, labelBehavior); - /// Create a copy of StacNavigationBarThemeData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacNavigationBarThemeDataImplCopyWith<_$StacNavigationBarThemeDataImpl> - get copyWith => __$$StacNavigationBarThemeDataImplCopyWithImpl< - _$StacNavigationBarThemeDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacNavigationBarThemeDataImplToJson( - this, - ); + String toString() { + return 'StacNavigationBarThemeData(height: $height, backgroundColor: $backgroundColor, elevation: $elevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, indicatorColor: $indicatorColor, indicatorShape: $indicatorShape, labelTextStyle: $labelTextStyle, iconTheme: $iconTheme, labelBehavior: $labelBehavior)'; } } -abstract class _StacNavigationBarThemeData - implements StacNavigationBarThemeData { - const factory _StacNavigationBarThemeData( - {final double? height, - final String? backgroundColor, - final double? elevation, - final String? shadowColor, - final String? surfaceTintColor, - final String? indicatorColor, - final StacBorder? indicatorShape, - final StacTextStyle? labelTextStyle, - final StacIconThemeData? iconTheme, - final NavigationDestinationLabelBehavior? labelBehavior}) = - _$StacNavigationBarThemeDataImpl; - - factory _StacNavigationBarThemeData.fromJson(Map json) = - _$StacNavigationBarThemeDataImpl.fromJson; - - @override - double? get height; - @override - String? get backgroundColor; - @override - double? get elevation; +/// @nodoc +abstract mixin class _$StacNavigationBarThemeDataCopyWith<$Res> + implements $StacNavigationBarThemeDataCopyWith<$Res> { + factory _$StacNavigationBarThemeDataCopyWith( + _StacNavigationBarThemeData value, + $Res Function(_StacNavigationBarThemeData) _then) = + __$StacNavigationBarThemeDataCopyWithImpl; @override - String? get shadowColor; + @useResult + $Res call( + {double? height, + String? backgroundColor, + double? elevation, + String? shadowColor, + String? surfaceTintColor, + String? indicatorColor, + StacBorder? indicatorShape, + StacTextStyle? labelTextStyle, + StacIconThemeData? iconTheme, + NavigationDestinationLabelBehavior? labelBehavior}); + @override - String? get surfaceTintColor; + $StacBorderCopyWith<$Res>? get indicatorShape; @override - String? get indicatorColor; + $StacTextStyleCopyWith<$Res>? get labelTextStyle; @override - StacBorder? get indicatorShape; + $StacIconThemeDataCopyWith<$Res>? get iconTheme; +} + +/// @nodoc +class __$StacNavigationBarThemeDataCopyWithImpl<$Res> + implements _$StacNavigationBarThemeDataCopyWith<$Res> { + __$StacNavigationBarThemeDataCopyWithImpl(this._self, this._then); + + final _StacNavigationBarThemeData _self; + final $Res Function(_StacNavigationBarThemeData) _then; + + /// Create a copy of StacNavigationBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get labelTextStyle; + @pragma('vm:prefer-inline') + $Res call({ + Object? height = freezed, + Object? backgroundColor = freezed, + Object? elevation = freezed, + Object? shadowColor = freezed, + Object? surfaceTintColor = freezed, + Object? indicatorColor = freezed, + Object? indicatorShape = freezed, + Object? labelTextStyle = freezed, + Object? iconTheme = freezed, + Object? labelBehavior = freezed, + }) { + return _then(_StacNavigationBarThemeData( + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + indicatorColor: freezed == indicatorColor + ? _self.indicatorColor + : indicatorColor // ignore: cast_nullable_to_non_nullable + as String?, + indicatorShape: freezed == indicatorShape + ? _self.indicatorShape + : indicatorShape // ignore: cast_nullable_to_non_nullable + as StacBorder?, + labelTextStyle: freezed == labelTextStyle + ? _self.labelTextStyle + : labelTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + iconTheme: freezed == iconTheme + ? _self.iconTheme + : iconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + labelBehavior: freezed == labelBehavior + ? _self.labelBehavior + : labelBehavior // ignore: cast_nullable_to_non_nullable + as NavigationDestinationLabelBehavior?, + )); + } + + /// Create a copy of StacNavigationBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacIconThemeData? get iconTheme; + @pragma('vm:prefer-inline') + $StacBorderCopyWith<$Res>? get indicatorShape { + if (_self.indicatorShape == null) { + return null; + } + + return $StacBorderCopyWith<$Res>(_self.indicatorShape!, (value) { + return _then(_self.copyWith(indicatorShape: value)); + }); + } + + /// Create a copy of StacNavigationBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - NavigationDestinationLabelBehavior? get labelBehavior; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get labelTextStyle { + if (_self.labelTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.labelTextStyle!, (value) { + return _then(_self.copyWith(labelTextStyle: value)); + }); + } /// Create a copy of StacNavigationBarThemeData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacNavigationBarThemeDataImplCopyWith<_$StacNavigationBarThemeDataImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get iconTheme { + if (_self.iconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.g.dart b/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.g.dart index 98f21a8c..81a1e9b5 100644 --- a/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.g.dart +++ b/packages/stac/lib/src/parsers/stac_navigation_bar_theme_data/stac_navigation_bar_theme_data.g.dart @@ -6,9 +6,9 @@ part of 'stac_navigation_bar_theme_data.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacNavigationBarThemeDataImpl _$$StacNavigationBarThemeDataImplFromJson( +_StacNavigationBarThemeData _$StacNavigationBarThemeDataFromJson( Map json) => - _$StacNavigationBarThemeDataImpl( + _StacNavigationBarThemeData( height: (json['height'] as num?)?.toDouble(), backgroundColor: json['backgroundColor'] as String?, elevation: (json['elevation'] as num?)?.toDouble(), @@ -29,8 +29,8 @@ _$StacNavigationBarThemeDataImpl _$$StacNavigationBarThemeDataImplFromJson( _$NavigationDestinationLabelBehaviorEnumMap, json['labelBehavior']), ); -Map _$$StacNavigationBarThemeDataImplToJson( - _$StacNavigationBarThemeDataImpl instance) => +Map _$StacNavigationBarThemeDataToJson( + _StacNavigationBarThemeData instance) => { 'height': instance.height, 'backgroundColor': instance.backgroundColor, diff --git a/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.dart b/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.dart index 1564e03d..c3ad1260 100644 --- a/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.dart +++ b/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.dart @@ -7,7 +7,7 @@ part 'stac_network_widget.freezed.dart'; part 'stac_network_widget.g.dart'; @freezed -class StacNetworkWidget with _$StacNetworkWidget { +abstract class StacNetworkWidget with _$StacNetworkWidget { const factory StacNetworkWidget({ required StacNetworkRequest request, }) = _StacNetworkWidget; diff --git a/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.freezed.dart b/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.freezed.dart index fa635b71..629c7d1f 100644 --- a/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,34 +10,47 @@ part of 'stac_network_widget.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacNetworkWidget _$StacNetworkWidgetFromJson(Map json) { - return _StacNetworkWidget.fromJson(json); -} - /// @nodoc mixin _$StacNetworkWidget { - StacNetworkRequest get request => throw _privateConstructorUsedError; - - /// Serializes this StacNetworkWidget to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacNetworkRequest get request; /// Create a copy of StacNetworkWidget /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacNetworkWidgetCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacNetworkWidgetCopyWithImpl( + this as StacNetworkWidget, _$identity); + + /// Serializes this StacNetworkWidget to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacNetworkWidget && + (identical(other.request, request) || other.request == request)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, request); + + @override + String toString() { + return 'StacNetworkWidget(request: $request)'; + } } /// @nodoc -abstract class $StacNetworkWidgetCopyWith<$Res> { +abstract mixin class $StacNetworkWidgetCopyWith<$Res> { factory $StacNetworkWidgetCopyWith( - StacNetworkWidget value, $Res Function(StacNetworkWidget) then) = - _$StacNetworkWidgetCopyWithImpl<$Res, StacNetworkWidget>; + StacNetworkWidget value, $Res Function(StacNetworkWidget) _then) = + _$StacNetworkWidgetCopyWithImpl; @useResult $Res call({StacNetworkRequest request}); @@ -44,14 +58,12 @@ abstract class $StacNetworkWidgetCopyWith<$Res> { } /// @nodoc -class _$StacNetworkWidgetCopyWithImpl<$Res, $Val extends StacNetworkWidget> +class _$StacNetworkWidgetCopyWithImpl<$Res> implements $StacNetworkWidgetCopyWith<$Res> { - _$StacNetworkWidgetCopyWithImpl(this._value, this._then); + _$StacNetworkWidgetCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacNetworkWidget _self; + final $Res Function(StacNetworkWidget) _then; /// Create a copy of StacNetworkWidget /// with the given fields replaced by the non-null parameter values. @@ -60,12 +72,12 @@ class _$StacNetworkWidgetCopyWithImpl<$Res, $Val extends StacNetworkWidget> $Res call({ Object? request = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( request: null == request - ? _value.request + ? _self.request : request // ignore: cast_nullable_to_non_nullable as StacNetworkRequest, - ) as $Val); + )); } /// Create a copy of StacNetworkWidget @@ -73,71 +85,42 @@ class _$StacNetworkWidgetCopyWithImpl<$Res, $Val extends StacNetworkWidget> @override @pragma('vm:prefer-inline') $StacNetworkRequestCopyWith<$Res> get request { - return $StacNetworkRequestCopyWith<$Res>(_value.request, (value) { - return _then(_value.copyWith(request: value) as $Val); + return $StacNetworkRequestCopyWith<$Res>(_self.request, (value) { + return _then(_self.copyWith(request: value)); }); } } /// @nodoc -abstract class _$$StacNetworkWidgetImplCopyWith<$Res> - implements $StacNetworkWidgetCopyWith<$Res> { - factory _$$StacNetworkWidgetImplCopyWith(_$StacNetworkWidgetImpl value, - $Res Function(_$StacNetworkWidgetImpl) then) = - __$$StacNetworkWidgetImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({StacNetworkRequest request}); +@JsonSerializable() +class _StacNetworkWidget implements StacNetworkWidget { + const _StacNetworkWidget({required this.request}); + factory _StacNetworkWidget.fromJson(Map json) => + _$StacNetworkWidgetFromJson(json); @override - $StacNetworkRequestCopyWith<$Res> get request; -} - -/// @nodoc -class __$$StacNetworkWidgetImplCopyWithImpl<$Res> - extends _$StacNetworkWidgetCopyWithImpl<$Res, _$StacNetworkWidgetImpl> - implements _$$StacNetworkWidgetImplCopyWith<$Res> { - __$$StacNetworkWidgetImplCopyWithImpl(_$StacNetworkWidgetImpl _value, - $Res Function(_$StacNetworkWidgetImpl) _then) - : super(_value, _then); + final StacNetworkRequest request; /// Create a copy of StacNetworkWidget /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? request = null, - }) { - return _then(_$StacNetworkWidgetImpl( - request: null == request - ? _value.request - : request // ignore: cast_nullable_to_non_nullable - as StacNetworkRequest, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$StacNetworkWidgetImpl implements _StacNetworkWidget { - const _$StacNetworkWidgetImpl({required this.request}); - - factory _$StacNetworkWidgetImpl.fromJson(Map json) => - _$$StacNetworkWidgetImplFromJson(json); - @override - final StacNetworkRequest request; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacNetworkWidgetCopyWith<_StacNetworkWidget> get copyWith => + __$StacNetworkWidgetCopyWithImpl<_StacNetworkWidget>(this, _$identity); @override - String toString() { - return 'StacNetworkWidget(request: $request)'; + Map toJson() { + return _$StacNetworkWidgetToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacNetworkWidgetImpl && + other is _StacNetworkWidget && (identical(other.request, request) || other.request == request)); } @@ -145,37 +128,58 @@ class _$StacNetworkWidgetImpl implements _StacNetworkWidget { @override int get hashCode => Object.hash(runtimeType, request); - /// Create a copy of StacNetworkWidget - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacNetworkWidgetImplCopyWith<_$StacNetworkWidgetImpl> get copyWith => - __$$StacNetworkWidgetImplCopyWithImpl<_$StacNetworkWidgetImpl>( - this, _$identity); + String toString() { + return 'StacNetworkWidget(request: $request)'; + } +} +/// @nodoc +abstract mixin class _$StacNetworkWidgetCopyWith<$Res> + implements $StacNetworkWidgetCopyWith<$Res> { + factory _$StacNetworkWidgetCopyWith( + _StacNetworkWidget value, $Res Function(_StacNetworkWidget) _then) = + __$StacNetworkWidgetCopyWithImpl; @override - Map toJson() { - return _$$StacNetworkWidgetImplToJson( - this, - ); - } + @useResult + $Res call({StacNetworkRequest request}); + + @override + $StacNetworkRequestCopyWith<$Res> get request; } -abstract class _StacNetworkWidget implements StacNetworkWidget { - const factory _StacNetworkWidget( - {required final StacNetworkRequest request}) = _$StacNetworkWidgetImpl; +/// @nodoc +class __$StacNetworkWidgetCopyWithImpl<$Res> + implements _$StacNetworkWidgetCopyWith<$Res> { + __$StacNetworkWidgetCopyWithImpl(this._self, this._then); - factory _StacNetworkWidget.fromJson(Map json) = - _$StacNetworkWidgetImpl.fromJson; + final _StacNetworkWidget _self; + final $Res Function(_StacNetworkWidget) _then; + /// Create a copy of StacNetworkWidget + /// with the given fields replaced by the non-null parameter values. @override - StacNetworkRequest get request; + @pragma('vm:prefer-inline') + $Res call({ + Object? request = null, + }) { + return _then(_StacNetworkWidget( + request: null == request + ? _self.request + : request // ignore: cast_nullable_to_non_nullable + as StacNetworkRequest, + )); + } /// Create a copy of StacNetworkWidget /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacNetworkWidgetImplCopyWith<_$StacNetworkWidgetImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacNetworkRequestCopyWith<$Res> get request { + return $StacNetworkRequestCopyWith<$Res>(_self.request, (value) { + return _then(_self.copyWith(request: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.g.dart b/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.g.dart index cb066044..78516c54 100644 --- a/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.g.dart +++ b/packages/stac/lib/src/parsers/stac_network_widget/stac_network_widget.g.dart @@ -6,15 +6,13 @@ part of 'stac_network_widget.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacNetworkWidgetImpl _$$StacNetworkWidgetImplFromJson( - Map json) => - _$StacNetworkWidgetImpl( +_StacNetworkWidget _$StacNetworkWidgetFromJson(Map json) => + _StacNetworkWidget( request: StacNetworkRequest.fromJson(json['request'] as Map), ); -Map _$$StacNetworkWidgetImplToJson( - _$StacNetworkWidgetImpl instance) => +Map _$StacNetworkWidgetToJson(_StacNetworkWidget instance) => { 'request': instance.request, }; diff --git a/packages/stac/lib/src/parsers/stac_offset/stac_offset.dart b/packages/stac/lib/src/parsers/stac_offset/stac_offset.dart index 26b66e36..57e8b86e 100644 --- a/packages/stac/lib/src/parsers/stac_offset/stac_offset.dart +++ b/packages/stac/lib/src/parsers/stac_offset/stac_offset.dart @@ -5,7 +5,7 @@ part 'stac_offset.freezed.dart'; part 'stac_offset.g.dart'; @freezed -class StacOffset with _$StacOffset { +abstract class StacOffset with _$StacOffset { const factory StacOffset({ required double dx, required double dy, diff --git a/packages/stac/lib/src/parsers/stac_offset/stac_offset.freezed.dart b/packages/stac/lib/src/parsers/stac_offset/stac_offset.freezed.dart index 82923b3a..606abc53 100644 --- a/packages/stac/lib/src/parsers/stac_offset/stac_offset.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_offset/stac_offset.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,58 @@ part of 'stac_offset.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacOffset _$StacOffsetFromJson(Map json) { - return _StacOffset.fromJson(json); -} - /// @nodoc mixin _$StacOffset { - double get dx => throw _privateConstructorUsedError; - double get dy => throw _privateConstructorUsedError; - - /// Serializes this StacOffset to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get dx; + double get dy; /// Create a copy of StacOffset /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacOffsetCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacOffsetCopyWithImpl(this as StacOffset, _$identity); -/// @nodoc -abstract class $StacOffsetCopyWith<$Res> { - factory $StacOffsetCopyWith( - StacOffset value, $Res Function(StacOffset) then) = - _$StacOffsetCopyWithImpl<$Res, StacOffset>; - @useResult - $Res call({double dx, double dy}); -} + /// Serializes this StacOffset to a JSON map. + Map toJson(); -/// @nodoc -class _$StacOffsetCopyWithImpl<$Res, $Val extends StacOffset> - implements $StacOffsetCopyWith<$Res> { - _$StacOffsetCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacOffset && + (identical(other.dx, dx) || other.dx == dx) && + (identical(other.dy, dy) || other.dy == dy)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, dx, dy); - /// Create a copy of StacOffset - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? dx = null, - Object? dy = null, - }) { - return _then(_value.copyWith( - dx: null == dx - ? _value.dx - : dx // ignore: cast_nullable_to_non_nullable - as double, - dy: null == dy - ? _value.dy - : dy // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + String toString() { + return 'StacOffset(dx: $dx, dy: $dy)'; } } /// @nodoc -abstract class _$$StacOffsetImplCopyWith<$Res> - implements $StacOffsetCopyWith<$Res> { - factory _$$StacOffsetImplCopyWith( - _$StacOffsetImpl value, $Res Function(_$StacOffsetImpl) then) = - __$$StacOffsetImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacOffsetCopyWith<$Res> { + factory $StacOffsetCopyWith( + StacOffset value, $Res Function(StacOffset) _then) = + _$StacOffsetCopyWithImpl; @useResult $Res call({double dx, double dy}); } /// @nodoc -class __$$StacOffsetImplCopyWithImpl<$Res> - extends _$StacOffsetCopyWithImpl<$Res, _$StacOffsetImpl> - implements _$$StacOffsetImplCopyWith<$Res> { - __$$StacOffsetImplCopyWithImpl( - _$StacOffsetImpl _value, $Res Function(_$StacOffsetImpl) _then) - : super(_value, _then); +class _$StacOffsetCopyWithImpl<$Res> implements $StacOffsetCopyWith<$Res> { + _$StacOffsetCopyWithImpl(this._self, this._then); + + final StacOffset _self; + final $Res Function(StacOffset) _then; /// Create a copy of StacOffset /// with the given fields replaced by the non-null parameter values. @@ -100,13 +71,13 @@ class __$$StacOffsetImplCopyWithImpl<$Res> Object? dx = null, Object? dy = null, }) { - return _then(_$StacOffsetImpl( + return _then(_self.copyWith( dx: null == dx - ? _value.dx + ? _self.dx : dx // ignore: cast_nullable_to_non_nullable as double, dy: null == dy - ? _value.dy + ? _self.dy : dy // ignore: cast_nullable_to_non_nullable as double, )); @@ -115,27 +86,36 @@ class __$$StacOffsetImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacOffsetImpl implements _StacOffset { - const _$StacOffsetImpl({required this.dx, required this.dy}); - - factory _$StacOffsetImpl.fromJson(Map json) => - _$$StacOffsetImplFromJson(json); +class _StacOffset implements StacOffset { + const _StacOffset({required this.dx, required this.dy}); + factory _StacOffset.fromJson(Map json) => + _$StacOffsetFromJson(json); @override final double dx; @override final double dy; + /// Create a copy of StacOffset + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacOffset(dx: $dx, dy: $dy)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacOffsetCopyWith<_StacOffset> get copyWith => + __$StacOffsetCopyWithImpl<_StacOffset>(this, _$identity); + + @override + Map toJson() { + return _$StacOffsetToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacOffsetImpl && + other is _StacOffset && (identical(other.dx, dx) || other.dx == dx) && (identical(other.dy, dy) || other.dy == dy)); } @@ -144,38 +124,49 @@ class _$StacOffsetImpl implements _StacOffset { @override int get hashCode => Object.hash(runtimeType, dx, dy); - /// Create a copy of StacOffset - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacOffsetImplCopyWith<_$StacOffsetImpl> get copyWith => - __$$StacOffsetImplCopyWithImpl<_$StacOffsetImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacOffsetImplToJson( - this, - ); + String toString() { + return 'StacOffset(dx: $dx, dy: $dy)'; } } -abstract class _StacOffset implements StacOffset { - const factory _StacOffset( - {required final double dx, required final double dy}) = _$StacOffsetImpl; +/// @nodoc +abstract mixin class _$StacOffsetCopyWith<$Res> + implements $StacOffsetCopyWith<$Res> { + factory _$StacOffsetCopyWith( + _StacOffset value, $Res Function(_StacOffset) _then) = + __$StacOffsetCopyWithImpl; + @override + @useResult + $Res call({double dx, double dy}); +} - factory _StacOffset.fromJson(Map json) = - _$StacOffsetImpl.fromJson; +/// @nodoc +class __$StacOffsetCopyWithImpl<$Res> implements _$StacOffsetCopyWith<$Res> { + __$StacOffsetCopyWithImpl(this._self, this._then); - @override - double get dx; - @override - double get dy; + final _StacOffset _self; + final $Res Function(_StacOffset) _then; /// Create a copy of StacOffset /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacOffsetImplCopyWith<_$StacOffsetImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? dx = null, + Object? dy = null, + }) { + return _then(_StacOffset( + dx: null == dx + ? _self.dx + : dx // ignore: cast_nullable_to_non_nullable + as double, + dy: null == dy + ? _self.dy + : dy // ignore: cast_nullable_to_non_nullable + as double, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_offset/stac_offset.g.dart b/packages/stac/lib/src/parsers/stac_offset/stac_offset.g.dart index 9bcaed2c..655b015c 100644 --- a/packages/stac/lib/src/parsers/stac_offset/stac_offset.g.dart +++ b/packages/stac/lib/src/parsers/stac_offset/stac_offset.g.dart @@ -6,13 +6,12 @@ part of 'stac_offset.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacOffsetImpl _$$StacOffsetImplFromJson(Map json) => - _$StacOffsetImpl( +_StacOffset _$StacOffsetFromJson(Map json) => _StacOffset( dx: (json['dx'] as num).toDouble(), dy: (json['dy'] as num).toDouble(), ); -Map _$$StacOffsetImplToJson(_$StacOffsetImpl instance) => +Map _$StacOffsetToJson(_StacOffset instance) => { 'dx': instance.dx, 'dy': instance.dy, diff --git a/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.dart b/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.dart index 67bd36b0..90c67c7c 100644 --- a/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.dart +++ b/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.dart @@ -6,7 +6,7 @@ part 'stac_opacity.freezed.dart'; part 'stac_opacity.g.dart'; @freezed -class StacOpacity with _$StacOpacity { +abstract class StacOpacity with _$StacOpacity { const factory StacOpacity({ required double opacity, required Map child, diff --git a/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.freezed.dart b/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.freezed.dart index 225cf3f4..d24aaea2 100644 --- a/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,59 @@ part of 'stac_opacity.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacOpacity _$StacOpacityFromJson(Map json) { - return _StacOpacity.fromJson(json); -} - /// @nodoc mixin _$StacOpacity { - double get opacity => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - - /// Serializes this StacOpacity to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get opacity; + Map get child; /// Create a copy of StacOpacity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacOpacityCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacOpacityCopyWithImpl(this as StacOpacity, _$identity); -/// @nodoc -abstract class $StacOpacityCopyWith<$Res> { - factory $StacOpacityCopyWith( - StacOpacity value, $Res Function(StacOpacity) then) = - _$StacOpacityCopyWithImpl<$Res, StacOpacity>; - @useResult - $Res call({double opacity, Map child}); -} + /// Serializes this StacOpacity to a JSON map. + Map toJson(); -/// @nodoc -class _$StacOpacityCopyWithImpl<$Res, $Val extends StacOpacity> - implements $StacOpacityCopyWith<$Res> { - _$StacOpacityCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacOpacity && + (identical(other.opacity, opacity) || other.opacity == opacity) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, opacity, const DeepCollectionEquality().hash(child)); - /// Create a copy of StacOpacity - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? opacity = null, - Object? child = null, - }) { - return _then(_value.copyWith( - opacity: null == opacity - ? _value.opacity - : opacity // ignore: cast_nullable_to_non_nullable - as double, - child: null == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + String toString() { + return 'StacOpacity(opacity: $opacity, child: $child)'; } } /// @nodoc -abstract class _$$StacOpacityImplCopyWith<$Res> - implements $StacOpacityCopyWith<$Res> { - factory _$$StacOpacityImplCopyWith( - _$StacOpacityImpl value, $Res Function(_$StacOpacityImpl) then) = - __$$StacOpacityImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacOpacityCopyWith<$Res> { + factory $StacOpacityCopyWith( + StacOpacity value, $Res Function(StacOpacity) _then) = + _$StacOpacityCopyWithImpl; @useResult $Res call({double opacity, Map child}); } /// @nodoc -class __$$StacOpacityImplCopyWithImpl<$Res> - extends _$StacOpacityCopyWithImpl<$Res, _$StacOpacityImpl> - implements _$$StacOpacityImplCopyWith<$Res> { - __$$StacOpacityImplCopyWithImpl( - _$StacOpacityImpl _value, $Res Function(_$StacOpacityImpl) _then) - : super(_value, _then); +class _$StacOpacityCopyWithImpl<$Res> implements $StacOpacityCopyWith<$Res> { + _$StacOpacityCopyWithImpl(this._self, this._then); + + final StacOpacity _self; + final $Res Function(StacOpacity) _then; /// Create a copy of StacOpacity /// with the given fields replaced by the non-null parameter values. @@ -100,13 +72,13 @@ class __$$StacOpacityImplCopyWithImpl<$Res> Object? opacity = null, Object? child = null, }) { - return _then(_$StacOpacityImpl( + return _then(_self.copyWith( opacity: null == opacity - ? _value.opacity + ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable as double, child: null == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, )); @@ -115,13 +87,12 @@ class __$$StacOpacityImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacOpacityImpl implements _StacOpacity { - const _$StacOpacityImpl( +class _StacOpacity implements StacOpacity { + const _StacOpacity( {required this.opacity, required final Map child}) : _child = child; - - factory _$StacOpacityImpl.fromJson(Map json) => - _$$StacOpacityImplFromJson(json); + factory _StacOpacity.fromJson(Map json) => + _$StacOpacityFromJson(json); @override final double opacity; @@ -133,16 +104,26 @@ class _$StacOpacityImpl implements _StacOpacity { return EqualUnmodifiableMapView(_child); } + /// Create a copy of StacOpacity + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacOpacityCopyWith<_StacOpacity> get copyWith => + __$StacOpacityCopyWithImpl<_StacOpacity>(this, _$identity); + @override - String toString() { - return 'StacOpacity(opacity: $opacity, child: $child)'; + Map toJson() { + return _$StacOpacityToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacOpacityImpl && + other is _StacOpacity && (identical(other.opacity, opacity) || other.opacity == opacity) && const DeepCollectionEquality().equals(other._child, _child)); } @@ -152,39 +133,49 @@ class _$StacOpacityImpl implements _StacOpacity { int get hashCode => Object.hash( runtimeType, opacity, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacOpacity - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacOpacityImplCopyWith<_$StacOpacityImpl> get copyWith => - __$$StacOpacityImplCopyWithImpl<_$StacOpacityImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacOpacityImplToJson( - this, - ); + String toString() { + return 'StacOpacity(opacity: $opacity, child: $child)'; } } -abstract class _StacOpacity implements StacOpacity { - const factory _StacOpacity( - {required final double opacity, - required final Map child}) = _$StacOpacityImpl; +/// @nodoc +abstract mixin class _$StacOpacityCopyWith<$Res> + implements $StacOpacityCopyWith<$Res> { + factory _$StacOpacityCopyWith( + _StacOpacity value, $Res Function(_StacOpacity) _then) = + __$StacOpacityCopyWithImpl; + @override + @useResult + $Res call({double opacity, Map child}); +} - factory _StacOpacity.fromJson(Map json) = - _$StacOpacityImpl.fromJson; +/// @nodoc +class __$StacOpacityCopyWithImpl<$Res> implements _$StacOpacityCopyWith<$Res> { + __$StacOpacityCopyWithImpl(this._self, this._then); - @override - double get opacity; - @override - Map get child; + final _StacOpacity _self; + final $Res Function(_StacOpacity) _then; /// Create a copy of StacOpacity /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacOpacityImplCopyWith<_$StacOpacityImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? opacity = null, + Object? child = null, + }) { + return _then(_StacOpacity( + opacity: null == opacity + ? _self.opacity + : opacity // ignore: cast_nullable_to_non_nullable + as double, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.g.dart b/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.g.dart index c7740ebd..9db24d2c 100644 --- a/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.g.dart +++ b/packages/stac/lib/src/parsers/stac_opacity/stac_opacity.g.dart @@ -6,13 +6,12 @@ part of 'stac_opacity.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacOpacityImpl _$$StacOpacityImplFromJson(Map json) => - _$StacOpacityImpl( +_StacOpacity _$StacOpacityFromJson(Map json) => _StacOpacity( opacity: (json['opacity'] as num).toDouble(), child: json['child'] as Map, ); -Map _$$StacOpacityImplToJson(_$StacOpacityImpl instance) => +Map _$StacOpacityToJson(_StacOpacity instance) => { 'opacity': instance.opacity, 'child': instance.child, diff --git a/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.dart b/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.dart index 5787d923..0bf9fe75 100644 --- a/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.dart +++ b/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.dart @@ -8,7 +8,7 @@ part 'stac_outlined_button.freezed.dart'; part 'stac_outlined_button.g.dart'; @freezed -class StacOutlinedButton with _$StacOutlinedButton { +abstract class StacOutlinedButton with _$StacOutlinedButton { const factory StacOutlinedButton({ Map? onPressed, Map? onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.freezed.dart b/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.freezed.dart index e51f4362..2d66f31f 100644 --- a/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,41 +10,73 @@ part of 'stac_outlined_button.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacOutlinedButton _$StacOutlinedButtonFromJson(Map json) { - return _StacOutlinedButton.fromJson(json); -} - /// @nodoc mixin _$StacOutlinedButton { - Map? get onPressed => throw _privateConstructorUsedError; - Map? get onLongPress => throw _privateConstructorUsedError; - Map? get onHover => throw _privateConstructorUsedError; - Map? get onFocusChange => throw _privateConstructorUsedError; - StacButtonStyle? get style => throw _privateConstructorUsedError; - dynamic get autofocus => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - - /// Serializes this StacOutlinedButton to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get onPressed; + Map? get onLongPress; + Map? get onHover; + Map? get onFocusChange; + StacButtonStyle? get style; + dynamic get autofocus; + Clip get clipBehavior; + Map get child; /// Create a copy of StacOutlinedButton /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacOutlinedButtonCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacOutlinedButtonCopyWithImpl( + this as StacOutlinedButton, _$identity); + + /// Serializes this StacOutlinedButton to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacOutlinedButton && + const DeepCollectionEquality().equals(other.onPressed, onPressed) && + const DeepCollectionEquality() + .equals(other.onLongPress, onLongPress) && + const DeepCollectionEquality().equals(other.onHover, onHover) && + const DeepCollectionEquality() + .equals(other.onFocusChange, onFocusChange) && + (identical(other.style, style) || other.style == style) && + const DeepCollectionEquality().equals(other.autofocus, autofocus) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + const DeepCollectionEquality().equals(other.child, child)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(onPressed), + const DeepCollectionEquality().hash(onLongPress), + const DeepCollectionEquality().hash(onHover), + const DeepCollectionEquality().hash(onFocusChange), + style, + const DeepCollectionEquality().hash(autofocus), + clipBehavior, + const DeepCollectionEquality().hash(child)); + + @override + String toString() { + return 'StacOutlinedButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + } } /// @nodoc -abstract class $StacOutlinedButtonCopyWith<$Res> { +abstract mixin class $StacOutlinedButtonCopyWith<$Res> { factory $StacOutlinedButtonCopyWith( - StacOutlinedButton value, $Res Function(StacOutlinedButton) then) = - _$StacOutlinedButtonCopyWithImpl<$Res, StacOutlinedButton>; + StacOutlinedButton value, $Res Function(StacOutlinedButton) _then) = + _$StacOutlinedButtonCopyWithImpl; @useResult $Res call( {Map? onPressed, @@ -59,14 +92,12 @@ abstract class $StacOutlinedButtonCopyWith<$Res> { } /// @nodoc -class _$StacOutlinedButtonCopyWithImpl<$Res, $Val extends StacOutlinedButton> +class _$StacOutlinedButtonCopyWithImpl<$Res> implements $StacOutlinedButtonCopyWith<$Res> { - _$StacOutlinedButtonCopyWithImpl(this._value, this._then); + _$StacOutlinedButtonCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacOutlinedButton _self; + final $Res Function(StacOutlinedButton) _then; /// Create a copy of StacOutlinedButton /// with the given fields replaced by the non-null parameter values. @@ -82,40 +113,40 @@ class _$StacOutlinedButtonCopyWithImpl<$Res, $Val extends StacOutlinedButton> Object? clipBehavior = null, Object? child = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( onPressed: freezed == onPressed - ? _value.onPressed + ? _self.onPressed : onPressed // ignore: cast_nullable_to_non_nullable as Map?, onLongPress: freezed == onLongPress - ? _value.onLongPress + ? _self.onLongPress : onLongPress // ignore: cast_nullable_to_non_nullable as Map?, onHover: freezed == onHover - ? _value.onHover + ? _self.onHover : onHover // ignore: cast_nullable_to_non_nullable as Map?, onFocusChange: freezed == onFocusChange - ? _value.onFocusChange + ? _self.onFocusChange : onFocusChange // ignore: cast_nullable_to_non_nullable as Map?, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, autofocus: freezed == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as dynamic, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, child: null == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, - ) as $Val); + )); } /// Create a copy of StacOutlinedButton @@ -123,98 +154,20 @@ class _$StacOutlinedButtonCopyWithImpl<$Res, $Val extends StacOutlinedButton> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } } -/// @nodoc -abstract class _$$StacOutlinedButtonImplCopyWith<$Res> - implements $StacOutlinedButtonCopyWith<$Res> { - factory _$$StacOutlinedButtonImplCopyWith(_$StacOutlinedButtonImpl value, - $Res Function(_$StacOutlinedButtonImpl) then) = - __$$StacOutlinedButtonImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? onPressed, - Map? onLongPress, - Map? onHover, - Map? onFocusChange, - StacButtonStyle? style, - dynamic autofocus, - Clip clipBehavior, - Map child}); - - @override - $StacButtonStyleCopyWith<$Res>? get style; -} - -/// @nodoc -class __$$StacOutlinedButtonImplCopyWithImpl<$Res> - extends _$StacOutlinedButtonCopyWithImpl<$Res, _$StacOutlinedButtonImpl> - implements _$$StacOutlinedButtonImplCopyWith<$Res> { - __$$StacOutlinedButtonImplCopyWithImpl(_$StacOutlinedButtonImpl _value, - $Res Function(_$StacOutlinedButtonImpl) _then) - : super(_value, _then); - - /// Create a copy of StacOutlinedButton - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? onPressed = freezed, - Object? onLongPress = freezed, - Object? onHover = freezed, - Object? onFocusChange = freezed, - Object? style = freezed, - Object? autofocus = freezed, - Object? clipBehavior = null, - Object? child = null, - }) { - return _then(_$StacOutlinedButtonImpl( - onPressed: freezed == onPressed - ? _value._onPressed - : onPressed // ignore: cast_nullable_to_non_nullable - as Map?, - onLongPress: freezed == onLongPress - ? _value._onLongPress - : onLongPress // ignore: cast_nullable_to_non_nullable - as Map?, - onHover: freezed == onHover - ? _value._onHover - : onHover // ignore: cast_nullable_to_non_nullable - as Map?, - onFocusChange: freezed == onFocusChange - ? _value._onFocusChange - : onFocusChange // ignore: cast_nullable_to_non_nullable - as Map?, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - autofocus: freezed == autofocus ? _value.autofocus! : autofocus, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - child: null == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacOutlinedButtonImpl implements _StacOutlinedButton { - const _$StacOutlinedButtonImpl( +class _StacOutlinedButton implements StacOutlinedButton { + const _StacOutlinedButton( {final Map? onPressed, final Map? onLongPress, final Map? onHover, @@ -228,9 +181,8 @@ class _$StacOutlinedButtonImpl implements _StacOutlinedButton { _onHover = onHover, _onFocusChange = onFocusChange, _child = child; - - factory _$StacOutlinedButtonImpl.fromJson(Map json) => - _$$StacOutlinedButtonImplFromJson(json); + factory _StacOutlinedButton.fromJson(Map json) => + _$StacOutlinedButtonFromJson(json); final Map? _onPressed; @override @@ -288,16 +240,26 @@ class _$StacOutlinedButtonImpl implements _StacOutlinedButton { return EqualUnmodifiableMapView(_child); } + /// Create a copy of StacOutlinedButton + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacOutlinedButtonCopyWith<_StacOutlinedButton> get copyWith => + __$StacOutlinedButtonCopyWithImpl<_StacOutlinedButton>(this, _$identity); + @override - String toString() { - return 'StacOutlinedButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + Map toJson() { + return _$StacOutlinedButtonToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacOutlinedButtonImpl && + other is _StacOutlinedButton && const DeepCollectionEquality() .equals(other._onPressed, _onPressed) && const DeepCollectionEquality() @@ -325,58 +287,105 @@ class _$StacOutlinedButtonImpl implements _StacOutlinedButton { clipBehavior, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacOutlinedButton - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacOutlinedButtonImplCopyWith<_$StacOutlinedButtonImpl> get copyWith => - __$$StacOutlinedButtonImplCopyWithImpl<_$StacOutlinedButtonImpl>( - this, _$identity); + String toString() { + return 'StacOutlinedButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, child: $child)'; + } +} +/// @nodoc +abstract mixin class _$StacOutlinedButtonCopyWith<$Res> + implements $StacOutlinedButtonCopyWith<$Res> { + factory _$StacOutlinedButtonCopyWith( + _StacOutlinedButton value, $Res Function(_StacOutlinedButton) _then) = + __$StacOutlinedButtonCopyWithImpl; @override - Map toJson() { - return _$$StacOutlinedButtonImplToJson( - this, - ); - } + @useResult + $Res call( + {Map? onPressed, + Map? onLongPress, + Map? onHover, + Map? onFocusChange, + StacButtonStyle? style, + dynamic autofocus, + Clip clipBehavior, + Map child}); + + @override + $StacButtonStyleCopyWith<$Res>? get style; } -abstract class _StacOutlinedButton implements StacOutlinedButton { - const factory _StacOutlinedButton( - {final Map? onPressed, - final Map? onLongPress, - final Map? onHover, - final Map? onFocusChange, - final StacButtonStyle? style, - final dynamic autofocus, - final Clip clipBehavior, - required final Map child}) = _$StacOutlinedButtonImpl; +/// @nodoc +class __$StacOutlinedButtonCopyWithImpl<$Res> + implements _$StacOutlinedButtonCopyWith<$Res> { + __$StacOutlinedButtonCopyWithImpl(this._self, this._then); - factory _StacOutlinedButton.fromJson(Map json) = - _$StacOutlinedButtonImpl.fromJson; + final _StacOutlinedButton _self; + final $Res Function(_StacOutlinedButton) _then; + /// Create a copy of StacOutlinedButton + /// with the given fields replaced by the non-null parameter values. @override - Map? get onPressed; - @override - Map? get onLongPress; - @override - Map? get onHover; - @override - Map? get onFocusChange; - @override - StacButtonStyle? get style; - @override - dynamic get autofocus; - @override - Clip get clipBehavior; - @override - Map get child; + @pragma('vm:prefer-inline') + $Res call({ + Object? onPressed = freezed, + Object? onLongPress = freezed, + Object? onHover = freezed, + Object? onFocusChange = freezed, + Object? style = freezed, + Object? autofocus = freezed, + Object? clipBehavior = null, + Object? child = null, + }) { + return _then(_StacOutlinedButton( + onPressed: freezed == onPressed + ? _self._onPressed + : onPressed // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPress: freezed == onLongPress + ? _self._onLongPress + : onLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onHover: freezed == onHover + ? _self._onHover + : onHover // ignore: cast_nullable_to_non_nullable + as Map?, + onFocusChange: freezed == onFocusChange + ? _self._onFocusChange + : onFocusChange // ignore: cast_nullable_to_non_nullable + as Map?, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + autofocus: freezed == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as dynamic, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + )); + } /// Create a copy of StacOutlinedButton /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacOutlinedButtonImplCopyWith<_$StacOutlinedButtonImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.g.dart b/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.g.dart index 5681f646..daa3b02a 100644 --- a/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.g.dart +++ b/packages/stac/lib/src/parsers/stac_outlined_button/stac_outlined_button.g.dart @@ -6,9 +6,8 @@ part of 'stac_outlined_button.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacOutlinedButtonImpl _$$StacOutlinedButtonImplFromJson( - Map json) => - _$StacOutlinedButtonImpl( +_StacOutlinedButton _$StacOutlinedButtonFromJson(Map json) => + _StacOutlinedButton( onPressed: json['onPressed'] as Map?, onLongPress: json['onLongPress'] as Map?, onHover: json['onHover'] as Map?, @@ -22,8 +21,7 @@ _$StacOutlinedButtonImpl _$$StacOutlinedButtonImplFromJson( child: json['child'] as Map, ); -Map _$$StacOutlinedButtonImplToJson( - _$StacOutlinedButtonImpl instance) => +Map _$StacOutlinedButtonToJson(_StacOutlinedButton instance) => { 'onPressed': instance.onPressed, 'onLongPress': instance.onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_padding/stac_padding.dart b/packages/stac/lib/src/parsers/stac_padding/stac_padding.dart index 6b3a4f29..77de1b98 100644 --- a/packages/stac/lib/src/parsers/stac_padding/stac_padding.dart +++ b/packages/stac/lib/src/parsers/stac_padding/stac_padding.dart @@ -7,7 +7,7 @@ part 'stac_padding.freezed.dart'; part 'stac_padding.g.dart'; @freezed -class StacPadding with _$StacPadding { +abstract class StacPadding with _$StacPadding { const factory StacPadding({ required StacEdgeInsets padding, Map? child, diff --git a/packages/stac/lib/src/parsers/stac_padding/stac_padding.freezed.dart b/packages/stac/lib/src/parsers/stac_padding/stac_padding.freezed.dart index c6a94dd9..16a15bfb 100644 --- a/packages/stac/lib/src/parsers/stac_padding/stac_padding.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_padding/stac_padding.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,35 +10,49 @@ part of 'stac_padding.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacPadding _$StacPaddingFromJson(Map json) { - return _StacPadding.fromJson(json); -} - /// @nodoc mixin _$StacPadding { - StacEdgeInsets get padding => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacPadding to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacEdgeInsets get padding; + Map? get child; /// Create a copy of StacPadding /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacPaddingCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacPaddingCopyWithImpl(this as StacPadding, _$identity); + + /// Serializes this StacPadding to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacPadding && + (identical(other.padding, padding) || other.padding == padding) && + const DeepCollectionEquality().equals(other.child, child)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, padding, const DeepCollectionEquality().hash(child)); + + @override + String toString() { + return 'StacPadding(padding: $padding, child: $child)'; + } } /// @nodoc -abstract class $StacPaddingCopyWith<$Res> { +abstract mixin class $StacPaddingCopyWith<$Res> { factory $StacPaddingCopyWith( - StacPadding value, $Res Function(StacPadding) then) = - _$StacPaddingCopyWithImpl<$Res, StacPadding>; + StacPadding value, $Res Function(StacPadding) _then) = + _$StacPaddingCopyWithImpl; @useResult $Res call({StacEdgeInsets padding, Map? child}); @@ -45,14 +60,11 @@ abstract class $StacPaddingCopyWith<$Res> { } /// @nodoc -class _$StacPaddingCopyWithImpl<$Res, $Val extends StacPadding> - implements $StacPaddingCopyWith<$Res> { - _$StacPaddingCopyWithImpl(this._value, this._then); +class _$StacPaddingCopyWithImpl<$Res> implements $StacPaddingCopyWith<$Res> { + _$StacPaddingCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacPadding _self; + final $Res Function(StacPadding) _then; /// Create a copy of StacPadding /// with the given fields replaced by the non-null parameter values. @@ -62,16 +74,16 @@ class _$StacPaddingCopyWithImpl<$Res, $Val extends StacPadding> Object? padding = null, Object? child = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( padding: null == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets, child: freezed == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, - ) as $Val); + )); } /// Create a copy of StacPadding @@ -79,64 +91,19 @@ class _$StacPaddingCopyWithImpl<$Res, $Val extends StacPadding> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res> get padding { - return $StacEdgeInsetsCopyWith<$Res>(_value.padding, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding, (value) { + return _then(_self.copyWith(padding: value)); }); } } -/// @nodoc -abstract class _$$StacPaddingImplCopyWith<$Res> - implements $StacPaddingCopyWith<$Res> { - factory _$$StacPaddingImplCopyWith( - _$StacPaddingImpl value, $Res Function(_$StacPaddingImpl) then) = - __$$StacPaddingImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({StacEdgeInsets padding, Map? child}); - - @override - $StacEdgeInsetsCopyWith<$Res> get padding; -} - -/// @nodoc -class __$$StacPaddingImplCopyWithImpl<$Res> - extends _$StacPaddingCopyWithImpl<$Res, _$StacPaddingImpl> - implements _$$StacPaddingImplCopyWith<$Res> { - __$$StacPaddingImplCopyWithImpl( - _$StacPaddingImpl _value, $Res Function(_$StacPaddingImpl) _then) - : super(_value, _then); - - /// Create a copy of StacPadding - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? padding = null, - Object? child = freezed, - }) { - return _then(_$StacPaddingImpl( - padding: null == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets, - child: freezed == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacPaddingImpl implements _StacPadding { - const _$StacPaddingImpl( - {required this.padding, final Map? child}) +class _StacPadding implements StacPadding { + const _StacPadding({required this.padding, final Map? child}) : _child = child; - - factory _$StacPaddingImpl.fromJson(Map json) => - _$$StacPaddingImplFromJson(json); + factory _StacPadding.fromJson(Map json) => + _$StacPaddingFromJson(json); @override final StacEdgeInsets padding; @@ -150,16 +117,26 @@ class _$StacPaddingImpl implements _StacPadding { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacPadding + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacPadding(padding: $padding, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacPaddingCopyWith<_StacPadding> get copyWith => + __$StacPaddingCopyWithImpl<_StacPadding>(this, _$identity); + + @override + Map toJson() { + return _$StacPaddingToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacPaddingImpl && + other is _StacPadding && (identical(other.padding, padding) || other.padding == padding) && const DeepCollectionEquality().equals(other._child, _child)); } @@ -169,39 +146,62 @@ class _$StacPaddingImpl implements _StacPadding { int get hashCode => Object.hash( runtimeType, padding, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacPadding - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacPaddingImplCopyWith<_$StacPaddingImpl> get copyWith => - __$$StacPaddingImplCopyWithImpl<_$StacPaddingImpl>(this, _$identity); + String toString() { + return 'StacPadding(padding: $padding, child: $child)'; + } +} +/// @nodoc +abstract mixin class _$StacPaddingCopyWith<$Res> + implements $StacPaddingCopyWith<$Res> { + factory _$StacPaddingCopyWith( + _StacPadding value, $Res Function(_StacPadding) _then) = + __$StacPaddingCopyWithImpl; @override - Map toJson() { - return _$$StacPaddingImplToJson( - this, - ); - } + @useResult + $Res call({StacEdgeInsets padding, Map? child}); + + @override + $StacEdgeInsetsCopyWith<$Res> get padding; } -abstract class _StacPadding implements StacPadding { - const factory _StacPadding( - {required final StacEdgeInsets padding, - final Map? child}) = _$StacPaddingImpl; +/// @nodoc +class __$StacPaddingCopyWithImpl<$Res> implements _$StacPaddingCopyWith<$Res> { + __$StacPaddingCopyWithImpl(this._self, this._then); - factory _StacPadding.fromJson(Map json) = - _$StacPaddingImpl.fromJson; + final _StacPadding _self; + final $Res Function(_StacPadding) _then; + /// Create a copy of StacPadding + /// with the given fields replaced by the non-null parameter values. @override - StacEdgeInsets get padding; - @override - Map? get child; + @pragma('vm:prefer-inline') + $Res call({ + Object? padding = null, + Object? child = freezed, + }) { + return _then(_StacPadding( + padding: null == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } /// Create a copy of StacPadding /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacPaddingImplCopyWith<_$StacPaddingImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res> get padding { + return $StacEdgeInsetsCopyWith<$Res>(_self.padding, (value) { + return _then(_self.copyWith(padding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_padding/stac_padding.g.dart b/packages/stac/lib/src/parsers/stac_padding/stac_padding.g.dart index 2c6dc59a..07ba2b4a 100644 --- a/packages/stac/lib/src/parsers/stac_padding/stac_padding.g.dart +++ b/packages/stac/lib/src/parsers/stac_padding/stac_padding.g.dart @@ -6,13 +6,12 @@ part of 'stac_padding.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacPaddingImpl _$$StacPaddingImplFromJson(Map json) => - _$StacPaddingImpl( +_StacPadding _$StacPaddingFromJson(Map json) => _StacPadding( padding: StacEdgeInsets.fromJson(json['padding']), child: json['child'] as Map?, ); -Map _$$StacPaddingImplToJson(_$StacPaddingImpl instance) => +Map _$StacPaddingToJson(_StacPadding instance) => { 'padding': instance.padding, 'child': instance.child, diff --git a/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.dart b/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.dart index 3f40ef5d..717cb80c 100644 --- a/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.dart +++ b/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.dart @@ -9,7 +9,7 @@ part 'stac_page_view.freezed.dart'; part 'stac_page_view.g.dart'; @freezed -class StacPageView with _$StacPageView { +abstract class StacPageView with _$StacPageView { const factory StacPageView({ @Default(Axis.horizontal) Axis scrollDirection, @Default(false) bool reverse, diff --git a/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.freezed.dart b/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.freezed.dart index 83483bd2..9e54492b 100644 --- a/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,163 +10,97 @@ part of 'stac_page_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacPageView _$StacPageViewFromJson(Map json) { - return _StacPageView.fromJson(json); -} - /// @nodoc mixin _$StacPageView { - Axis get scrollDirection => throw _privateConstructorUsedError; - bool get reverse => throw _privateConstructorUsedError; - StacScrollPhysics? get physics => throw _privateConstructorUsedError; - bool get pageSnapping => throw _privateConstructorUsedError; - Map? get onPageChanged => throw _privateConstructorUsedError; - DragStartBehavior get dragStartBehavior => throw _privateConstructorUsedError; - bool get allowImplicitScrolling => throw _privateConstructorUsedError; - String? get restorationId => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - bool get padEnds => throw _privateConstructorUsedError; - int get initialPage => throw _privateConstructorUsedError; - dynamic get keepPage => throw _privateConstructorUsedError; - double get viewportFraction => throw _privateConstructorUsedError; - List> get children => throw _privateConstructorUsedError; - - /// Serializes this StacPageView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Axis get scrollDirection; + bool get reverse; + StacScrollPhysics? get physics; + bool get pageSnapping; + Map? get onPageChanged; + DragStartBehavior get dragStartBehavior; + bool get allowImplicitScrolling; + String? get restorationId; + Clip get clipBehavior; + bool get padEnds; + int get initialPage; + dynamic get keepPage; + double get viewportFraction; + List> get children; /// Create a copy of StacPageView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacPageViewCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacPageViewCopyWithImpl( + this as StacPageView, _$identity); -/// @nodoc -abstract class $StacPageViewCopyWith<$Res> { - factory $StacPageViewCopyWith( - StacPageView value, $Res Function(StacPageView) then) = - _$StacPageViewCopyWithImpl<$Res, StacPageView>; - @useResult - $Res call( - {Axis scrollDirection, - bool reverse, - StacScrollPhysics? physics, - bool pageSnapping, - Map? onPageChanged, - DragStartBehavior dragStartBehavior, - bool allowImplicitScrolling, - String? restorationId, - Clip clipBehavior, - bool padEnds, - int initialPage, - dynamic keepPage, - double viewportFraction, - List> children}); -} + /// Serializes this StacPageView to a JSON map. + Map toJson(); -/// @nodoc -class _$StacPageViewCopyWithImpl<$Res, $Val extends StacPageView> - implements $StacPageViewCopyWith<$Res> { - _$StacPageViewCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacPageView && + (identical(other.scrollDirection, scrollDirection) || + other.scrollDirection == scrollDirection) && + (identical(other.reverse, reverse) || other.reverse == reverse) && + (identical(other.physics, physics) || other.physics == physics) && + (identical(other.pageSnapping, pageSnapping) || + other.pageSnapping == pageSnapping) && + const DeepCollectionEquality() + .equals(other.onPageChanged, onPageChanged) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical(other.allowImplicitScrolling, allowImplicitScrolling) || + other.allowImplicitScrolling == allowImplicitScrolling) && + (identical(other.restorationId, restorationId) || + other.restorationId == restorationId) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.padEnds, padEnds) || other.padEnds == padEnds) && + (identical(other.initialPage, initialPage) || + other.initialPage == initialPage) && + const DeepCollectionEquality().equals(other.keepPage, keepPage) && + (identical(other.viewportFraction, viewportFraction) || + other.viewportFraction == viewportFraction) && + const DeepCollectionEquality().equals(other.children, children)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + scrollDirection, + reverse, + physics, + pageSnapping, + const DeepCollectionEquality().hash(onPageChanged), + dragStartBehavior, + allowImplicitScrolling, + restorationId, + clipBehavior, + padEnds, + initialPage, + const DeepCollectionEquality().hash(keepPage), + viewportFraction, + const DeepCollectionEquality().hash(children)); - /// Create a copy of StacPageView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? scrollDirection = null, - Object? reverse = null, - Object? physics = freezed, - Object? pageSnapping = null, - Object? onPageChanged = freezed, - Object? dragStartBehavior = null, - Object? allowImplicitScrolling = null, - Object? restorationId = freezed, - Object? clipBehavior = null, - Object? padEnds = null, - Object? initialPage = null, - Object? keepPage = freezed, - Object? viewportFraction = null, - Object? children = null, - }) { - return _then(_value.copyWith( - scrollDirection: null == scrollDirection - ? _value.scrollDirection - : scrollDirection // ignore: cast_nullable_to_non_nullable - as Axis, - reverse: null == reverse - ? _value.reverse - : reverse // ignore: cast_nullable_to_non_nullable - as bool, - physics: freezed == physics - ? _value.physics - : physics // ignore: cast_nullable_to_non_nullable - as StacScrollPhysics?, - pageSnapping: null == pageSnapping - ? _value.pageSnapping - : pageSnapping // ignore: cast_nullable_to_non_nullable - as bool, - onPageChanged: freezed == onPageChanged - ? _value.onPageChanged - : onPageChanged // ignore: cast_nullable_to_non_nullable - as Map?, - dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior - : dragStartBehavior // ignore: cast_nullable_to_non_nullable - as DragStartBehavior, - allowImplicitScrolling: null == allowImplicitScrolling - ? _value.allowImplicitScrolling - : allowImplicitScrolling // ignore: cast_nullable_to_non_nullable - as bool, - restorationId: freezed == restorationId - ? _value.restorationId - : restorationId // ignore: cast_nullable_to_non_nullable - as String?, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - padEnds: null == padEnds - ? _value.padEnds - : padEnds // ignore: cast_nullable_to_non_nullable - as bool, - initialPage: null == initialPage - ? _value.initialPage - : initialPage // ignore: cast_nullable_to_non_nullable - as int, - keepPage: freezed == keepPage - ? _value.keepPage - : keepPage // ignore: cast_nullable_to_non_nullable - as dynamic, - viewportFraction: null == viewportFraction - ? _value.viewportFraction - : viewportFraction // ignore: cast_nullable_to_non_nullable - as double, - children: null == children - ? _value.children - : children // ignore: cast_nullable_to_non_nullable - as List>, - ) as $Val); + String toString() { + return 'StacPageView(scrollDirection: $scrollDirection, reverse: $reverse, physics: $physics, pageSnapping: $pageSnapping, onPageChanged: $onPageChanged, dragStartBehavior: $dragStartBehavior, allowImplicitScrolling: $allowImplicitScrolling, restorationId: $restorationId, clipBehavior: $clipBehavior, padEnds: $padEnds, initialPage: $initialPage, keepPage: $keepPage, viewportFraction: $viewportFraction, children: $children)'; } } /// @nodoc -abstract class _$$StacPageViewImplCopyWith<$Res> - implements $StacPageViewCopyWith<$Res> { - factory _$$StacPageViewImplCopyWith( - _$StacPageViewImpl value, $Res Function(_$StacPageViewImpl) then) = - __$$StacPageViewImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacPageViewCopyWith<$Res> { + factory $StacPageViewCopyWith( + StacPageView value, $Res Function(StacPageView) _then) = + _$StacPageViewCopyWithImpl; @useResult $Res call( {Axis scrollDirection, @@ -185,12 +120,11 @@ abstract class _$$StacPageViewImplCopyWith<$Res> } /// @nodoc -class __$$StacPageViewImplCopyWithImpl<$Res> - extends _$StacPageViewCopyWithImpl<$Res, _$StacPageViewImpl> - implements _$$StacPageViewImplCopyWith<$Res> { - __$$StacPageViewImplCopyWithImpl( - _$StacPageViewImpl _value, $Res Function(_$StacPageViewImpl) _then) - : super(_value, _then); +class _$StacPageViewCopyWithImpl<$Res> implements $StacPageViewCopyWith<$Res> { + _$StacPageViewCopyWithImpl(this._self, this._then); + + final StacPageView _self; + final $Res Function(StacPageView) _then; /// Create a copy of StacPageView /// with the given fields replaced by the non-null parameter values. @@ -212,58 +146,61 @@ class __$$StacPageViewImplCopyWithImpl<$Res> Object? viewportFraction = null, Object? children = null, }) { - return _then(_$StacPageViewImpl( + return _then(_self.copyWith( scrollDirection: null == scrollDirection - ? _value.scrollDirection + ? _self.scrollDirection : scrollDirection // ignore: cast_nullable_to_non_nullable as Axis, reverse: null == reverse - ? _value.reverse + ? _self.reverse : reverse // ignore: cast_nullable_to_non_nullable as bool, physics: freezed == physics - ? _value.physics + ? _self.physics : physics // ignore: cast_nullable_to_non_nullable as StacScrollPhysics?, pageSnapping: null == pageSnapping - ? _value.pageSnapping + ? _self.pageSnapping : pageSnapping // ignore: cast_nullable_to_non_nullable as bool, onPageChanged: freezed == onPageChanged - ? _value._onPageChanged + ? _self.onPageChanged : onPageChanged // ignore: cast_nullable_to_non_nullable as Map?, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, allowImplicitScrolling: null == allowImplicitScrolling - ? _value.allowImplicitScrolling + ? _self.allowImplicitScrolling : allowImplicitScrolling // ignore: cast_nullable_to_non_nullable as bool, restorationId: freezed == restorationId - ? _value.restorationId + ? _self.restorationId : restorationId // ignore: cast_nullable_to_non_nullable as String?, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, padEnds: null == padEnds - ? _value.padEnds + ? _self.padEnds : padEnds // ignore: cast_nullable_to_non_nullable as bool, initialPage: null == initialPage - ? _value.initialPage + ? _self.initialPage : initialPage // ignore: cast_nullable_to_non_nullable as int, - keepPage: freezed == keepPage ? _value.keepPage! : keepPage, + keepPage: freezed == keepPage + ? _self.keepPage + : keepPage // ignore: cast_nullable_to_non_nullable + as dynamic, viewportFraction: null == viewportFraction - ? _value.viewportFraction + ? _self.viewportFraction : viewportFraction // ignore: cast_nullable_to_non_nullable as double, children: null == children - ? _value._children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, )); @@ -272,8 +209,8 @@ class __$$StacPageViewImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacPageViewImpl implements _StacPageView { - const _$StacPageViewImpl( +class _StacPageView implements StacPageView { + const _StacPageView( {this.scrollDirection = Axis.horizontal, this.reverse = false, this.physics, @@ -290,9 +227,8 @@ class _$StacPageViewImpl implements _StacPageView { final List> children = const []}) : _onPageChanged = onPageChanged, _children = children; - - factory _$StacPageViewImpl.fromJson(Map json) => - _$$StacPageViewImplFromJson(json); + factory _StacPageView.fromJson(Map json) => + _$StacPageViewFromJson(json); @override @JsonKey() @@ -347,16 +283,26 @@ class _$StacPageViewImpl implements _StacPageView { return EqualUnmodifiableListView(_children); } + /// Create a copy of StacPageView + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacPageView(scrollDirection: $scrollDirection, reverse: $reverse, physics: $physics, pageSnapping: $pageSnapping, onPageChanged: $onPageChanged, dragStartBehavior: $dragStartBehavior, allowImplicitScrolling: $allowImplicitScrolling, restorationId: $restorationId, clipBehavior: $clipBehavior, padEnds: $padEnds, initialPage: $initialPage, keepPage: $keepPage, viewportFraction: $viewportFraction, children: $children)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacPageViewCopyWith<_StacPageView> get copyWith => + __$StacPageViewCopyWithImpl<_StacPageView>(this, _$identity); + + @override + Map toJson() { + return _$StacPageViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacPageViewImpl && + other is _StacPageView && (identical(other.scrollDirection, scrollDirection) || other.scrollDirection == scrollDirection) && (identical(other.reverse, reverse) || other.reverse == reverse) && @@ -401,75 +347,124 @@ class _$StacPageViewImpl implements _StacPageView { viewportFraction, const DeepCollectionEquality().hash(_children)); - /// Create a copy of StacPageView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacPageViewImplCopyWith<_$StacPageViewImpl> get copyWith => - __$$StacPageViewImplCopyWithImpl<_$StacPageViewImpl>(this, _$identity); + String toString() { + return 'StacPageView(scrollDirection: $scrollDirection, reverse: $reverse, physics: $physics, pageSnapping: $pageSnapping, onPageChanged: $onPageChanged, dragStartBehavior: $dragStartBehavior, allowImplicitScrolling: $allowImplicitScrolling, restorationId: $restorationId, clipBehavior: $clipBehavior, padEnds: $padEnds, initialPage: $initialPage, keepPage: $keepPage, viewportFraction: $viewportFraction, children: $children)'; + } +} +/// @nodoc +abstract mixin class _$StacPageViewCopyWith<$Res> + implements $StacPageViewCopyWith<$Res> { + factory _$StacPageViewCopyWith( + _StacPageView value, $Res Function(_StacPageView) _then) = + __$StacPageViewCopyWithImpl; @override - Map toJson() { - return _$$StacPageViewImplToJson( - this, - ); - } + @useResult + $Res call( + {Axis scrollDirection, + bool reverse, + StacScrollPhysics? physics, + bool pageSnapping, + Map? onPageChanged, + DragStartBehavior dragStartBehavior, + bool allowImplicitScrolling, + String? restorationId, + Clip clipBehavior, + bool padEnds, + int initialPage, + dynamic keepPage, + double viewportFraction, + List> children}); } -abstract class _StacPageView implements StacPageView { - const factory _StacPageView( - {final Axis scrollDirection, - final bool reverse, - final StacScrollPhysics? physics, - final bool pageSnapping, - final Map? onPageChanged, - final DragStartBehavior dragStartBehavior, - final bool allowImplicitScrolling, - final String? restorationId, - final Clip clipBehavior, - final bool padEnds, - final int initialPage, - final dynamic keepPage, - final double viewportFraction, - final List> children}) = _$StacPageViewImpl; +/// @nodoc +class __$StacPageViewCopyWithImpl<$Res> + implements _$StacPageViewCopyWith<$Res> { + __$StacPageViewCopyWithImpl(this._self, this._then); - factory _StacPageView.fromJson(Map json) = - _$StacPageViewImpl.fromJson; - - @override - Axis get scrollDirection; - @override - bool get reverse; - @override - StacScrollPhysics? get physics; - @override - bool get pageSnapping; - @override - Map? get onPageChanged; - @override - DragStartBehavior get dragStartBehavior; - @override - bool get allowImplicitScrolling; - @override - String? get restorationId; - @override - Clip get clipBehavior; - @override - bool get padEnds; - @override - int get initialPage; - @override - dynamic get keepPage; - @override - double get viewportFraction; - @override - List> get children; + final _StacPageView _self; + final $Res Function(_StacPageView) _then; /// Create a copy of StacPageView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacPageViewImplCopyWith<_$StacPageViewImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? scrollDirection = null, + Object? reverse = null, + Object? physics = freezed, + Object? pageSnapping = null, + Object? onPageChanged = freezed, + Object? dragStartBehavior = null, + Object? allowImplicitScrolling = null, + Object? restorationId = freezed, + Object? clipBehavior = null, + Object? padEnds = null, + Object? initialPage = null, + Object? keepPage = freezed, + Object? viewportFraction = null, + Object? children = null, + }) { + return _then(_StacPageView( + scrollDirection: null == scrollDirection + ? _self.scrollDirection + : scrollDirection // ignore: cast_nullable_to_non_nullable + as Axis, + reverse: null == reverse + ? _self.reverse + : reverse // ignore: cast_nullable_to_non_nullable + as bool, + physics: freezed == physics + ? _self.physics + : physics // ignore: cast_nullable_to_non_nullable + as StacScrollPhysics?, + pageSnapping: null == pageSnapping + ? _self.pageSnapping + : pageSnapping // ignore: cast_nullable_to_non_nullable + as bool, + onPageChanged: freezed == onPageChanged + ? _self._onPageChanged + : onPageChanged // ignore: cast_nullable_to_non_nullable + as Map?, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + allowImplicitScrolling: null == allowImplicitScrolling + ? _self.allowImplicitScrolling + : allowImplicitScrolling // ignore: cast_nullable_to_non_nullable + as bool, + restorationId: freezed == restorationId + ? _self.restorationId + : restorationId // ignore: cast_nullable_to_non_nullable + as String?, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + padEnds: null == padEnds + ? _self.padEnds + : padEnds // ignore: cast_nullable_to_non_nullable + as bool, + initialPage: null == initialPage + ? _self.initialPage + : initialPage // ignore: cast_nullable_to_non_nullable + as int, + keepPage: freezed == keepPage + ? _self.keepPage + : keepPage // ignore: cast_nullable_to_non_nullable + as dynamic, + viewportFraction: null == viewportFraction + ? _self.viewportFraction + : viewportFraction // ignore: cast_nullable_to_non_nullable + as double, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.g.dart b/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.g.dart index ac7c7437..3edad707 100644 --- a/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_page_view/stac_page_view.g.dart @@ -6,8 +6,8 @@ part of 'stac_page_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacPageViewImpl _$$StacPageViewImplFromJson(Map json) => - _$StacPageViewImpl( +_StacPageView _$StacPageViewFromJson(Map json) => + _StacPageView( scrollDirection: $enumDecodeNullable(_$AxisEnumMap, json['scrollDirection']) ?? Axis.horizontal, @@ -32,7 +32,7 @@ _$StacPageViewImpl _$$StacPageViewImplFromJson(Map json) => const [], ); -Map _$$StacPageViewImplToJson(_$StacPageViewImpl instance) => +Map _$StacPageViewToJson(_StacPageView instance) => { 'scrollDirection': _$AxisEnumMap[instance.scrollDirection]!, 'reverse': instance.reverse, diff --git a/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.dart b/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.dart index 0a732b07..dc3cc364 100644 --- a/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.dart +++ b/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.dart @@ -6,7 +6,7 @@ part 'stac_placeholder.freezed.dart'; part 'stac_placeholder.g.dart'; @freezed -class StacPlaceholder with _$StacPlaceholder { +abstract class StacPlaceholder with _$StacPlaceholder { const factory StacPlaceholder({ @Default(2.0) double fallbackWidth, @Default(400.0) double fallbackHeight, diff --git a/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.freezed.dart b/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.freezed.dart index 469d7393..fe3fab79 100644 --- a/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,100 +10,59 @@ part of 'stac_placeholder.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacPlaceholder _$StacPlaceholderFromJson(Map json) { - return _StacPlaceholder.fromJson(json); -} - /// @nodoc mixin _$StacPlaceholder { - double get fallbackWidth => throw _privateConstructorUsedError; - double get fallbackHeight => throw _privateConstructorUsedError; - double get strokeWidth => throw _privateConstructorUsedError; - String get color => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacPlaceholder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get fallbackWidth; + double get fallbackHeight; + double get strokeWidth; + String get color; + Map? get child; /// Create a copy of StacPlaceholder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacPlaceholderCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacPlaceholderCopyWithImpl( + this as StacPlaceholder, _$identity); -/// @nodoc -abstract class $StacPlaceholderCopyWith<$Res> { - factory $StacPlaceholderCopyWith( - StacPlaceholder value, $Res Function(StacPlaceholder) then) = - _$StacPlaceholderCopyWithImpl<$Res, StacPlaceholder>; - @useResult - $Res call( - {double fallbackWidth, - double fallbackHeight, - double strokeWidth, - String color, - Map? child}); -} + /// Serializes this StacPlaceholder to a JSON map. + Map toJson(); -/// @nodoc -class _$StacPlaceholderCopyWithImpl<$Res, $Val extends StacPlaceholder> - implements $StacPlaceholderCopyWith<$Res> { - _$StacPlaceholderCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacPlaceholder && + (identical(other.fallbackWidth, fallbackWidth) || + other.fallbackWidth == fallbackWidth) && + (identical(other.fallbackHeight, fallbackHeight) || + other.fallbackHeight == fallbackHeight) && + (identical(other.strokeWidth, strokeWidth) || + other.strokeWidth == strokeWidth) && + (identical(other.color, color) || other.color == color) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, fallbackWidth, fallbackHeight, + strokeWidth, color, const DeepCollectionEquality().hash(child)); - /// Create a copy of StacPlaceholder - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? fallbackWidth = null, - Object? fallbackHeight = null, - Object? strokeWidth = null, - Object? color = null, - Object? child = freezed, - }) { - return _then(_value.copyWith( - fallbackWidth: null == fallbackWidth - ? _value.fallbackWidth - : fallbackWidth // ignore: cast_nullable_to_non_nullable - as double, - fallbackHeight: null == fallbackHeight - ? _value.fallbackHeight - : fallbackHeight // ignore: cast_nullable_to_non_nullable - as double, - strokeWidth: null == strokeWidth - ? _value.strokeWidth - : strokeWidth // ignore: cast_nullable_to_non_nullable - as double, - color: null == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacPlaceholder(fallbackWidth: $fallbackWidth, fallbackHeight: $fallbackHeight, strokeWidth: $strokeWidth, color: $color, child: $child)'; } } /// @nodoc -abstract class _$$StacPlaceholderImplCopyWith<$Res> - implements $StacPlaceholderCopyWith<$Res> { - factory _$$StacPlaceholderImplCopyWith(_$StacPlaceholderImpl value, - $Res Function(_$StacPlaceholderImpl) then) = - __$$StacPlaceholderImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacPlaceholderCopyWith<$Res> { + factory $StacPlaceholderCopyWith( + StacPlaceholder value, $Res Function(StacPlaceholder) _then) = + _$StacPlaceholderCopyWithImpl; @useResult $Res call( {double fallbackWidth, @@ -113,12 +73,12 @@ abstract class _$$StacPlaceholderImplCopyWith<$Res> } /// @nodoc -class __$$StacPlaceholderImplCopyWithImpl<$Res> - extends _$StacPlaceholderCopyWithImpl<$Res, _$StacPlaceholderImpl> - implements _$$StacPlaceholderImplCopyWith<$Res> { - __$$StacPlaceholderImplCopyWithImpl( - _$StacPlaceholderImpl _value, $Res Function(_$StacPlaceholderImpl) _then) - : super(_value, _then); +class _$StacPlaceholderCopyWithImpl<$Res> + implements $StacPlaceholderCopyWith<$Res> { + _$StacPlaceholderCopyWithImpl(this._self, this._then); + + final StacPlaceholder _self; + final $Res Function(StacPlaceholder) _then; /// Create a copy of StacPlaceholder /// with the given fields replaced by the non-null parameter values. @@ -131,25 +91,25 @@ class __$$StacPlaceholderImplCopyWithImpl<$Res> Object? color = null, Object? child = freezed, }) { - return _then(_$StacPlaceholderImpl( + return _then(_self.copyWith( fallbackWidth: null == fallbackWidth - ? _value.fallbackWidth + ? _self.fallbackWidth : fallbackWidth // ignore: cast_nullable_to_non_nullable as double, fallbackHeight: null == fallbackHeight - ? _value.fallbackHeight + ? _self.fallbackHeight : fallbackHeight // ignore: cast_nullable_to_non_nullable as double, strokeWidth: null == strokeWidth - ? _value.strokeWidth + ? _self.strokeWidth : strokeWidth // ignore: cast_nullable_to_non_nullable as double, color: null == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -158,17 +118,16 @@ class __$$StacPlaceholderImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacPlaceholderImpl implements _StacPlaceholder { - const _$StacPlaceholderImpl( +class _StacPlaceholder implements StacPlaceholder { + const _StacPlaceholder( {this.fallbackWidth = 2.0, this.fallbackHeight = 400.0, this.strokeWidth = 400.0, this.color = '#455A64', final Map? child}) : _child = child; - - factory _$StacPlaceholderImpl.fromJson(Map json) => - _$$StacPlaceholderImplFromJson(json); + factory _StacPlaceholder.fromJson(Map json) => + _$StacPlaceholderFromJson(json); @override @JsonKey() @@ -192,16 +151,26 @@ class _$StacPlaceholderImpl implements _StacPlaceholder { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacPlaceholder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacPlaceholder(fallbackWidth: $fallbackWidth, fallbackHeight: $fallbackHeight, strokeWidth: $strokeWidth, color: $color, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacPlaceholderCopyWith<_StacPlaceholder> get copyWith => + __$StacPlaceholderCopyWithImpl<_StacPlaceholder>(this, _$identity); + + @override + Map toJson() { + return _$StacPlaceholderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacPlaceholderImpl && + other is _StacPlaceholder && (identical(other.fallbackWidth, fallbackWidth) || other.fallbackWidth == fallbackWidth) && (identical(other.fallbackHeight, fallbackHeight) || @@ -217,49 +186,70 @@ class _$StacPlaceholderImpl implements _StacPlaceholder { int get hashCode => Object.hash(runtimeType, fallbackWidth, fallbackHeight, strokeWidth, color, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacPlaceholder - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacPlaceholderImplCopyWith<_$StacPlaceholderImpl> get copyWith => - __$$StacPlaceholderImplCopyWithImpl<_$StacPlaceholderImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacPlaceholderImplToJson( - this, - ); + String toString() { + return 'StacPlaceholder(fallbackWidth: $fallbackWidth, fallbackHeight: $fallbackHeight, strokeWidth: $strokeWidth, color: $color, child: $child)'; } } -abstract class _StacPlaceholder implements StacPlaceholder { - const factory _StacPlaceholder( - {final double fallbackWidth, - final double fallbackHeight, - final double strokeWidth, - final String color, - final Map? child}) = _$StacPlaceholderImpl; +/// @nodoc +abstract mixin class _$StacPlaceholderCopyWith<$Res> + implements $StacPlaceholderCopyWith<$Res> { + factory _$StacPlaceholderCopyWith( + _StacPlaceholder value, $Res Function(_StacPlaceholder) _then) = + __$StacPlaceholderCopyWithImpl; + @override + @useResult + $Res call( + {double fallbackWidth, + double fallbackHeight, + double strokeWidth, + String color, + Map? child}); +} - factory _StacPlaceholder.fromJson(Map json) = - _$StacPlaceholderImpl.fromJson; +/// @nodoc +class __$StacPlaceholderCopyWithImpl<$Res> + implements _$StacPlaceholderCopyWith<$Res> { + __$StacPlaceholderCopyWithImpl(this._self, this._then); - @override - double get fallbackWidth; - @override - double get fallbackHeight; - @override - double get strokeWidth; - @override - String get color; - @override - Map? get child; + final _StacPlaceholder _self; + final $Res Function(_StacPlaceholder) _then; /// Create a copy of StacPlaceholder /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacPlaceholderImplCopyWith<_$StacPlaceholderImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? fallbackWidth = null, + Object? fallbackHeight = null, + Object? strokeWidth = null, + Object? color = null, + Object? child = freezed, + }) { + return _then(_StacPlaceholder( + fallbackWidth: null == fallbackWidth + ? _self.fallbackWidth + : fallbackWidth // ignore: cast_nullable_to_non_nullable + as double, + fallbackHeight: null == fallbackHeight + ? _self.fallbackHeight + : fallbackHeight // ignore: cast_nullable_to_non_nullable + as double, + strokeWidth: null == strokeWidth + ? _self.strokeWidth + : strokeWidth // ignore: cast_nullable_to_non_nullable + as double, + color: null == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.g.dart b/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.g.dart index 9a60ca56..38e6dff7 100644 --- a/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.g.dart +++ b/packages/stac/lib/src/parsers/stac_placeholder/stac_placeholder.g.dart @@ -6,9 +6,8 @@ part of 'stac_placeholder.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacPlaceholderImpl _$$StacPlaceholderImplFromJson( - Map json) => - _$StacPlaceholderImpl( +_StacPlaceholder _$StacPlaceholderFromJson(Map json) => + _StacPlaceholder( fallbackWidth: (json['fallbackWidth'] as num?)?.toDouble() ?? 2.0, fallbackHeight: (json['fallbackHeight'] as num?)?.toDouble() ?? 400.0, strokeWidth: (json['strokeWidth'] as num?)?.toDouble() ?? 400.0, @@ -16,8 +15,7 @@ _$StacPlaceholderImpl _$$StacPlaceholderImplFromJson( child: json['child'] as Map?, ); -Map _$$StacPlaceholderImplToJson( - _$StacPlaceholderImpl instance) => +Map _$StacPlaceholderToJson(_StacPlaceholder instance) => { 'fallbackWidth': instance.fallbackWidth, 'fallbackHeight': instance.fallbackHeight, diff --git a/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.dart b/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.dart index cb05db42..0b32cbbc 100644 --- a/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.dart +++ b/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.dart @@ -15,7 +15,7 @@ part 'stac_positioned.g.dart'; enum StacPositionedType { directional, fill, fromRect } @freezed -class StacPositioned with _$StacPositioned { +abstract class StacPositioned with _$StacPositioned { const factory StacPositioned({ StacPositionedType? positionedType, double? left, diff --git a/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.freezed.dart b/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.freezed.dart index 6ebafe2a..eb092450 100644 --- a/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,45 +10,84 @@ part of 'stac_positioned.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacPositioned _$StacPositionedFromJson(Map json) { - return _StacPositioned.fromJson(json); -} - /// @nodoc mixin _$StacPositioned { - StacPositionedType? get positionedType => throw _privateConstructorUsedError; - double? get left => throw _privateConstructorUsedError; - double? get top => throw _privateConstructorUsedError; - double? get right => throw _privateConstructorUsedError; - double? get bottom => throw _privateConstructorUsedError; - double? get width => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - double? get start => throw _privateConstructorUsedError; - double? get end => throw _privateConstructorUsedError; - TextDirection get textDirection => throw _privateConstructorUsedError; - StacRect? get rect => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacPositioned to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacPositionedType? get positionedType; + double? get left; + double? get top; + double? get right; + double? get bottom; + double? get width; + double? get height; + double? get start; + double? get end; + TextDirection get textDirection; + StacRect? get rect; + Map? get child; /// Create a copy of StacPositioned /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacPositionedCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacPositionedCopyWithImpl( + this as StacPositioned, _$identity); + + /// Serializes this StacPositioned to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacPositioned && + (identical(other.positionedType, positionedType) || + other.positionedType == positionedType) && + (identical(other.left, left) || other.left == left) && + (identical(other.top, top) || other.top == top) && + (identical(other.right, right) || other.right == right) && + (identical(other.bottom, bottom) || other.bottom == bottom) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.start, start) || other.start == start) && + (identical(other.end, end) || other.end == end) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + (identical(other.rect, rect) || other.rect == rect) && + const DeepCollectionEquality().equals(other.child, child)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + positionedType, + left, + top, + right, + bottom, + width, + height, + start, + end, + textDirection, + rect, + const DeepCollectionEquality().hash(child)); + + @override + String toString() { + return 'StacPositioned(positionedType: $positionedType, left: $left, top: $top, right: $right, bottom: $bottom, width: $width, height: $height, start: $start, end: $end, textDirection: $textDirection, rect: $rect, child: $child)'; + } } /// @nodoc -abstract class $StacPositionedCopyWith<$Res> { +abstract mixin class $StacPositionedCopyWith<$Res> { factory $StacPositionedCopyWith( - StacPositioned value, $Res Function(StacPositioned) then) = - _$StacPositionedCopyWithImpl<$Res, StacPositioned>; + StacPositioned value, $Res Function(StacPositioned) _then) = + _$StacPositionedCopyWithImpl; @useResult $Res call( {StacPositionedType? positionedType, @@ -67,14 +107,12 @@ abstract class $StacPositionedCopyWith<$Res> { } /// @nodoc -class _$StacPositionedCopyWithImpl<$Res, $Val extends StacPositioned> +class _$StacPositionedCopyWithImpl<$Res> implements $StacPositionedCopyWith<$Res> { - _$StacPositionedCopyWithImpl(this._value, this._then); + _$StacPositionedCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacPositioned _self; + final $Res Function(StacPositioned) _then; /// Create a copy of StacPositioned /// with the given fields replaced by the non-null parameter values. @@ -94,56 +132,56 @@ class _$StacPositionedCopyWithImpl<$Res, $Val extends StacPositioned> Object? rect = freezed, Object? child = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( positionedType: freezed == positionedType - ? _value.positionedType + ? _self.positionedType : positionedType // ignore: cast_nullable_to_non_nullable as StacPositionedType?, left: freezed == left - ? _value.left + ? _self.left : left // ignore: cast_nullable_to_non_nullable as double?, top: freezed == top - ? _value.top + ? _self.top : top // ignore: cast_nullable_to_non_nullable as double?, right: freezed == right - ? _value.right + ? _self.right : right // ignore: cast_nullable_to_non_nullable as double?, bottom: freezed == bottom - ? _value.bottom + ? _self.bottom : bottom // ignore: cast_nullable_to_non_nullable as double?, width: freezed == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, start: freezed == start - ? _value.start + ? _self.start : start // ignore: cast_nullable_to_non_nullable as double?, end: freezed == end - ? _value.end + ? _self.end : end // ignore: cast_nullable_to_non_nullable as double?, textDirection: null == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection, rect: freezed == rect - ? _value.rect + ? _self.rect : rect // ignore: cast_nullable_to_non_nullable as StacRect?, child: freezed == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, - ) as $Val); + )); } /// Create a copy of StacPositioned @@ -151,125 +189,20 @@ class _$StacPositionedCopyWithImpl<$Res, $Val extends StacPositioned> @override @pragma('vm:prefer-inline') $StacRectCopyWith<$Res>? get rect { - if (_value.rect == null) { + if (_self.rect == null) { return null; } - return $StacRectCopyWith<$Res>(_value.rect!, (value) { - return _then(_value.copyWith(rect: value) as $Val); + return $StacRectCopyWith<$Res>(_self.rect!, (value) { + return _then(_self.copyWith(rect: value)); }); } } -/// @nodoc -abstract class _$$StacPositionedImplCopyWith<$Res> - implements $StacPositionedCopyWith<$Res> { - factory _$$StacPositionedImplCopyWith(_$StacPositionedImpl value, - $Res Function(_$StacPositionedImpl) then) = - __$$StacPositionedImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacPositionedType? positionedType, - double? left, - double? top, - double? right, - double? bottom, - double? width, - double? height, - double? start, - double? end, - TextDirection textDirection, - StacRect? rect, - Map? child}); - - @override - $StacRectCopyWith<$Res>? get rect; -} - -/// @nodoc -class __$$StacPositionedImplCopyWithImpl<$Res> - extends _$StacPositionedCopyWithImpl<$Res, _$StacPositionedImpl> - implements _$$StacPositionedImplCopyWith<$Res> { - __$$StacPositionedImplCopyWithImpl( - _$StacPositionedImpl _value, $Res Function(_$StacPositionedImpl) _then) - : super(_value, _then); - - /// Create a copy of StacPositioned - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? positionedType = freezed, - Object? left = freezed, - Object? top = freezed, - Object? right = freezed, - Object? bottom = freezed, - Object? width = freezed, - Object? height = freezed, - Object? start = freezed, - Object? end = freezed, - Object? textDirection = null, - Object? rect = freezed, - Object? child = freezed, - }) { - return _then(_$StacPositionedImpl( - positionedType: freezed == positionedType - ? _value.positionedType - : positionedType // ignore: cast_nullable_to_non_nullable - as StacPositionedType?, - left: freezed == left - ? _value.left - : left // ignore: cast_nullable_to_non_nullable - as double?, - top: freezed == top - ? _value.top - : top // ignore: cast_nullable_to_non_nullable - as double?, - right: freezed == right - ? _value.right - : right // ignore: cast_nullable_to_non_nullable - as double?, - bottom: freezed == bottom - ? _value.bottom - : bottom // ignore: cast_nullable_to_non_nullable - as double?, - width: freezed == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - start: freezed == start - ? _value.start - : start // ignore: cast_nullable_to_non_nullable - as double?, - end: freezed == end - ? _value.end - : end // ignore: cast_nullable_to_non_nullable - as double?, - textDirection: null == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection, - rect: freezed == rect - ? _value.rect - : rect // ignore: cast_nullable_to_non_nullable - as StacRect?, - child: freezed == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacPositionedImpl implements _StacPositioned { - const _$StacPositionedImpl( +class _StacPositioned implements StacPositioned { + const _StacPositioned( {this.positionedType, this.left, this.top, @@ -283,9 +216,8 @@ class _$StacPositionedImpl implements _StacPositioned { this.rect, final Map? child}) : _child = child; - - factory _$StacPositionedImpl.fromJson(Map json) => - _$$StacPositionedImplFromJson(json); + factory _StacPositioned.fromJson(Map json) => + _$StacPositionedFromJson(json); @override final StacPositionedType? positionedType; @@ -320,16 +252,26 @@ class _$StacPositionedImpl implements _StacPositioned { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacPositioned + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacPositionedCopyWith<_StacPositioned> get copyWith => + __$StacPositionedCopyWithImpl<_StacPositioned>(this, _$identity); + @override - String toString() { - return 'StacPositioned(positionedType: $positionedType, left: $left, top: $top, right: $right, bottom: $bottom, width: $width, height: $height, start: $start, end: $end, textDirection: $textDirection, rect: $rect, child: $child)'; + Map toJson() { + return _$StacPositionedToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacPositionedImpl && + other is _StacPositioned && (identical(other.positionedType, positionedType) || other.positionedType == positionedType) && (identical(other.left, left) || other.left == left) && @@ -363,70 +305,129 @@ class _$StacPositionedImpl implements _StacPositioned { rect, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacPositioned - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacPositionedImplCopyWith<_$StacPositionedImpl> get copyWith => - __$$StacPositionedImplCopyWithImpl<_$StacPositionedImpl>( - this, _$identity); + String toString() { + return 'StacPositioned(positionedType: $positionedType, left: $left, top: $top, right: $right, bottom: $bottom, width: $width, height: $height, start: $start, end: $end, textDirection: $textDirection, rect: $rect, child: $child)'; + } +} +/// @nodoc +abstract mixin class _$StacPositionedCopyWith<$Res> + implements $StacPositionedCopyWith<$Res> { + factory _$StacPositionedCopyWith( + _StacPositioned value, $Res Function(_StacPositioned) _then) = + __$StacPositionedCopyWithImpl; @override - Map toJson() { - return _$$StacPositionedImplToJson( - this, - ); - } + @useResult + $Res call( + {StacPositionedType? positionedType, + double? left, + double? top, + double? right, + double? bottom, + double? width, + double? height, + double? start, + double? end, + TextDirection textDirection, + StacRect? rect, + Map? child}); + + @override + $StacRectCopyWith<$Res>? get rect; } -abstract class _StacPositioned implements StacPositioned { - const factory _StacPositioned( - {final StacPositionedType? positionedType, - final double? left, - final double? top, - final double? right, - final double? bottom, - final double? width, - final double? height, - final double? start, - final double? end, - final TextDirection textDirection, - final StacRect? rect, - final Map? child}) = _$StacPositionedImpl; +/// @nodoc +class __$StacPositionedCopyWithImpl<$Res> + implements _$StacPositionedCopyWith<$Res> { + __$StacPositionedCopyWithImpl(this._self, this._then); - factory _StacPositioned.fromJson(Map json) = - _$StacPositionedImpl.fromJson; + final _StacPositioned _self; + final $Res Function(_StacPositioned) _then; + /// Create a copy of StacPositioned + /// with the given fields replaced by the non-null parameter values. @override - StacPositionedType? get positionedType; - @override - double? get left; - @override - double? get top; - @override - double? get right; - @override - double? get bottom; - @override - double? get width; - @override - double? get height; - @override - double? get start; - @override - double? get end; - @override - TextDirection get textDirection; - @override - StacRect? get rect; - @override - Map? get child; + @pragma('vm:prefer-inline') + $Res call({ + Object? positionedType = freezed, + Object? left = freezed, + Object? top = freezed, + Object? right = freezed, + Object? bottom = freezed, + Object? width = freezed, + Object? height = freezed, + Object? start = freezed, + Object? end = freezed, + Object? textDirection = null, + Object? rect = freezed, + Object? child = freezed, + }) { + return _then(_StacPositioned( + positionedType: freezed == positionedType + ? _self.positionedType + : positionedType // ignore: cast_nullable_to_non_nullable + as StacPositionedType?, + left: freezed == left + ? _self.left + : left // ignore: cast_nullable_to_non_nullable + as double?, + top: freezed == top + ? _self.top + : top // ignore: cast_nullable_to_non_nullable + as double?, + right: freezed == right + ? _self.right + : right // ignore: cast_nullable_to_non_nullable + as double?, + bottom: freezed == bottom + ? _self.bottom + : bottom // ignore: cast_nullable_to_non_nullable + as double?, + width: freezed == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as double?, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + start: freezed == start + ? _self.start + : start // ignore: cast_nullable_to_non_nullable + as double?, + end: freezed == end + ? _self.end + : end // ignore: cast_nullable_to_non_nullable + as double?, + textDirection: null == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection, + rect: freezed == rect + ? _self.rect + : rect // ignore: cast_nullable_to_non_nullable + as StacRect?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } /// Create a copy of StacPositioned /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacPositionedImplCopyWith<_$StacPositionedImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacRectCopyWith<$Res>? get rect { + if (_self.rect == null) { + return null; + } + + return $StacRectCopyWith<$Res>(_self.rect!, (value) { + return _then(_self.copyWith(rect: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.g.dart b/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.g.dart index 68383cff..5a1b1959 100644 --- a/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.g.dart +++ b/packages/stac/lib/src/parsers/stac_positioned/stac_positioned.g.dart @@ -6,8 +6,8 @@ part of 'stac_positioned.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacPositionedImpl _$$StacPositionedImplFromJson(Map json) => - _$StacPositionedImpl( +_StacPositioned _$StacPositionedFromJson(Map json) => + _StacPositioned( positionedType: $enumDecodeNullable( _$StacPositionedTypeEnumMap, json['positionedType']), left: (json['left'] as num?)?.toDouble(), @@ -27,8 +27,7 @@ _$StacPositionedImpl _$$StacPositionedImplFromJson(Map json) => child: json['child'] as Map?, ); -Map _$$StacPositionedImplToJson( - _$StacPositionedImpl instance) => +Map _$StacPositionedToJson(_StacPositioned instance) => { 'positionedType': _$StacPositionedTypeEnumMap[instance.positionedType], 'left': instance.left, diff --git a/packages/stac/lib/src/parsers/stac_radio/stac_radio.dart b/packages/stac/lib/src/parsers/stac_radio/stac_radio.dart index f0450702..5d229dad 100644 --- a/packages/stac/lib/src/parsers/stac_radio/stac_radio.dart +++ b/packages/stac/lib/src/parsers/stac_radio/stac_radio.dart @@ -11,7 +11,7 @@ part 'stac_radio.g.dart'; enum StacRadioType { adaptive, cupertino, material } @freezed -class StacRadio with _$StacRadio { +abstract class StacRadio with _$StacRadio { const factory StacRadio({ @Default(StacRadioType.material) StacRadioType radioType, dynamic value, diff --git a/packages/stac/lib/src/parsers/stac_radio/stac_radio.freezed.dart b/packages/stac/lib/src/parsers/stac_radio/stac_radio.freezed.dart index 56b1ba7d..376a39f8 100644 --- a/packages/stac/lib/src/parsers/stac_radio/stac_radio.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_radio/stac_radio.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,50 +10,112 @@ part of 'stac_radio.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacRadio _$StacRadioFromJson(Map json) { - return _StacRadio.fromJson(json); -} - /// @nodoc mixin _$StacRadio { - StacRadioType get radioType => throw _privateConstructorUsedError; - dynamic get value => throw _privateConstructorUsedError; - Map? get onChanged => throw _privateConstructorUsedError; - StacMouseCursor? get mouseCursor => throw _privateConstructorUsedError; - bool get toggleable => throw _privateConstructorUsedError; - String? get activeColor => throw _privateConstructorUsedError; - String? get inactiveColor => throw _privateConstructorUsedError; - String? get fillColor => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - String? get overlayColor => throw _privateConstructorUsedError; - double? get splashRadius => throw _privateConstructorUsedError; - MaterialTapTargetSize? get materialTapTargetSize => - throw _privateConstructorUsedError; - StacVisualDensity? get visualDensity => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - bool get useCheckmarkStyle => throw _privateConstructorUsedError; - bool get useCupertinoCheckmarkStyle => throw _privateConstructorUsedError; - - /// Serializes this StacRadio to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacRadioType get radioType; + dynamic get value; + Map? get onChanged; + StacMouseCursor? get mouseCursor; + bool get toggleable; + String? get activeColor; + String? get inactiveColor; + String? get fillColor; + String? get focusColor; + String? get hoverColor; + String? get overlayColor; + double? get splashRadius; + MaterialTapTargetSize? get materialTapTargetSize; + StacVisualDensity? get visualDensity; + bool get autofocus; + bool get useCheckmarkStyle; + bool get useCupertinoCheckmarkStyle; /// Create a copy of StacRadio /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacRadioCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacRadioCopyWithImpl(this as StacRadio, _$identity); + + /// Serializes this StacRadio to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacRadio && + (identical(other.radioType, radioType) || + other.radioType == radioType) && + const DeepCollectionEquality().equals(other.value, value) && + const DeepCollectionEquality().equals(other.onChanged, onChanged) && + (identical(other.mouseCursor, mouseCursor) || + other.mouseCursor == mouseCursor) && + (identical(other.toggleable, toggleable) || + other.toggleable == toggleable) && + (identical(other.activeColor, activeColor) || + other.activeColor == activeColor) && + (identical(other.inactiveColor, inactiveColor) || + other.inactiveColor == inactiveColor) && + (identical(other.fillColor, fillColor) || + other.fillColor == fillColor) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.overlayColor, overlayColor) || + other.overlayColor == overlayColor) && + (identical(other.splashRadius, splashRadius) || + other.splashRadius == splashRadius) && + (identical(other.materialTapTargetSize, materialTapTargetSize) || + other.materialTapTargetSize == materialTapTargetSize) && + (identical(other.visualDensity, visualDensity) || + other.visualDensity == visualDensity) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.useCheckmarkStyle, useCheckmarkStyle) || + other.useCheckmarkStyle == useCheckmarkStyle) && + (identical(other.useCupertinoCheckmarkStyle, + useCupertinoCheckmarkStyle) || + other.useCupertinoCheckmarkStyle == + useCupertinoCheckmarkStyle)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + radioType, + const DeepCollectionEquality().hash(value), + const DeepCollectionEquality().hash(onChanged), + mouseCursor, + toggleable, + activeColor, + inactiveColor, + fillColor, + focusColor, + hoverColor, + overlayColor, + splashRadius, + materialTapTargetSize, + visualDensity, + autofocus, + useCheckmarkStyle, + useCupertinoCheckmarkStyle); + + @override + String toString() { + return 'StacRadio(radioType: $radioType, value: $value, onChanged: $onChanged, mouseCursor: $mouseCursor, toggleable: $toggleable, activeColor: $activeColor, inactiveColor: $inactiveColor, fillColor: $fillColor, focusColor: $focusColor, hoverColor: $hoverColor, overlayColor: $overlayColor, splashRadius: $splashRadius, materialTapTargetSize: $materialTapTargetSize, visualDensity: $visualDensity, autofocus: $autofocus, useCheckmarkStyle: $useCheckmarkStyle, useCupertinoCheckmarkStyle: $useCupertinoCheckmarkStyle)'; + } } /// @nodoc -abstract class $StacRadioCopyWith<$Res> { - factory $StacRadioCopyWith(StacRadio value, $Res Function(StacRadio) then) = - _$StacRadioCopyWithImpl<$Res, StacRadio>; +abstract mixin class $StacRadioCopyWith<$Res> { + factory $StacRadioCopyWith(StacRadio value, $Res Function(StacRadio) _then) = + _$StacRadioCopyWithImpl; @useResult $Res call( {StacRadioType radioType, @@ -77,14 +140,11 @@ abstract class $StacRadioCopyWith<$Res> { } /// @nodoc -class _$StacRadioCopyWithImpl<$Res, $Val extends StacRadio> - implements $StacRadioCopyWith<$Res> { - _$StacRadioCopyWithImpl(this._value, this._then); +class _$StacRadioCopyWithImpl<$Res> implements $StacRadioCopyWith<$Res> { + _$StacRadioCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacRadio _self; + final $Res Function(StacRadio) _then; /// Create a copy of StacRadio /// with the given fields replaced by the non-null parameter values. @@ -109,76 +169,76 @@ class _$StacRadioCopyWithImpl<$Res, $Val extends StacRadio> Object? useCheckmarkStyle = null, Object? useCupertinoCheckmarkStyle = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( radioType: null == radioType - ? _value.radioType + ? _self.radioType : radioType // ignore: cast_nullable_to_non_nullable as StacRadioType, value: freezed == value - ? _value.value + ? _self.value : value // ignore: cast_nullable_to_non_nullable as dynamic, onChanged: freezed == onChanged - ? _value.onChanged + ? _self.onChanged : onChanged // ignore: cast_nullable_to_non_nullable as Map?, mouseCursor: freezed == mouseCursor - ? _value.mouseCursor + ? _self.mouseCursor : mouseCursor // ignore: cast_nullable_to_non_nullable as StacMouseCursor?, toggleable: null == toggleable - ? _value.toggleable + ? _self.toggleable : toggleable // ignore: cast_nullable_to_non_nullable as bool, activeColor: freezed == activeColor - ? _value.activeColor + ? _self.activeColor : activeColor // ignore: cast_nullable_to_non_nullable as String?, inactiveColor: freezed == inactiveColor - ? _value.inactiveColor + ? _self.inactiveColor : inactiveColor // ignore: cast_nullable_to_non_nullable as String?, fillColor: freezed == fillColor - ? _value.fillColor + ? _self.fillColor : fillColor // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, overlayColor: freezed == overlayColor - ? _value.overlayColor + ? _self.overlayColor : overlayColor // ignore: cast_nullable_to_non_nullable as String?, splashRadius: freezed == splashRadius - ? _value.splashRadius + ? _self.splashRadius : splashRadius // ignore: cast_nullable_to_non_nullable as double?, materialTapTargetSize: freezed == materialTapTargetSize - ? _value.materialTapTargetSize + ? _self.materialTapTargetSize : materialTapTargetSize // ignore: cast_nullable_to_non_nullable as MaterialTapTargetSize?, visualDensity: freezed == visualDensity - ? _value.visualDensity + ? _self.visualDensity : visualDensity // ignore: cast_nullable_to_non_nullable as StacVisualDensity?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, useCheckmarkStyle: null == useCheckmarkStyle - ? _value.useCheckmarkStyle + ? _self.useCheckmarkStyle : useCheckmarkStyle // ignore: cast_nullable_to_non_nullable as bool, useCupertinoCheckmarkStyle: null == useCupertinoCheckmarkStyle - ? _value.useCupertinoCheckmarkStyle + ? _self.useCupertinoCheckmarkStyle : useCupertinoCheckmarkStyle // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of StacRadio @@ -186,155 +246,20 @@ class _$StacRadioCopyWithImpl<$Res, $Val extends StacRadio> @override @pragma('vm:prefer-inline') $StacVisualDensityCopyWith<$Res>? get visualDensity { - if (_value.visualDensity == null) { + if (_self.visualDensity == null) { return null; } - return $StacVisualDensityCopyWith<$Res>(_value.visualDensity!, (value) { - return _then(_value.copyWith(visualDensity: value) as $Val); + return $StacVisualDensityCopyWith<$Res>(_self.visualDensity!, (value) { + return _then(_self.copyWith(visualDensity: value)); }); } } -/// @nodoc -abstract class _$$StacRadioImplCopyWith<$Res> - implements $StacRadioCopyWith<$Res> { - factory _$$StacRadioImplCopyWith( - _$StacRadioImpl value, $Res Function(_$StacRadioImpl) then) = - __$$StacRadioImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacRadioType radioType, - dynamic value, - Map? onChanged, - StacMouseCursor? mouseCursor, - bool toggleable, - String? activeColor, - String? inactiveColor, - String? fillColor, - String? focusColor, - String? hoverColor, - String? overlayColor, - double? splashRadius, - MaterialTapTargetSize? materialTapTargetSize, - StacVisualDensity? visualDensity, - bool autofocus, - bool useCheckmarkStyle, - bool useCupertinoCheckmarkStyle}); - - @override - $StacVisualDensityCopyWith<$Res>? get visualDensity; -} - -/// @nodoc -class __$$StacRadioImplCopyWithImpl<$Res> - extends _$StacRadioCopyWithImpl<$Res, _$StacRadioImpl> - implements _$$StacRadioImplCopyWith<$Res> { - __$$StacRadioImplCopyWithImpl( - _$StacRadioImpl _value, $Res Function(_$StacRadioImpl) _then) - : super(_value, _then); - - /// Create a copy of StacRadio - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? radioType = null, - Object? value = freezed, - Object? onChanged = freezed, - Object? mouseCursor = freezed, - Object? toggleable = null, - Object? activeColor = freezed, - Object? inactiveColor = freezed, - Object? fillColor = freezed, - Object? focusColor = freezed, - Object? hoverColor = freezed, - Object? overlayColor = freezed, - Object? splashRadius = freezed, - Object? materialTapTargetSize = freezed, - Object? visualDensity = freezed, - Object? autofocus = null, - Object? useCheckmarkStyle = null, - Object? useCupertinoCheckmarkStyle = null, - }) { - return _then(_$StacRadioImpl( - radioType: null == radioType - ? _value.radioType - : radioType // ignore: cast_nullable_to_non_nullable - as StacRadioType, - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as dynamic, - onChanged: freezed == onChanged - ? _value._onChanged - : onChanged // ignore: cast_nullable_to_non_nullable - as Map?, - mouseCursor: freezed == mouseCursor - ? _value.mouseCursor - : mouseCursor // ignore: cast_nullable_to_non_nullable - as StacMouseCursor?, - toggleable: null == toggleable - ? _value.toggleable - : toggleable // ignore: cast_nullable_to_non_nullable - as bool, - activeColor: freezed == activeColor - ? _value.activeColor - : activeColor // ignore: cast_nullable_to_non_nullable - as String?, - inactiveColor: freezed == inactiveColor - ? _value.inactiveColor - : inactiveColor // ignore: cast_nullable_to_non_nullable - as String?, - fillColor: freezed == fillColor - ? _value.fillColor - : fillColor // ignore: cast_nullable_to_non_nullable - as String?, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - overlayColor: freezed == overlayColor - ? _value.overlayColor - : overlayColor // ignore: cast_nullable_to_non_nullable - as String?, - splashRadius: freezed == splashRadius - ? _value.splashRadius - : splashRadius // ignore: cast_nullable_to_non_nullable - as double?, - materialTapTargetSize: freezed == materialTapTargetSize - ? _value.materialTapTargetSize - : materialTapTargetSize // ignore: cast_nullable_to_non_nullable - as MaterialTapTargetSize?, - visualDensity: freezed == visualDensity - ? _value.visualDensity - : visualDensity // ignore: cast_nullable_to_non_nullable - as StacVisualDensity?, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - useCheckmarkStyle: null == useCheckmarkStyle - ? _value.useCheckmarkStyle - : useCheckmarkStyle // ignore: cast_nullable_to_non_nullable - as bool, - useCupertinoCheckmarkStyle: null == useCupertinoCheckmarkStyle - ? _value.useCupertinoCheckmarkStyle - : useCupertinoCheckmarkStyle // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacRadioImpl implements _StacRadio { - const _$StacRadioImpl( +class _StacRadio implements StacRadio { + const _StacRadio( {this.radioType = StacRadioType.material, this.value, final Map? onChanged, @@ -353,9 +278,8 @@ class _$StacRadioImpl implements _StacRadio { this.useCheckmarkStyle = false, this.useCupertinoCheckmarkStyle = false}) : _onChanged = onChanged; - - factory _$StacRadioImpl.fromJson(Map json) => - _$$StacRadioImplFromJson(json); + factory _StacRadio.fromJson(Map json) => + _$StacRadioFromJson(json); @override @JsonKey() @@ -405,16 +329,26 @@ class _$StacRadioImpl implements _StacRadio { @JsonKey() final bool useCupertinoCheckmarkStyle; + /// Create a copy of StacRadio + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacRadio(radioType: $radioType, value: $value, onChanged: $onChanged, mouseCursor: $mouseCursor, toggleable: $toggleable, activeColor: $activeColor, inactiveColor: $inactiveColor, fillColor: $fillColor, focusColor: $focusColor, hoverColor: $hoverColor, overlayColor: $overlayColor, splashRadius: $splashRadius, materialTapTargetSize: $materialTapTargetSize, visualDensity: $visualDensity, autofocus: $autofocus, useCheckmarkStyle: $useCheckmarkStyle, useCupertinoCheckmarkStyle: $useCupertinoCheckmarkStyle)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacRadioCopyWith<_StacRadio> get copyWith => + __$StacRadioCopyWithImpl<_StacRadio>(this, _$identity); + + @override + Map toJson() { + return _$StacRadioToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacRadioImpl && + other is _StacRadio && (identical(other.radioType, radioType) || other.radioType == radioType) && const DeepCollectionEquality().equals(other.value, value) && @@ -474,84 +408,158 @@ class _$StacRadioImpl implements _StacRadio { useCheckmarkStyle, useCupertinoCheckmarkStyle); - /// Create a copy of StacRadio - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacRadioImplCopyWith<_$StacRadioImpl> get copyWith => - __$$StacRadioImplCopyWithImpl<_$StacRadioImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacRadioImplToJson( - this, - ); + String toString() { + return 'StacRadio(radioType: $radioType, value: $value, onChanged: $onChanged, mouseCursor: $mouseCursor, toggleable: $toggleable, activeColor: $activeColor, inactiveColor: $inactiveColor, fillColor: $fillColor, focusColor: $focusColor, hoverColor: $hoverColor, overlayColor: $overlayColor, splashRadius: $splashRadius, materialTapTargetSize: $materialTapTargetSize, visualDensity: $visualDensity, autofocus: $autofocus, useCheckmarkStyle: $useCheckmarkStyle, useCupertinoCheckmarkStyle: $useCupertinoCheckmarkStyle)'; } } -abstract class _StacRadio implements StacRadio { - const factory _StacRadio( - {final StacRadioType radioType, - final dynamic value, - final Map? onChanged, - final StacMouseCursor? mouseCursor, - final bool toggleable, - final String? activeColor, - final String? inactiveColor, - final String? fillColor, - final String? focusColor, - final String? hoverColor, - final String? overlayColor, - final double? splashRadius, - final MaterialTapTargetSize? materialTapTargetSize, - final StacVisualDensity? visualDensity, - final bool autofocus, - final bool useCheckmarkStyle, - final bool useCupertinoCheckmarkStyle}) = _$StacRadioImpl; - - factory _StacRadio.fromJson(Map json) = - _$StacRadioImpl.fromJson; - - @override - StacRadioType get radioType; - @override - dynamic get value; - @override - Map? get onChanged; - @override - StacMouseCursor? get mouseCursor; - @override - bool get toggleable; - @override - String? get activeColor; - @override - String? get inactiveColor; - @override - String? get fillColor; - @override - String? get focusColor; - @override - String? get hoverColor; - @override - String? get overlayColor; - @override - double? get splashRadius; - @override - MaterialTapTargetSize? get materialTapTargetSize; - @override - StacVisualDensity? get visualDensity; +/// @nodoc +abstract mixin class _$StacRadioCopyWith<$Res> + implements $StacRadioCopyWith<$Res> { + factory _$StacRadioCopyWith( + _StacRadio value, $Res Function(_StacRadio) _then) = + __$StacRadioCopyWithImpl; @override - bool get autofocus; + @useResult + $Res call( + {StacRadioType radioType, + dynamic value, + Map? onChanged, + StacMouseCursor? mouseCursor, + bool toggleable, + String? activeColor, + String? inactiveColor, + String? fillColor, + String? focusColor, + String? hoverColor, + String? overlayColor, + double? splashRadius, + MaterialTapTargetSize? materialTapTargetSize, + StacVisualDensity? visualDensity, + bool autofocus, + bool useCheckmarkStyle, + bool useCupertinoCheckmarkStyle}); + @override - bool get useCheckmarkStyle; + $StacVisualDensityCopyWith<$Res>? get visualDensity; +} + +/// @nodoc +class __$StacRadioCopyWithImpl<$Res> implements _$StacRadioCopyWith<$Res> { + __$StacRadioCopyWithImpl(this._self, this._then); + + final _StacRadio _self; + final $Res Function(_StacRadio) _then; + + /// Create a copy of StacRadio + /// with the given fields replaced by the non-null parameter values. @override - bool get useCupertinoCheckmarkStyle; + @pragma('vm:prefer-inline') + $Res call({ + Object? radioType = null, + Object? value = freezed, + Object? onChanged = freezed, + Object? mouseCursor = freezed, + Object? toggleable = null, + Object? activeColor = freezed, + Object? inactiveColor = freezed, + Object? fillColor = freezed, + Object? focusColor = freezed, + Object? hoverColor = freezed, + Object? overlayColor = freezed, + Object? splashRadius = freezed, + Object? materialTapTargetSize = freezed, + Object? visualDensity = freezed, + Object? autofocus = null, + Object? useCheckmarkStyle = null, + Object? useCupertinoCheckmarkStyle = null, + }) { + return _then(_StacRadio( + radioType: null == radioType + ? _self.radioType + : radioType // ignore: cast_nullable_to_non_nullable + as StacRadioType, + value: freezed == value + ? _self.value + : value // ignore: cast_nullable_to_non_nullable + as dynamic, + onChanged: freezed == onChanged + ? _self._onChanged + : onChanged // ignore: cast_nullable_to_non_nullable + as Map?, + mouseCursor: freezed == mouseCursor + ? _self.mouseCursor + : mouseCursor // ignore: cast_nullable_to_non_nullable + as StacMouseCursor?, + toggleable: null == toggleable + ? _self.toggleable + : toggleable // ignore: cast_nullable_to_non_nullable + as bool, + activeColor: freezed == activeColor + ? _self.activeColor + : activeColor // ignore: cast_nullable_to_non_nullable + as String?, + inactiveColor: freezed == inactiveColor + ? _self.inactiveColor + : inactiveColor // ignore: cast_nullable_to_non_nullable + as String?, + fillColor: freezed == fillColor + ? _self.fillColor + : fillColor // ignore: cast_nullable_to_non_nullable + as String?, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + overlayColor: freezed == overlayColor + ? _self.overlayColor + : overlayColor // ignore: cast_nullable_to_non_nullable + as String?, + splashRadius: freezed == splashRadius + ? _self.splashRadius + : splashRadius // ignore: cast_nullable_to_non_nullable + as double?, + materialTapTargetSize: freezed == materialTapTargetSize + ? _self.materialTapTargetSize + : materialTapTargetSize // ignore: cast_nullable_to_non_nullable + as MaterialTapTargetSize?, + visualDensity: freezed == visualDensity + ? _self.visualDensity + : visualDensity // ignore: cast_nullable_to_non_nullable + as StacVisualDensity?, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + useCheckmarkStyle: null == useCheckmarkStyle + ? _self.useCheckmarkStyle + : useCheckmarkStyle // ignore: cast_nullable_to_non_nullable + as bool, + useCupertinoCheckmarkStyle: null == useCupertinoCheckmarkStyle + ? _self.useCupertinoCheckmarkStyle + : useCupertinoCheckmarkStyle // ignore: cast_nullable_to_non_nullable + as bool, + )); + } /// Create a copy of StacRadio /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacRadioImplCopyWith<_$StacRadioImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacVisualDensityCopyWith<$Res>? get visualDensity { + if (_self.visualDensity == null) { + return null; + } + + return $StacVisualDensityCopyWith<$Res>(_self.visualDensity!, (value) { + return _then(_self.copyWith(visualDensity: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_radio/stac_radio.g.dart b/packages/stac/lib/src/parsers/stac_radio/stac_radio.g.dart index 0bd9ab85..dc3c783a 100644 --- a/packages/stac/lib/src/parsers/stac_radio/stac_radio.g.dart +++ b/packages/stac/lib/src/parsers/stac_radio/stac_radio.g.dart @@ -6,8 +6,7 @@ part of 'stac_radio.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacRadioImpl _$$StacRadioImplFromJson(Map json) => - _$StacRadioImpl( +_StacRadio _$StacRadioFromJson(Map json) => _StacRadio( radioType: $enumDecodeNullable(_$StacRadioTypeEnumMap, json['radioType']) ?? StacRadioType.material, @@ -35,7 +34,7 @@ _$StacRadioImpl _$$StacRadioImplFromJson(Map json) => json['useCupertinoCheckmarkStyle'] as bool? ?? false, ); -Map _$$StacRadioImplToJson(_$StacRadioImpl instance) => +Map _$StacRadioToJson(_StacRadio instance) => { 'radioType': _$StacRadioTypeEnumMap[instance.radioType]!, 'value': instance.value, diff --git a/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.dart b/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.dart index 3ac0caa6..f14cca33 100644 --- a/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.dart +++ b/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.dart @@ -8,7 +8,7 @@ part 'stac_radio_group.g.dart'; enum RadioAlignment { vertical, horizontal } @freezed -class StacRadioGroup with _$StacRadioGroup { +abstract class StacRadioGroup with _$StacRadioGroup { const factory StacRadioGroup({ String? id, dynamic groupValue, diff --git a/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.freezed.dart b/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.freezed.dart index 6661d74f..44a2da6b 100644 --- a/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,94 +10,67 @@ part of 'stac_radio_group.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacRadioGroup _$StacRadioGroupFromJson(Map json) { - return _StacRadioGroup.fromJson(json); -} - /// @nodoc mixin _$StacRadioGroup { - String? get id => throw _privateConstructorUsedError; - dynamic get groupValue => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacRadioGroup to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get id; + dynamic get groupValue; + Map? get child; /// Create a copy of StacRadioGroup /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacRadioGroupCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacRadioGroupCopyWithImpl( + this as StacRadioGroup, _$identity); -/// @nodoc -abstract class $StacRadioGroupCopyWith<$Res> { - factory $StacRadioGroupCopyWith( - StacRadioGroup value, $Res Function(StacRadioGroup) then) = - _$StacRadioGroupCopyWithImpl<$Res, StacRadioGroup>; - @useResult - $Res call({String? id, dynamic groupValue, Map? child}); -} + /// Serializes this StacRadioGroup to a JSON map. + Map toJson(); -/// @nodoc -class _$StacRadioGroupCopyWithImpl<$Res, $Val extends StacRadioGroup> - implements $StacRadioGroupCopyWith<$Res> { - _$StacRadioGroupCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacRadioGroup && + (identical(other.id, id) || other.id == id) && + const DeepCollectionEquality() + .equals(other.groupValue, groupValue) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + const DeepCollectionEquality().hash(groupValue), + const DeepCollectionEquality().hash(child)); - /// Create a copy of StacRadioGroup - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? groupValue = freezed, - Object? child = freezed, - }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String?, - groupValue: freezed == groupValue - ? _value.groupValue - : groupValue // ignore: cast_nullable_to_non_nullable - as dynamic, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacRadioGroup(id: $id, groupValue: $groupValue, child: $child)'; } } /// @nodoc -abstract class _$$StacRadioGroupImplCopyWith<$Res> - implements $StacRadioGroupCopyWith<$Res> { - factory _$$StacRadioGroupImplCopyWith(_$StacRadioGroupImpl value, - $Res Function(_$StacRadioGroupImpl) then) = - __$$StacRadioGroupImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacRadioGroupCopyWith<$Res> { + factory $StacRadioGroupCopyWith( + StacRadioGroup value, $Res Function(StacRadioGroup) _then) = + _$StacRadioGroupCopyWithImpl; @useResult $Res call({String? id, dynamic groupValue, Map? child}); } /// @nodoc -class __$$StacRadioGroupImplCopyWithImpl<$Res> - extends _$StacRadioGroupCopyWithImpl<$Res, _$StacRadioGroupImpl> - implements _$$StacRadioGroupImplCopyWith<$Res> { - __$$StacRadioGroupImplCopyWithImpl( - _$StacRadioGroupImpl _value, $Res Function(_$StacRadioGroupImpl) _then) - : super(_value, _then); +class _$StacRadioGroupCopyWithImpl<$Res> + implements $StacRadioGroupCopyWith<$Res> { + _$StacRadioGroupCopyWithImpl(this._self, this._then); + + final StacRadioGroup _self; + final $Res Function(StacRadioGroup) _then; /// Create a copy of StacRadioGroup /// with the given fields replaced by the non-null parameter values. @@ -107,17 +81,17 @@ class __$$StacRadioGroupImplCopyWithImpl<$Res> Object? groupValue = freezed, Object? child = freezed, }) { - return _then(_$StacRadioGroupImpl( + return _then(_self.copyWith( id: freezed == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String?, groupValue: freezed == groupValue - ? _value.groupValue + ? _self.groupValue : groupValue // ignore: cast_nullable_to_non_nullable as dynamic, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -126,13 +100,12 @@ class __$$StacRadioGroupImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacRadioGroupImpl implements _StacRadioGroup { - const _$StacRadioGroupImpl( +class _StacRadioGroup implements StacRadioGroup { + const _StacRadioGroup( {this.id, this.groupValue, final Map? child}) : _child = child; - - factory _$StacRadioGroupImpl.fromJson(Map json) => - _$$StacRadioGroupImplFromJson(json); + factory _StacRadioGroup.fromJson(Map json) => + _$StacRadioGroupFromJson(json); @override final String? id; @@ -148,16 +121,26 @@ class _$StacRadioGroupImpl implements _StacRadioGroup { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacRadioGroup + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacRadioGroup(id: $id, groupValue: $groupValue, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacRadioGroupCopyWith<_StacRadioGroup> get copyWith => + __$StacRadioGroupCopyWithImpl<_StacRadioGroup>(this, _$identity); + + @override + Map toJson() { + return _$StacRadioGroupToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacRadioGroupImpl && + other is _StacRadioGroup && (identical(other.id, id) || other.id == id) && const DeepCollectionEquality() .equals(other.groupValue, groupValue) && @@ -172,43 +155,55 @@ class _$StacRadioGroupImpl implements _StacRadioGroup { const DeepCollectionEquality().hash(groupValue), const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacRadioGroup - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacRadioGroupImplCopyWith<_$StacRadioGroupImpl> get copyWith => - __$$StacRadioGroupImplCopyWithImpl<_$StacRadioGroupImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacRadioGroupImplToJson( - this, - ); + String toString() { + return 'StacRadioGroup(id: $id, groupValue: $groupValue, child: $child)'; } } -abstract class _StacRadioGroup implements StacRadioGroup { - const factory _StacRadioGroup( - {final String? id, - final dynamic groupValue, - final Map? child}) = _$StacRadioGroupImpl; +/// @nodoc +abstract mixin class _$StacRadioGroupCopyWith<$Res> + implements $StacRadioGroupCopyWith<$Res> { + factory _$StacRadioGroupCopyWith( + _StacRadioGroup value, $Res Function(_StacRadioGroup) _then) = + __$StacRadioGroupCopyWithImpl; + @override + @useResult + $Res call({String? id, dynamic groupValue, Map? child}); +} - factory _StacRadioGroup.fromJson(Map json) = - _$StacRadioGroupImpl.fromJson; +/// @nodoc +class __$StacRadioGroupCopyWithImpl<$Res> + implements _$StacRadioGroupCopyWith<$Res> { + __$StacRadioGroupCopyWithImpl(this._self, this._then); - @override - String? get id; - @override - dynamic get groupValue; - @override - Map? get child; + final _StacRadioGroup _self; + final $Res Function(_StacRadioGroup) _then; /// Create a copy of StacRadioGroup /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacRadioGroupImplCopyWith<_$StacRadioGroupImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = freezed, + Object? groupValue = freezed, + Object? child = freezed, + }) { + return _then(_StacRadioGroup( + id: freezed == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + groupValue: freezed == groupValue + ? _self.groupValue + : groupValue // ignore: cast_nullable_to_non_nullable + as dynamic, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.g.dart b/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.g.dart index 67880cd8..0c239ad6 100644 --- a/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.g.dart +++ b/packages/stac/lib/src/parsers/stac_radio_group/stac_radio_group.g.dart @@ -6,15 +6,14 @@ part of 'stac_radio_group.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacRadioGroupImpl _$$StacRadioGroupImplFromJson(Map json) => - _$StacRadioGroupImpl( +_StacRadioGroup _$StacRadioGroupFromJson(Map json) => + _StacRadioGroup( id: json['id'] as String?, groupValue: json['groupValue'], child: json['child'] as Map?, ); -Map _$$StacRadioGroupImplToJson( - _$StacRadioGroupImpl instance) => +Map _$StacRadioGroupToJson(_StacRadioGroup instance) => { 'id': instance.id, 'groupValue': instance.groupValue, diff --git a/packages/stac/lib/src/parsers/stac_rect/stac_rect.dart b/packages/stac/lib/src/parsers/stac_rect/stac_rect.dart index ea9f451b..b97eb7a9 100644 --- a/packages/stac/lib/src/parsers/stac_rect/stac_rect.dart +++ b/packages/stac/lib/src/parsers/stac_rect/stac_rect.dart @@ -8,7 +8,7 @@ part 'stac_rect.g.dart'; enum StacRectType { fromCenter, fromCircle, fromLTRB, fromLTWH, fromPoints } @freezed -class StacRect with _$StacRect { +abstract class StacRect with _$StacRect { const factory StacRect({ required StacRectType rectType, StacOffset? center, diff --git a/packages/stac/lib/src/parsers/stac_rect/stac_rect.freezed.dart b/packages/stac/lib/src/parsers/stac_rect/stac_rect.freezed.dart index eff96366..d29696eb 100644 --- a/packages/stac/lib/src/parsers/stac_rect/stac_rect.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_rect/stac_rect.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,43 +10,67 @@ part of 'stac_rect.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacRect _$StacRectFromJson(Map json) { - return _StacRect.fromJson(json); -} - /// @nodoc mixin _$StacRect { - StacRectType get rectType => throw _privateConstructorUsedError; - StacOffset? get center => throw _privateConstructorUsedError; - StacOffset? get a => throw _privateConstructorUsedError; - StacOffset? get b => throw _privateConstructorUsedError; - double? get width => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - double? get left => throw _privateConstructorUsedError; - double? get top => throw _privateConstructorUsedError; - double? get right => throw _privateConstructorUsedError; - double? get bottom => throw _privateConstructorUsedError; - double? get radius => throw _privateConstructorUsedError; - - /// Serializes this StacRect to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacRectType get rectType; + StacOffset? get center; + StacOffset? get a; + StacOffset? get b; + double? get width; + double? get height; + double? get left; + double? get top; + double? get right; + double? get bottom; + double? get radius; /// Create a copy of StacRect /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacRectCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacRectCopyWithImpl(this as StacRect, _$identity); + + /// Serializes this StacRect to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacRect && + (identical(other.rectType, rectType) || + other.rectType == rectType) && + (identical(other.center, center) || other.center == center) && + (identical(other.a, a) || other.a == a) && + (identical(other.b, b) || other.b == b) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.left, left) || other.left == left) && + (identical(other.top, top) || other.top == top) && + (identical(other.right, right) || other.right == right) && + (identical(other.bottom, bottom) || other.bottom == bottom) && + (identical(other.radius, radius) || other.radius == radius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, rectType, center, a, b, width, + height, left, top, right, bottom, radius); + + @override + String toString() { + return 'StacRect(rectType: $rectType, center: $center, a: $a, b: $b, width: $width, height: $height, left: $left, top: $top, right: $right, bottom: $bottom, radius: $radius)'; + } } /// @nodoc -abstract class $StacRectCopyWith<$Res> { - factory $StacRectCopyWith(StacRect value, $Res Function(StacRect) then) = - _$StacRectCopyWithImpl<$Res, StacRect>; +abstract mixin class $StacRectCopyWith<$Res> { + factory $StacRectCopyWith(StacRect value, $Res Function(StacRect) _then) = + _$StacRectCopyWithImpl; @useResult $Res call( {StacRectType rectType, @@ -66,14 +91,11 @@ abstract class $StacRectCopyWith<$Res> { } /// @nodoc -class _$StacRectCopyWithImpl<$Res, $Val extends StacRect> - implements $StacRectCopyWith<$Res> { - _$StacRectCopyWithImpl(this._value, this._then); +class _$StacRectCopyWithImpl<$Res> implements $StacRectCopyWith<$Res> { + _$StacRectCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacRect _self; + final $Res Function(StacRect) _then; /// Create a copy of StacRect /// with the given fields replaced by the non-null parameter values. @@ -92,52 +114,52 @@ class _$StacRectCopyWithImpl<$Res, $Val extends StacRect> Object? bottom = freezed, Object? radius = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( rectType: null == rectType - ? _value.rectType + ? _self.rectType : rectType // ignore: cast_nullable_to_non_nullable as StacRectType, center: freezed == center - ? _value.center + ? _self.center : center // ignore: cast_nullable_to_non_nullable as StacOffset?, a: freezed == a - ? _value.a + ? _self.a : a // ignore: cast_nullable_to_non_nullable as StacOffset?, b: freezed == b - ? _value.b + ? _self.b : b // ignore: cast_nullable_to_non_nullable as StacOffset?, width: freezed == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, left: freezed == left - ? _value.left + ? _self.left : left // ignore: cast_nullable_to_non_nullable as double?, top: freezed == top - ? _value.top + ? _self.top : top // ignore: cast_nullable_to_non_nullable as double?, right: freezed == right - ? _value.right + ? _self.right : right // ignore: cast_nullable_to_non_nullable as double?, bottom: freezed == bottom - ? _value.bottom + ? _self.bottom : bottom // ignore: cast_nullable_to_non_nullable as double?, radius: freezed == radius - ? _value.radius + ? _self.radius : radius // ignore: cast_nullable_to_non_nullable as double?, - ) as $Val); + )); } /// Create a copy of StacRect @@ -145,12 +167,12 @@ class _$StacRectCopyWithImpl<$Res, $Val extends StacRect> @override @pragma('vm:prefer-inline') $StacOffsetCopyWith<$Res>? get center { - if (_value.center == null) { + if (_self.center == null) { return null; } - return $StacOffsetCopyWith<$Res>(_value.center!, (value) { - return _then(_value.copyWith(center: value) as $Val); + return $StacOffsetCopyWith<$Res>(_self.center!, (value) { + return _then(_self.copyWith(center: value)); }); } @@ -159,12 +181,12 @@ class _$StacRectCopyWithImpl<$Res, $Val extends StacRect> @override @pragma('vm:prefer-inline') $StacOffsetCopyWith<$Res>? get a { - if (_value.a == null) { + if (_self.a == null) { return null; } - return $StacOffsetCopyWith<$Res>(_value.a!, (value) { - return _then(_value.copyWith(a: value) as $Val); + return $StacOffsetCopyWith<$Res>(_self.a!, (value) { + return _then(_self.copyWith(a: value)); }); } @@ -173,22 +195,107 @@ class _$StacRectCopyWithImpl<$Res, $Val extends StacRect> @override @pragma('vm:prefer-inline') $StacOffsetCopyWith<$Res>? get b { - if (_value.b == null) { + if (_self.b == null) { return null; } - return $StacOffsetCopyWith<$Res>(_value.b!, (value) { - return _then(_value.copyWith(b: value) as $Val); + return $StacOffsetCopyWith<$Res>(_self.b!, (value) { + return _then(_self.copyWith(b: value)); }); } } /// @nodoc -abstract class _$$StacRectImplCopyWith<$Res> +@JsonSerializable() +class _StacRect implements StacRect { + const _StacRect( + {required this.rectType, + this.center, + this.a, + this.b, + this.width, + this.height, + this.left, + this.top, + this.right, + this.bottom, + this.radius}); + factory _StacRect.fromJson(Map json) => + _$StacRectFromJson(json); + + @override + final StacRectType rectType; + @override + final StacOffset? center; + @override + final StacOffset? a; + @override + final StacOffset? b; + @override + final double? width; + @override + final double? height; + @override + final double? left; + @override + final double? top; + @override + final double? right; + @override + final double? bottom; + @override + final double? radius; + + /// Create a copy of StacRect + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacRectCopyWith<_StacRect> get copyWith => + __$StacRectCopyWithImpl<_StacRect>(this, _$identity); + + @override + Map toJson() { + return _$StacRectToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacRect && + (identical(other.rectType, rectType) || + other.rectType == rectType) && + (identical(other.center, center) || other.center == center) && + (identical(other.a, a) || other.a == a) && + (identical(other.b, b) || other.b == b) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.left, left) || other.left == left) && + (identical(other.top, top) || other.top == top) && + (identical(other.right, right) || other.right == right) && + (identical(other.bottom, bottom) || other.bottom == bottom) && + (identical(other.radius, radius) || other.radius == radius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, rectType, center, a, b, width, + height, left, top, right, bottom, radius); + + @override + String toString() { + return 'StacRect(rectType: $rectType, center: $center, a: $a, b: $b, width: $width, height: $height, left: $left, top: $top, right: $right, bottom: $bottom, radius: $radius)'; + } +} + +/// @nodoc +abstract mixin class _$StacRectCopyWith<$Res> implements $StacRectCopyWith<$Res> { - factory _$$StacRectImplCopyWith( - _$StacRectImpl value, $Res Function(_$StacRectImpl) then) = - __$$StacRectImplCopyWithImpl<$Res>; + factory _$StacRectCopyWith(_StacRect value, $Res Function(_StacRect) _then) = + __$StacRectCopyWithImpl; @override @useResult $Res call( @@ -213,17 +320,16 @@ abstract class _$$StacRectImplCopyWith<$Res> } /// @nodoc -class __$$StacRectImplCopyWithImpl<$Res> - extends _$StacRectCopyWithImpl<$Res, _$StacRectImpl> - implements _$$StacRectImplCopyWith<$Res> { - __$$StacRectImplCopyWithImpl( - _$StacRectImpl _value, $Res Function(_$StacRectImpl) _then) - : super(_value, _then); +class __$StacRectCopyWithImpl<$Res> implements _$StacRectCopyWith<$Res> { + __$StacRectCopyWithImpl(this._self, this._then); + + final _StacRect _self; + final $Res Function(_StacRect) _then; /// Create a copy of StacRect /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ Object? rectType = null, Object? center = freezed, @@ -237,186 +343,95 @@ class __$$StacRectImplCopyWithImpl<$Res> Object? bottom = freezed, Object? radius = freezed, }) { - return _then(_$StacRectImpl( + return _then(_StacRect( rectType: null == rectType - ? _value.rectType + ? _self.rectType : rectType // ignore: cast_nullable_to_non_nullable as StacRectType, center: freezed == center - ? _value.center + ? _self.center : center // ignore: cast_nullable_to_non_nullable as StacOffset?, a: freezed == a - ? _value.a + ? _self.a : a // ignore: cast_nullable_to_non_nullable as StacOffset?, b: freezed == b - ? _value.b + ? _self.b : b // ignore: cast_nullable_to_non_nullable as StacOffset?, width: freezed == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, left: freezed == left - ? _value.left + ? _self.left : left // ignore: cast_nullable_to_non_nullable as double?, top: freezed == top - ? _value.top + ? _self.top : top // ignore: cast_nullable_to_non_nullable as double?, right: freezed == right - ? _value.right + ? _self.right : right // ignore: cast_nullable_to_non_nullable as double?, bottom: freezed == bottom - ? _value.bottom + ? _self.bottom : bottom // ignore: cast_nullable_to_non_nullable as double?, radius: freezed == radius - ? _value.radius + ? _self.radius : radius // ignore: cast_nullable_to_non_nullable as double?, )); } -} - -/// @nodoc -@JsonSerializable() -class _$StacRectImpl implements _StacRect { - const _$StacRectImpl( - {required this.rectType, - this.center, - this.a, - this.b, - this.width, - this.height, - this.left, - this.top, - this.right, - this.bottom, - this.radius}); - - factory _$StacRectImpl.fromJson(Map json) => - _$$StacRectImplFromJson(json); - - @override - final StacRectType rectType; - @override - final StacOffset? center; - @override - final StacOffset? a; - @override - final StacOffset? b; - @override - final double? width; - @override - final double? height; - @override - final double? left; - @override - final double? top; - @override - final double? right; - @override - final double? bottom; - @override - final double? radius; + /// Create a copy of StacRect + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacRect(rectType: $rectType, center: $center, a: $a, b: $b, width: $width, height: $height, left: $left, top: $top, right: $right, bottom: $bottom, radius: $radius)'; - } + @pragma('vm:prefer-inline') + $StacOffsetCopyWith<$Res>? get center { + if (_self.center == null) { + return null; + } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacRectImpl && - (identical(other.rectType, rectType) || - other.rectType == rectType) && - (identical(other.center, center) || other.center == center) && - (identical(other.a, a) || other.a == a) && - (identical(other.b, b) || other.b == b) && - (identical(other.width, width) || other.width == width) && - (identical(other.height, height) || other.height == height) && - (identical(other.left, left) || other.left == left) && - (identical(other.top, top) || other.top == top) && - (identical(other.right, right) || other.right == right) && - (identical(other.bottom, bottom) || other.bottom == bottom) && - (identical(other.radius, radius) || other.radius == radius)); + return $StacOffsetCopyWith<$Res>(_self.center!, (value) { + return _then(_self.copyWith(center: value)); + }); } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, rectType, center, a, b, width, - height, left, top, right, bottom, radius); - /// Create a copy of StacRect /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacRectImplCopyWith<_$StacRectImpl> get copyWith => - __$$StacRectImplCopyWithImpl<_$StacRectImpl>(this, _$identity); + $StacOffsetCopyWith<$Res>? get a { + if (_self.a == null) { + return null; + } - @override - Map toJson() { - return _$$StacRectImplToJson( - this, - ); + return $StacOffsetCopyWith<$Res>(_self.a!, (value) { + return _then(_self.copyWith(a: value)); + }); } -} - -abstract class _StacRect implements StacRect { - const factory _StacRect( - {required final StacRectType rectType, - final StacOffset? center, - final StacOffset? a, - final StacOffset? b, - final double? width, - final double? height, - final double? left, - final double? top, - final double? right, - final double? bottom, - final double? radius}) = _$StacRectImpl; - - factory _StacRect.fromJson(Map json) = - _$StacRectImpl.fromJson; - - @override - StacRectType get rectType; - @override - StacOffset? get center; - @override - StacOffset? get a; - @override - StacOffset? get b; - @override - double? get width; - @override - double? get height; - @override - double? get left; - @override - double? get top; - @override - double? get right; - @override - double? get bottom; - @override - double? get radius; /// Create a copy of StacRect /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacRectImplCopyWith<_$StacRectImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacOffsetCopyWith<$Res>? get b { + if (_self.b == null) { + return null; + } + + return $StacOffsetCopyWith<$Res>(_self.b!, (value) { + return _then(_self.copyWith(b: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_rect/stac_rect.g.dart b/packages/stac/lib/src/parsers/stac_rect/stac_rect.g.dart index 263ab550..ed95482b 100644 --- a/packages/stac/lib/src/parsers/stac_rect/stac_rect.g.dart +++ b/packages/stac/lib/src/parsers/stac_rect/stac_rect.g.dart @@ -6,8 +6,7 @@ part of 'stac_rect.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacRectImpl _$$StacRectImplFromJson(Map json) => - _$StacRectImpl( +_StacRect _$StacRectFromJson(Map json) => _StacRect( rectType: $enumDecode(_$StacRectTypeEnumMap, json['rectType']), center: json['center'] == null ? null @@ -27,8 +26,7 @@ _$StacRectImpl _$$StacRectImplFromJson(Map json) => radius: (json['radius'] as num?)?.toDouble(), ); -Map _$$StacRectImplToJson(_$StacRectImpl instance) => - { +Map _$StacRectToJson(_StacRect instance) => { 'rectType': _$StacRectTypeEnumMap[instance.rectType]!, 'center': instance.center, 'a': instance.a, diff --git a/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.dart b/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.dart index cb2b6243..4fa5ee7e 100644 --- a/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.dart +++ b/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.dart @@ -6,7 +6,7 @@ part 'stac_rect_tween.freezed.dart'; part 'stac_rect_tween.g.dart'; @freezed -class StacRectTween with _$StacRectTween { +abstract class StacRectTween with _$StacRectTween { const factory StacRectTween({ required String type, StacRect? begin, diff --git a/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.freezed.dart b/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.freezed.dart index 89dead43..795ff555 100644 --- a/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,36 +10,51 @@ part of 'stac_rect_tween.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacRectTween _$StacRectTweenFromJson(Map json) { - return _StacRectTween.fromJson(json); -} - /// @nodoc mixin _$StacRectTween { - String get type => throw _privateConstructorUsedError; - StacRect? get begin => throw _privateConstructorUsedError; - StacRect? get end => throw _privateConstructorUsedError; - - /// Serializes this StacRectTween to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get type; + StacRect? get begin; + StacRect? get end; /// Create a copy of StacRectTween /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacRectTweenCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacRectTweenCopyWithImpl( + this as StacRectTween, _$identity); + + /// Serializes this StacRectTween to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacRectTween && + (identical(other.type, type) || other.type == type) && + (identical(other.begin, begin) || other.begin == begin) && + (identical(other.end, end) || other.end == end)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, type, begin, end); + + @override + String toString() { + return 'StacRectTween(type: $type, begin: $begin, end: $end)'; + } } /// @nodoc -abstract class $StacRectTweenCopyWith<$Res> { +abstract mixin class $StacRectTweenCopyWith<$Res> { factory $StacRectTweenCopyWith( - StacRectTween value, $Res Function(StacRectTween) then) = - _$StacRectTweenCopyWithImpl<$Res, StacRectTween>; + StacRectTween value, $Res Function(StacRectTween) _then) = + _$StacRectTweenCopyWithImpl; @useResult $Res call({String type, StacRect? begin, StacRect? end}); @@ -47,14 +63,12 @@ abstract class $StacRectTweenCopyWith<$Res> { } /// @nodoc -class _$StacRectTweenCopyWithImpl<$Res, $Val extends StacRectTween> +class _$StacRectTweenCopyWithImpl<$Res> implements $StacRectTweenCopyWith<$Res> { - _$StacRectTweenCopyWithImpl(this._value, this._then); + _$StacRectTweenCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacRectTween _self; + final $Res Function(StacRectTween) _then; /// Create a copy of StacRectTween /// with the given fields replaced by the non-null parameter values. @@ -65,20 +79,20 @@ class _$StacRectTweenCopyWithImpl<$Res, $Val extends StacRectTween> Object? begin = freezed, Object? end = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as String, begin: freezed == begin - ? _value.begin + ? _self.begin : begin // ignore: cast_nullable_to_non_nullable as StacRect?, end: freezed == end - ? _value.end + ? _self.end : end // ignore: cast_nullable_to_non_nullable as StacRect?, - ) as $Val); + )); } /// Create a copy of StacRectTween @@ -86,12 +100,12 @@ class _$StacRectTweenCopyWithImpl<$Res, $Val extends StacRectTween> @override @pragma('vm:prefer-inline') $StacRectCopyWith<$Res>? get begin { - if (_value.begin == null) { + if (_self.begin == null) { return null; } - return $StacRectCopyWith<$Res>(_value.begin!, (value) { - return _then(_value.copyWith(begin: value) as $Val); + return $StacRectCopyWith<$Res>(_self.begin!, (value) { + return _then(_self.copyWith(begin: value)); }); } @@ -100,22 +114,71 @@ class _$StacRectTweenCopyWithImpl<$Res, $Val extends StacRectTween> @override @pragma('vm:prefer-inline') $StacRectCopyWith<$Res>? get end { - if (_value.end == null) { + if (_self.end == null) { return null; } - return $StacRectCopyWith<$Res>(_value.end!, (value) { - return _then(_value.copyWith(end: value) as $Val); + return $StacRectCopyWith<$Res>(_self.end!, (value) { + return _then(_self.copyWith(end: value)); }); } } /// @nodoc -abstract class _$$StacRectTweenImplCopyWith<$Res> +@JsonSerializable() +class _StacRectTween implements StacRectTween { + const _StacRectTween({required this.type, this.begin, this.end}); + factory _StacRectTween.fromJson(Map json) => + _$StacRectTweenFromJson(json); + + @override + final String type; + @override + final StacRect? begin; + @override + final StacRect? end; + + /// Create a copy of StacRectTween + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacRectTweenCopyWith<_StacRectTween> get copyWith => + __$StacRectTweenCopyWithImpl<_StacRectTween>(this, _$identity); + + @override + Map toJson() { + return _$StacRectTweenToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacRectTween && + (identical(other.type, type) || other.type == type) && + (identical(other.begin, begin) || other.begin == begin) && + (identical(other.end, end) || other.end == end)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, type, begin, end); + + @override + String toString() { + return 'StacRectTween(type: $type, begin: $begin, end: $end)'; + } +} + +/// @nodoc +abstract mixin class _$StacRectTweenCopyWith<$Res> implements $StacRectTweenCopyWith<$Res> { - factory _$$StacRectTweenImplCopyWith( - _$StacRectTweenImpl value, $Res Function(_$StacRectTweenImpl) then) = - __$$StacRectTweenImplCopyWithImpl<$Res>; + factory _$StacRectTweenCopyWith( + _StacRectTween value, $Res Function(_StacRectTween) _then) = + __$StacRectTweenCopyWithImpl; @override @useResult $Res call({String type, StacRect? begin, StacRect? end}); @@ -127,109 +190,65 @@ abstract class _$$StacRectTweenImplCopyWith<$Res> } /// @nodoc -class __$$StacRectTweenImplCopyWithImpl<$Res> - extends _$StacRectTweenCopyWithImpl<$Res, _$StacRectTweenImpl> - implements _$$StacRectTweenImplCopyWith<$Res> { - __$$StacRectTweenImplCopyWithImpl( - _$StacRectTweenImpl _value, $Res Function(_$StacRectTweenImpl) _then) - : super(_value, _then); +class __$StacRectTweenCopyWithImpl<$Res> + implements _$StacRectTweenCopyWith<$Res> { + __$StacRectTweenCopyWithImpl(this._self, this._then); + + final _StacRectTween _self; + final $Res Function(_StacRectTween) _then; /// Create a copy of StacRectTween /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ Object? type = null, Object? begin = freezed, Object? end = freezed, }) { - return _then(_$StacRectTweenImpl( + return _then(_StacRectTween( type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as String, begin: freezed == begin - ? _value.begin + ? _self.begin : begin // ignore: cast_nullable_to_non_nullable as StacRect?, end: freezed == end - ? _value.end + ? _self.end : end // ignore: cast_nullable_to_non_nullable as StacRect?, )); } -} - -/// @nodoc -@JsonSerializable() -class _$StacRectTweenImpl implements _StacRectTween { - const _$StacRectTweenImpl({required this.type, this.begin, this.end}); - - factory _$StacRectTweenImpl.fromJson(Map json) => - _$$StacRectTweenImplFromJson(json); - - @override - final String type; - @override - final StacRect? begin; - @override - final StacRect? end; + /// Create a copy of StacRectTween + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacRectTween(type: $type, begin: $begin, end: $end)'; - } + @pragma('vm:prefer-inline') + $StacRectCopyWith<$Res>? get begin { + if (_self.begin == null) { + return null; + } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacRectTweenImpl && - (identical(other.type, type) || other.type == type) && - (identical(other.begin, begin) || other.begin == begin) && - (identical(other.end, end) || other.end == end)); + return $StacRectCopyWith<$Res>(_self.begin!, (value) { + return _then(_self.copyWith(begin: value)); + }); } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, type, begin, end); - /// Create a copy of StacRectTween /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacRectTweenImplCopyWith<_$StacRectTweenImpl> get copyWith => - __$$StacRectTweenImplCopyWithImpl<_$StacRectTweenImpl>(this, _$identity); + $StacRectCopyWith<$Res>? get end { + if (_self.end == null) { + return null; + } - @override - Map toJson() { - return _$$StacRectTweenImplToJson( - this, - ); + return $StacRectCopyWith<$Res>(_self.end!, (value) { + return _then(_self.copyWith(end: value)); + }); } } -abstract class _StacRectTween implements StacRectTween { - const factory _StacRectTween( - {required final String type, - final StacRect? begin, - final StacRect? end}) = _$StacRectTweenImpl; - - factory _StacRectTween.fromJson(Map json) = - _$StacRectTweenImpl.fromJson; - - @override - String get type; - @override - StacRect? get begin; - @override - StacRect? get end; - - /// Create a copy of StacRectTween - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacRectTweenImplCopyWith<_$StacRectTweenImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.g.dart b/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.g.dart index c863292d..86113336 100644 --- a/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.g.dart +++ b/packages/stac/lib/src/parsers/stac_rect_tween/stac_rect_tween.g.dart @@ -6,8 +6,8 @@ part of 'stac_rect_tween.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacRectTweenImpl _$$StacRectTweenImplFromJson(Map json) => - _$StacRectTweenImpl( +_StacRectTween _$StacRectTweenFromJson(Map json) => + _StacRectTween( type: json['type'] as String, begin: json['begin'] == null ? null @@ -17,7 +17,7 @@ _$StacRectTweenImpl _$$StacRectTweenImplFromJson(Map json) => : StacRect.fromJson(json['end'] as Map), ); -Map _$$StacRectTweenImplToJson(_$StacRectTweenImpl instance) => +Map _$StacRectTweenToJson(_StacRectTween instance) => { 'type': instance.type, 'begin': instance.begin, diff --git a/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.dart b/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.dart index 3d61b7bb..0c227464 100644 --- a/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.dart +++ b/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.dart @@ -7,7 +7,7 @@ part 'stac_refresh_indicator.freezed.dart'; part 'stac_refresh_indicator.g.dart'; @freezed -class StacRefreshIndicator with _$StacRefreshIndicator { +abstract class StacRefreshIndicator with _$StacRefreshIndicator { const factory StacRefreshIndicator({ Map? child, @Default(40) double displacement, diff --git a/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.freezed.dart b/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.freezed.dart index ec116ba6..4cd629f6 100644 --- a/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,137 +10,83 @@ part of 'stac_refresh_indicator.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacRefreshIndicator _$StacRefreshIndicatorFromJson(Map json) { - return _StacRefreshIndicator.fromJson(json); -} - /// @nodoc mixin _$StacRefreshIndicator { - Map? get child => throw _privateConstructorUsedError; - double get displacement => throw _privateConstructorUsedError; - double get edgeOffset => throw _privateConstructorUsedError; - Map? get onRefresh => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get semanticsLabel => throw _privateConstructorUsedError; - String? get semanticsValue => throw _privateConstructorUsedError; - double get strokeWidth => throw _privateConstructorUsedError; - RefreshIndicatorTriggerMode get triggerMode => - throw _privateConstructorUsedError; - - /// Serializes this StacRefreshIndicator to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get child; + double get displacement; + double get edgeOffset; + Map? get onRefresh; + String? get color; + String? get backgroundColor; + String? get semanticsLabel; + String? get semanticsValue; + double get strokeWidth; + RefreshIndicatorTriggerMode get triggerMode; /// Create a copy of StacRefreshIndicator /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacRefreshIndicatorCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacRefreshIndicatorCopyWithImpl( + this as StacRefreshIndicator, _$identity); -/// @nodoc -abstract class $StacRefreshIndicatorCopyWith<$Res> { - factory $StacRefreshIndicatorCopyWith(StacRefreshIndicator value, - $Res Function(StacRefreshIndicator) then) = - _$StacRefreshIndicatorCopyWithImpl<$Res, StacRefreshIndicator>; - @useResult - $Res call( - {Map? child, - double displacement, - double edgeOffset, - Map? onRefresh, - String? color, - String? backgroundColor, - String? semanticsLabel, - String? semanticsValue, - double strokeWidth, - RefreshIndicatorTriggerMode triggerMode}); -} + /// Serializes this StacRefreshIndicator to a JSON map. + Map toJson(); -/// @nodoc -class _$StacRefreshIndicatorCopyWithImpl<$Res, - $Val extends StacRefreshIndicator> - implements $StacRefreshIndicatorCopyWith<$Res> { - _$StacRefreshIndicatorCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacRefreshIndicator && + const DeepCollectionEquality().equals(other.child, child) && + (identical(other.displacement, displacement) || + other.displacement == displacement) && + (identical(other.edgeOffset, edgeOffset) || + other.edgeOffset == edgeOffset) && + const DeepCollectionEquality().equals(other.onRefresh, onRefresh) && + (identical(other.color, color) || other.color == color) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.semanticsLabel, semanticsLabel) || + other.semanticsLabel == semanticsLabel) && + (identical(other.semanticsValue, semanticsValue) || + other.semanticsValue == semanticsValue) && + (identical(other.strokeWidth, strokeWidth) || + other.strokeWidth == strokeWidth) && + (identical(other.triggerMode, triggerMode) || + other.triggerMode == triggerMode)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(child), + displacement, + edgeOffset, + const DeepCollectionEquality().hash(onRefresh), + color, + backgroundColor, + semanticsLabel, + semanticsValue, + strokeWidth, + triggerMode); - /// Create a copy of StacRefreshIndicator - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? child = freezed, - Object? displacement = null, - Object? edgeOffset = null, - Object? onRefresh = freezed, - Object? color = freezed, - Object? backgroundColor = freezed, - Object? semanticsLabel = freezed, - Object? semanticsValue = freezed, - Object? strokeWidth = null, - Object? triggerMode = null, - }) { - return _then(_value.copyWith( - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - displacement: null == displacement - ? _value.displacement - : displacement // ignore: cast_nullable_to_non_nullable - as double, - edgeOffset: null == edgeOffset - ? _value.edgeOffset - : edgeOffset // ignore: cast_nullable_to_non_nullable - as double, - onRefresh: freezed == onRefresh - ? _value.onRefresh - : onRefresh // ignore: cast_nullable_to_non_nullable - as Map?, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - semanticsLabel: freezed == semanticsLabel - ? _value.semanticsLabel - : semanticsLabel // ignore: cast_nullable_to_non_nullable - as String?, - semanticsValue: freezed == semanticsValue - ? _value.semanticsValue - : semanticsValue // ignore: cast_nullable_to_non_nullable - as String?, - strokeWidth: null == strokeWidth - ? _value.strokeWidth - : strokeWidth // ignore: cast_nullable_to_non_nullable - as double, - triggerMode: null == triggerMode - ? _value.triggerMode - : triggerMode // ignore: cast_nullable_to_non_nullable - as RefreshIndicatorTriggerMode, - ) as $Val); + String toString() { + return 'StacRefreshIndicator(child: $child, displacement: $displacement, edgeOffset: $edgeOffset, onRefresh: $onRefresh, color: $color, backgroundColor: $backgroundColor, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, strokeWidth: $strokeWidth, triggerMode: $triggerMode)'; } } /// @nodoc -abstract class _$$StacRefreshIndicatorImplCopyWith<$Res> - implements $StacRefreshIndicatorCopyWith<$Res> { - factory _$$StacRefreshIndicatorImplCopyWith(_$StacRefreshIndicatorImpl value, - $Res Function(_$StacRefreshIndicatorImpl) then) = - __$$StacRefreshIndicatorImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacRefreshIndicatorCopyWith<$Res> { + factory $StacRefreshIndicatorCopyWith(StacRefreshIndicator value, + $Res Function(StacRefreshIndicator) _then) = + _$StacRefreshIndicatorCopyWithImpl; @useResult $Res call( {Map? child, @@ -155,12 +102,12 @@ abstract class _$$StacRefreshIndicatorImplCopyWith<$Res> } /// @nodoc -class __$$StacRefreshIndicatorImplCopyWithImpl<$Res> - extends _$StacRefreshIndicatorCopyWithImpl<$Res, _$StacRefreshIndicatorImpl> - implements _$$StacRefreshIndicatorImplCopyWith<$Res> { - __$$StacRefreshIndicatorImplCopyWithImpl(_$StacRefreshIndicatorImpl _value, - $Res Function(_$StacRefreshIndicatorImpl) _then) - : super(_value, _then); +class _$StacRefreshIndicatorCopyWithImpl<$Res> + implements $StacRefreshIndicatorCopyWith<$Res> { + _$StacRefreshIndicatorCopyWithImpl(this._self, this._then); + + final StacRefreshIndicator _self; + final $Res Function(StacRefreshIndicator) _then; /// Create a copy of StacRefreshIndicator /// with the given fields replaced by the non-null parameter values. @@ -178,45 +125,45 @@ class __$$StacRefreshIndicatorImplCopyWithImpl<$Res> Object? strokeWidth = null, Object? triggerMode = null, }) { - return _then(_$StacRefreshIndicatorImpl( + return _then(_self.copyWith( child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, displacement: null == displacement - ? _value.displacement + ? _self.displacement : displacement // ignore: cast_nullable_to_non_nullable as double, edgeOffset: null == edgeOffset - ? _value.edgeOffset + ? _self.edgeOffset : edgeOffset // ignore: cast_nullable_to_non_nullable as double, onRefresh: freezed == onRefresh - ? _value._onRefresh + ? _self.onRefresh : onRefresh // ignore: cast_nullable_to_non_nullable as Map?, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, semanticsLabel: freezed == semanticsLabel - ? _value.semanticsLabel + ? _self.semanticsLabel : semanticsLabel // ignore: cast_nullable_to_non_nullable as String?, semanticsValue: freezed == semanticsValue - ? _value.semanticsValue + ? _self.semanticsValue : semanticsValue // ignore: cast_nullable_to_non_nullable as String?, strokeWidth: null == strokeWidth - ? _value.strokeWidth + ? _self.strokeWidth : strokeWidth // ignore: cast_nullable_to_non_nullable as double, triggerMode: null == triggerMode - ? _value.triggerMode + ? _self.triggerMode : triggerMode // ignore: cast_nullable_to_non_nullable as RefreshIndicatorTriggerMode, )); @@ -225,8 +172,8 @@ class __$$StacRefreshIndicatorImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacRefreshIndicatorImpl implements _StacRefreshIndicator { - const _$StacRefreshIndicatorImpl( +class _StacRefreshIndicator implements StacRefreshIndicator { + const _StacRefreshIndicator( {final Map? child, this.displacement = 40, this.edgeOffset = 0, @@ -239,9 +186,8 @@ class _$StacRefreshIndicatorImpl implements _StacRefreshIndicator { this.triggerMode = RefreshIndicatorTriggerMode.onEdge}) : _child = child, _onRefresh = onRefresh; - - factory _$StacRefreshIndicatorImpl.fromJson(Map json) => - _$$StacRefreshIndicatorImplFromJson(json); + factory _StacRefreshIndicator.fromJson(Map json) => + _$StacRefreshIndicatorFromJson(json); final Map? _child; @override @@ -284,16 +230,27 @@ class _$StacRefreshIndicatorImpl implements _StacRefreshIndicator { @JsonKey() final RefreshIndicatorTriggerMode triggerMode; + /// Create a copy of StacRefreshIndicator + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacRefreshIndicator(child: $child, displacement: $displacement, edgeOffset: $edgeOffset, onRefresh: $onRefresh, color: $color, backgroundColor: $backgroundColor, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, strokeWidth: $strokeWidth, triggerMode: $triggerMode)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacRefreshIndicatorCopyWith<_StacRefreshIndicator> get copyWith => + __$StacRefreshIndicatorCopyWithImpl<_StacRefreshIndicator>( + this, _$identity); + + @override + Map toJson() { + return _$StacRefreshIndicatorToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacRefreshIndicatorImpl && + other is _StacRefreshIndicator && const DeepCollectionEquality().equals(other._child, _child) && (identical(other.displacement, displacement) || other.displacement == displacement) && @@ -329,66 +286,100 @@ class _$StacRefreshIndicatorImpl implements _StacRefreshIndicator { strokeWidth, triggerMode); - /// Create a copy of StacRefreshIndicator - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacRefreshIndicatorImplCopyWith<_$StacRefreshIndicatorImpl> - get copyWith => - __$$StacRefreshIndicatorImplCopyWithImpl<_$StacRefreshIndicatorImpl>( - this, _$identity); + String toString() { + return 'StacRefreshIndicator(child: $child, displacement: $displacement, edgeOffset: $edgeOffset, onRefresh: $onRefresh, color: $color, backgroundColor: $backgroundColor, semanticsLabel: $semanticsLabel, semanticsValue: $semanticsValue, strokeWidth: $strokeWidth, triggerMode: $triggerMode)'; + } +} +/// @nodoc +abstract mixin class _$StacRefreshIndicatorCopyWith<$Res> + implements $StacRefreshIndicatorCopyWith<$Res> { + factory _$StacRefreshIndicatorCopyWith(_StacRefreshIndicator value, + $Res Function(_StacRefreshIndicator) _then) = + __$StacRefreshIndicatorCopyWithImpl; @override - Map toJson() { - return _$$StacRefreshIndicatorImplToJson( - this, - ); - } + @useResult + $Res call( + {Map? child, + double displacement, + double edgeOffset, + Map? onRefresh, + String? color, + String? backgroundColor, + String? semanticsLabel, + String? semanticsValue, + double strokeWidth, + RefreshIndicatorTriggerMode triggerMode}); } -abstract class _StacRefreshIndicator implements StacRefreshIndicator { - const factory _StacRefreshIndicator( - {final Map? child, - final double displacement, - final double edgeOffset, - final Map? onRefresh, - final String? color, - final String? backgroundColor, - final String? semanticsLabel, - final String? semanticsValue, - final double strokeWidth, - final RefreshIndicatorTriggerMode triggerMode}) = - _$StacRefreshIndicatorImpl; +/// @nodoc +class __$StacRefreshIndicatorCopyWithImpl<$Res> + implements _$StacRefreshIndicatorCopyWith<$Res> { + __$StacRefreshIndicatorCopyWithImpl(this._self, this._then); - factory _StacRefreshIndicator.fromJson(Map json) = - _$StacRefreshIndicatorImpl.fromJson; - - @override - Map? get child; - @override - double get displacement; - @override - double get edgeOffset; - @override - Map? get onRefresh; - @override - String? get color; - @override - String? get backgroundColor; - @override - String? get semanticsLabel; - @override - String? get semanticsValue; - @override - double get strokeWidth; - @override - RefreshIndicatorTriggerMode get triggerMode; + final _StacRefreshIndicator _self; + final $Res Function(_StacRefreshIndicator) _then; /// Create a copy of StacRefreshIndicator /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacRefreshIndicatorImplCopyWith<_$StacRefreshIndicatorImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? child = freezed, + Object? displacement = null, + Object? edgeOffset = null, + Object? onRefresh = freezed, + Object? color = freezed, + Object? backgroundColor = freezed, + Object? semanticsLabel = freezed, + Object? semanticsValue = freezed, + Object? strokeWidth = null, + Object? triggerMode = null, + }) { + return _then(_StacRefreshIndicator( + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + displacement: null == displacement + ? _self.displacement + : displacement // ignore: cast_nullable_to_non_nullable + as double, + edgeOffset: null == edgeOffset + ? _self.edgeOffset + : edgeOffset // ignore: cast_nullable_to_non_nullable + as double, + onRefresh: freezed == onRefresh + ? _self._onRefresh + : onRefresh // ignore: cast_nullable_to_non_nullable + as Map?, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + semanticsLabel: freezed == semanticsLabel + ? _self.semanticsLabel + : semanticsLabel // ignore: cast_nullable_to_non_nullable + as String?, + semanticsValue: freezed == semanticsValue + ? _self.semanticsValue + : semanticsValue // ignore: cast_nullable_to_non_nullable + as String?, + strokeWidth: null == strokeWidth + ? _self.strokeWidth + : strokeWidth // ignore: cast_nullable_to_non_nullable + as double, + triggerMode: null == triggerMode + ? _self.triggerMode + : triggerMode // ignore: cast_nullable_to_non_nullable + as RefreshIndicatorTriggerMode, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.g.dart b/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.g.dart index ca7c8363..e1d2f157 100644 --- a/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.g.dart +++ b/packages/stac/lib/src/parsers/stac_refresh_indicator/stac_refresh_indicator.g.dart @@ -6,9 +6,9 @@ part of 'stac_refresh_indicator.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacRefreshIndicatorImpl _$$StacRefreshIndicatorImplFromJson( +_StacRefreshIndicator _$StacRefreshIndicatorFromJson( Map json) => - _$StacRefreshIndicatorImpl( + _StacRefreshIndicator( child: json['child'] as Map?, displacement: (json['displacement'] as num?)?.toDouble() ?? 40, edgeOffset: (json['edgeOffset'] as num?)?.toDouble() ?? 0, @@ -24,8 +24,8 @@ _$StacRefreshIndicatorImpl _$$StacRefreshIndicatorImplFromJson( RefreshIndicatorTriggerMode.onEdge, ); -Map _$$StacRefreshIndicatorImplToJson( - _$StacRefreshIndicatorImpl instance) => +Map _$StacRefreshIndicatorToJson( + _StacRefreshIndicator instance) => { 'child': instance.child, 'displacement': instance.displacement, diff --git a/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.dart b/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.dart index f7f3a2e0..6a5870b4 100644 --- a/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.dart +++ b/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.dart @@ -6,7 +6,7 @@ part 'stac_rounded_rectangle_border.freezed.dart'; part 'stac_rounded_rectangle_border.g.dart'; @freezed -class StacRoundedRectangleBorder with _$StacRoundedRectangleBorder { +abstract class StacRoundedRectangleBorder with _$StacRoundedRectangleBorder { const factory StacRoundedRectangleBorder({ StacBorderSide? side, StacBorderRadius? borderRadius, diff --git a/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.freezed.dart b/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.freezed.dart index f89aaa66..a0774216 100644 --- a/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,37 +10,51 @@ part of 'stac_rounded_rectangle_border.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacRoundedRectangleBorder _$StacRoundedRectangleBorderFromJson( - Map json) { - return _StacRoundedRectangleBorder.fromJson(json); -} - /// @nodoc mixin _$StacRoundedRectangleBorder { - StacBorderSide? get side => throw _privateConstructorUsedError; - StacBorderRadius? get borderRadius => throw _privateConstructorUsedError; - - /// Serializes this StacRoundedRectangleBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacBorderSide? get side; + StacBorderRadius? get borderRadius; /// Create a copy of StacRoundedRectangleBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacRoundedRectangleBorderCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => + _$StacRoundedRectangleBorderCopyWithImpl( + this as StacRoundedRectangleBorder, _$identity); + + /// Serializes this StacRoundedRectangleBorder to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacRoundedRectangleBorder && + (identical(other.side, side) || other.side == side) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, side, borderRadius); + + @override + String toString() { + return 'StacRoundedRectangleBorder(side: $side, borderRadius: $borderRadius)'; + } } /// @nodoc -abstract class $StacRoundedRectangleBorderCopyWith<$Res> { +abstract mixin class $StacRoundedRectangleBorderCopyWith<$Res> { factory $StacRoundedRectangleBorderCopyWith(StacRoundedRectangleBorder value, - $Res Function(StacRoundedRectangleBorder) then) = - _$StacRoundedRectangleBorderCopyWithImpl<$Res, - StacRoundedRectangleBorder>; + $Res Function(StacRoundedRectangleBorder) _then) = + _$StacRoundedRectangleBorderCopyWithImpl; @useResult $Res call({StacBorderSide? side, StacBorderRadius? borderRadius}); @@ -48,15 +63,12 @@ abstract class $StacRoundedRectangleBorderCopyWith<$Res> { } /// @nodoc -class _$StacRoundedRectangleBorderCopyWithImpl<$Res, - $Val extends StacRoundedRectangleBorder> +class _$StacRoundedRectangleBorderCopyWithImpl<$Res> implements $StacRoundedRectangleBorderCopyWith<$Res> { - _$StacRoundedRectangleBorderCopyWithImpl(this._value, this._then); + _$StacRoundedRectangleBorderCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacRoundedRectangleBorder _self; + final $Res Function(StacRoundedRectangleBorder) _then; /// Create a copy of StacRoundedRectangleBorder /// with the given fields replaced by the non-null parameter values. @@ -66,16 +78,16 @@ class _$StacRoundedRectangleBorderCopyWithImpl<$Res, Object? side = freezed, Object? borderRadius = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( side: freezed == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide?, borderRadius: freezed == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius?, - ) as $Val); + )); } /// Create a copy of StacRoundedRectangleBorder @@ -83,12 +95,12 @@ class _$StacRoundedRectangleBorderCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res>? get side { - if (_value.side == null) { + if (_self.side == null) { return null; } - return $StacBorderSideCopyWith<$Res>(_value.side!, (value) { - return _then(_value.copyWith(side: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.side!, (value) { + return _then(_self.copyWith(side: value)); }); } @@ -97,23 +109,71 @@ class _$StacRoundedRectangleBorderCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith<$Res>? get borderRadius { - if (_value.borderRadius == null) { + if (_self.borderRadius == null) { return null; } - return $StacBorderRadiusCopyWith<$Res>(_value.borderRadius!, (value) { - return _then(_value.copyWith(borderRadius: value) as $Val); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius!, (value) { + return _then(_self.copyWith(borderRadius: value)); }); } } /// @nodoc -abstract class _$$StacRoundedRectangleBorderImplCopyWith<$Res> +@JsonSerializable() +class _StacRoundedRectangleBorder implements StacRoundedRectangleBorder { + const _StacRoundedRectangleBorder({this.side, this.borderRadius}); + factory _StacRoundedRectangleBorder.fromJson(Map json) => + _$StacRoundedRectangleBorderFromJson(json); + + @override + final StacBorderSide? side; + @override + final StacBorderRadius? borderRadius; + + /// Create a copy of StacRoundedRectangleBorder + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacRoundedRectangleBorderCopyWith<_StacRoundedRectangleBorder> + get copyWith => __$StacRoundedRectangleBorderCopyWithImpl< + _StacRoundedRectangleBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacRoundedRectangleBorderToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacRoundedRectangleBorder && + (identical(other.side, side) || other.side == side) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, side, borderRadius); + + @override + String toString() { + return 'StacRoundedRectangleBorder(side: $side, borderRadius: $borderRadius)'; + } +} + +/// @nodoc +abstract mixin class _$StacRoundedRectangleBorderCopyWith<$Res> implements $StacRoundedRectangleBorderCopyWith<$Res> { - factory _$$StacRoundedRectangleBorderImplCopyWith( - _$StacRoundedRectangleBorderImpl value, - $Res Function(_$StacRoundedRectangleBorderImpl) then) = - __$$StacRoundedRectangleBorderImplCopyWithImpl<$Res>; + factory _$StacRoundedRectangleBorderCopyWith( + _StacRoundedRectangleBorder value, + $Res Function(_StacRoundedRectangleBorder) _then) = + __$StacRoundedRectangleBorderCopyWithImpl; @override @useResult $Res call({StacBorderSide? side, StacBorderRadius? borderRadius}); @@ -125,104 +185,60 @@ abstract class _$$StacRoundedRectangleBorderImplCopyWith<$Res> } /// @nodoc -class __$$StacRoundedRectangleBorderImplCopyWithImpl<$Res> - extends _$StacRoundedRectangleBorderCopyWithImpl<$Res, - _$StacRoundedRectangleBorderImpl> - implements _$$StacRoundedRectangleBorderImplCopyWith<$Res> { - __$$StacRoundedRectangleBorderImplCopyWithImpl( - _$StacRoundedRectangleBorderImpl _value, - $Res Function(_$StacRoundedRectangleBorderImpl) _then) - : super(_value, _then); +class __$StacRoundedRectangleBorderCopyWithImpl<$Res> + implements _$StacRoundedRectangleBorderCopyWith<$Res> { + __$StacRoundedRectangleBorderCopyWithImpl(this._self, this._then); + + final _StacRoundedRectangleBorder _self; + final $Res Function(_StacRoundedRectangleBorder) _then; /// Create a copy of StacRoundedRectangleBorder /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ Object? side = freezed, Object? borderRadius = freezed, }) { - return _then(_$StacRoundedRectangleBorderImpl( + return _then(_StacRoundedRectangleBorder( side: freezed == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide?, borderRadius: freezed == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius?, )); } -} - -/// @nodoc -@JsonSerializable() -class _$StacRoundedRectangleBorderImpl implements _StacRoundedRectangleBorder { - const _$StacRoundedRectangleBorderImpl({this.side, this.borderRadius}); - - factory _$StacRoundedRectangleBorderImpl.fromJson( - Map json) => - _$$StacRoundedRectangleBorderImplFromJson(json); - - @override - final StacBorderSide? side; - @override - final StacBorderRadius? borderRadius; + /// Create a copy of StacRoundedRectangleBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacRoundedRectangleBorder(side: $side, borderRadius: $borderRadius)'; - } + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res>? get side { + if (_self.side == null) { + return null; + } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacRoundedRectangleBorderImpl && - (identical(other.side, side) || other.side == side) && - (identical(other.borderRadius, borderRadius) || - other.borderRadius == borderRadius)); + return $StacBorderSideCopyWith<$Res>(_self.side!, (value) { + return _then(_self.copyWith(side: value)); + }); } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, side, borderRadius); - /// Create a copy of StacRoundedRectangleBorder /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacRoundedRectangleBorderImplCopyWith<_$StacRoundedRectangleBorderImpl> - get copyWith => __$$StacRoundedRectangleBorderImplCopyWithImpl< - _$StacRoundedRectangleBorderImpl>(this, _$identity); + $StacBorderRadiusCopyWith<$Res>? get borderRadius { + if (_self.borderRadius == null) { + return null; + } - @override - Map toJson() { - return _$$StacRoundedRectangleBorderImplToJson( - this, - ); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius!, (value) { + return _then(_self.copyWith(borderRadius: value)); + }); } } -abstract class _StacRoundedRectangleBorder - implements StacRoundedRectangleBorder { - const factory _StacRoundedRectangleBorder( - {final StacBorderSide? side, - final StacBorderRadius? borderRadius}) = _$StacRoundedRectangleBorderImpl; - - factory _StacRoundedRectangleBorder.fromJson(Map json) = - _$StacRoundedRectangleBorderImpl.fromJson; - - @override - StacBorderSide? get side; - @override - StacBorderRadius? get borderRadius; - - /// Create a copy of StacRoundedRectangleBorder - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacRoundedRectangleBorderImplCopyWith<_$StacRoundedRectangleBorderImpl> - get copyWith => throw _privateConstructorUsedError; -} +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.g.dart b/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.g.dart index 942813f4..9c0252c0 100644 --- a/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.g.dart +++ b/packages/stac/lib/src/parsers/stac_rounded_rectangle_border/stac_rounded_rectangle_border.g.dart @@ -6,9 +6,9 @@ part of 'stac_rounded_rectangle_border.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacRoundedRectangleBorderImpl _$$StacRoundedRectangleBorderImplFromJson( +_StacRoundedRectangleBorder _$StacRoundedRectangleBorderFromJson( Map json) => - _$StacRoundedRectangleBorderImpl( + _StacRoundedRectangleBorder( side: json['side'] == null ? null : StacBorderSide.fromJson(json['side'] as Map), @@ -17,8 +17,8 @@ _$StacRoundedRectangleBorderImpl _$$StacRoundedRectangleBorderImplFromJson( : StacBorderRadius.fromJson(json['borderRadius']), ); -Map _$$StacRoundedRectangleBorderImplToJson( - _$StacRoundedRectangleBorderImpl instance) => +Map _$StacRoundedRectangleBorderToJson( + _StacRoundedRectangleBorder instance) => { 'side': instance.side, 'borderRadius': instance.borderRadius, diff --git a/packages/stac/lib/src/parsers/stac_row/stac_row.dart b/packages/stac/lib/src/parsers/stac_row/stac_row.dart index 25b3b439..0561fe59 100644 --- a/packages/stac/lib/src/parsers/stac_row/stac_row.dart +++ b/packages/stac/lib/src/parsers/stac_row/stac_row.dart @@ -7,7 +7,7 @@ part 'stac_row.freezed.dart'; part 'stac_row.g.dart'; @freezed -class StacRow with _$StacRow { +abstract class StacRow with _$StacRow { const factory StacRow({ @Default(MainAxisAlignment.start) MainAxisAlignment mainAxisAlignment, @Default(CrossAxisAlignment.center) CrossAxisAlignment crossAxisAlignment, diff --git a/packages/stac/lib/src/parsers/stac_row/stac_row.freezed.dart b/packages/stac/lib/src/parsers/stac_row/stac_row.freezed.dart index 57142243..7db45976 100644 --- a/packages/stac/lib/src/parsers/stac_row/stac_row.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_row/stac_row.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,112 +10,70 @@ part of 'stac_row.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacRow _$StacRowFromJson(Map json) { - return _StacRow.fromJson(json); -} - /// @nodoc mixin _$StacRow { - MainAxisAlignment get mainAxisAlignment => throw _privateConstructorUsedError; - CrossAxisAlignment get crossAxisAlignment => - throw _privateConstructorUsedError; - MainAxisSize get mainAxisSize => throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - VerticalDirection get verticalDirection => throw _privateConstructorUsedError; - double get spacing => throw _privateConstructorUsedError; - List> get children => throw _privateConstructorUsedError; - - /// Serializes this StacRow to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + MainAxisAlignment get mainAxisAlignment; + CrossAxisAlignment get crossAxisAlignment; + MainAxisSize get mainAxisSize; + TextDirection? get textDirection; + VerticalDirection get verticalDirection; + double get spacing; + List> get children; /// Create a copy of StacRow /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $StacRowCopyWith get copyWith => throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $StacRowCopyWith get copyWith => + _$StacRowCopyWithImpl(this as StacRow, _$identity); -/// @nodoc -abstract class $StacRowCopyWith<$Res> { - factory $StacRowCopyWith(StacRow value, $Res Function(StacRow) then) = - _$StacRowCopyWithImpl<$Res, StacRow>; - @useResult - $Res call( - {MainAxisAlignment mainAxisAlignment, - CrossAxisAlignment crossAxisAlignment, - MainAxisSize mainAxisSize, - TextDirection? textDirection, - VerticalDirection verticalDirection, - double spacing, - List> children}); -} + /// Serializes this StacRow to a JSON map. + Map toJson(); -/// @nodoc -class _$StacRowCopyWithImpl<$Res, $Val extends StacRow> - implements $StacRowCopyWith<$Res> { - _$StacRowCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacRow && + (identical(other.mainAxisAlignment, mainAxisAlignment) || + other.mainAxisAlignment == mainAxisAlignment) && + (identical(other.crossAxisAlignment, crossAxisAlignment) || + other.crossAxisAlignment == crossAxisAlignment) && + (identical(other.mainAxisSize, mainAxisSize) || + other.mainAxisSize == mainAxisSize) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + (identical(other.verticalDirection, verticalDirection) || + other.verticalDirection == verticalDirection) && + (identical(other.spacing, spacing) || other.spacing == spacing) && + const DeepCollectionEquality().equals(other.children, children)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + mainAxisAlignment, + crossAxisAlignment, + mainAxisSize, + textDirection, + verticalDirection, + spacing, + const DeepCollectionEquality().hash(children)); - /// Create a copy of StacRow - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? mainAxisAlignment = null, - Object? crossAxisAlignment = null, - Object? mainAxisSize = null, - Object? textDirection = freezed, - Object? verticalDirection = null, - Object? spacing = null, - Object? children = null, - }) { - return _then(_value.copyWith( - mainAxisAlignment: null == mainAxisAlignment - ? _value.mainAxisAlignment - : mainAxisAlignment // ignore: cast_nullable_to_non_nullable - as MainAxisAlignment, - crossAxisAlignment: null == crossAxisAlignment - ? _value.crossAxisAlignment - : crossAxisAlignment // ignore: cast_nullable_to_non_nullable - as CrossAxisAlignment, - mainAxisSize: null == mainAxisSize - ? _value.mainAxisSize - : mainAxisSize // ignore: cast_nullable_to_non_nullable - as MainAxisSize, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - verticalDirection: null == verticalDirection - ? _value.verticalDirection - : verticalDirection // ignore: cast_nullable_to_non_nullable - as VerticalDirection, - spacing: null == spacing - ? _value.spacing - : spacing // ignore: cast_nullable_to_non_nullable - as double, - children: null == children - ? _value.children - : children // ignore: cast_nullable_to_non_nullable - as List>, - ) as $Val); + String toString() { + return 'StacRow(mainAxisAlignment: $mainAxisAlignment, crossAxisAlignment: $crossAxisAlignment, mainAxisSize: $mainAxisSize, textDirection: $textDirection, verticalDirection: $verticalDirection, spacing: $spacing, children: $children)'; } } /// @nodoc -abstract class _$$StacRowImplCopyWith<$Res> implements $StacRowCopyWith<$Res> { - factory _$$StacRowImplCopyWith( - _$StacRowImpl value, $Res Function(_$StacRowImpl) then) = - __$$StacRowImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacRowCopyWith<$Res> { + factory $StacRowCopyWith(StacRow value, $Res Function(StacRow) _then) = + _$StacRowCopyWithImpl; @useResult $Res call( {MainAxisAlignment mainAxisAlignment, @@ -127,12 +86,11 @@ abstract class _$$StacRowImplCopyWith<$Res> implements $StacRowCopyWith<$Res> { } /// @nodoc -class __$$StacRowImplCopyWithImpl<$Res> - extends _$StacRowCopyWithImpl<$Res, _$StacRowImpl> - implements _$$StacRowImplCopyWith<$Res> { - __$$StacRowImplCopyWithImpl( - _$StacRowImpl _value, $Res Function(_$StacRowImpl) _then) - : super(_value, _then); +class _$StacRowCopyWithImpl<$Res> implements $StacRowCopyWith<$Res> { + _$StacRowCopyWithImpl(this._self, this._then); + + final StacRow _self; + final $Res Function(StacRow) _then; /// Create a copy of StacRow /// with the given fields replaced by the non-null parameter values. @@ -147,33 +105,33 @@ class __$$StacRowImplCopyWithImpl<$Res> Object? spacing = null, Object? children = null, }) { - return _then(_$StacRowImpl( + return _then(_self.copyWith( mainAxisAlignment: null == mainAxisAlignment - ? _value.mainAxisAlignment + ? _self.mainAxisAlignment : mainAxisAlignment // ignore: cast_nullable_to_non_nullable as MainAxisAlignment, crossAxisAlignment: null == crossAxisAlignment - ? _value.crossAxisAlignment + ? _self.crossAxisAlignment : crossAxisAlignment // ignore: cast_nullable_to_non_nullable as CrossAxisAlignment, mainAxisSize: null == mainAxisSize - ? _value.mainAxisSize + ? _self.mainAxisSize : mainAxisSize // ignore: cast_nullable_to_non_nullable as MainAxisSize, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, verticalDirection: null == verticalDirection - ? _value.verticalDirection + ? _self.verticalDirection : verticalDirection // ignore: cast_nullable_to_non_nullable as VerticalDirection, spacing: null == spacing - ? _value.spacing + ? _self.spacing : spacing // ignore: cast_nullable_to_non_nullable as double, children: null == children - ? _value._children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, )); @@ -182,8 +140,8 @@ class __$$StacRowImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacRowImpl implements _StacRow { - const _$StacRowImpl( +class _StacRow implements StacRow { + const _StacRow( {this.mainAxisAlignment = MainAxisAlignment.start, this.crossAxisAlignment = CrossAxisAlignment.center, this.mainAxisSize = MainAxisSize.max, @@ -192,9 +150,8 @@ class _$StacRowImpl implements _StacRow { this.spacing = 0, final List> children = const []}) : _children = children; - - factory _$StacRowImpl.fromJson(Map json) => - _$$StacRowImplFromJson(json); + factory _StacRow.fromJson(Map json) => + _$StacRowFromJson(json); @override @JsonKey() @@ -222,16 +179,26 @@ class _$StacRowImpl implements _StacRow { return EqualUnmodifiableListView(_children); } + /// Create a copy of StacRow + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacRow(mainAxisAlignment: $mainAxisAlignment, crossAxisAlignment: $crossAxisAlignment, mainAxisSize: $mainAxisSize, textDirection: $textDirection, verticalDirection: $verticalDirection, spacing: $spacing, children: $children)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacRowCopyWith<_StacRow> get copyWith => + __$StacRowCopyWithImpl<_StacRow>(this, _$identity); + + @override + Map toJson() { + return _$StacRowToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacRowImpl && + other is _StacRow && (identical(other.mainAxisAlignment, mainAxisAlignment) || other.mainAxisAlignment == mainAxisAlignment) && (identical(other.crossAxisAlignment, crossAxisAlignment) || @@ -258,53 +225,79 @@ class _$StacRowImpl implements _StacRow { spacing, const DeepCollectionEquality().hash(_children)); - /// Create a copy of StacRow - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacRowImplCopyWith<_$StacRowImpl> get copyWith => - __$$StacRowImplCopyWithImpl<_$StacRowImpl>(this, _$identity); + String toString() { + return 'StacRow(mainAxisAlignment: $mainAxisAlignment, crossAxisAlignment: $crossAxisAlignment, mainAxisSize: $mainAxisSize, textDirection: $textDirection, verticalDirection: $verticalDirection, spacing: $spacing, children: $children)'; + } +} +/// @nodoc +abstract mixin class _$StacRowCopyWith<$Res> implements $StacRowCopyWith<$Res> { + factory _$StacRowCopyWith(_StacRow value, $Res Function(_StacRow) _then) = + __$StacRowCopyWithImpl; @override - Map toJson() { - return _$$StacRowImplToJson( - this, - ); - } + @useResult + $Res call( + {MainAxisAlignment mainAxisAlignment, + CrossAxisAlignment crossAxisAlignment, + MainAxisSize mainAxisSize, + TextDirection? textDirection, + VerticalDirection verticalDirection, + double spacing, + List> children}); } -abstract class _StacRow implements StacRow { - const factory _StacRow( - {final MainAxisAlignment mainAxisAlignment, - final CrossAxisAlignment crossAxisAlignment, - final MainAxisSize mainAxisSize, - final TextDirection? textDirection, - final VerticalDirection verticalDirection, - final double spacing, - final List> children}) = _$StacRowImpl; +/// @nodoc +class __$StacRowCopyWithImpl<$Res> implements _$StacRowCopyWith<$Res> { + __$StacRowCopyWithImpl(this._self, this._then); - factory _StacRow.fromJson(Map json) = _$StacRowImpl.fromJson; - - @override - MainAxisAlignment get mainAxisAlignment; - @override - CrossAxisAlignment get crossAxisAlignment; - @override - MainAxisSize get mainAxisSize; - @override - TextDirection? get textDirection; - @override - VerticalDirection get verticalDirection; - @override - double get spacing; - @override - List> get children; + final _StacRow _self; + final $Res Function(_StacRow) _then; /// Create a copy of StacRow /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacRowImplCopyWith<_$StacRowImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? mainAxisAlignment = null, + Object? crossAxisAlignment = null, + Object? mainAxisSize = null, + Object? textDirection = freezed, + Object? verticalDirection = null, + Object? spacing = null, + Object? children = null, + }) { + return _then(_StacRow( + mainAxisAlignment: null == mainAxisAlignment + ? _self.mainAxisAlignment + : mainAxisAlignment // ignore: cast_nullable_to_non_nullable + as MainAxisAlignment, + crossAxisAlignment: null == crossAxisAlignment + ? _self.crossAxisAlignment + : crossAxisAlignment // ignore: cast_nullable_to_non_nullable + as CrossAxisAlignment, + mainAxisSize: null == mainAxisSize + ? _self.mainAxisSize + : mainAxisSize // ignore: cast_nullable_to_non_nullable + as MainAxisSize, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + verticalDirection: null == verticalDirection + ? _self.verticalDirection + : verticalDirection // ignore: cast_nullable_to_non_nullable + as VerticalDirection, + spacing: null == spacing + ? _self.spacing + : spacing // ignore: cast_nullable_to_non_nullable + as double, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_row/stac_row.g.dart b/packages/stac/lib/src/parsers/stac_row/stac_row.g.dart index 333b8229..0eb1fee0 100644 --- a/packages/stac/lib/src/parsers/stac_row/stac_row.g.dart +++ b/packages/stac/lib/src/parsers/stac_row/stac_row.g.dart @@ -6,8 +6,7 @@ part of 'stac_row.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacRowImpl _$$StacRowImplFromJson(Map json) => - _$StacRowImpl( +_StacRow _$StacRowFromJson(Map json) => _StacRow( mainAxisAlignment: $enumDecodeNullable( _$MainAxisAlignmentEnumMap, json['mainAxisAlignment']) ?? MainAxisAlignment.start, @@ -29,8 +28,7 @@ _$StacRowImpl _$$StacRowImplFromJson(Map json) => const [], ); -Map _$$StacRowImplToJson(_$StacRowImpl instance) => - { +Map _$StacRowToJson(_StacRow instance) => { 'mainAxisAlignment': _$MainAxisAlignmentEnumMap[instance.mainAxisAlignment]!, 'crossAxisAlignment': diff --git a/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.dart b/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.dart index a3291a1c..74d6963b 100644 --- a/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.dart +++ b/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.dart @@ -7,7 +7,7 @@ part 'stac_safe_area.freezed.dart'; part 'stac_safe_area.g.dart'; @freezed -class StacSafeArea with _$StacSafeArea { +abstract class StacSafeArea with _$StacSafeArea { const factory StacSafeArea({ Map? child, @Default(true) bool left, diff --git a/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.freezed.dart b/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.freezed.dart index 8897a734..a9c9fdee 100644 --- a/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,40 +10,69 @@ part of 'stac_safe_area.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSafeArea _$StacSafeAreaFromJson(Map json) { - return _StacSafeArea.fromJson(json); -} - /// @nodoc mixin _$StacSafeArea { - Map? get child => throw _privateConstructorUsedError; - bool get left => throw _privateConstructorUsedError; - bool get top => throw _privateConstructorUsedError; - bool get right => throw _privateConstructorUsedError; - bool get bottom => throw _privateConstructorUsedError; - StacEdgeInsets get minimum => throw _privateConstructorUsedError; - bool get maintainBottomViewPadding => throw _privateConstructorUsedError; - - /// Serializes this StacSafeArea to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get child; + bool get left; + bool get top; + bool get right; + bool get bottom; + StacEdgeInsets get minimum; + bool get maintainBottomViewPadding; /// Create a copy of StacSafeArea /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSafeAreaCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacSafeAreaCopyWithImpl( + this as StacSafeArea, _$identity); + + /// Serializes this StacSafeArea to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSafeArea && + const DeepCollectionEquality().equals(other.child, child) && + (identical(other.left, left) || other.left == left) && + (identical(other.top, top) || other.top == top) && + (identical(other.right, right) || other.right == right) && + (identical(other.bottom, bottom) || other.bottom == bottom) && + (identical(other.minimum, minimum) || other.minimum == minimum) && + (identical(other.maintainBottomViewPadding, + maintainBottomViewPadding) || + other.maintainBottomViewPadding == maintainBottomViewPadding)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(child), + left, + top, + right, + bottom, + minimum, + maintainBottomViewPadding); + + @override + String toString() { + return 'StacSafeArea(child: $child, left: $left, top: $top, right: $right, bottom: $bottom, minimum: $minimum, maintainBottomViewPadding: $maintainBottomViewPadding)'; + } } /// @nodoc -abstract class $StacSafeAreaCopyWith<$Res> { +abstract mixin class $StacSafeAreaCopyWith<$Res> { factory $StacSafeAreaCopyWith( - StacSafeArea value, $Res Function(StacSafeArea) then) = - _$StacSafeAreaCopyWithImpl<$Res, StacSafeArea>; + StacSafeArea value, $Res Function(StacSafeArea) _then) = + _$StacSafeAreaCopyWithImpl; @useResult $Res call( {Map? child, @@ -57,14 +87,11 @@ abstract class $StacSafeAreaCopyWith<$Res> { } /// @nodoc -class _$StacSafeAreaCopyWithImpl<$Res, $Val extends StacSafeArea> - implements $StacSafeAreaCopyWith<$Res> { - _$StacSafeAreaCopyWithImpl(this._value, this._then); +class _$StacSafeAreaCopyWithImpl<$Res> implements $StacSafeAreaCopyWith<$Res> { + _$StacSafeAreaCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacSafeArea _self; + final $Res Function(StacSafeArea) _then; /// Create a copy of StacSafeArea /// with the given fields replaced by the non-null parameter values. @@ -79,36 +106,36 @@ class _$StacSafeAreaCopyWithImpl<$Res, $Val extends StacSafeArea> Object? minimum = null, Object? maintainBottomViewPadding = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( child: freezed == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, left: null == left - ? _value.left + ? _self.left : left // ignore: cast_nullable_to_non_nullable as bool, top: null == top - ? _value.top + ? _self.top : top // ignore: cast_nullable_to_non_nullable as bool, right: null == right - ? _value.right + ? _self.right : right // ignore: cast_nullable_to_non_nullable as bool, bottom: null == bottom - ? _value.bottom + ? _self.bottom : bottom // ignore: cast_nullable_to_non_nullable as bool, minimum: null == minimum - ? _value.minimum + ? _self.minimum : minimum // ignore: cast_nullable_to_non_nullable as StacEdgeInsets, maintainBottomViewPadding: null == maintainBottomViewPadding - ? _value.maintainBottomViewPadding + ? _self.maintainBottomViewPadding : maintainBottomViewPadding // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of StacSafeArea @@ -116,91 +143,16 @@ class _$StacSafeAreaCopyWithImpl<$Res, $Val extends StacSafeArea> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res> get minimum { - return $StacEdgeInsetsCopyWith<$Res>(_value.minimum, (value) { - return _then(_value.copyWith(minimum: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.minimum, (value) { + return _then(_self.copyWith(minimum: value)); }); } } -/// @nodoc -abstract class _$$StacSafeAreaImplCopyWith<$Res> - implements $StacSafeAreaCopyWith<$Res> { - factory _$$StacSafeAreaImplCopyWith( - _$StacSafeAreaImpl value, $Res Function(_$StacSafeAreaImpl) then) = - __$$StacSafeAreaImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? child, - bool left, - bool top, - bool right, - bool bottom, - StacEdgeInsets minimum, - bool maintainBottomViewPadding}); - - @override - $StacEdgeInsetsCopyWith<$Res> get minimum; -} - -/// @nodoc -class __$$StacSafeAreaImplCopyWithImpl<$Res> - extends _$StacSafeAreaCopyWithImpl<$Res, _$StacSafeAreaImpl> - implements _$$StacSafeAreaImplCopyWith<$Res> { - __$$StacSafeAreaImplCopyWithImpl( - _$StacSafeAreaImpl _value, $Res Function(_$StacSafeAreaImpl) _then) - : super(_value, _then); - - /// Create a copy of StacSafeArea - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? child = freezed, - Object? left = null, - Object? top = null, - Object? right = null, - Object? bottom = null, - Object? minimum = null, - Object? maintainBottomViewPadding = null, - }) { - return _then(_$StacSafeAreaImpl( - child: freezed == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - left: null == left - ? _value.left - : left // ignore: cast_nullable_to_non_nullable - as bool, - top: null == top - ? _value.top - : top // ignore: cast_nullable_to_non_nullable - as bool, - right: null == right - ? _value.right - : right // ignore: cast_nullable_to_non_nullable - as bool, - bottom: null == bottom - ? _value.bottom - : bottom // ignore: cast_nullable_to_non_nullable - as bool, - minimum: null == minimum - ? _value.minimum - : minimum // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets, - maintainBottomViewPadding: null == maintainBottomViewPadding - ? _value.maintainBottomViewPadding - : maintainBottomViewPadding // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacSafeAreaImpl implements _StacSafeArea { - const _$StacSafeAreaImpl( +class _StacSafeArea implements StacSafeArea { + const _StacSafeArea( {final Map? child, this.left = true, this.top = true, @@ -209,9 +161,8 @@ class _$StacSafeAreaImpl implements _StacSafeArea { this.minimum = const StacEdgeInsets(), this.maintainBottomViewPadding = false}) : _child = child; - - factory _$StacSafeAreaImpl.fromJson(Map json) => - _$$StacSafeAreaImplFromJson(json); + factory _StacSafeArea.fromJson(Map json) => + _$StacSafeAreaFromJson(json); final Map? _child; @override @@ -242,16 +193,26 @@ class _$StacSafeAreaImpl implements _StacSafeArea { @JsonKey() final bool maintainBottomViewPadding; + /// Create a copy of StacSafeArea + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacSafeArea(child: $child, left: $left, top: $top, right: $right, bottom: $bottom, minimum: $minimum, maintainBottomViewPadding: $maintainBottomViewPadding)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSafeAreaCopyWith<_StacSafeArea> get copyWith => + __$StacSafeAreaCopyWithImpl<_StacSafeArea>(this, _$identity); + + @override + Map toJson() { + return _$StacSafeAreaToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSafeAreaImpl && + other is _StacSafeArea && const DeepCollectionEquality().equals(other._child, _child) && (identical(other.left, left) || other.left == left) && (identical(other.top, top) || other.top == top) && @@ -275,54 +236,95 @@ class _$StacSafeAreaImpl implements _StacSafeArea { minimum, maintainBottomViewPadding); - /// Create a copy of StacSafeArea - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacSafeAreaImplCopyWith<_$StacSafeAreaImpl> get copyWith => - __$$StacSafeAreaImplCopyWithImpl<_$StacSafeAreaImpl>(this, _$identity); + String toString() { + return 'StacSafeArea(child: $child, left: $left, top: $top, right: $right, bottom: $bottom, minimum: $minimum, maintainBottomViewPadding: $maintainBottomViewPadding)'; + } +} +/// @nodoc +abstract mixin class _$StacSafeAreaCopyWith<$Res> + implements $StacSafeAreaCopyWith<$Res> { + factory _$StacSafeAreaCopyWith( + _StacSafeArea value, $Res Function(_StacSafeArea) _then) = + __$StacSafeAreaCopyWithImpl; @override - Map toJson() { - return _$$StacSafeAreaImplToJson( - this, - ); - } + @useResult + $Res call( + {Map? child, + bool left, + bool top, + bool right, + bool bottom, + StacEdgeInsets minimum, + bool maintainBottomViewPadding}); + + @override + $StacEdgeInsetsCopyWith<$Res> get minimum; } -abstract class _StacSafeArea implements StacSafeArea { - const factory _StacSafeArea( - {final Map? child, - final bool left, - final bool top, - final bool right, - final bool bottom, - final StacEdgeInsets minimum, - final bool maintainBottomViewPadding}) = _$StacSafeAreaImpl; +/// @nodoc +class __$StacSafeAreaCopyWithImpl<$Res> + implements _$StacSafeAreaCopyWith<$Res> { + __$StacSafeAreaCopyWithImpl(this._self, this._then); - factory _StacSafeArea.fromJson(Map json) = - _$StacSafeAreaImpl.fromJson; + final _StacSafeArea _self; + final $Res Function(_StacSafeArea) _then; + /// Create a copy of StacSafeArea + /// with the given fields replaced by the non-null parameter values. @override - Map? get child; - @override - bool get left; - @override - bool get top; - @override - bool get right; - @override - bool get bottom; - @override - StacEdgeInsets get minimum; - @override - bool get maintainBottomViewPadding; + @pragma('vm:prefer-inline') + $Res call({ + Object? child = freezed, + Object? left = null, + Object? top = null, + Object? right = null, + Object? bottom = null, + Object? minimum = null, + Object? maintainBottomViewPadding = null, + }) { + return _then(_StacSafeArea( + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + left: null == left + ? _self.left + : left // ignore: cast_nullable_to_non_nullable + as bool, + top: null == top + ? _self.top + : top // ignore: cast_nullable_to_non_nullable + as bool, + right: null == right + ? _self.right + : right // ignore: cast_nullable_to_non_nullable + as bool, + bottom: null == bottom + ? _self.bottom + : bottom // ignore: cast_nullable_to_non_nullable + as bool, + minimum: null == minimum + ? _self.minimum + : minimum // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets, + maintainBottomViewPadding: null == maintainBottomViewPadding + ? _self.maintainBottomViewPadding + : maintainBottomViewPadding // ignore: cast_nullable_to_non_nullable + as bool, + )); + } /// Create a copy of StacSafeArea /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSafeAreaImplCopyWith<_$StacSafeAreaImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res> get minimum { + return $StacEdgeInsetsCopyWith<$Res>(_self.minimum, (value) { + return _then(_self.copyWith(minimum: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.g.dart b/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.g.dart index f7f8b710..273c5f7e 100644 --- a/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.g.dart +++ b/packages/stac/lib/src/parsers/stac_safe_area/stac_safe_area.g.dart @@ -6,8 +6,8 @@ part of 'stac_safe_area.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSafeAreaImpl _$$StacSafeAreaImplFromJson(Map json) => - _$StacSafeAreaImpl( +_StacSafeArea _$StacSafeAreaFromJson(Map json) => + _StacSafeArea( child: json['child'] as Map?, left: json['left'] as bool? ?? true, top: json['top'] as bool? ?? true, @@ -20,7 +20,7 @@ _$StacSafeAreaImpl _$$StacSafeAreaImplFromJson(Map json) => json['maintainBottomViewPadding'] as bool? ?? false, ); -Map _$$StacSafeAreaImplToJson(_$StacSafeAreaImpl instance) => +Map _$StacSafeAreaToJson(_StacSafeArea instance) => { 'child': instance.child, 'left': instance.left, diff --git a/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.dart b/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.dart index 3fcbceb7..3b87b58e 100644 --- a/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.dart +++ b/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.dart @@ -8,7 +8,7 @@ part 'stac_scaffold.freezed.dart'; part 'stac_scaffold.g.dart'; @freezed -class StacScaffold with _$StacScaffold { +abstract class StacScaffold with _$StacScaffold { const factory StacScaffold({ Map? appBar, Map? body, diff --git a/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.freezed.dart b/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.freezed.dart index f77e53e9..8bba3523 100644 --- a/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,210 +10,128 @@ part of 'stac_scaffold.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacScaffold _$StacScaffoldFromJson(Map json) { - return _StacScaffold.fromJson(json); -} - /// @nodoc mixin _$StacScaffold { - Map? get appBar => throw _privateConstructorUsedError; - Map? get body => throw _privateConstructorUsedError; - Map? get floatingActionButton => - throw _privateConstructorUsedError; - StacFloatingActionButtonLocation? get floatingActionButtonLocation => - throw _privateConstructorUsedError; - List>? get persistentFooterButtons => - throw _privateConstructorUsedError; - Map? get drawer => throw _privateConstructorUsedError; - Map? get endDrawer => throw _privateConstructorUsedError; - Map? get bottomNavigationBar => - throw _privateConstructorUsedError; - Map? get bottomSheet => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - bool? get resizeToAvoidBottomInset => throw _privateConstructorUsedError; - bool get primary => throw _privateConstructorUsedError; - DragStartBehavior get drawerDragStartBehavior => - throw _privateConstructorUsedError; - bool get extendBody => throw _privateConstructorUsedError; - bool get extendBodyBehindAppBar => throw _privateConstructorUsedError; - String? get drawerScrimColor => throw _privateConstructorUsedError; - double? get drawerEdgeDragWidth => throw _privateConstructorUsedError; - bool get drawerEnableOpenDragGesture => throw _privateConstructorUsedError; - bool get endDrawerEnableOpenDragGesture => throw _privateConstructorUsedError; - String? get restorationId => throw _privateConstructorUsedError; - - /// Serializes this StacScaffold to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get appBar; + Map? get body; + Map? get floatingActionButton; + StacFloatingActionButtonLocation? get floatingActionButtonLocation; + List>? get persistentFooterButtons; + Map? get drawer; + Map? get endDrawer; + Map? get bottomNavigationBar; + Map? get bottomSheet; + String? get backgroundColor; + bool? get resizeToAvoidBottomInset; + bool get primary; + DragStartBehavior get drawerDragStartBehavior; + bool get extendBody; + bool get extendBodyBehindAppBar; + String? get drawerScrimColor; + double? get drawerEdgeDragWidth; + bool get drawerEnableOpenDragGesture; + bool get endDrawerEnableOpenDragGesture; + String? get restorationId; /// Create a copy of StacScaffold /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacScaffoldCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacScaffoldCopyWithImpl( + this as StacScaffold, _$identity); -/// @nodoc -abstract class $StacScaffoldCopyWith<$Res> { - factory $StacScaffoldCopyWith( - StacScaffold value, $Res Function(StacScaffold) then) = - _$StacScaffoldCopyWithImpl<$Res, StacScaffold>; - @useResult - $Res call( - {Map? appBar, - Map? body, - Map? floatingActionButton, - StacFloatingActionButtonLocation? floatingActionButtonLocation, - List>? persistentFooterButtons, - Map? drawer, - Map? endDrawer, - Map? bottomNavigationBar, - Map? bottomSheet, - String? backgroundColor, - bool? resizeToAvoidBottomInset, - bool primary, - DragStartBehavior drawerDragStartBehavior, - bool extendBody, - bool extendBodyBehindAppBar, - String? drawerScrimColor, - double? drawerEdgeDragWidth, - bool drawerEnableOpenDragGesture, - bool endDrawerEnableOpenDragGesture, - String? restorationId}); -} + /// Serializes this StacScaffold to a JSON map. + Map toJson(); -/// @nodoc -class _$StacScaffoldCopyWithImpl<$Res, $Val extends StacScaffold> - implements $StacScaffoldCopyWith<$Res> { - _$StacScaffoldCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacScaffold && + const DeepCollectionEquality().equals(other.appBar, appBar) && + const DeepCollectionEquality().equals(other.body, body) && + const DeepCollectionEquality() + .equals(other.floatingActionButton, floatingActionButton) && + (identical(other.floatingActionButtonLocation, + floatingActionButtonLocation) || + other.floatingActionButtonLocation == + floatingActionButtonLocation) && + const DeepCollectionEquality().equals( + other.persistentFooterButtons, persistentFooterButtons) && + const DeepCollectionEquality().equals(other.drawer, drawer) && + const DeepCollectionEquality().equals(other.endDrawer, endDrawer) && + const DeepCollectionEquality() + .equals(other.bottomNavigationBar, bottomNavigationBar) && + const DeepCollectionEquality() + .equals(other.bottomSheet, bottomSheet) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical( + other.resizeToAvoidBottomInset, resizeToAvoidBottomInset) || + other.resizeToAvoidBottomInset == resizeToAvoidBottomInset) && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.drawerDragStartBehavior, drawerDragStartBehavior) || + other.drawerDragStartBehavior == drawerDragStartBehavior) && + (identical(other.extendBody, extendBody) || + other.extendBody == extendBody) && + (identical(other.extendBodyBehindAppBar, extendBodyBehindAppBar) || + other.extendBodyBehindAppBar == extendBodyBehindAppBar) && + (identical(other.drawerScrimColor, drawerScrimColor) || + other.drawerScrimColor == drawerScrimColor) && + (identical(other.drawerEdgeDragWidth, drawerEdgeDragWidth) || + other.drawerEdgeDragWidth == drawerEdgeDragWidth) && + (identical(other.drawerEnableOpenDragGesture, drawerEnableOpenDragGesture) || + other.drawerEnableOpenDragGesture == + drawerEnableOpenDragGesture) && + (identical(other.endDrawerEnableOpenDragGesture, + endDrawerEnableOpenDragGesture) || + other.endDrawerEnableOpenDragGesture == + endDrawerEnableOpenDragGesture) && + (identical(other.restorationId, restorationId) || + other.restorationId == restorationId)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(appBar), + const DeepCollectionEquality().hash(body), + const DeepCollectionEquality().hash(floatingActionButton), + floatingActionButtonLocation, + const DeepCollectionEquality().hash(persistentFooterButtons), + const DeepCollectionEquality().hash(drawer), + const DeepCollectionEquality().hash(endDrawer), + const DeepCollectionEquality().hash(bottomNavigationBar), + const DeepCollectionEquality().hash(bottomSheet), + backgroundColor, + resizeToAvoidBottomInset, + primary, + drawerDragStartBehavior, + extendBody, + extendBodyBehindAppBar, + drawerScrimColor, + drawerEdgeDragWidth, + drawerEnableOpenDragGesture, + endDrawerEnableOpenDragGesture, + restorationId + ]); - /// Create a copy of StacScaffold - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? appBar = freezed, - Object? body = freezed, - Object? floatingActionButton = freezed, - Object? floatingActionButtonLocation = freezed, - Object? persistentFooterButtons = freezed, - Object? drawer = freezed, - Object? endDrawer = freezed, - Object? bottomNavigationBar = freezed, - Object? bottomSheet = freezed, - Object? backgroundColor = freezed, - Object? resizeToAvoidBottomInset = freezed, - Object? primary = null, - Object? drawerDragStartBehavior = null, - Object? extendBody = null, - Object? extendBodyBehindAppBar = null, - Object? drawerScrimColor = freezed, - Object? drawerEdgeDragWidth = freezed, - Object? drawerEnableOpenDragGesture = null, - Object? endDrawerEnableOpenDragGesture = null, - Object? restorationId = freezed, - }) { - return _then(_value.copyWith( - appBar: freezed == appBar - ? _value.appBar - : appBar // ignore: cast_nullable_to_non_nullable - as Map?, - body: freezed == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as Map?, - floatingActionButton: freezed == floatingActionButton - ? _value.floatingActionButton - : floatingActionButton // ignore: cast_nullable_to_non_nullable - as Map?, - floatingActionButtonLocation: freezed == floatingActionButtonLocation - ? _value.floatingActionButtonLocation - : floatingActionButtonLocation // ignore: cast_nullable_to_non_nullable - as StacFloatingActionButtonLocation?, - persistentFooterButtons: freezed == persistentFooterButtons - ? _value.persistentFooterButtons - : persistentFooterButtons // ignore: cast_nullable_to_non_nullable - as List>?, - drawer: freezed == drawer - ? _value.drawer - : drawer // ignore: cast_nullable_to_non_nullable - as Map?, - endDrawer: freezed == endDrawer - ? _value.endDrawer - : endDrawer // ignore: cast_nullable_to_non_nullable - as Map?, - bottomNavigationBar: freezed == bottomNavigationBar - ? _value.bottomNavigationBar - : bottomNavigationBar // ignore: cast_nullable_to_non_nullable - as Map?, - bottomSheet: freezed == bottomSheet - ? _value.bottomSheet - : bottomSheet // ignore: cast_nullable_to_non_nullable - as Map?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - resizeToAvoidBottomInset: freezed == resizeToAvoidBottomInset - ? _value.resizeToAvoidBottomInset - : resizeToAvoidBottomInset // ignore: cast_nullable_to_non_nullable - as bool?, - primary: null == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as bool, - drawerDragStartBehavior: null == drawerDragStartBehavior - ? _value.drawerDragStartBehavior - : drawerDragStartBehavior // ignore: cast_nullable_to_non_nullable - as DragStartBehavior, - extendBody: null == extendBody - ? _value.extendBody - : extendBody // ignore: cast_nullable_to_non_nullable - as bool, - extendBodyBehindAppBar: null == extendBodyBehindAppBar - ? _value.extendBodyBehindAppBar - : extendBodyBehindAppBar // ignore: cast_nullable_to_non_nullable - as bool, - drawerScrimColor: freezed == drawerScrimColor - ? _value.drawerScrimColor - : drawerScrimColor // ignore: cast_nullable_to_non_nullable - as String?, - drawerEdgeDragWidth: freezed == drawerEdgeDragWidth - ? _value.drawerEdgeDragWidth - : drawerEdgeDragWidth // ignore: cast_nullable_to_non_nullable - as double?, - drawerEnableOpenDragGesture: null == drawerEnableOpenDragGesture - ? _value.drawerEnableOpenDragGesture - : drawerEnableOpenDragGesture // ignore: cast_nullable_to_non_nullable - as bool, - endDrawerEnableOpenDragGesture: null == endDrawerEnableOpenDragGesture - ? _value.endDrawerEnableOpenDragGesture - : endDrawerEnableOpenDragGesture // ignore: cast_nullable_to_non_nullable - as bool, - restorationId: freezed == restorationId - ? _value.restorationId - : restorationId // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + String toString() { + return 'StacScaffold(appBar: $appBar, body: $body, floatingActionButton: $floatingActionButton, floatingActionButtonLocation: $floatingActionButtonLocation, persistentFooterButtons: $persistentFooterButtons, drawer: $drawer, endDrawer: $endDrawer, bottomNavigationBar: $bottomNavigationBar, bottomSheet: $bottomSheet, backgroundColor: $backgroundColor, resizeToAvoidBottomInset: $resizeToAvoidBottomInset, primary: $primary, drawerDragStartBehavior: $drawerDragStartBehavior, extendBody: $extendBody, extendBodyBehindAppBar: $extendBodyBehindAppBar, drawerScrimColor: $drawerScrimColor, drawerEdgeDragWidth: $drawerEdgeDragWidth, drawerEnableOpenDragGesture: $drawerEnableOpenDragGesture, endDrawerEnableOpenDragGesture: $endDrawerEnableOpenDragGesture, restorationId: $restorationId)'; } } /// @nodoc -abstract class _$$StacScaffoldImplCopyWith<$Res> - implements $StacScaffoldCopyWith<$Res> { - factory _$$StacScaffoldImplCopyWith( - _$StacScaffoldImpl value, $Res Function(_$StacScaffoldImpl) then) = - __$$StacScaffoldImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacScaffoldCopyWith<$Res> { + factory $StacScaffoldCopyWith( + StacScaffold value, $Res Function(StacScaffold) _then) = + _$StacScaffoldCopyWithImpl; @useResult $Res call( {Map? appBar, @@ -238,12 +157,11 @@ abstract class _$$StacScaffoldImplCopyWith<$Res> } /// @nodoc -class __$$StacScaffoldImplCopyWithImpl<$Res> - extends _$StacScaffoldCopyWithImpl<$Res, _$StacScaffoldImpl> - implements _$$StacScaffoldImplCopyWith<$Res> { - __$$StacScaffoldImplCopyWithImpl( - _$StacScaffoldImpl _value, $Res Function(_$StacScaffoldImpl) _then) - : super(_value, _then); +class _$StacScaffoldCopyWithImpl<$Res> implements $StacScaffoldCopyWith<$Res> { + _$StacScaffoldCopyWithImpl(this._self, this._then); + + final StacScaffold _self; + final $Res Function(StacScaffold) _then; /// Create a copy of StacScaffold /// with the given fields replaced by the non-null parameter values. @@ -271,85 +189,85 @@ class __$$StacScaffoldImplCopyWithImpl<$Res> Object? endDrawerEnableOpenDragGesture = null, Object? restorationId = freezed, }) { - return _then(_$StacScaffoldImpl( + return _then(_self.copyWith( appBar: freezed == appBar - ? _value._appBar + ? _self.appBar : appBar // ignore: cast_nullable_to_non_nullable as Map?, body: freezed == body - ? _value._body + ? _self.body : body // ignore: cast_nullable_to_non_nullable as Map?, floatingActionButton: freezed == floatingActionButton - ? _value._floatingActionButton + ? _self.floatingActionButton : floatingActionButton // ignore: cast_nullable_to_non_nullable as Map?, floatingActionButtonLocation: freezed == floatingActionButtonLocation - ? _value.floatingActionButtonLocation + ? _self.floatingActionButtonLocation : floatingActionButtonLocation // ignore: cast_nullable_to_non_nullable as StacFloatingActionButtonLocation?, persistentFooterButtons: freezed == persistentFooterButtons - ? _value._persistentFooterButtons + ? _self.persistentFooterButtons : persistentFooterButtons // ignore: cast_nullable_to_non_nullable as List>?, drawer: freezed == drawer - ? _value._drawer + ? _self.drawer : drawer // ignore: cast_nullable_to_non_nullable as Map?, endDrawer: freezed == endDrawer - ? _value._endDrawer + ? _self.endDrawer : endDrawer // ignore: cast_nullable_to_non_nullable as Map?, bottomNavigationBar: freezed == bottomNavigationBar - ? _value._bottomNavigationBar + ? _self.bottomNavigationBar : bottomNavigationBar // ignore: cast_nullable_to_non_nullable as Map?, bottomSheet: freezed == bottomSheet - ? _value._bottomSheet + ? _self.bottomSheet : bottomSheet // ignore: cast_nullable_to_non_nullable as Map?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, resizeToAvoidBottomInset: freezed == resizeToAvoidBottomInset - ? _value.resizeToAvoidBottomInset + ? _self.resizeToAvoidBottomInset : resizeToAvoidBottomInset // ignore: cast_nullable_to_non_nullable as bool?, primary: null == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as bool, drawerDragStartBehavior: null == drawerDragStartBehavior - ? _value.drawerDragStartBehavior + ? _self.drawerDragStartBehavior : drawerDragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, extendBody: null == extendBody - ? _value.extendBody + ? _self.extendBody : extendBody // ignore: cast_nullable_to_non_nullable as bool, extendBodyBehindAppBar: null == extendBodyBehindAppBar - ? _value.extendBodyBehindAppBar + ? _self.extendBodyBehindAppBar : extendBodyBehindAppBar // ignore: cast_nullable_to_non_nullable as bool, drawerScrimColor: freezed == drawerScrimColor - ? _value.drawerScrimColor + ? _self.drawerScrimColor : drawerScrimColor // ignore: cast_nullable_to_non_nullable as String?, drawerEdgeDragWidth: freezed == drawerEdgeDragWidth - ? _value.drawerEdgeDragWidth + ? _self.drawerEdgeDragWidth : drawerEdgeDragWidth // ignore: cast_nullable_to_non_nullable as double?, drawerEnableOpenDragGesture: null == drawerEnableOpenDragGesture - ? _value.drawerEnableOpenDragGesture + ? _self.drawerEnableOpenDragGesture : drawerEnableOpenDragGesture // ignore: cast_nullable_to_non_nullable as bool, endDrawerEnableOpenDragGesture: null == endDrawerEnableOpenDragGesture - ? _value.endDrawerEnableOpenDragGesture + ? _self.endDrawerEnableOpenDragGesture : endDrawerEnableOpenDragGesture // ignore: cast_nullable_to_non_nullable as bool, restorationId: freezed == restorationId - ? _value.restorationId + ? _self.restorationId : restorationId // ignore: cast_nullable_to_non_nullable as String?, )); @@ -358,8 +276,8 @@ class __$$StacScaffoldImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacScaffoldImpl implements _StacScaffold { - const _$StacScaffoldImpl( +class _StacScaffold implements StacScaffold { + const _StacScaffold( {final Map? appBar, final Map? body, final Map? floatingActionButton, @@ -388,9 +306,8 @@ class _$StacScaffoldImpl implements _StacScaffold { _endDrawer = endDrawer, _bottomNavigationBar = bottomNavigationBar, _bottomSheet = bottomSheet; - - factory _$StacScaffoldImpl.fromJson(Map json) => - _$$StacScaffoldImplFromJson(json); + factory _StacScaffold.fromJson(Map json) => + _$StacScaffoldFromJson(json); final Map? _appBar; @override @@ -506,16 +423,26 @@ class _$StacScaffoldImpl implements _StacScaffold { @override final String? restorationId; + /// Create a copy of StacScaffold + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacScaffold(appBar: $appBar, body: $body, floatingActionButton: $floatingActionButton, floatingActionButtonLocation: $floatingActionButtonLocation, persistentFooterButtons: $persistentFooterButtons, drawer: $drawer, endDrawer: $endDrawer, bottomNavigationBar: $bottomNavigationBar, bottomSheet: $bottomSheet, backgroundColor: $backgroundColor, resizeToAvoidBottomInset: $resizeToAvoidBottomInset, primary: $primary, drawerDragStartBehavior: $drawerDragStartBehavior, extendBody: $extendBody, extendBodyBehindAppBar: $extendBodyBehindAppBar, drawerScrimColor: $drawerScrimColor, drawerEdgeDragWidth: $drawerEdgeDragWidth, drawerEnableOpenDragGesture: $drawerEnableOpenDragGesture, endDrawerEnableOpenDragGesture: $endDrawerEnableOpenDragGesture, restorationId: $restorationId)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacScaffoldCopyWith<_StacScaffold> get copyWith => + __$StacScaffoldCopyWithImpl<_StacScaffold>(this, _$identity); + + @override + Map toJson() { + return _$StacScaffoldToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacScaffoldImpl && + other is _StacScaffold && const DeepCollectionEquality().equals(other._appBar, _appBar) && const DeepCollectionEquality().equals(other._body, _body) && const DeepCollectionEquality() @@ -585,93 +512,160 @@ class _$StacScaffoldImpl implements _StacScaffold { restorationId ]); - /// Create a copy of StacScaffold - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacScaffoldImplCopyWith<_$StacScaffoldImpl> get copyWith => - __$$StacScaffoldImplCopyWithImpl<_$StacScaffoldImpl>(this, _$identity); + String toString() { + return 'StacScaffold(appBar: $appBar, body: $body, floatingActionButton: $floatingActionButton, floatingActionButtonLocation: $floatingActionButtonLocation, persistentFooterButtons: $persistentFooterButtons, drawer: $drawer, endDrawer: $endDrawer, bottomNavigationBar: $bottomNavigationBar, bottomSheet: $bottomSheet, backgroundColor: $backgroundColor, resizeToAvoidBottomInset: $resizeToAvoidBottomInset, primary: $primary, drawerDragStartBehavior: $drawerDragStartBehavior, extendBody: $extendBody, extendBodyBehindAppBar: $extendBodyBehindAppBar, drawerScrimColor: $drawerScrimColor, drawerEdgeDragWidth: $drawerEdgeDragWidth, drawerEnableOpenDragGesture: $drawerEnableOpenDragGesture, endDrawerEnableOpenDragGesture: $endDrawerEnableOpenDragGesture, restorationId: $restorationId)'; + } +} +/// @nodoc +abstract mixin class _$StacScaffoldCopyWith<$Res> + implements $StacScaffoldCopyWith<$Res> { + factory _$StacScaffoldCopyWith( + _StacScaffold value, $Res Function(_StacScaffold) _then) = + __$StacScaffoldCopyWithImpl; @override - Map toJson() { - return _$$StacScaffoldImplToJson( - this, - ); - } + @useResult + $Res call( + {Map? appBar, + Map? body, + Map? floatingActionButton, + StacFloatingActionButtonLocation? floatingActionButtonLocation, + List>? persistentFooterButtons, + Map? drawer, + Map? endDrawer, + Map? bottomNavigationBar, + Map? bottomSheet, + String? backgroundColor, + bool? resizeToAvoidBottomInset, + bool primary, + DragStartBehavior drawerDragStartBehavior, + bool extendBody, + bool extendBodyBehindAppBar, + String? drawerScrimColor, + double? drawerEdgeDragWidth, + bool drawerEnableOpenDragGesture, + bool endDrawerEnableOpenDragGesture, + String? restorationId}); } -abstract class _StacScaffold implements StacScaffold { - const factory _StacScaffold( - {final Map? appBar, - final Map? body, - final Map? floatingActionButton, - final StacFloatingActionButtonLocation? floatingActionButtonLocation, - final List>? persistentFooterButtons, - final Map? drawer, - final Map? endDrawer, - final Map? bottomNavigationBar, - final Map? bottomSheet, - final String? backgroundColor, - final bool? resizeToAvoidBottomInset, - final bool primary, - final DragStartBehavior drawerDragStartBehavior, - final bool extendBody, - final bool extendBodyBehindAppBar, - final String? drawerScrimColor, - final double? drawerEdgeDragWidth, - final bool drawerEnableOpenDragGesture, - final bool endDrawerEnableOpenDragGesture, - final String? restorationId}) = _$StacScaffoldImpl; - - factory _StacScaffold.fromJson(Map json) = - _$StacScaffoldImpl.fromJson; +/// @nodoc +class __$StacScaffoldCopyWithImpl<$Res> + implements _$StacScaffoldCopyWith<$Res> { + __$StacScaffoldCopyWithImpl(this._self, this._then); - @override - Map? get appBar; - @override - Map? get body; - @override - Map? get floatingActionButton; - @override - StacFloatingActionButtonLocation? get floatingActionButtonLocation; - @override - List>? get persistentFooterButtons; - @override - Map? get drawer; - @override - Map? get endDrawer; - @override - Map? get bottomNavigationBar; - @override - Map? get bottomSheet; - @override - String? get backgroundColor; - @override - bool? get resizeToAvoidBottomInset; - @override - bool get primary; - @override - DragStartBehavior get drawerDragStartBehavior; - @override - bool get extendBody; - @override - bool get extendBodyBehindAppBar; - @override - String? get drawerScrimColor; - @override - double? get drawerEdgeDragWidth; - @override - bool get drawerEnableOpenDragGesture; - @override - bool get endDrawerEnableOpenDragGesture; - @override - String? get restorationId; + final _StacScaffold _self; + final $Res Function(_StacScaffold) _then; /// Create a copy of StacScaffold /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacScaffoldImplCopyWith<_$StacScaffoldImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? appBar = freezed, + Object? body = freezed, + Object? floatingActionButton = freezed, + Object? floatingActionButtonLocation = freezed, + Object? persistentFooterButtons = freezed, + Object? drawer = freezed, + Object? endDrawer = freezed, + Object? bottomNavigationBar = freezed, + Object? bottomSheet = freezed, + Object? backgroundColor = freezed, + Object? resizeToAvoidBottomInset = freezed, + Object? primary = null, + Object? drawerDragStartBehavior = null, + Object? extendBody = null, + Object? extendBodyBehindAppBar = null, + Object? drawerScrimColor = freezed, + Object? drawerEdgeDragWidth = freezed, + Object? drawerEnableOpenDragGesture = null, + Object? endDrawerEnableOpenDragGesture = null, + Object? restorationId = freezed, + }) { + return _then(_StacScaffold( + appBar: freezed == appBar + ? _self._appBar + : appBar // ignore: cast_nullable_to_non_nullable + as Map?, + body: freezed == body + ? _self._body + : body // ignore: cast_nullable_to_non_nullable + as Map?, + floatingActionButton: freezed == floatingActionButton + ? _self._floatingActionButton + : floatingActionButton // ignore: cast_nullable_to_non_nullable + as Map?, + floatingActionButtonLocation: freezed == floatingActionButtonLocation + ? _self.floatingActionButtonLocation + : floatingActionButtonLocation // ignore: cast_nullable_to_non_nullable + as StacFloatingActionButtonLocation?, + persistentFooterButtons: freezed == persistentFooterButtons + ? _self._persistentFooterButtons + : persistentFooterButtons // ignore: cast_nullable_to_non_nullable + as List>?, + drawer: freezed == drawer + ? _self._drawer + : drawer // ignore: cast_nullable_to_non_nullable + as Map?, + endDrawer: freezed == endDrawer + ? _self._endDrawer + : endDrawer // ignore: cast_nullable_to_non_nullable + as Map?, + bottomNavigationBar: freezed == bottomNavigationBar + ? _self._bottomNavigationBar + : bottomNavigationBar // ignore: cast_nullable_to_non_nullable + as Map?, + bottomSheet: freezed == bottomSheet + ? _self._bottomSheet + : bottomSheet // ignore: cast_nullable_to_non_nullable + as Map?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + resizeToAvoidBottomInset: freezed == resizeToAvoidBottomInset + ? _self.resizeToAvoidBottomInset + : resizeToAvoidBottomInset // ignore: cast_nullable_to_non_nullable + as bool?, + primary: null == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as bool, + drawerDragStartBehavior: null == drawerDragStartBehavior + ? _self.drawerDragStartBehavior + : drawerDragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + extendBody: null == extendBody + ? _self.extendBody + : extendBody // ignore: cast_nullable_to_non_nullable + as bool, + extendBodyBehindAppBar: null == extendBodyBehindAppBar + ? _self.extendBodyBehindAppBar + : extendBodyBehindAppBar // ignore: cast_nullable_to_non_nullable + as bool, + drawerScrimColor: freezed == drawerScrimColor + ? _self.drawerScrimColor + : drawerScrimColor // ignore: cast_nullable_to_non_nullable + as String?, + drawerEdgeDragWidth: freezed == drawerEdgeDragWidth + ? _self.drawerEdgeDragWidth + : drawerEdgeDragWidth // ignore: cast_nullable_to_non_nullable + as double?, + drawerEnableOpenDragGesture: null == drawerEnableOpenDragGesture + ? _self.drawerEnableOpenDragGesture + : drawerEnableOpenDragGesture // ignore: cast_nullable_to_non_nullable + as bool, + endDrawerEnableOpenDragGesture: null == endDrawerEnableOpenDragGesture + ? _self.endDrawerEnableOpenDragGesture + : endDrawerEnableOpenDragGesture // ignore: cast_nullable_to_non_nullable + as bool, + restorationId: freezed == restorationId + ? _self.restorationId + : restorationId // ignore: cast_nullable_to_non_nullable + as String?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.g.dart b/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.g.dart index 6ab7dc47..95aa42dd 100644 --- a/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.g.dart +++ b/packages/stac/lib/src/parsers/stac_scaffold/stac_scaffold.g.dart @@ -6,8 +6,8 @@ part of 'stac_scaffold.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacScaffoldImpl _$$StacScaffoldImplFromJson(Map json) => - _$StacScaffoldImpl( +_StacScaffold _$StacScaffoldFromJson(Map json) => + _StacScaffold( appBar: json['appBar'] as Map?, body: json['body'] as Map?, floatingActionButton: @@ -40,7 +40,7 @@ _$StacScaffoldImpl _$$StacScaffoldImplFromJson(Map json) => restorationId: json['restorationId'] as String?, ); -Map _$$StacScaffoldImplToJson(_$StacScaffoldImpl instance) => +Map _$StacScaffoldToJson(_StacScaffold instance) => { 'appBar': instance.appBar, 'body': instance.body, diff --git a/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.dart b/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.dart index b9236178..5250bd0c 100644 --- a/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.dart +++ b/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.dart @@ -7,7 +7,7 @@ part 'stac_shadow.freezed.dart'; part 'stac_shadow.g.dart'; @freezed -class StacShadow with _$StacShadow { +abstract class StacShadow with _$StacShadow { const factory StacShadow({ @Default('#000000') String color, @Default(StacOffset(dx: 0, dy: 0)) StacOffset offset, diff --git a/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.freezed.dart b/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.freezed.dart index b9f6453c..c371f8cd 100644 --- a/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,36 +10,51 @@ part of 'stac_shadow.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacShadow _$StacShadowFromJson(Map json) { - return _StacShadow.fromJson(json); -} - /// @nodoc mixin _$StacShadow { - String get color => throw _privateConstructorUsedError; - StacOffset get offset => throw _privateConstructorUsedError; - double get blurRadius => throw _privateConstructorUsedError; - - /// Serializes this StacShadow to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get color; + StacOffset get offset; + double get blurRadius; /// Create a copy of StacShadow /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacShadowCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacShadowCopyWithImpl(this as StacShadow, _$identity); + + /// Serializes this StacShadow to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacShadow && + (identical(other.color, color) || other.color == color) && + (identical(other.offset, offset) || other.offset == offset) && + (identical(other.blurRadius, blurRadius) || + other.blurRadius == blurRadius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, color, offset, blurRadius); + + @override + String toString() { + return 'StacShadow(color: $color, offset: $offset, blurRadius: $blurRadius)'; + } } /// @nodoc -abstract class $StacShadowCopyWith<$Res> { +abstract mixin class $StacShadowCopyWith<$Res> { factory $StacShadowCopyWith( - StacShadow value, $Res Function(StacShadow) then) = - _$StacShadowCopyWithImpl<$Res, StacShadow>; + StacShadow value, $Res Function(StacShadow) _then) = + _$StacShadowCopyWithImpl; @useResult $Res call({String color, StacOffset offset, double blurRadius}); @@ -46,14 +62,11 @@ abstract class $StacShadowCopyWith<$Res> { } /// @nodoc -class _$StacShadowCopyWithImpl<$Res, $Val extends StacShadow> - implements $StacShadowCopyWith<$Res> { - _$StacShadowCopyWithImpl(this._value, this._then); +class _$StacShadowCopyWithImpl<$Res> implements $StacShadowCopyWith<$Res> { + _$StacShadowCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacShadow _self; + final $Res Function(StacShadow) _then; /// Create a copy of StacShadow /// with the given fields replaced by the non-null parameter values. @@ -64,20 +77,20 @@ class _$StacShadowCopyWithImpl<$Res, $Val extends StacShadow> Object? offset = null, Object? blurRadius = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( color: null == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String, offset: null == offset - ? _value.offset + ? _self.offset : offset // ignore: cast_nullable_to_non_nullable as StacOffset, blurRadius: null == blurRadius - ? _value.blurRadius + ? _self.blurRadius : blurRadius // ignore: cast_nullable_to_non_nullable as double, - ) as $Val); + )); } /// Create a copy of StacShadow @@ -85,70 +98,21 @@ class _$StacShadowCopyWithImpl<$Res, $Val extends StacShadow> @override @pragma('vm:prefer-inline') $StacOffsetCopyWith<$Res> get offset { - return $StacOffsetCopyWith<$Res>(_value.offset, (value) { - return _then(_value.copyWith(offset: value) as $Val); + return $StacOffsetCopyWith<$Res>(_self.offset, (value) { + return _then(_self.copyWith(offset: value)); }); } } -/// @nodoc -abstract class _$$StacShadowImplCopyWith<$Res> - implements $StacShadowCopyWith<$Res> { - factory _$$StacShadowImplCopyWith( - _$StacShadowImpl value, $Res Function(_$StacShadowImpl) then) = - __$$StacShadowImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String color, StacOffset offset, double blurRadius}); - - @override - $StacOffsetCopyWith<$Res> get offset; -} - -/// @nodoc -class __$$StacShadowImplCopyWithImpl<$Res> - extends _$StacShadowCopyWithImpl<$Res, _$StacShadowImpl> - implements _$$StacShadowImplCopyWith<$Res> { - __$$StacShadowImplCopyWithImpl( - _$StacShadowImpl _value, $Res Function(_$StacShadowImpl) _then) - : super(_value, _then); - - /// Create a copy of StacShadow - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? color = null, - Object? offset = null, - Object? blurRadius = null, - }) { - return _then(_$StacShadowImpl( - color: null == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String, - offset: null == offset - ? _value.offset - : offset // ignore: cast_nullable_to_non_nullable - as StacOffset, - blurRadius: null == blurRadius - ? _value.blurRadius - : blurRadius // ignore: cast_nullable_to_non_nullable - as double, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacShadowImpl implements _StacShadow { - const _$StacShadowImpl( +class _StacShadow implements StacShadow { + const _StacShadow( {this.color = '#000000', this.offset = const StacOffset(dx: 0, dy: 0), this.blurRadius = 0.0}); - - factory _$StacShadowImpl.fromJson(Map json) => - _$$StacShadowImplFromJson(json); + factory _StacShadow.fromJson(Map json) => + _$StacShadowFromJson(json); @override @JsonKey() @@ -160,16 +124,26 @@ class _$StacShadowImpl implements _StacShadow { @JsonKey() final double blurRadius; + /// Create a copy of StacShadow + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacShadow(color: $color, offset: $offset, blurRadius: $blurRadius)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacShadowCopyWith<_StacShadow> get copyWith => + __$StacShadowCopyWithImpl<_StacShadow>(this, _$identity); + + @override + Map toJson() { + return _$StacShadowToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacShadowImpl && + other is _StacShadow && (identical(other.color, color) || other.color == color) && (identical(other.offset, offset) || other.offset == offset) && (identical(other.blurRadius, blurRadius) || @@ -180,42 +154,67 @@ class _$StacShadowImpl implements _StacShadow { @override int get hashCode => Object.hash(runtimeType, color, offset, blurRadius); - /// Create a copy of StacShadow - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacShadowImplCopyWith<_$StacShadowImpl> get copyWith => - __$$StacShadowImplCopyWithImpl<_$StacShadowImpl>(this, _$identity); + String toString() { + return 'StacShadow(color: $color, offset: $offset, blurRadius: $blurRadius)'; + } +} + +/// @nodoc +abstract mixin class _$StacShadowCopyWith<$Res> + implements $StacShadowCopyWith<$Res> { + factory _$StacShadowCopyWith( + _StacShadow value, $Res Function(_StacShadow) _then) = + __$StacShadowCopyWithImpl; + @override + @useResult + $Res call({String color, StacOffset offset, double blurRadius}); @override - Map toJson() { - return _$$StacShadowImplToJson( - this, - ); - } + $StacOffsetCopyWith<$Res> get offset; } -abstract class _StacShadow implements StacShadow { - const factory _StacShadow( - {final String color, - final StacOffset offset, - final double blurRadius}) = _$StacShadowImpl; +/// @nodoc +class __$StacShadowCopyWithImpl<$Res> implements _$StacShadowCopyWith<$Res> { + __$StacShadowCopyWithImpl(this._self, this._then); - factory _StacShadow.fromJson(Map json) = - _$StacShadowImpl.fromJson; + final _StacShadow _self; + final $Res Function(_StacShadow) _then; + /// Create a copy of StacShadow + /// with the given fields replaced by the non-null parameter values. @override - String get color; - @override - StacOffset get offset; - @override - double get blurRadius; + @pragma('vm:prefer-inline') + $Res call({ + Object? color = null, + Object? offset = null, + Object? blurRadius = null, + }) { + return _then(_StacShadow( + color: null == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String, + offset: null == offset + ? _self.offset + : offset // ignore: cast_nullable_to_non_nullable + as StacOffset, + blurRadius: null == blurRadius + ? _self.blurRadius + : blurRadius // ignore: cast_nullable_to_non_nullable + as double, + )); + } /// Create a copy of StacShadow /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacShadowImplCopyWith<_$StacShadowImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacOffsetCopyWith<$Res> get offset { + return $StacOffsetCopyWith<$Res>(_self.offset, (value) { + return _then(_self.copyWith(offset: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.g.dart b/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.g.dart index f62fbf85..25f7765b 100644 --- a/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.g.dart +++ b/packages/stac/lib/src/parsers/stac_shadow/stac_shadow.g.dart @@ -6,8 +6,7 @@ part of 'stac_shadow.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacShadowImpl _$$StacShadowImplFromJson(Map json) => - _$StacShadowImpl( +_StacShadow _$StacShadowFromJson(Map json) => _StacShadow( color: json['color'] as String? ?? '#000000', offset: json['offset'] == null ? const StacOffset(dx: 0, dy: 0) @@ -15,7 +14,7 @@ _$StacShadowImpl _$$StacShadowImplFromJson(Map json) => blurRadius: (json['blurRadius'] as num?)?.toDouble() ?? 0.0, ); -Map _$$StacShadowImplToJson(_$StacShadowImpl instance) => +Map _$StacShadowToJson(_StacShadow instance) => { 'color': instance.color, 'offset': instance.offset, diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.dart index 629fe1ad..78c28abd 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.dart @@ -6,9 +6,9 @@ part 'stac_beveled_rectangle_border.freezed.dart'; part 'stac_beveled_rectangle_border.g.dart'; @freezed -class StacBeveledRectangleBorder with _$StacBeveledRectangleBorder { +abstract class StacBeveledRectangleBorder with _$StacBeveledRectangleBorder { const factory StacBeveledRectangleBorder({ - @Default(StacBorderSide.none()) StacBorderSide side, + @Default(StacBorderSide.none) StacBorderSide side, @Default(StacBorderRadius()) StacBorderRadius borderRadius, }) = _StacBeveledRectangleBorder; diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.freezed.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.freezed.dart index 3993e07e..ac95334e 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,37 +10,51 @@ part of 'stac_beveled_rectangle_border.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacBeveledRectangleBorder _$StacBeveledRectangleBorderFromJson( - Map json) { - return _StacBeveledRectangleBorder.fromJson(json); -} - /// @nodoc mixin _$StacBeveledRectangleBorder { - StacBorderSide get side => throw _privateConstructorUsedError; - StacBorderRadius get borderRadius => throw _privateConstructorUsedError; - - /// Serializes this StacBeveledRectangleBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacBorderSide get side; + StacBorderRadius get borderRadius; /// Create a copy of StacBeveledRectangleBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacBeveledRectangleBorderCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => + _$StacBeveledRectangleBorderCopyWithImpl( + this as StacBeveledRectangleBorder, _$identity); + + /// Serializes this StacBeveledRectangleBorder to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacBeveledRectangleBorder && + (identical(other.side, side) || other.side == side) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, side, borderRadius); + + @override + String toString() { + return 'StacBeveledRectangleBorder(side: $side, borderRadius: $borderRadius)'; + } } /// @nodoc -abstract class $StacBeveledRectangleBorderCopyWith<$Res> { +abstract mixin class $StacBeveledRectangleBorderCopyWith<$Res> { factory $StacBeveledRectangleBorderCopyWith(StacBeveledRectangleBorder value, - $Res Function(StacBeveledRectangleBorder) then) = - _$StacBeveledRectangleBorderCopyWithImpl<$Res, - StacBeveledRectangleBorder>; + $Res Function(StacBeveledRectangleBorder) _then) = + _$StacBeveledRectangleBorderCopyWithImpl; @useResult $Res call({StacBorderSide side, StacBorderRadius borderRadius}); @@ -48,15 +63,12 @@ abstract class $StacBeveledRectangleBorderCopyWith<$Res> { } /// @nodoc -class _$StacBeveledRectangleBorderCopyWithImpl<$Res, - $Val extends StacBeveledRectangleBorder> +class _$StacBeveledRectangleBorderCopyWithImpl<$Res> implements $StacBeveledRectangleBorderCopyWith<$Res> { - _$StacBeveledRectangleBorderCopyWithImpl(this._value, this._then); + _$StacBeveledRectangleBorderCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacBeveledRectangleBorder _self; + final $Res Function(StacBeveledRectangleBorder) _then; /// Create a copy of StacBeveledRectangleBorder /// with the given fields replaced by the non-null parameter values. @@ -66,16 +78,16 @@ class _$StacBeveledRectangleBorderCopyWithImpl<$Res, Object? side = null, Object? borderRadius = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( side: null == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide, borderRadius: null == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius, - ) as $Val); + )); } /// Create a copy of StacBeveledRectangleBorder @@ -83,8 +95,8 @@ class _$StacBeveledRectangleBorderCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res> get side { - return $StacBorderSideCopyWith<$Res>(_value.side, (value) { - return _then(_value.copyWith(side: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.side, (value) { + return _then(_self.copyWith(side: value)); }); } @@ -93,70 +105,20 @@ class _$StacBeveledRectangleBorderCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith<$Res> get borderRadius { - return $StacBorderRadiusCopyWith<$Res>(_value.borderRadius, (value) { - return _then(_value.copyWith(borderRadius: value) as $Val); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); }); } } -/// @nodoc -abstract class _$$StacBeveledRectangleBorderImplCopyWith<$Res> - implements $StacBeveledRectangleBorderCopyWith<$Res> { - factory _$$StacBeveledRectangleBorderImplCopyWith( - _$StacBeveledRectangleBorderImpl value, - $Res Function(_$StacBeveledRectangleBorderImpl) then) = - __$$StacBeveledRectangleBorderImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({StacBorderSide side, StacBorderRadius borderRadius}); - - @override - $StacBorderSideCopyWith<$Res> get side; - @override - $StacBorderRadiusCopyWith<$Res> get borderRadius; -} - -/// @nodoc -class __$$StacBeveledRectangleBorderImplCopyWithImpl<$Res> - extends _$StacBeveledRectangleBorderCopyWithImpl<$Res, - _$StacBeveledRectangleBorderImpl> - implements _$$StacBeveledRectangleBorderImplCopyWith<$Res> { - __$$StacBeveledRectangleBorderImplCopyWithImpl( - _$StacBeveledRectangleBorderImpl _value, - $Res Function(_$StacBeveledRectangleBorderImpl) _then) - : super(_value, _then); - - /// Create a copy of StacBeveledRectangleBorder - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? side = null, - Object? borderRadius = null, - }) { - return _then(_$StacBeveledRectangleBorderImpl( - side: null == side - ? _value.side - : side // ignore: cast_nullable_to_non_nullable - as StacBorderSide, - borderRadius: null == borderRadius - ? _value.borderRadius - : borderRadius // ignore: cast_nullable_to_non_nullable - as StacBorderRadius, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacBeveledRectangleBorderImpl implements _StacBeveledRectangleBorder { - const _$StacBeveledRectangleBorderImpl( - {this.side = const StacBorderSide.none(), +class _StacBeveledRectangleBorder implements StacBeveledRectangleBorder { + const _StacBeveledRectangleBorder( + {this.side = StacBorderSide.none, this.borderRadius = const StacBorderRadius()}); - - factory _$StacBeveledRectangleBorderImpl.fromJson( - Map json) => - _$$StacBeveledRectangleBorderImplFromJson(json); + factory _StacBeveledRectangleBorder.fromJson(Map json) => + _$StacBeveledRectangleBorderFromJson(json); @override @JsonKey() @@ -165,16 +127,27 @@ class _$StacBeveledRectangleBorderImpl implements _StacBeveledRectangleBorder { @JsonKey() final StacBorderRadius borderRadius; + /// Create a copy of StacBeveledRectangleBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacBeveledRectangleBorder(side: $side, borderRadius: $borderRadius)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacBeveledRectangleBorderCopyWith<_StacBeveledRectangleBorder> + get copyWith => __$StacBeveledRectangleBorderCopyWithImpl< + _StacBeveledRectangleBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacBeveledRectangleBorderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacBeveledRectangleBorderImpl && + other is _StacBeveledRectangleBorder && (identical(other.side, side) || other.side == side) && (identical(other.borderRadius, borderRadius) || other.borderRadius == borderRadius)); @@ -184,41 +157,76 @@ class _$StacBeveledRectangleBorderImpl implements _StacBeveledRectangleBorder { @override int get hashCode => Object.hash(runtimeType, side, borderRadius); - /// Create a copy of StacBeveledRectangleBorder - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacBeveledRectangleBorderImplCopyWith<_$StacBeveledRectangleBorderImpl> - get copyWith => __$$StacBeveledRectangleBorderImplCopyWithImpl< - _$StacBeveledRectangleBorderImpl>(this, _$identity); + String toString() { + return 'StacBeveledRectangleBorder(side: $side, borderRadius: $borderRadius)'; + } +} +/// @nodoc +abstract mixin class _$StacBeveledRectangleBorderCopyWith<$Res> + implements $StacBeveledRectangleBorderCopyWith<$Res> { + factory _$StacBeveledRectangleBorderCopyWith( + _StacBeveledRectangleBorder value, + $Res Function(_StacBeveledRectangleBorder) _then) = + __$StacBeveledRectangleBorderCopyWithImpl; @override - Map toJson() { - return _$$StacBeveledRectangleBorderImplToJson( - this, - ); - } + @useResult + $Res call({StacBorderSide side, StacBorderRadius borderRadius}); + + @override + $StacBorderSideCopyWith<$Res> get side; + @override + $StacBorderRadiusCopyWith<$Res> get borderRadius; } -abstract class _StacBeveledRectangleBorder - implements StacBeveledRectangleBorder { - const factory _StacBeveledRectangleBorder( - {final StacBorderSide side, - final StacBorderRadius borderRadius}) = _$StacBeveledRectangleBorderImpl; +/// @nodoc +class __$StacBeveledRectangleBorderCopyWithImpl<$Res> + implements _$StacBeveledRectangleBorderCopyWith<$Res> { + __$StacBeveledRectangleBorderCopyWithImpl(this._self, this._then); - factory _StacBeveledRectangleBorder.fromJson(Map json) = - _$StacBeveledRectangleBorderImpl.fromJson; + final _StacBeveledRectangleBorder _self; + final $Res Function(_StacBeveledRectangleBorder) _then; + /// Create a copy of StacBeveledRectangleBorder + /// with the given fields replaced by the non-null parameter values. @override - StacBorderSide get side; + @pragma('vm:prefer-inline') + $Res call({ + Object? side = null, + Object? borderRadius = null, + }) { + return _then(_StacBeveledRectangleBorder( + side: null == side + ? _self.side + : side // ignore: cast_nullable_to_non_nullable + as StacBorderSide, + borderRadius: null == borderRadius + ? _self.borderRadius + : borderRadius // ignore: cast_nullable_to_non_nullable + as StacBorderRadius, + )); + } + + /// Create a copy of StacBeveledRectangleBorder + /// with the given fields replaced by the non-null parameter values. @override - StacBorderRadius get borderRadius; + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res> get side { + return $StacBorderSideCopyWith<$Res>(_self.side, (value) { + return _then(_self.copyWith(side: value)); + }); + } /// Create a copy of StacBeveledRectangleBorder /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacBeveledRectangleBorderImplCopyWith<_$StacBeveledRectangleBorderImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacBorderRadiusCopyWith<$Res> get borderRadius { + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.g.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.g.dart index 8095288d..240bd337 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.g.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_beveled_rectangle_border.g.dart @@ -6,19 +6,19 @@ part of 'stac_beveled_rectangle_border.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacBeveledRectangleBorderImpl _$$StacBeveledRectangleBorderImplFromJson( +_StacBeveledRectangleBorder _$StacBeveledRectangleBorderFromJson( Map json) => - _$StacBeveledRectangleBorderImpl( + _StacBeveledRectangleBorder( side: json['side'] == null - ? const StacBorderSide.none() + ? StacBorderSide.none : StacBorderSide.fromJson(json['side'] as Map), borderRadius: json['borderRadius'] == null ? const StacBorderRadius() : StacBorderRadius.fromJson(json['borderRadius']), ); -Map _$$StacBeveledRectangleBorderImplToJson( - _$StacBeveledRectangleBorderImpl instance) => +Map _$StacBeveledRectangleBorderToJson( + _StacBeveledRectangleBorder instance) => { 'side': instance.side, 'borderRadius': instance.borderRadius, diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.dart index 3ef0363c..b94ff3b0 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.dart @@ -6,9 +6,9 @@ part 'stac_circle_border.freezed.dart'; part 'stac_circle_border.g.dart'; @freezed -class StacCircleBorder with _$StacCircleBorder { +abstract class StacCircleBorder with _$StacCircleBorder { const factory StacCircleBorder({ - @Default(StacBorderSide.none()) StacBorderSide side, + @Default(StacBorderSide.none) StacBorderSide side, @Default(0.0) double eccentricity, }) = _StacCircleBorder; diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.freezed.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.freezed.dart index fb9876e0..4a9b2187 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,35 +10,50 @@ part of 'stac_circle_border.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacCircleBorder _$StacCircleBorderFromJson(Map json) { - return _StacCircleBorder.fromJson(json); -} - /// @nodoc mixin _$StacCircleBorder { - StacBorderSide get side => throw _privateConstructorUsedError; - double get eccentricity => throw _privateConstructorUsedError; - - /// Serializes this StacCircleBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacBorderSide get side; + double get eccentricity; /// Create a copy of StacCircleBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacCircleBorderCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacCircleBorderCopyWithImpl( + this as StacCircleBorder, _$identity); + + /// Serializes this StacCircleBorder to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacCircleBorder && + (identical(other.side, side) || other.side == side) && + (identical(other.eccentricity, eccentricity) || + other.eccentricity == eccentricity)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, side, eccentricity); + + @override + String toString() { + return 'StacCircleBorder(side: $side, eccentricity: $eccentricity)'; + } } /// @nodoc -abstract class $StacCircleBorderCopyWith<$Res> { +abstract mixin class $StacCircleBorderCopyWith<$Res> { factory $StacCircleBorderCopyWith( - StacCircleBorder value, $Res Function(StacCircleBorder) then) = - _$StacCircleBorderCopyWithImpl<$Res, StacCircleBorder>; + StacCircleBorder value, $Res Function(StacCircleBorder) _then) = + _$StacCircleBorderCopyWithImpl; @useResult $Res call({StacBorderSide side, double eccentricity}); @@ -45,14 +61,12 @@ abstract class $StacCircleBorderCopyWith<$Res> { } /// @nodoc -class _$StacCircleBorderCopyWithImpl<$Res, $Val extends StacCircleBorder> +class _$StacCircleBorderCopyWithImpl<$Res> implements $StacCircleBorderCopyWith<$Res> { - _$StacCircleBorderCopyWithImpl(this._value, this._then); + _$StacCircleBorderCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacCircleBorder _self; + final $Res Function(StacCircleBorder) _then; /// Create a copy of StacCircleBorder /// with the given fields replaced by the non-null parameter values. @@ -62,16 +76,16 @@ class _$StacCircleBorderCopyWithImpl<$Res, $Val extends StacCircleBorder> Object? side = null, Object? eccentricity = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( side: null == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide, eccentricity: null == eccentricity - ? _value.eccentricity + ? _self.eccentricity : eccentricity // ignore: cast_nullable_to_non_nullable as double, - ) as $Val); + )); } /// Create a copy of StacCircleBorder @@ -79,63 +93,19 @@ class _$StacCircleBorderCopyWithImpl<$Res, $Val extends StacCircleBorder> @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res> get side { - return $StacBorderSideCopyWith<$Res>(_value.side, (value) { - return _then(_value.copyWith(side: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.side, (value) { + return _then(_self.copyWith(side: value)); }); } } -/// @nodoc -abstract class _$$StacCircleBorderImplCopyWith<$Res> - implements $StacCircleBorderCopyWith<$Res> { - factory _$$StacCircleBorderImplCopyWith(_$StacCircleBorderImpl value, - $Res Function(_$StacCircleBorderImpl) then) = - __$$StacCircleBorderImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({StacBorderSide side, double eccentricity}); - - @override - $StacBorderSideCopyWith<$Res> get side; -} - -/// @nodoc -class __$$StacCircleBorderImplCopyWithImpl<$Res> - extends _$StacCircleBorderCopyWithImpl<$Res, _$StacCircleBorderImpl> - implements _$$StacCircleBorderImplCopyWith<$Res> { - __$$StacCircleBorderImplCopyWithImpl(_$StacCircleBorderImpl _value, - $Res Function(_$StacCircleBorderImpl) _then) - : super(_value, _then); - - /// Create a copy of StacCircleBorder - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? side = null, - Object? eccentricity = null, - }) { - return _then(_$StacCircleBorderImpl( - side: null == side - ? _value.side - : side // ignore: cast_nullable_to_non_nullable - as StacBorderSide, - eccentricity: null == eccentricity - ? _value.eccentricity - : eccentricity // ignore: cast_nullable_to_non_nullable - as double, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacCircleBorderImpl implements _StacCircleBorder { - const _$StacCircleBorderImpl( - {this.side = const StacBorderSide.none(), this.eccentricity = 0.0}); - - factory _$StacCircleBorderImpl.fromJson(Map json) => - _$$StacCircleBorderImplFromJson(json); +class _StacCircleBorder implements StacCircleBorder { + const _StacCircleBorder( + {this.side = StacBorderSide.none, this.eccentricity = 0.0}); + factory _StacCircleBorder.fromJson(Map json) => + _$StacCircleBorderFromJson(json); @override @JsonKey() @@ -144,16 +114,26 @@ class _$StacCircleBorderImpl implements _StacCircleBorder { @JsonKey() final double eccentricity; + /// Create a copy of StacCircleBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacCircleBorder(side: $side, eccentricity: $eccentricity)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacCircleBorderCopyWith<_StacCircleBorder> get copyWith => + __$StacCircleBorderCopyWithImpl<_StacCircleBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacCircleBorderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacCircleBorderImpl && + other is _StacCircleBorder && (identical(other.side, side) || other.side == side) && (identical(other.eccentricity, eccentricity) || other.eccentricity == eccentricity)); @@ -163,40 +143,63 @@ class _$StacCircleBorderImpl implements _StacCircleBorder { @override int get hashCode => Object.hash(runtimeType, side, eccentricity); - /// Create a copy of StacCircleBorder - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacCircleBorderImplCopyWith<_$StacCircleBorderImpl> get copyWith => - __$$StacCircleBorderImplCopyWithImpl<_$StacCircleBorderImpl>( - this, _$identity); + String toString() { + return 'StacCircleBorder(side: $side, eccentricity: $eccentricity)'; + } +} +/// @nodoc +abstract mixin class _$StacCircleBorderCopyWith<$Res> + implements $StacCircleBorderCopyWith<$Res> { + factory _$StacCircleBorderCopyWith( + _StacCircleBorder value, $Res Function(_StacCircleBorder) _then) = + __$StacCircleBorderCopyWithImpl; @override - Map toJson() { - return _$$StacCircleBorderImplToJson( - this, - ); - } + @useResult + $Res call({StacBorderSide side, double eccentricity}); + + @override + $StacBorderSideCopyWith<$Res> get side; } -abstract class _StacCircleBorder implements StacCircleBorder { - const factory _StacCircleBorder( - {final StacBorderSide side, - final double eccentricity}) = _$StacCircleBorderImpl; +/// @nodoc +class __$StacCircleBorderCopyWithImpl<$Res> + implements _$StacCircleBorderCopyWith<$Res> { + __$StacCircleBorderCopyWithImpl(this._self, this._then); - factory _StacCircleBorder.fromJson(Map json) = - _$StacCircleBorderImpl.fromJson; + final _StacCircleBorder _self; + final $Res Function(_StacCircleBorder) _then; + /// Create a copy of StacCircleBorder + /// with the given fields replaced by the non-null parameter values. @override - StacBorderSide get side; - @override - double get eccentricity; + @pragma('vm:prefer-inline') + $Res call({ + Object? side = null, + Object? eccentricity = null, + }) { + return _then(_StacCircleBorder( + side: null == side + ? _self.side + : side // ignore: cast_nullable_to_non_nullable + as StacBorderSide, + eccentricity: null == eccentricity + ? _self.eccentricity + : eccentricity // ignore: cast_nullable_to_non_nullable + as double, + )); + } /// Create a copy of StacCircleBorder /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacCircleBorderImplCopyWith<_$StacCircleBorderImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res> get side { + return $StacBorderSideCopyWith<$Res>(_self.side, (value) { + return _then(_self.copyWith(side: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.g.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.g.dart index f308be1d..328b53a5 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.g.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_circle_border.g.dart @@ -6,17 +6,15 @@ part of 'stac_circle_border.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacCircleBorderImpl _$$StacCircleBorderImplFromJson( - Map json) => - _$StacCircleBorderImpl( +_StacCircleBorder _$StacCircleBorderFromJson(Map json) => + _StacCircleBorder( side: json['side'] == null - ? const StacBorderSide.none() + ? StacBorderSide.none : StacBorderSide.fromJson(json['side'] as Map), eccentricity: (json['eccentricity'] as num?)?.toDouble() ?? 0.0, ); -Map _$$StacCircleBorderImplToJson( - _$StacCircleBorderImpl instance) => +Map _$StacCircleBorderToJson(_StacCircleBorder instance) => { 'side': instance.side, 'eccentricity': instance.eccentricity, diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.dart index ce97966b..88acdb4a 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.dart @@ -6,9 +6,10 @@ part 'stac_continous_rectangle_border.freezed.dart'; part 'stac_continous_rectangle_border.g.dart'; @freezed -class StacContinousRectangleBorder with _$StacContinousRectangleBorder { +abstract class StacContinousRectangleBorder + with _$StacContinousRectangleBorder { const factory StacContinousRectangleBorder({ - @Default(StacBorderSide.none()) StacBorderSide side, + @Default(StacBorderSide.none) StacBorderSide side, @Default(StacBorderRadius()) StacBorderRadius borderRadius, }) = _StacContinousRectangleBorder; diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.freezed.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.freezed.dart index 17d7353d..6d92a5cd 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,38 +10,52 @@ part of 'stac_continous_rectangle_border.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacContinousRectangleBorder _$StacContinousRectangleBorderFromJson( - Map json) { - return _StacContinousRectangleBorder.fromJson(json); -} - /// @nodoc mixin _$StacContinousRectangleBorder { - StacBorderSide get side => throw _privateConstructorUsedError; - StacBorderRadius get borderRadius => throw _privateConstructorUsedError; - - /// Serializes this StacContinousRectangleBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacBorderSide get side; + StacBorderRadius get borderRadius; /// Create a copy of StacContinousRectangleBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacContinousRectangleBorderCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => _$StacContinousRectangleBorderCopyWithImpl< + StacContinousRectangleBorder>( + this as StacContinousRectangleBorder, _$identity); + + /// Serializes this StacContinousRectangleBorder to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacContinousRectangleBorder && + (identical(other.side, side) || other.side == side) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, side, borderRadius); + + @override + String toString() { + return 'StacContinousRectangleBorder(side: $side, borderRadius: $borderRadius)'; + } } /// @nodoc -abstract class $StacContinousRectangleBorderCopyWith<$Res> { +abstract mixin class $StacContinousRectangleBorderCopyWith<$Res> { factory $StacContinousRectangleBorderCopyWith( StacContinousRectangleBorder value, - $Res Function(StacContinousRectangleBorder) then) = - _$StacContinousRectangleBorderCopyWithImpl<$Res, - StacContinousRectangleBorder>; + $Res Function(StacContinousRectangleBorder) _then) = + _$StacContinousRectangleBorderCopyWithImpl; @useResult $Res call({StacBorderSide side, StacBorderRadius borderRadius}); @@ -49,15 +64,12 @@ abstract class $StacContinousRectangleBorderCopyWith<$Res> { } /// @nodoc -class _$StacContinousRectangleBorderCopyWithImpl<$Res, - $Val extends StacContinousRectangleBorder> +class _$StacContinousRectangleBorderCopyWithImpl<$Res> implements $StacContinousRectangleBorderCopyWith<$Res> { - _$StacContinousRectangleBorderCopyWithImpl(this._value, this._then); + _$StacContinousRectangleBorderCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacContinousRectangleBorder _self; + final $Res Function(StacContinousRectangleBorder) _then; /// Create a copy of StacContinousRectangleBorder /// with the given fields replaced by the non-null parameter values. @@ -67,16 +79,16 @@ class _$StacContinousRectangleBorderCopyWithImpl<$Res, Object? side = null, Object? borderRadius = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( side: null == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide, borderRadius: null == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius, - ) as $Val); + )); } /// Create a copy of StacContinousRectangleBorder @@ -84,8 +96,8 @@ class _$StacContinousRectangleBorderCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res> get side { - return $StacBorderSideCopyWith<$Res>(_value.side, (value) { - return _then(_value.copyWith(side: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.side, (value) { + return _then(_self.copyWith(side: value)); }); } @@ -94,71 +106,20 @@ class _$StacContinousRectangleBorderCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith<$Res> get borderRadius { - return $StacBorderRadiusCopyWith<$Res>(_value.borderRadius, (value) { - return _then(_value.copyWith(borderRadius: value) as $Val); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); }); } } -/// @nodoc -abstract class _$$StacContinousRectangleBorderImplCopyWith<$Res> - implements $StacContinousRectangleBorderCopyWith<$Res> { - factory _$$StacContinousRectangleBorderImplCopyWith( - _$StacContinousRectangleBorderImpl value, - $Res Function(_$StacContinousRectangleBorderImpl) then) = - __$$StacContinousRectangleBorderImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({StacBorderSide side, StacBorderRadius borderRadius}); - - @override - $StacBorderSideCopyWith<$Res> get side; - @override - $StacBorderRadiusCopyWith<$Res> get borderRadius; -} - -/// @nodoc -class __$$StacContinousRectangleBorderImplCopyWithImpl<$Res> - extends _$StacContinousRectangleBorderCopyWithImpl<$Res, - _$StacContinousRectangleBorderImpl> - implements _$$StacContinousRectangleBorderImplCopyWith<$Res> { - __$$StacContinousRectangleBorderImplCopyWithImpl( - _$StacContinousRectangleBorderImpl _value, - $Res Function(_$StacContinousRectangleBorderImpl) _then) - : super(_value, _then); - - /// Create a copy of StacContinousRectangleBorder - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? side = null, - Object? borderRadius = null, - }) { - return _then(_$StacContinousRectangleBorderImpl( - side: null == side - ? _value.side - : side // ignore: cast_nullable_to_non_nullable - as StacBorderSide, - borderRadius: null == borderRadius - ? _value.borderRadius - : borderRadius // ignore: cast_nullable_to_non_nullable - as StacBorderRadius, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacContinousRectangleBorderImpl - implements _StacContinousRectangleBorder { - const _$StacContinousRectangleBorderImpl( - {this.side = const StacBorderSide.none(), +class _StacContinousRectangleBorder implements StacContinousRectangleBorder { + const _StacContinousRectangleBorder( + {this.side = StacBorderSide.none, this.borderRadius = const StacBorderRadius()}); - - factory _$StacContinousRectangleBorderImpl.fromJson( - Map json) => - _$$StacContinousRectangleBorderImplFromJson(json); + factory _StacContinousRectangleBorder.fromJson(Map json) => + _$StacContinousRectangleBorderFromJson(json); @override @JsonKey() @@ -167,16 +128,27 @@ class _$StacContinousRectangleBorderImpl @JsonKey() final StacBorderRadius borderRadius; + /// Create a copy of StacContinousRectangleBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacContinousRectangleBorder(side: $side, borderRadius: $borderRadius)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacContinousRectangleBorderCopyWith<_StacContinousRectangleBorder> + get copyWith => __$StacContinousRectangleBorderCopyWithImpl< + _StacContinousRectangleBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacContinousRectangleBorderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacContinousRectangleBorderImpl && + other is _StacContinousRectangleBorder && (identical(other.side, side) || other.side == side) && (identical(other.borderRadius, borderRadius) || other.borderRadius == borderRadius)); @@ -186,43 +158,76 @@ class _$StacContinousRectangleBorderImpl @override int get hashCode => Object.hash(runtimeType, side, borderRadius); - /// Create a copy of StacContinousRectangleBorder - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacContinousRectangleBorderImplCopyWith< - _$StacContinousRectangleBorderImpl> - get copyWith => __$$StacContinousRectangleBorderImplCopyWithImpl< - _$StacContinousRectangleBorderImpl>(this, _$identity); + String toString() { + return 'StacContinousRectangleBorder(side: $side, borderRadius: $borderRadius)'; + } +} +/// @nodoc +abstract mixin class _$StacContinousRectangleBorderCopyWith<$Res> + implements $StacContinousRectangleBorderCopyWith<$Res> { + factory _$StacContinousRectangleBorderCopyWith( + _StacContinousRectangleBorder value, + $Res Function(_StacContinousRectangleBorder) _then) = + __$StacContinousRectangleBorderCopyWithImpl; @override - Map toJson() { - return _$$StacContinousRectangleBorderImplToJson( - this, - ); - } + @useResult + $Res call({StacBorderSide side, StacBorderRadius borderRadius}); + + @override + $StacBorderSideCopyWith<$Res> get side; + @override + $StacBorderRadiusCopyWith<$Res> get borderRadius; } -abstract class _StacContinousRectangleBorder - implements StacContinousRectangleBorder { - const factory _StacContinousRectangleBorder( - {final StacBorderSide side, final StacBorderRadius borderRadius}) = - _$StacContinousRectangleBorderImpl; +/// @nodoc +class __$StacContinousRectangleBorderCopyWithImpl<$Res> + implements _$StacContinousRectangleBorderCopyWith<$Res> { + __$StacContinousRectangleBorderCopyWithImpl(this._self, this._then); - factory _StacContinousRectangleBorder.fromJson(Map json) = - _$StacContinousRectangleBorderImpl.fromJson; + final _StacContinousRectangleBorder _self; + final $Res Function(_StacContinousRectangleBorder) _then; + /// Create a copy of StacContinousRectangleBorder + /// with the given fields replaced by the non-null parameter values. @override - StacBorderSide get side; + @pragma('vm:prefer-inline') + $Res call({ + Object? side = null, + Object? borderRadius = null, + }) { + return _then(_StacContinousRectangleBorder( + side: null == side + ? _self.side + : side // ignore: cast_nullable_to_non_nullable + as StacBorderSide, + borderRadius: null == borderRadius + ? _self.borderRadius + : borderRadius // ignore: cast_nullable_to_non_nullable + as StacBorderRadius, + )); + } + + /// Create a copy of StacContinousRectangleBorder + /// with the given fields replaced by the non-null parameter values. @override - StacBorderRadius get borderRadius; + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res> get side { + return $StacBorderSideCopyWith<$Res>(_self.side, (value) { + return _then(_self.copyWith(side: value)); + }); + } /// Create a copy of StacContinousRectangleBorder /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacContinousRectangleBorderImplCopyWith< - _$StacContinousRectangleBorderImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacBorderRadiusCopyWith<$Res> get borderRadius { + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.g.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.g.dart index 2a32f58f..b1ed7269 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.g.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_continous_rectangle_border.g.dart @@ -6,19 +6,19 @@ part of 'stac_continous_rectangle_border.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacContinousRectangleBorderImpl _$$StacContinousRectangleBorderImplFromJson( +_StacContinousRectangleBorder _$StacContinousRectangleBorderFromJson( Map json) => - _$StacContinousRectangleBorderImpl( + _StacContinousRectangleBorder( side: json['side'] == null - ? const StacBorderSide.none() + ? StacBorderSide.none : StacBorderSide.fromJson(json['side'] as Map), borderRadius: json['borderRadius'] == null ? const StacBorderRadius() : StacBorderRadius.fromJson(json['borderRadius']), ); -Map _$$StacContinousRectangleBorderImplToJson( - _$StacContinousRectangleBorderImpl instance) => +Map _$StacContinousRectangleBorderToJson( + _StacContinousRectangleBorder instance) => { 'side': instance.side, 'borderRadius': instance.borderRadius, diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.dart index 51542b1c..11a7f606 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.dart @@ -6,9 +6,9 @@ part 'stac_rounded_rectangle_border.freezed.dart'; part 'stac_rounded_rectangle_border.g.dart'; @freezed -class StacRoundedRactangleBorder with _$StacRoundedRactangleBorder { +abstract class StacRoundedRactangleBorder with _$StacRoundedRactangleBorder { const factory StacRoundedRactangleBorder({ - @Default(StacBorderSide.none()) StacBorderSide side, + @Default(StacBorderSide.none) StacBorderSide side, @Default(StacBorderRadius()) StacBorderRadius borderRadius, }) = _StacRoundedRactangleBorder; diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.freezed.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.freezed.dart index 2085a7ed..9a888492 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,37 +10,51 @@ part of 'stac_rounded_rectangle_border.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacRoundedRactangleBorder _$StacRoundedRactangleBorderFromJson( - Map json) { - return _StacRoundedRactangleBorder.fromJson(json); -} - /// @nodoc mixin _$StacRoundedRactangleBorder { - StacBorderSide get side => throw _privateConstructorUsedError; - StacBorderRadius get borderRadius => throw _privateConstructorUsedError; - - /// Serializes this StacRoundedRactangleBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacBorderSide get side; + StacBorderRadius get borderRadius; /// Create a copy of StacRoundedRactangleBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacRoundedRactangleBorderCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => + _$StacRoundedRactangleBorderCopyWithImpl( + this as StacRoundedRactangleBorder, _$identity); + + /// Serializes this StacRoundedRactangleBorder to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacRoundedRactangleBorder && + (identical(other.side, side) || other.side == side) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, side, borderRadius); + + @override + String toString() { + return 'StacRoundedRactangleBorder(side: $side, borderRadius: $borderRadius)'; + } } /// @nodoc -abstract class $StacRoundedRactangleBorderCopyWith<$Res> { +abstract mixin class $StacRoundedRactangleBorderCopyWith<$Res> { factory $StacRoundedRactangleBorderCopyWith(StacRoundedRactangleBorder value, - $Res Function(StacRoundedRactangleBorder) then) = - _$StacRoundedRactangleBorderCopyWithImpl<$Res, - StacRoundedRactangleBorder>; + $Res Function(StacRoundedRactangleBorder) _then) = + _$StacRoundedRactangleBorderCopyWithImpl; @useResult $Res call({StacBorderSide side, StacBorderRadius borderRadius}); @@ -48,15 +63,12 @@ abstract class $StacRoundedRactangleBorderCopyWith<$Res> { } /// @nodoc -class _$StacRoundedRactangleBorderCopyWithImpl<$Res, - $Val extends StacRoundedRactangleBorder> +class _$StacRoundedRactangleBorderCopyWithImpl<$Res> implements $StacRoundedRactangleBorderCopyWith<$Res> { - _$StacRoundedRactangleBorderCopyWithImpl(this._value, this._then); + _$StacRoundedRactangleBorderCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacRoundedRactangleBorder _self; + final $Res Function(StacRoundedRactangleBorder) _then; /// Create a copy of StacRoundedRactangleBorder /// with the given fields replaced by the non-null parameter values. @@ -66,16 +78,16 @@ class _$StacRoundedRactangleBorderCopyWithImpl<$Res, Object? side = null, Object? borderRadius = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( side: null == side - ? _value.side + ? _self.side : side // ignore: cast_nullable_to_non_nullable as StacBorderSide, borderRadius: null == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius, - ) as $Val); + )); } /// Create a copy of StacRoundedRactangleBorder @@ -83,8 +95,8 @@ class _$StacRoundedRactangleBorderCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderSideCopyWith<$Res> get side { - return $StacBorderSideCopyWith<$Res>(_value.side, (value) { - return _then(_value.copyWith(side: value) as $Val); + return $StacBorderSideCopyWith<$Res>(_self.side, (value) { + return _then(_self.copyWith(side: value)); }); } @@ -93,70 +105,20 @@ class _$StacRoundedRactangleBorderCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith<$Res> get borderRadius { - return $StacBorderRadiusCopyWith<$Res>(_value.borderRadius, (value) { - return _then(_value.copyWith(borderRadius: value) as $Val); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); }); } } -/// @nodoc -abstract class _$$StacRoundedRactangleBorderImplCopyWith<$Res> - implements $StacRoundedRactangleBorderCopyWith<$Res> { - factory _$$StacRoundedRactangleBorderImplCopyWith( - _$StacRoundedRactangleBorderImpl value, - $Res Function(_$StacRoundedRactangleBorderImpl) then) = - __$$StacRoundedRactangleBorderImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({StacBorderSide side, StacBorderRadius borderRadius}); - - @override - $StacBorderSideCopyWith<$Res> get side; - @override - $StacBorderRadiusCopyWith<$Res> get borderRadius; -} - -/// @nodoc -class __$$StacRoundedRactangleBorderImplCopyWithImpl<$Res> - extends _$StacRoundedRactangleBorderCopyWithImpl<$Res, - _$StacRoundedRactangleBorderImpl> - implements _$$StacRoundedRactangleBorderImplCopyWith<$Res> { - __$$StacRoundedRactangleBorderImplCopyWithImpl( - _$StacRoundedRactangleBorderImpl _value, - $Res Function(_$StacRoundedRactangleBorderImpl) _then) - : super(_value, _then); - - /// Create a copy of StacRoundedRactangleBorder - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? side = null, - Object? borderRadius = null, - }) { - return _then(_$StacRoundedRactangleBorderImpl( - side: null == side - ? _value.side - : side // ignore: cast_nullable_to_non_nullable - as StacBorderSide, - borderRadius: null == borderRadius - ? _value.borderRadius - : borderRadius // ignore: cast_nullable_to_non_nullable - as StacBorderRadius, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacRoundedRactangleBorderImpl implements _StacRoundedRactangleBorder { - const _$StacRoundedRactangleBorderImpl( - {this.side = const StacBorderSide.none(), +class _StacRoundedRactangleBorder implements StacRoundedRactangleBorder { + const _StacRoundedRactangleBorder( + {this.side = StacBorderSide.none, this.borderRadius = const StacBorderRadius()}); - - factory _$StacRoundedRactangleBorderImpl.fromJson( - Map json) => - _$$StacRoundedRactangleBorderImplFromJson(json); + factory _StacRoundedRactangleBorder.fromJson(Map json) => + _$StacRoundedRactangleBorderFromJson(json); @override @JsonKey() @@ -165,16 +127,27 @@ class _$StacRoundedRactangleBorderImpl implements _StacRoundedRactangleBorder { @JsonKey() final StacBorderRadius borderRadius; + /// Create a copy of StacRoundedRactangleBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacRoundedRactangleBorder(side: $side, borderRadius: $borderRadius)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacRoundedRactangleBorderCopyWith<_StacRoundedRactangleBorder> + get copyWith => __$StacRoundedRactangleBorderCopyWithImpl< + _StacRoundedRactangleBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacRoundedRactangleBorderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacRoundedRactangleBorderImpl && + other is _StacRoundedRactangleBorder && (identical(other.side, side) || other.side == side) && (identical(other.borderRadius, borderRadius) || other.borderRadius == borderRadius)); @@ -184,41 +157,76 @@ class _$StacRoundedRactangleBorderImpl implements _StacRoundedRactangleBorder { @override int get hashCode => Object.hash(runtimeType, side, borderRadius); - /// Create a copy of StacRoundedRactangleBorder - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacRoundedRactangleBorderImplCopyWith<_$StacRoundedRactangleBorderImpl> - get copyWith => __$$StacRoundedRactangleBorderImplCopyWithImpl< - _$StacRoundedRactangleBorderImpl>(this, _$identity); + String toString() { + return 'StacRoundedRactangleBorder(side: $side, borderRadius: $borderRadius)'; + } +} +/// @nodoc +abstract mixin class _$StacRoundedRactangleBorderCopyWith<$Res> + implements $StacRoundedRactangleBorderCopyWith<$Res> { + factory _$StacRoundedRactangleBorderCopyWith( + _StacRoundedRactangleBorder value, + $Res Function(_StacRoundedRactangleBorder) _then) = + __$StacRoundedRactangleBorderCopyWithImpl; @override - Map toJson() { - return _$$StacRoundedRactangleBorderImplToJson( - this, - ); - } + @useResult + $Res call({StacBorderSide side, StacBorderRadius borderRadius}); + + @override + $StacBorderSideCopyWith<$Res> get side; + @override + $StacBorderRadiusCopyWith<$Res> get borderRadius; } -abstract class _StacRoundedRactangleBorder - implements StacRoundedRactangleBorder { - const factory _StacRoundedRactangleBorder( - {final StacBorderSide side, - final StacBorderRadius borderRadius}) = _$StacRoundedRactangleBorderImpl; +/// @nodoc +class __$StacRoundedRactangleBorderCopyWithImpl<$Res> + implements _$StacRoundedRactangleBorderCopyWith<$Res> { + __$StacRoundedRactangleBorderCopyWithImpl(this._self, this._then); - factory _StacRoundedRactangleBorder.fromJson(Map json) = - _$StacRoundedRactangleBorderImpl.fromJson; + final _StacRoundedRactangleBorder _self; + final $Res Function(_StacRoundedRactangleBorder) _then; + /// Create a copy of StacRoundedRactangleBorder + /// with the given fields replaced by the non-null parameter values. @override - StacBorderSide get side; + @pragma('vm:prefer-inline') + $Res call({ + Object? side = null, + Object? borderRadius = null, + }) { + return _then(_StacRoundedRactangleBorder( + side: null == side + ? _self.side + : side // ignore: cast_nullable_to_non_nullable + as StacBorderSide, + borderRadius: null == borderRadius + ? _self.borderRadius + : borderRadius // ignore: cast_nullable_to_non_nullable + as StacBorderRadius, + )); + } + + /// Create a copy of StacRoundedRactangleBorder + /// with the given fields replaced by the non-null parameter values. @override - StacBorderRadius get borderRadius; + @pragma('vm:prefer-inline') + $StacBorderSideCopyWith<$Res> get side { + return $StacBorderSideCopyWith<$Res>(_self.side, (value) { + return _then(_self.copyWith(side: value)); + }); + } /// Create a copy of StacRoundedRactangleBorder /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacRoundedRactangleBorderImplCopyWith<_$StacRoundedRactangleBorderImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacBorderRadiusCopyWith<$Res> get borderRadius { + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.g.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.g.dart index e11402c0..17b80dac 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.g.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_rounded_rectangle_border.g.dart @@ -6,19 +6,19 @@ part of 'stac_rounded_rectangle_border.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacRoundedRactangleBorderImpl _$$StacRoundedRactangleBorderImplFromJson( +_StacRoundedRactangleBorder _$StacRoundedRactangleBorderFromJson( Map json) => - _$StacRoundedRactangleBorderImpl( + _StacRoundedRactangleBorder( side: json['side'] == null - ? const StacBorderSide.none() + ? StacBorderSide.none : StacBorderSide.fromJson(json['side'] as Map), borderRadius: json['borderRadius'] == null ? const StacBorderRadius() : StacBorderRadius.fromJson(json['borderRadius']), ); -Map _$$StacRoundedRactangleBorderImplToJson( - _$StacRoundedRactangleBorderImpl instance) => +Map _$StacRoundedRactangleBorderToJson( + _StacRoundedRactangleBorder instance) => { 'side': instance.side, 'borderRadius': instance.borderRadius, diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.dart index 2d3c142e..cf2b4edd 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.dart @@ -17,7 +17,7 @@ enum StacShapeBorderType { } @freezed -class StacShapeBorder with _$StacShapeBorder { +abstract class StacShapeBorder with _$StacShapeBorder { const factory StacShapeBorder({ required StacShapeBorderType borderType, required Map data, diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.freezed.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.freezed.dart index b51ea6f0..90770067 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,62 @@ part of 'stac_shape_border.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacShapeBorder _$StacShapeBorderFromJson(Map json) { - return _StacShapeBorder.fromJson(json); -} - /// @nodoc mixin _$StacShapeBorder { - StacShapeBorderType get borderType => throw _privateConstructorUsedError; - Map get data => throw _privateConstructorUsedError; - - /// Serializes this StacShapeBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacShapeBorderType get borderType; + Map get data; /// Create a copy of StacShapeBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacShapeBorderCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacShapeBorderCopyWithImpl( + this as StacShapeBorder, _$identity); -/// @nodoc -abstract class $StacShapeBorderCopyWith<$Res> { - factory $StacShapeBorderCopyWith( - StacShapeBorder value, $Res Function(StacShapeBorder) then) = - _$StacShapeBorderCopyWithImpl<$Res, StacShapeBorder>; - @useResult - $Res call({StacShapeBorderType borderType, Map data}); -} + /// Serializes this StacShapeBorder to a JSON map. + Map toJson(); -/// @nodoc -class _$StacShapeBorderCopyWithImpl<$Res, $Val extends StacShapeBorder> - implements $StacShapeBorderCopyWith<$Res> { - _$StacShapeBorderCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacShapeBorder && + (identical(other.borderType, borderType) || + other.borderType == borderType) && + const DeepCollectionEquality().equals(other.data, data)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, borderType, const DeepCollectionEquality().hash(data)); - /// Create a copy of StacShapeBorder - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? borderType = null, - Object? data = null, - }) { - return _then(_value.copyWith( - borderType: null == borderType - ? _value.borderType - : borderType // ignore: cast_nullable_to_non_nullable - as StacShapeBorderType, - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + String toString() { + return 'StacShapeBorder(borderType: $borderType, data: $data)'; } } /// @nodoc -abstract class _$$StacShapeBorderImplCopyWith<$Res> - implements $StacShapeBorderCopyWith<$Res> { - factory _$$StacShapeBorderImplCopyWith(_$StacShapeBorderImpl value, - $Res Function(_$StacShapeBorderImpl) then) = - __$$StacShapeBorderImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacShapeBorderCopyWith<$Res> { + factory $StacShapeBorderCopyWith( + StacShapeBorder value, $Res Function(StacShapeBorder) _then) = + _$StacShapeBorderCopyWithImpl; @useResult $Res call({StacShapeBorderType borderType, Map data}); } /// @nodoc -class __$$StacShapeBorderImplCopyWithImpl<$Res> - extends _$StacShapeBorderCopyWithImpl<$Res, _$StacShapeBorderImpl> - implements _$$StacShapeBorderImplCopyWith<$Res> { - __$$StacShapeBorderImplCopyWithImpl( - _$StacShapeBorderImpl _value, $Res Function(_$StacShapeBorderImpl) _then) - : super(_value, _then); +class _$StacShapeBorderCopyWithImpl<$Res> + implements $StacShapeBorderCopyWith<$Res> { + _$StacShapeBorderCopyWithImpl(this._self, this._then); + + final StacShapeBorder _self; + final $Res Function(StacShapeBorder) _then; /// Create a copy of StacShapeBorder /// with the given fields replaced by the non-null parameter values. @@ -100,13 +75,13 @@ class __$$StacShapeBorderImplCopyWithImpl<$Res> Object? borderType = null, Object? data = null, }) { - return _then(_$StacShapeBorderImpl( + return _then(_self.copyWith( borderType: null == borderType - ? _value.borderType + ? _self.borderType : borderType // ignore: cast_nullable_to_non_nullable as StacShapeBorderType, data: null == data - ? _value._data + ? _self.data : data // ignore: cast_nullable_to_non_nullable as Map, )); @@ -115,13 +90,12 @@ class __$$StacShapeBorderImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacShapeBorderImpl implements _StacShapeBorder { - const _$StacShapeBorderImpl( +class _StacShapeBorder implements StacShapeBorder { + const _StacShapeBorder( {required this.borderType, required final Map data}) : _data = data; - - factory _$StacShapeBorderImpl.fromJson(Map json) => - _$$StacShapeBorderImplFromJson(json); + factory _StacShapeBorder.fromJson(Map json) => + _$StacShapeBorderFromJson(json); @override final StacShapeBorderType borderType; @@ -133,16 +107,26 @@ class _$StacShapeBorderImpl implements _StacShapeBorder { return EqualUnmodifiableMapView(_data); } + /// Create a copy of StacShapeBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacShapeBorder(borderType: $borderType, data: $data)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacShapeBorderCopyWith<_StacShapeBorder> get copyWith => + __$StacShapeBorderCopyWithImpl<_StacShapeBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacShapeBorderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacShapeBorderImpl && + other is _StacShapeBorder && (identical(other.borderType, borderType) || other.borderType == borderType) && const DeepCollectionEquality().equals(other._data, _data)); @@ -153,40 +137,50 @@ class _$StacShapeBorderImpl implements _StacShapeBorder { int get hashCode => Object.hash( runtimeType, borderType, const DeepCollectionEquality().hash(_data)); - /// Create a copy of StacShapeBorder - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacShapeBorderImplCopyWith<_$StacShapeBorderImpl> get copyWith => - __$$StacShapeBorderImplCopyWithImpl<_$StacShapeBorderImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacShapeBorderImplToJson( - this, - ); + String toString() { + return 'StacShapeBorder(borderType: $borderType, data: $data)'; } } -abstract class _StacShapeBorder implements StacShapeBorder { - const factory _StacShapeBorder( - {required final StacShapeBorderType borderType, - required final Map data}) = _$StacShapeBorderImpl; +/// @nodoc +abstract mixin class _$StacShapeBorderCopyWith<$Res> + implements $StacShapeBorderCopyWith<$Res> { + factory _$StacShapeBorderCopyWith( + _StacShapeBorder value, $Res Function(_StacShapeBorder) _then) = + __$StacShapeBorderCopyWithImpl; + @override + @useResult + $Res call({StacShapeBorderType borderType, Map data}); +} - factory _StacShapeBorder.fromJson(Map json) = - _$StacShapeBorderImpl.fromJson; +/// @nodoc +class __$StacShapeBorderCopyWithImpl<$Res> + implements _$StacShapeBorderCopyWith<$Res> { + __$StacShapeBorderCopyWithImpl(this._self, this._then); - @override - StacShapeBorderType get borderType; - @override - Map get data; + final _StacShapeBorder _self; + final $Res Function(_StacShapeBorder) _then; /// Create a copy of StacShapeBorder /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacShapeBorderImplCopyWith<_$StacShapeBorderImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? borderType = null, + Object? data = null, + }) { + return _then(_StacShapeBorder( + borderType: null == borderType + ? _self.borderType + : borderType // ignore: cast_nullable_to_non_nullable + as StacShapeBorderType, + data: null == data + ? _self._data + : data // ignore: cast_nullable_to_non_nullable + as Map, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.g.dart b/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.g.dart index 9b03adfc..6e1b1195 100644 --- a/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.g.dart +++ b/packages/stac/lib/src/parsers/stac_shape_border/stac_shape_border.g.dart @@ -6,15 +6,13 @@ part of 'stac_shape_border.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacShapeBorderImpl _$$StacShapeBorderImplFromJson( - Map json) => - _$StacShapeBorderImpl( +_StacShapeBorder _$StacShapeBorderFromJson(Map json) => + _StacShapeBorder( borderType: $enumDecode(_$StacShapeBorderTypeEnumMap, json['borderType']), data: json['data'] as Map, ); -Map _$$StacShapeBorderImplToJson( - _$StacShapeBorderImpl instance) => +Map _$StacShapeBorderToJson(_StacShapeBorder instance) => { 'borderType': _$StacShapeBorderTypeEnumMap[instance.borderType]!, 'data': instance.data, diff --git a/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.dart b/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.dart index 8c9a7539..b9ed13ee 100644 --- a/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.dart +++ b/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.dart @@ -10,7 +10,7 @@ part 'stac_single_child_scroll_view.freezed.dart'; part 'stac_single_child_scroll_view.g.dart'; @freezed -class StacSingleChildScrollView with _$StacSingleChildScrollView { +abstract class StacSingleChildScrollView with _$StacSingleChildScrollView { const factory StacSingleChildScrollView({ @Default(Axis.vertical) Axis scrollDirection, @Default(false) bool reverse, diff --git a/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.freezed.dart b/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.freezed.dart index c1d4a0cc..7a924745 100644 --- a/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,45 +10,82 @@ part of 'stac_single_child_scroll_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSingleChildScrollView _$StacSingleChildScrollViewFromJson( - Map json) { - return _StacSingleChildScrollView.fromJson(json); -} - /// @nodoc mixin _$StacSingleChildScrollView { - Axis get scrollDirection => throw _privateConstructorUsedError; - bool get reverse => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - bool? get primary => throw _privateConstructorUsedError; - StacScrollPhysics? get physics => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - DragStartBehavior get dragStartBehavior => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - String? get restorationId => throw _privateConstructorUsedError; - ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior => - throw _privateConstructorUsedError; - - /// Serializes this StacSingleChildScrollView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Axis get scrollDirection; + bool get reverse; + StacEdgeInsets? get padding; + bool? get primary; + StacScrollPhysics? get physics; + Map? get child; + DragStartBehavior get dragStartBehavior; + Clip get clipBehavior; + String? get restorationId; + ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; /// Create a copy of StacSingleChildScrollView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSingleChildScrollViewCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacSingleChildScrollViewCopyWithImpl( + this as StacSingleChildScrollView, _$identity); + + /// Serializes this StacSingleChildScrollView to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSingleChildScrollView && + (identical(other.scrollDirection, scrollDirection) || + other.scrollDirection == scrollDirection) && + (identical(other.reverse, reverse) || other.reverse == reverse) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.physics, physics) || other.physics == physics) && + const DeepCollectionEquality().equals(other.child, child) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.restorationId, restorationId) || + other.restorationId == restorationId) && + (identical( + other.keyboardDismissBehavior, keyboardDismissBehavior) || + other.keyboardDismissBehavior == keyboardDismissBehavior)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + scrollDirection, + reverse, + padding, + primary, + physics, + const DeepCollectionEquality().hash(child), + dragStartBehavior, + clipBehavior, + restorationId, + keyboardDismissBehavior); + + @override + String toString() { + return 'StacSingleChildScrollView(scrollDirection: $scrollDirection, reverse: $reverse, padding: $padding, primary: $primary, physics: $physics, child: $child, dragStartBehavior: $dragStartBehavior, clipBehavior: $clipBehavior, restorationId: $restorationId, keyboardDismissBehavior: $keyboardDismissBehavior)'; + } } /// @nodoc -abstract class $StacSingleChildScrollViewCopyWith<$Res> { +abstract mixin class $StacSingleChildScrollViewCopyWith<$Res> { factory $StacSingleChildScrollViewCopyWith(StacSingleChildScrollView value, - $Res Function(StacSingleChildScrollView) then) = - _$StacSingleChildScrollViewCopyWithImpl<$Res, StacSingleChildScrollView>; + $Res Function(StacSingleChildScrollView) _then) = + _$StacSingleChildScrollViewCopyWithImpl; @useResult $Res call( {Axis scrollDirection, @@ -65,15 +103,12 @@ abstract class $StacSingleChildScrollViewCopyWith<$Res> { } /// @nodoc -class _$StacSingleChildScrollViewCopyWithImpl<$Res, - $Val extends StacSingleChildScrollView> +class _$StacSingleChildScrollViewCopyWithImpl<$Res> implements $StacSingleChildScrollViewCopyWith<$Res> { - _$StacSingleChildScrollViewCopyWithImpl(this._value, this._then); + _$StacSingleChildScrollViewCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacSingleChildScrollView _self; + final $Res Function(StacSingleChildScrollView) _then; /// Create a copy of StacSingleChildScrollView /// with the given fields replaced by the non-null parameter values. @@ -91,48 +126,48 @@ class _$StacSingleChildScrollViewCopyWithImpl<$Res, Object? restorationId = freezed, Object? keyboardDismissBehavior = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( scrollDirection: null == scrollDirection - ? _value.scrollDirection + ? _self.scrollDirection : scrollDirection // ignore: cast_nullable_to_non_nullable as Axis, reverse: null == reverse - ? _value.reverse + ? _self.reverse : reverse // ignore: cast_nullable_to_non_nullable as bool, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, primary: freezed == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as bool?, physics: freezed == physics - ? _value.physics + ? _self.physics : physics // ignore: cast_nullable_to_non_nullable as StacScrollPhysics?, child: freezed == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, restorationId: freezed == restorationId - ? _value.restorationId + ? _self.restorationId : restorationId // ignore: cast_nullable_to_non_nullable as String?, keyboardDismissBehavior: null == keyboardDismissBehavior - ? _value.keyboardDismissBehavior + ? _self.keyboardDismissBehavior : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable as ScrollViewKeyboardDismissBehavior, - ) as $Val); + )); } /// Create a copy of StacSingleChildScrollView @@ -140,116 +175,20 @@ class _$StacSingleChildScrollViewCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } } -/// @nodoc -abstract class _$$StacSingleChildScrollViewImplCopyWith<$Res> - implements $StacSingleChildScrollViewCopyWith<$Res> { - factory _$$StacSingleChildScrollViewImplCopyWith( - _$StacSingleChildScrollViewImpl value, - $Res Function(_$StacSingleChildScrollViewImpl) then) = - __$$StacSingleChildScrollViewImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Axis scrollDirection, - bool reverse, - StacEdgeInsets? padding, - bool? primary, - StacScrollPhysics? physics, - Map? child, - DragStartBehavior dragStartBehavior, - Clip clipBehavior, - String? restorationId, - ScrollViewKeyboardDismissBehavior keyboardDismissBehavior}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; -} - -/// @nodoc -class __$$StacSingleChildScrollViewImplCopyWithImpl<$Res> - extends _$StacSingleChildScrollViewCopyWithImpl<$Res, - _$StacSingleChildScrollViewImpl> - implements _$$StacSingleChildScrollViewImplCopyWith<$Res> { - __$$StacSingleChildScrollViewImplCopyWithImpl( - _$StacSingleChildScrollViewImpl _value, - $Res Function(_$StacSingleChildScrollViewImpl) _then) - : super(_value, _then); - - /// Create a copy of StacSingleChildScrollView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? scrollDirection = null, - Object? reverse = null, - Object? padding = freezed, - Object? primary = freezed, - Object? physics = freezed, - Object? child = freezed, - Object? dragStartBehavior = null, - Object? clipBehavior = null, - Object? restorationId = freezed, - Object? keyboardDismissBehavior = null, - }) { - return _then(_$StacSingleChildScrollViewImpl( - scrollDirection: null == scrollDirection - ? _value.scrollDirection - : scrollDirection // ignore: cast_nullable_to_non_nullable - as Axis, - reverse: null == reverse - ? _value.reverse - : reverse // ignore: cast_nullable_to_non_nullable - as bool, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - primary: freezed == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as bool?, - physics: freezed == physics - ? _value.physics - : physics // ignore: cast_nullable_to_non_nullable - as StacScrollPhysics?, - child: freezed == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior - : dragStartBehavior // ignore: cast_nullable_to_non_nullable - as DragStartBehavior, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - restorationId: freezed == restorationId - ? _value.restorationId - : restorationId // ignore: cast_nullable_to_non_nullable - as String?, - keyboardDismissBehavior: null == keyboardDismissBehavior - ? _value.keyboardDismissBehavior - : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable - as ScrollViewKeyboardDismissBehavior, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacSingleChildScrollViewImpl implements _StacSingleChildScrollView { - const _$StacSingleChildScrollViewImpl( +class _StacSingleChildScrollView implements StacSingleChildScrollView { + const _StacSingleChildScrollView( {this.scrollDirection = Axis.vertical, this.reverse = false, this.padding, @@ -261,9 +200,8 @@ class _$StacSingleChildScrollViewImpl implements _StacSingleChildScrollView { this.restorationId, this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual}) : _child = child; - - factory _$StacSingleChildScrollViewImpl.fromJson(Map json) => - _$$StacSingleChildScrollViewImplFromJson(json); + factory _StacSingleChildScrollView.fromJson(Map json) => + _$StacSingleChildScrollViewFromJson(json); @override @JsonKey() @@ -299,16 +237,28 @@ class _$StacSingleChildScrollViewImpl implements _StacSingleChildScrollView { @JsonKey() final ScrollViewKeyboardDismissBehavior keyboardDismissBehavior; + /// Create a copy of StacSingleChildScrollView + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSingleChildScrollViewCopyWith<_StacSingleChildScrollView> + get copyWith => + __$StacSingleChildScrollViewCopyWithImpl<_StacSingleChildScrollView>( + this, _$identity); + @override - String toString() { - return 'StacSingleChildScrollView(scrollDirection: $scrollDirection, reverse: $reverse, padding: $padding, primary: $primary, physics: $physics, child: $child, dragStartBehavior: $dragStartBehavior, clipBehavior: $clipBehavior, restorationId: $restorationId, keyboardDismissBehavior: $keyboardDismissBehavior)'; + Map toJson() { + return _$StacSingleChildScrollViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSingleChildScrollViewImpl && + other is _StacSingleChildScrollView && (identical(other.scrollDirection, scrollDirection) || other.scrollDirection == scrollDirection) && (identical(other.reverse, reverse) || other.reverse == reverse) && @@ -342,65 +292,117 @@ class _$StacSingleChildScrollViewImpl implements _StacSingleChildScrollView { restorationId, keyboardDismissBehavior); - /// Create a copy of StacSingleChildScrollView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacSingleChildScrollViewImplCopyWith<_$StacSingleChildScrollViewImpl> - get copyWith => __$$StacSingleChildScrollViewImplCopyWithImpl< - _$StacSingleChildScrollViewImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacSingleChildScrollViewImplToJson( - this, - ); + String toString() { + return 'StacSingleChildScrollView(scrollDirection: $scrollDirection, reverse: $reverse, padding: $padding, primary: $primary, physics: $physics, child: $child, dragStartBehavior: $dragStartBehavior, clipBehavior: $clipBehavior, restorationId: $restorationId, keyboardDismissBehavior: $keyboardDismissBehavior)'; } } -abstract class _StacSingleChildScrollView implements StacSingleChildScrollView { - const factory _StacSingleChildScrollView( - {final Axis scrollDirection, - final bool reverse, - final StacEdgeInsets? padding, - final bool? primary, - final StacScrollPhysics? physics, - final Map? child, - final DragStartBehavior dragStartBehavior, - final Clip clipBehavior, - final String? restorationId, - final ScrollViewKeyboardDismissBehavior keyboardDismissBehavior}) = - _$StacSingleChildScrollViewImpl; - - factory _StacSingleChildScrollView.fromJson(Map json) = - _$StacSingleChildScrollViewImpl.fromJson; - - @override - Axis get scrollDirection; - @override - bool get reverse; - @override - StacEdgeInsets? get padding; - @override - bool? get primary; - @override - StacScrollPhysics? get physics; - @override - Map? get child; - @override - DragStartBehavior get dragStartBehavior; +/// @nodoc +abstract mixin class _$StacSingleChildScrollViewCopyWith<$Res> + implements $StacSingleChildScrollViewCopyWith<$Res> { + factory _$StacSingleChildScrollViewCopyWith(_StacSingleChildScrollView value, + $Res Function(_StacSingleChildScrollView) _then) = + __$StacSingleChildScrollViewCopyWithImpl; @override - Clip get clipBehavior; + @useResult + $Res call( + {Axis scrollDirection, + bool reverse, + StacEdgeInsets? padding, + bool? primary, + StacScrollPhysics? physics, + Map? child, + DragStartBehavior dragStartBehavior, + Clip clipBehavior, + String? restorationId, + ScrollViewKeyboardDismissBehavior keyboardDismissBehavior}); + @override - String? get restorationId; + $StacEdgeInsetsCopyWith<$Res>? get padding; +} + +/// @nodoc +class __$StacSingleChildScrollViewCopyWithImpl<$Res> + implements _$StacSingleChildScrollViewCopyWith<$Res> { + __$StacSingleChildScrollViewCopyWithImpl(this._self, this._then); + + final _StacSingleChildScrollView _self; + final $Res Function(_StacSingleChildScrollView) _then; + + /// Create a copy of StacSingleChildScrollView + /// with the given fields replaced by the non-null parameter values. @override - ScrollViewKeyboardDismissBehavior get keyboardDismissBehavior; + @pragma('vm:prefer-inline') + $Res call({ + Object? scrollDirection = null, + Object? reverse = null, + Object? padding = freezed, + Object? primary = freezed, + Object? physics = freezed, + Object? child = freezed, + Object? dragStartBehavior = null, + Object? clipBehavior = null, + Object? restorationId = freezed, + Object? keyboardDismissBehavior = null, + }) { + return _then(_StacSingleChildScrollView( + scrollDirection: null == scrollDirection + ? _self.scrollDirection + : scrollDirection // ignore: cast_nullable_to_non_nullable + as Axis, + reverse: null == reverse + ? _self.reverse + : reverse // ignore: cast_nullable_to_non_nullable + as bool, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + primary: freezed == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as bool?, + physics: freezed == physics + ? _self.physics + : physics // ignore: cast_nullable_to_non_nullable + as StacScrollPhysics?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + restorationId: freezed == restorationId + ? _self.restorationId + : restorationId // ignore: cast_nullable_to_non_nullable + as String?, + keyboardDismissBehavior: null == keyboardDismissBehavior + ? _self.keyboardDismissBehavior + : keyboardDismissBehavior // ignore: cast_nullable_to_non_nullable + as ScrollViewKeyboardDismissBehavior, + )); + } /// Create a copy of StacSingleChildScrollView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSingleChildScrollViewImplCopyWith<_$StacSingleChildScrollViewImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.g.dart b/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.g.dart index 2e7ba4fa..01876a54 100644 --- a/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_single_child_scroll_view/stac_single_child_scroll_view.g.dart @@ -6,9 +6,9 @@ part of 'stac_single_child_scroll_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSingleChildScrollViewImpl _$$StacSingleChildScrollViewImplFromJson( +_StacSingleChildScrollView _$StacSingleChildScrollViewFromJson( Map json) => - _$StacSingleChildScrollViewImpl( + _StacSingleChildScrollView( scrollDirection: $enumDecodeNullable(_$AxisEnumMap, json['scrollDirection']) ?? Axis.vertical, @@ -31,8 +31,8 @@ _$StacSingleChildScrollViewImpl _$$StacSingleChildScrollViewImplFromJson( ScrollViewKeyboardDismissBehavior.manual, ); -Map _$$StacSingleChildScrollViewImplToJson( - _$StacSingleChildScrollViewImpl instance) => +Map _$StacSingleChildScrollViewToJson( + _StacSingleChildScrollView instance) => { 'scrollDirection': _$AxisEnumMap[instance.scrollDirection]!, 'reverse': instance.reverse, diff --git a/packages/stac/lib/src/parsers/stac_size/stac_size.dart b/packages/stac/lib/src/parsers/stac_size/stac_size.dart index 9af85881..f0425057 100644 --- a/packages/stac/lib/src/parsers/stac_size/stac_size.dart +++ b/packages/stac/lib/src/parsers/stac_size/stac_size.dart @@ -6,7 +6,7 @@ part 'stac_size.freezed.dart'; part 'stac_size.g.dart'; @freezed -class StacSize with _$StacSize { +abstract class StacSize with _$StacSize { const factory StacSize({ required double width, required double height, diff --git a/packages/stac/lib/src/parsers/stac_size/stac_size.freezed.dart b/packages/stac/lib/src/parsers/stac_size/stac_size.freezed.dart index 85a59853..9adb735a 100644 --- a/packages/stac/lib/src/parsers/stac_size/stac_size.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_size/stac_size.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,87 +10,57 @@ part of 'stac_size.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSize _$StacSizeFromJson(Map json) { - return _StacSize.fromJson(json); -} - /// @nodoc mixin _$StacSize { - double get width => throw _privateConstructorUsedError; - double get height => throw _privateConstructorUsedError; - - /// Serializes this StacSize to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get width; + double get height; /// Create a copy of StacSize /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSizeCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacSizeCopyWithImpl(this as StacSize, _$identity); -/// @nodoc -abstract class $StacSizeCopyWith<$Res> { - factory $StacSizeCopyWith(StacSize value, $Res Function(StacSize) then) = - _$StacSizeCopyWithImpl<$Res, StacSize>; - @useResult - $Res call({double width, double height}); -} + /// Serializes this StacSize to a JSON map. + Map toJson(); -/// @nodoc -class _$StacSizeCopyWithImpl<$Res, $Val extends StacSize> - implements $StacSizeCopyWith<$Res> { - _$StacSizeCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSize && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, width, height); - /// Create a copy of StacSize - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? width = null, - Object? height = null, - }) { - return _then(_value.copyWith( - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + String toString() { + return 'StacSize(width: $width, height: $height)'; } } /// @nodoc -abstract class _$$StacSizeImplCopyWith<$Res> - implements $StacSizeCopyWith<$Res> { - factory _$$StacSizeImplCopyWith( - _$StacSizeImpl value, $Res Function(_$StacSizeImpl) then) = - __$$StacSizeImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacSizeCopyWith<$Res> { + factory $StacSizeCopyWith(StacSize value, $Res Function(StacSize) _then) = + _$StacSizeCopyWithImpl; @useResult $Res call({double width, double height}); } /// @nodoc -class __$$StacSizeImplCopyWithImpl<$Res> - extends _$StacSizeCopyWithImpl<$Res, _$StacSizeImpl> - implements _$$StacSizeImplCopyWith<$Res> { - __$$StacSizeImplCopyWithImpl( - _$StacSizeImpl _value, $Res Function(_$StacSizeImpl) _then) - : super(_value, _then); +class _$StacSizeCopyWithImpl<$Res> implements $StacSizeCopyWith<$Res> { + _$StacSizeCopyWithImpl(this._self, this._then); + + final StacSize _self; + final $Res Function(StacSize) _then; /// Create a copy of StacSize /// with the given fields replaced by the non-null parameter values. @@ -99,13 +70,13 @@ class __$$StacSizeImplCopyWithImpl<$Res> Object? width = null, Object? height = null, }) { - return _then(_$StacSizeImpl( + return _then(_self.copyWith( width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double, height: null == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double, )); @@ -114,27 +85,36 @@ class __$$StacSizeImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacSizeImpl implements _StacSize { - const _$StacSizeImpl({required this.width, required this.height}); - - factory _$StacSizeImpl.fromJson(Map json) => - _$$StacSizeImplFromJson(json); +class _StacSize implements StacSize { + const _StacSize({required this.width, required this.height}); + factory _StacSize.fromJson(Map json) => + _$StacSizeFromJson(json); @override final double width; @override final double height; + /// Create a copy of StacSize + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacSize(width: $width, height: $height)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSizeCopyWith<_StacSize> get copyWith => + __$StacSizeCopyWithImpl<_StacSize>(this, _$identity); + + @override + Map toJson() { + return _$StacSizeToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSizeImpl && + other is _StacSize && (identical(other.width, width) || other.width == width) && (identical(other.height, height) || other.height == height)); } @@ -143,39 +123,48 @@ class _$StacSizeImpl implements _StacSize { @override int get hashCode => Object.hash(runtimeType, width, height); - /// Create a copy of StacSize - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacSizeImplCopyWith<_$StacSizeImpl> get copyWith => - __$$StacSizeImplCopyWithImpl<_$StacSizeImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacSizeImplToJson( - this, - ); + String toString() { + return 'StacSize(width: $width, height: $height)'; } } -abstract class _StacSize implements StacSize { - const factory _StacSize( - {required final double width, - required final double height}) = _$StacSizeImpl; +/// @nodoc +abstract mixin class _$StacSizeCopyWith<$Res> + implements $StacSizeCopyWith<$Res> { + factory _$StacSizeCopyWith(_StacSize value, $Res Function(_StacSize) _then) = + __$StacSizeCopyWithImpl; + @override + @useResult + $Res call({double width, double height}); +} - factory _StacSize.fromJson(Map json) = - _$StacSizeImpl.fromJson; +/// @nodoc +class __$StacSizeCopyWithImpl<$Res> implements _$StacSizeCopyWith<$Res> { + __$StacSizeCopyWithImpl(this._self, this._then); - @override - double get width; - @override - double get height; + final _StacSize _self; + final $Res Function(_StacSize) _then; /// Create a copy of StacSize /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSizeImplCopyWith<_$StacSizeImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? width = null, + Object? height = null, + }) { + return _then(_StacSize( + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as double, + height: null == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_size/stac_size.g.dart b/packages/stac/lib/src/parsers/stac_size/stac_size.g.dart index a3a44bf1..315de90f 100644 --- a/packages/stac/lib/src/parsers/stac_size/stac_size.g.dart +++ b/packages/stac/lib/src/parsers/stac_size/stac_size.g.dart @@ -6,14 +6,12 @@ part of 'stac_size.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSizeImpl _$$StacSizeImplFromJson(Map json) => - _$StacSizeImpl( +_StacSize _$StacSizeFromJson(Map json) => _StacSize( width: (json['width'] as num).toDouble(), height: (json['height'] as num).toDouble(), ); -Map _$$StacSizeImplToJson(_$StacSizeImpl instance) => - { +Map _$StacSizeToJson(_StacSize instance) => { 'width': instance.width, 'height': instance.height, }; diff --git a/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.dart b/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.dart index ed496f22..056fef21 100644 --- a/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.dart +++ b/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.dart @@ -6,7 +6,7 @@ part 'stac_sized_box.freezed.dart'; part 'stac_sized_box.g.dart'; @freezed -class StacSizedBox with _$StacSizedBox { +abstract class StacSizedBox with _$StacSizedBox { const factory StacSizedBox({ double? width, double? height, diff --git a/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.freezed.dart b/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.freezed.dart index 7e6d3e32..11120b41 100644 --- a/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,94 +10,62 @@ part of 'stac_sized_box.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSizedBox _$StacSizedBoxFromJson(Map json) { - return _StacSizedBox.fromJson(json); -} - /// @nodoc mixin _$StacSizedBox { - double? get width => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacSizedBox to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double? get width; + double? get height; + Map? get child; /// Create a copy of StacSizedBox /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSizedBoxCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacSizedBoxCopyWithImpl( + this as StacSizedBox, _$identity); -/// @nodoc -abstract class $StacSizedBoxCopyWith<$Res> { - factory $StacSizedBoxCopyWith( - StacSizedBox value, $Res Function(StacSizedBox) then) = - _$StacSizedBoxCopyWithImpl<$Res, StacSizedBox>; - @useResult - $Res call({double? width, double? height, Map? child}); -} + /// Serializes this StacSizedBox to a JSON map. + Map toJson(); -/// @nodoc -class _$StacSizedBoxCopyWithImpl<$Res, $Val extends StacSizedBox> - implements $StacSizedBoxCopyWith<$Res> { - _$StacSizedBoxCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSizedBox && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, width, height, const DeepCollectionEquality().hash(child)); - /// Create a copy of StacSizedBox - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? width = freezed, - Object? height = freezed, - Object? child = freezed, - }) { - return _then(_value.copyWith( - width: freezed == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacSizedBox(width: $width, height: $height, child: $child)'; } } /// @nodoc -abstract class _$$StacSizedBoxImplCopyWith<$Res> - implements $StacSizedBoxCopyWith<$Res> { - factory _$$StacSizedBoxImplCopyWith( - _$StacSizedBoxImpl value, $Res Function(_$StacSizedBoxImpl) then) = - __$$StacSizedBoxImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacSizedBoxCopyWith<$Res> { + factory $StacSizedBoxCopyWith( + StacSizedBox value, $Res Function(StacSizedBox) _then) = + _$StacSizedBoxCopyWithImpl; @useResult $Res call({double? width, double? height, Map? child}); } /// @nodoc -class __$$StacSizedBoxImplCopyWithImpl<$Res> - extends _$StacSizedBoxCopyWithImpl<$Res, _$StacSizedBoxImpl> - implements _$$StacSizedBoxImplCopyWith<$Res> { - __$$StacSizedBoxImplCopyWithImpl( - _$StacSizedBoxImpl _value, $Res Function(_$StacSizedBoxImpl) _then) - : super(_value, _then); +class _$StacSizedBoxCopyWithImpl<$Res> implements $StacSizedBoxCopyWith<$Res> { + _$StacSizedBoxCopyWithImpl(this._self, this._then); + + final StacSizedBox _self; + final $Res Function(StacSizedBox) _then; /// Create a copy of StacSizedBox /// with the given fields replaced by the non-null parameter values. @@ -107,17 +76,17 @@ class __$$StacSizedBoxImplCopyWithImpl<$Res> Object? height = freezed, Object? child = freezed, }) { - return _then(_$StacSizedBoxImpl( + return _then(_self.copyWith( width: freezed == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -126,13 +95,12 @@ class __$$StacSizedBoxImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacSizedBoxImpl implements _StacSizedBox { - const _$StacSizedBoxImpl( +class _StacSizedBox implements StacSizedBox { + const _StacSizedBox( {this.width, this.height, final Map? child}) : _child = child; - - factory _$StacSizedBoxImpl.fromJson(Map json) => - _$$StacSizedBoxImplFromJson(json); + factory _StacSizedBox.fromJson(Map json) => + _$StacSizedBoxFromJson(json); @override final double? width; @@ -148,16 +116,26 @@ class _$StacSizedBoxImpl implements _StacSizedBox { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacSizedBox + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSizedBoxCopyWith<_StacSizedBox> get copyWith => + __$StacSizedBoxCopyWithImpl<_StacSizedBox>(this, _$identity); + @override - String toString() { - return 'StacSizedBox(width: $width, height: $height, child: $child)'; + Map toJson() { + return _$StacSizedBoxToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSizedBoxImpl && + other is _StacSizedBox && (identical(other.width, width) || other.width == width) && (identical(other.height, height) || other.height == height) && const DeepCollectionEquality().equals(other._child, _child)); @@ -168,42 +146,55 @@ class _$StacSizedBoxImpl implements _StacSizedBox { int get hashCode => Object.hash( runtimeType, width, height, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacSizedBox - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacSizedBoxImplCopyWith<_$StacSizedBoxImpl> get copyWith => - __$$StacSizedBoxImplCopyWithImpl<_$StacSizedBoxImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacSizedBoxImplToJson( - this, - ); + String toString() { + return 'StacSizedBox(width: $width, height: $height, child: $child)'; } } -abstract class _StacSizedBox implements StacSizedBox { - const factory _StacSizedBox( - {final double? width, - final double? height, - final Map? child}) = _$StacSizedBoxImpl; +/// @nodoc +abstract mixin class _$StacSizedBoxCopyWith<$Res> + implements $StacSizedBoxCopyWith<$Res> { + factory _$StacSizedBoxCopyWith( + _StacSizedBox value, $Res Function(_StacSizedBox) _then) = + __$StacSizedBoxCopyWithImpl; + @override + @useResult + $Res call({double? width, double? height, Map? child}); +} - factory _StacSizedBox.fromJson(Map json) = - _$StacSizedBoxImpl.fromJson; +/// @nodoc +class __$StacSizedBoxCopyWithImpl<$Res> + implements _$StacSizedBoxCopyWith<$Res> { + __$StacSizedBoxCopyWithImpl(this._self, this._then); - @override - double? get width; - @override - double? get height; - @override - Map? get child; + final _StacSizedBox _self; + final $Res Function(_StacSizedBox) _then; /// Create a copy of StacSizedBox /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSizedBoxImplCopyWith<_$StacSizedBoxImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? width = freezed, + Object? height = freezed, + Object? child = freezed, + }) { + return _then(_StacSizedBox( + width: freezed == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as double?, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.g.dart b/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.g.dart index d08182a6..cc8e485c 100644 --- a/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.g.dart +++ b/packages/stac/lib/src/parsers/stac_sized_box/stac_sized_box.g.dart @@ -6,14 +6,14 @@ part of 'stac_sized_box.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSizedBoxImpl _$$StacSizedBoxImplFromJson(Map json) => - _$StacSizedBoxImpl( +_StacSizedBox _$StacSizedBoxFromJson(Map json) => + _StacSizedBox( width: (json['width'] as num?)?.toDouble(), height: (json['height'] as num?)?.toDouble(), child: json['child'] as Map?, ); -Map _$$StacSizedBoxImplToJson(_$StacSizedBoxImpl instance) => +Map _$StacSizedBoxToJson(_StacSizedBox instance) => { 'width': instance.width, 'height': instance.height, diff --git a/packages/stac/lib/src/parsers/stac_slider/stac_slider.dart b/packages/stac/lib/src/parsers/stac_slider/stac_slider.dart index 6a1b3045..77663a04 100644 --- a/packages/stac/lib/src/parsers/stac_slider/stac_slider.dart +++ b/packages/stac/lib/src/parsers/stac_slider/stac_slider.dart @@ -10,7 +10,7 @@ part 'stac_slider.g.dart'; enum StacSliderType { adaptive, cupertino, material } @freezed -class StacSlider with _$StacSlider { +abstract class StacSlider with _$StacSlider { const factory StacSlider({ String? id, @Default(StacSliderType.material) StacSliderType sliderType, diff --git a/packages/stac/lib/src/parsers/stac_slider/stac_slider.freezed.dart b/packages/stac/lib/src/parsers/stac_slider/stac_slider.freezed.dart index 588a1e66..bcd419d5 100644 --- a/packages/stac/lib/src/parsers/stac_slider/stac_slider.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_slider/stac_slider.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,199 +10,116 @@ part of 'stac_slider.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSlider _$StacSliderFromJson(Map json) { - return _StacSlider.fromJson(json); -} - /// @nodoc mixin _$StacSlider { - String? get id => throw _privateConstructorUsedError; - StacSliderType get sliderType => throw _privateConstructorUsedError; - double get value => throw _privateConstructorUsedError; - double? get secondaryTrackValue => throw _privateConstructorUsedError; - Map? get onChanged => throw _privateConstructorUsedError; - Map? get onChangeStart => throw _privateConstructorUsedError; - Map? get onChangeEnd => throw _privateConstructorUsedError; - double get min => throw _privateConstructorUsedError; - double get max => throw _privateConstructorUsedError; - int? get divisions => throw _privateConstructorUsedError; - String? get label => throw _privateConstructorUsedError; - String? get activeColor => throw _privateConstructorUsedError; - String? get inactiveColor => throw _privateConstructorUsedError; - String? get secondaryActiveColor => throw _privateConstructorUsedError; - String? get thumbColor => throw _privateConstructorUsedError; - String? get overlayColor => throw _privateConstructorUsedError; - StacMouseCursor? get mouseCursor => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - SliderInteraction? get allowedInteraction => - throw _privateConstructorUsedError; - - /// Serializes this StacSlider to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get id; + StacSliderType get sliderType; + double get value; + double? get secondaryTrackValue; + Map? get onChanged; + Map? get onChangeStart; + Map? get onChangeEnd; + double get min; + double get max; + int? get divisions; + String? get label; + String? get activeColor; + String? get inactiveColor; + String? get secondaryActiveColor; + String? get thumbColor; + String? get overlayColor; + StacMouseCursor? get mouseCursor; + bool get autofocus; + SliderInteraction? get allowedInteraction; /// Create a copy of StacSlider /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSliderCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacSliderCopyWithImpl(this as StacSlider, _$identity); -/// @nodoc -abstract class $StacSliderCopyWith<$Res> { - factory $StacSliderCopyWith( - StacSlider value, $Res Function(StacSlider) then) = - _$StacSliderCopyWithImpl<$Res, StacSlider>; - @useResult - $Res call( - {String? id, - StacSliderType sliderType, - double value, - double? secondaryTrackValue, - Map? onChanged, - Map? onChangeStart, - Map? onChangeEnd, - double min, - double max, - int? divisions, - String? label, - String? activeColor, - String? inactiveColor, - String? secondaryActiveColor, - String? thumbColor, - String? overlayColor, - StacMouseCursor? mouseCursor, - bool autofocus, - SliderInteraction? allowedInteraction}); -} + /// Serializes this StacSlider to a JSON map. + Map toJson(); -/// @nodoc -class _$StacSliderCopyWithImpl<$Res, $Val extends StacSlider> - implements $StacSliderCopyWith<$Res> { - _$StacSliderCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSlider && + (identical(other.id, id) || other.id == id) && + (identical(other.sliderType, sliderType) || + other.sliderType == sliderType) && + (identical(other.value, value) || other.value == value) && + (identical(other.secondaryTrackValue, secondaryTrackValue) || + other.secondaryTrackValue == secondaryTrackValue) && + const DeepCollectionEquality().equals(other.onChanged, onChanged) && + const DeepCollectionEquality() + .equals(other.onChangeStart, onChangeStart) && + const DeepCollectionEquality() + .equals(other.onChangeEnd, onChangeEnd) && + (identical(other.min, min) || other.min == min) && + (identical(other.max, max) || other.max == max) && + (identical(other.divisions, divisions) || + other.divisions == divisions) && + (identical(other.label, label) || other.label == label) && + (identical(other.activeColor, activeColor) || + other.activeColor == activeColor) && + (identical(other.inactiveColor, inactiveColor) || + other.inactiveColor == inactiveColor) && + (identical(other.secondaryActiveColor, secondaryActiveColor) || + other.secondaryActiveColor == secondaryActiveColor) && + (identical(other.thumbColor, thumbColor) || + other.thumbColor == thumbColor) && + (identical(other.overlayColor, overlayColor) || + other.overlayColor == overlayColor) && + (identical(other.mouseCursor, mouseCursor) || + other.mouseCursor == mouseCursor) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.allowedInteraction, allowedInteraction) || + other.allowedInteraction == allowedInteraction)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + sliderType, + value, + secondaryTrackValue, + const DeepCollectionEquality().hash(onChanged), + const DeepCollectionEquality().hash(onChangeStart), + const DeepCollectionEquality().hash(onChangeEnd), + min, + max, + divisions, + label, + activeColor, + inactiveColor, + secondaryActiveColor, + thumbColor, + overlayColor, + mouseCursor, + autofocus, + allowedInteraction + ]); - /// Create a copy of StacSlider - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? sliderType = null, - Object? value = null, - Object? secondaryTrackValue = freezed, - Object? onChanged = freezed, - Object? onChangeStart = freezed, - Object? onChangeEnd = freezed, - Object? min = null, - Object? max = null, - Object? divisions = freezed, - Object? label = freezed, - Object? activeColor = freezed, - Object? inactiveColor = freezed, - Object? secondaryActiveColor = freezed, - Object? thumbColor = freezed, - Object? overlayColor = freezed, - Object? mouseCursor = freezed, - Object? autofocus = null, - Object? allowedInteraction = freezed, - }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String?, - sliderType: null == sliderType - ? _value.sliderType - : sliderType // ignore: cast_nullable_to_non_nullable - as StacSliderType, - value: null == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as double, - secondaryTrackValue: freezed == secondaryTrackValue - ? _value.secondaryTrackValue - : secondaryTrackValue // ignore: cast_nullable_to_non_nullable - as double?, - onChanged: freezed == onChanged - ? _value.onChanged - : onChanged // ignore: cast_nullable_to_non_nullable - as Map?, - onChangeStart: freezed == onChangeStart - ? _value.onChangeStart - : onChangeStart // ignore: cast_nullable_to_non_nullable - as Map?, - onChangeEnd: freezed == onChangeEnd - ? _value.onChangeEnd - : onChangeEnd // ignore: cast_nullable_to_non_nullable - as Map?, - min: null == min - ? _value.min - : min // ignore: cast_nullable_to_non_nullable - as double, - max: null == max - ? _value.max - : max // ignore: cast_nullable_to_non_nullable - as double, - divisions: freezed == divisions - ? _value.divisions - : divisions // ignore: cast_nullable_to_non_nullable - as int?, - label: freezed == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String?, - activeColor: freezed == activeColor - ? _value.activeColor - : activeColor // ignore: cast_nullable_to_non_nullable - as String?, - inactiveColor: freezed == inactiveColor - ? _value.inactiveColor - : inactiveColor // ignore: cast_nullable_to_non_nullable - as String?, - secondaryActiveColor: freezed == secondaryActiveColor - ? _value.secondaryActiveColor - : secondaryActiveColor // ignore: cast_nullable_to_non_nullable - as String?, - thumbColor: freezed == thumbColor - ? _value.thumbColor - : thumbColor // ignore: cast_nullable_to_non_nullable - as String?, - overlayColor: freezed == overlayColor - ? _value.overlayColor - : overlayColor // ignore: cast_nullable_to_non_nullable - as String?, - mouseCursor: freezed == mouseCursor - ? _value.mouseCursor - : mouseCursor // ignore: cast_nullable_to_non_nullable - as StacMouseCursor?, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - allowedInteraction: freezed == allowedInteraction - ? _value.allowedInteraction - : allowedInteraction // ignore: cast_nullable_to_non_nullable - as SliderInteraction?, - ) as $Val); + String toString() { + return 'StacSlider(id: $id, sliderType: $sliderType, value: $value, secondaryTrackValue: $secondaryTrackValue, onChanged: $onChanged, onChangeStart: $onChangeStart, onChangeEnd: $onChangeEnd, min: $min, max: $max, divisions: $divisions, label: $label, activeColor: $activeColor, inactiveColor: $inactiveColor, secondaryActiveColor: $secondaryActiveColor, thumbColor: $thumbColor, overlayColor: $overlayColor, mouseCursor: $mouseCursor, autofocus: $autofocus, allowedInteraction: $allowedInteraction)'; } } /// @nodoc -abstract class _$$StacSliderImplCopyWith<$Res> - implements $StacSliderCopyWith<$Res> { - factory _$$StacSliderImplCopyWith( - _$StacSliderImpl value, $Res Function(_$StacSliderImpl) then) = - __$$StacSliderImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacSliderCopyWith<$Res> { + factory $StacSliderCopyWith( + StacSlider value, $Res Function(StacSlider) _then) = + _$StacSliderCopyWithImpl; @useResult $Res call( {String? id, @@ -226,12 +144,11 @@ abstract class _$$StacSliderImplCopyWith<$Res> } /// @nodoc -class __$$StacSliderImplCopyWithImpl<$Res> - extends _$StacSliderCopyWithImpl<$Res, _$StacSliderImpl> - implements _$$StacSliderImplCopyWith<$Res> { - __$$StacSliderImplCopyWithImpl( - _$StacSliderImpl _value, $Res Function(_$StacSliderImpl) _then) - : super(_value, _then); +class _$StacSliderCopyWithImpl<$Res> implements $StacSliderCopyWith<$Res> { + _$StacSliderCopyWithImpl(this._self, this._then); + + final StacSlider _self; + final $Res Function(StacSlider) _then; /// Create a copy of StacSlider /// with the given fields replaced by the non-null parameter values. @@ -258,81 +175,81 @@ class __$$StacSliderImplCopyWithImpl<$Res> Object? autofocus = null, Object? allowedInteraction = freezed, }) { - return _then(_$StacSliderImpl( + return _then(_self.copyWith( id: freezed == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String?, sliderType: null == sliderType - ? _value.sliderType + ? _self.sliderType : sliderType // ignore: cast_nullable_to_non_nullable as StacSliderType, value: null == value - ? _value.value + ? _self.value : value // ignore: cast_nullable_to_non_nullable as double, secondaryTrackValue: freezed == secondaryTrackValue - ? _value.secondaryTrackValue + ? _self.secondaryTrackValue : secondaryTrackValue // ignore: cast_nullable_to_non_nullable as double?, onChanged: freezed == onChanged - ? _value._onChanged + ? _self.onChanged : onChanged // ignore: cast_nullable_to_non_nullable as Map?, onChangeStart: freezed == onChangeStart - ? _value._onChangeStart + ? _self.onChangeStart : onChangeStart // ignore: cast_nullable_to_non_nullable as Map?, onChangeEnd: freezed == onChangeEnd - ? _value._onChangeEnd + ? _self.onChangeEnd : onChangeEnd // ignore: cast_nullable_to_non_nullable as Map?, min: null == min - ? _value.min + ? _self.min : min // ignore: cast_nullable_to_non_nullable as double, max: null == max - ? _value.max + ? _self.max : max // ignore: cast_nullable_to_non_nullable as double, divisions: freezed == divisions - ? _value.divisions + ? _self.divisions : divisions // ignore: cast_nullable_to_non_nullable as int?, label: freezed == label - ? _value.label + ? _self.label : label // ignore: cast_nullable_to_non_nullable as String?, activeColor: freezed == activeColor - ? _value.activeColor + ? _self.activeColor : activeColor // ignore: cast_nullable_to_non_nullable as String?, inactiveColor: freezed == inactiveColor - ? _value.inactiveColor + ? _self.inactiveColor : inactiveColor // ignore: cast_nullable_to_non_nullable as String?, secondaryActiveColor: freezed == secondaryActiveColor - ? _value.secondaryActiveColor + ? _self.secondaryActiveColor : secondaryActiveColor // ignore: cast_nullable_to_non_nullable as String?, thumbColor: freezed == thumbColor - ? _value.thumbColor + ? _self.thumbColor : thumbColor // ignore: cast_nullable_to_non_nullable as String?, overlayColor: freezed == overlayColor - ? _value.overlayColor + ? _self.overlayColor : overlayColor // ignore: cast_nullable_to_non_nullable as String?, mouseCursor: freezed == mouseCursor - ? _value.mouseCursor + ? _self.mouseCursor : mouseCursor // ignore: cast_nullable_to_non_nullable as StacMouseCursor?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, allowedInteraction: freezed == allowedInteraction - ? _value.allowedInteraction + ? _self.allowedInteraction : allowedInteraction // ignore: cast_nullable_to_non_nullable as SliderInteraction?, )); @@ -341,8 +258,8 @@ class __$$StacSliderImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacSliderImpl implements _StacSlider { - const _$StacSliderImpl( +class _StacSlider implements StacSlider { + const _StacSlider( {this.id, this.sliderType = StacSliderType.material, required this.value, @@ -365,9 +282,8 @@ class _$StacSliderImpl implements _StacSlider { : _onChanged = onChanged, _onChangeStart = onChangeStart, _onChangeEnd = onChangeEnd; - - factory _$StacSliderImpl.fromJson(Map json) => - _$$StacSliderImplFromJson(json); + factory _StacSlider.fromJson(Map json) => + _$StacSliderFromJson(json); @override final String? id; @@ -436,16 +352,26 @@ class _$StacSliderImpl implements _StacSlider { @override final SliderInteraction? allowedInteraction; + /// Create a copy of StacSlider + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacSlider(id: $id, sliderType: $sliderType, value: $value, secondaryTrackValue: $secondaryTrackValue, onChanged: $onChanged, onChangeStart: $onChangeStart, onChangeEnd: $onChangeEnd, min: $min, max: $max, divisions: $divisions, label: $label, activeColor: $activeColor, inactiveColor: $inactiveColor, secondaryActiveColor: $secondaryActiveColor, thumbColor: $thumbColor, overlayColor: $overlayColor, mouseCursor: $mouseCursor, autofocus: $autofocus, allowedInteraction: $allowedInteraction)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSliderCopyWith<_StacSlider> get copyWith => + __$StacSliderCopyWithImpl<_StacSlider>(this, _$identity); + + @override + Map toJson() { + return _$StacSliderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSliderImpl && + other is _StacSlider && (identical(other.id, id) || other.id == id) && (identical(other.sliderType, sliderType) || other.sliderType == sliderType) && @@ -506,90 +432,153 @@ class _$StacSliderImpl implements _StacSlider { allowedInteraction ]); - /// Create a copy of StacSlider - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacSliderImplCopyWith<_$StacSliderImpl> get copyWith => - __$$StacSliderImplCopyWithImpl<_$StacSliderImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacSliderImplToJson( - this, - ); + String toString() { + return 'StacSlider(id: $id, sliderType: $sliderType, value: $value, secondaryTrackValue: $secondaryTrackValue, onChanged: $onChanged, onChangeStart: $onChangeStart, onChangeEnd: $onChangeEnd, min: $min, max: $max, divisions: $divisions, label: $label, activeColor: $activeColor, inactiveColor: $inactiveColor, secondaryActiveColor: $secondaryActiveColor, thumbColor: $thumbColor, overlayColor: $overlayColor, mouseCursor: $mouseCursor, autofocus: $autofocus, allowedInteraction: $allowedInteraction)'; } } -abstract class _StacSlider implements StacSlider { - const factory _StacSlider( - {final String? id, - final StacSliderType sliderType, - required final double value, - final double? secondaryTrackValue, - final Map? onChanged, - final Map? onChangeStart, - final Map? onChangeEnd, - final double min, - final double max, - final int? divisions, - final String? label, - final String? activeColor, - final String? inactiveColor, - final String? secondaryActiveColor, - final String? thumbColor, - final String? overlayColor, - final StacMouseCursor? mouseCursor, - final bool autofocus, - final SliderInteraction? allowedInteraction}) = _$StacSliderImpl; +/// @nodoc +abstract mixin class _$StacSliderCopyWith<$Res> + implements $StacSliderCopyWith<$Res> { + factory _$StacSliderCopyWith( + _StacSlider value, $Res Function(_StacSlider) _then) = + __$StacSliderCopyWithImpl; + @override + @useResult + $Res call( + {String? id, + StacSliderType sliderType, + double value, + double? secondaryTrackValue, + Map? onChanged, + Map? onChangeStart, + Map? onChangeEnd, + double min, + double max, + int? divisions, + String? label, + String? activeColor, + String? inactiveColor, + String? secondaryActiveColor, + String? thumbColor, + String? overlayColor, + StacMouseCursor? mouseCursor, + bool autofocus, + SliderInteraction? allowedInteraction}); +} - factory _StacSlider.fromJson(Map json) = - _$StacSliderImpl.fromJson; +/// @nodoc +class __$StacSliderCopyWithImpl<$Res> implements _$StacSliderCopyWith<$Res> { + __$StacSliderCopyWithImpl(this._self, this._then); - @override - String? get id; - @override - StacSliderType get sliderType; - @override - double get value; - @override - double? get secondaryTrackValue; - @override - Map? get onChanged; - @override - Map? get onChangeStart; - @override - Map? get onChangeEnd; - @override - double get min; - @override - double get max; - @override - int? get divisions; - @override - String? get label; - @override - String? get activeColor; - @override - String? get inactiveColor; - @override - String? get secondaryActiveColor; - @override - String? get thumbColor; - @override - String? get overlayColor; - @override - StacMouseCursor? get mouseCursor; - @override - bool get autofocus; - @override - SliderInteraction? get allowedInteraction; + final _StacSlider _self; + final $Res Function(_StacSlider) _then; /// Create a copy of StacSlider /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSliderImplCopyWith<_$StacSliderImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = freezed, + Object? sliderType = null, + Object? value = null, + Object? secondaryTrackValue = freezed, + Object? onChanged = freezed, + Object? onChangeStart = freezed, + Object? onChangeEnd = freezed, + Object? min = null, + Object? max = null, + Object? divisions = freezed, + Object? label = freezed, + Object? activeColor = freezed, + Object? inactiveColor = freezed, + Object? secondaryActiveColor = freezed, + Object? thumbColor = freezed, + Object? overlayColor = freezed, + Object? mouseCursor = freezed, + Object? autofocus = null, + Object? allowedInteraction = freezed, + }) { + return _then(_StacSlider( + id: freezed == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + sliderType: null == sliderType + ? _self.sliderType + : sliderType // ignore: cast_nullable_to_non_nullable + as StacSliderType, + value: null == value + ? _self.value + : value // ignore: cast_nullable_to_non_nullable + as double, + secondaryTrackValue: freezed == secondaryTrackValue + ? _self.secondaryTrackValue + : secondaryTrackValue // ignore: cast_nullable_to_non_nullable + as double?, + onChanged: freezed == onChanged + ? _self._onChanged + : onChanged // ignore: cast_nullable_to_non_nullable + as Map?, + onChangeStart: freezed == onChangeStart + ? _self._onChangeStart + : onChangeStart // ignore: cast_nullable_to_non_nullable + as Map?, + onChangeEnd: freezed == onChangeEnd + ? _self._onChangeEnd + : onChangeEnd // ignore: cast_nullable_to_non_nullable + as Map?, + min: null == min + ? _self.min + : min // ignore: cast_nullable_to_non_nullable + as double, + max: null == max + ? _self.max + : max // ignore: cast_nullable_to_non_nullable + as double, + divisions: freezed == divisions + ? _self.divisions + : divisions // ignore: cast_nullable_to_non_nullable + as int?, + label: freezed == label + ? _self.label + : label // ignore: cast_nullable_to_non_nullable + as String?, + activeColor: freezed == activeColor + ? _self.activeColor + : activeColor // ignore: cast_nullable_to_non_nullable + as String?, + inactiveColor: freezed == inactiveColor + ? _self.inactiveColor + : inactiveColor // ignore: cast_nullable_to_non_nullable + as String?, + secondaryActiveColor: freezed == secondaryActiveColor + ? _self.secondaryActiveColor + : secondaryActiveColor // ignore: cast_nullable_to_non_nullable + as String?, + thumbColor: freezed == thumbColor + ? _self.thumbColor + : thumbColor // ignore: cast_nullable_to_non_nullable + as String?, + overlayColor: freezed == overlayColor + ? _self.overlayColor + : overlayColor // ignore: cast_nullable_to_non_nullable + as String?, + mouseCursor: freezed == mouseCursor + ? _self.mouseCursor + : mouseCursor // ignore: cast_nullable_to_non_nullable + as StacMouseCursor?, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + allowedInteraction: freezed == allowedInteraction + ? _self.allowedInteraction + : allowedInteraction // ignore: cast_nullable_to_non_nullable + as SliderInteraction?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_slider/stac_slider.g.dart b/packages/stac/lib/src/parsers/stac_slider/stac_slider.g.dart index 7e43638a..e7b5d1bc 100644 --- a/packages/stac/lib/src/parsers/stac_slider/stac_slider.g.dart +++ b/packages/stac/lib/src/parsers/stac_slider/stac_slider.g.dart @@ -6,8 +6,7 @@ part of 'stac_slider.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSliderImpl _$$StacSliderImplFromJson(Map json) => - _$StacSliderImpl( +_StacSlider _$StacSliderFromJson(Map json) => _StacSlider( id: json['id'] as String?, sliderType: $enumDecodeNullable(_$StacSliderTypeEnumMap, json['sliderType']) ?? @@ -33,7 +32,7 @@ _$StacSliderImpl _$$StacSliderImplFromJson(Map json) => _$SliderInteractionEnumMap, json['allowedInteraction']), ); -Map _$$StacSliderImplToJson(_$StacSliderImpl instance) => +Map _$StacSliderToJson(_StacSlider instance) => { 'id': instance.id, 'sliderType': _$StacSliderTypeEnumMap[instance.sliderType]!, diff --git a/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.dart b/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.dart index 56581d1b..7d63f0e2 100644 --- a/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.dart +++ b/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.dart @@ -9,7 +9,7 @@ part 'stac_sliver_app_bar.freezed.dart'; part 'stac_sliver_app_bar.g.dart'; @freezed -class StacSliverAppBar with _$StacSliverAppBar { +abstract class StacSliverAppBar with _$StacSliverAppBar { const factory StacSliverAppBar({ Map? leading, @Default(true) bool automaticallyImplyLeading, diff --git a/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.freezed.dart b/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.freezed.dart index 2a6ef4a5..fa748c1f 100644 --- a/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,70 +10,181 @@ part of 'stac_sliver_app_bar.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSliverAppBar _$StacSliverAppBarFromJson(Map json) { - return _StacSliverAppBar.fromJson(json); -} - /// @nodoc mixin _$StacSliverAppBar { - Map? get leading => throw _privateConstructorUsedError; - bool get automaticallyImplyLeading => throw _privateConstructorUsedError; - Map? get title => throw _privateConstructorUsedError; - List>? get actions => throw _privateConstructorUsedError; - Map? get flexibleSpace => throw _privateConstructorUsedError; - Map? get bottom => throw _privateConstructorUsedError; - double? get elevation => throw _privateConstructorUsedError; - double? get scrolledUnderElevation => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get surfaceTintColor => throw _privateConstructorUsedError; - bool get forceElevated => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get foregroundColor => throw _privateConstructorUsedError; - StacIconThemeData? get iconTheme => throw _privateConstructorUsedError; - StacIconThemeData? get actionsIconTheme => throw _privateConstructorUsedError; - bool get primary => throw _privateConstructorUsedError; - bool? get centerTitle => throw _privateConstructorUsedError; - bool get excludeHeaderSemantics => throw _privateConstructorUsedError; - double? get titleSpacing => throw _privateConstructorUsedError; - double? get collapsedHeight => throw _privateConstructorUsedError; - double? get expandedHeight => throw _privateConstructorUsedError; - bool get floating => throw _privateConstructorUsedError; - bool get pinned => throw _privateConstructorUsedError; - bool get snap => throw _privateConstructorUsedError; - bool get stretch => throw _privateConstructorUsedError; - double get stretchTriggerOffset => throw _privateConstructorUsedError; - StacShapeBorder? get shape => - throw _privateConstructorUsedError; // StacAsyncCallback? onStretchTrigger, TODO: Implement StacAsyncCallback - double get toolbarHeight => throw _privateConstructorUsedError; - double? get leadingWidth => throw _privateConstructorUsedError; - StacTextStyle? get toolbarTextStyle => throw _privateConstructorUsedError; - StacTextStyle? get titleTextStyle => throw _privateConstructorUsedError; - StacSystemUIOverlayStyle? get systemOverlayStyle => - throw _privateConstructorUsedError; - bool get forceMaterialTransparency => throw _privateConstructorUsedError; - Clip? get clipBehavior => throw _privateConstructorUsedError; - StacEdgeInsets? get actionsPadding => throw _privateConstructorUsedError; - - /// Serializes this StacSliverAppBar to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get leading; + bool get automaticallyImplyLeading; + Map? get title; + List>? get actions; + Map? get flexibleSpace; + Map? get bottom; + double? get elevation; + double? get scrolledUnderElevation; + String? get shadowColor; + String? get surfaceTintColor; + bool get forceElevated; + String? get backgroundColor; + String? get foregroundColor; + StacIconThemeData? get iconTheme; + StacIconThemeData? get actionsIconTheme; + bool get primary; + bool? get centerTitle; + bool get excludeHeaderSemantics; + double? get titleSpacing; + double? get collapsedHeight; + double? get expandedHeight; + bool get floating; + bool get pinned; + bool get snap; + bool get stretch; + double get stretchTriggerOffset; + StacShapeBorder? + get shape; // StacAsyncCallback? onStretchTrigger, TODO: Implement StacAsyncCallback + double get toolbarHeight; + double? get leadingWidth; + StacTextStyle? get toolbarTextStyle; + StacTextStyle? get titleTextStyle; + StacSystemUIOverlayStyle? get systemOverlayStyle; + bool get forceMaterialTransparency; + Clip? get clipBehavior; + StacEdgeInsets? get actionsPadding; /// Create a copy of StacSliverAppBar /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSliverAppBarCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacSliverAppBarCopyWithImpl( + this as StacSliverAppBar, _$identity); + + /// Serializes this StacSliverAppBar to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSliverAppBar && + const DeepCollectionEquality().equals(other.leading, leading) && + (identical(other.automaticallyImplyLeading, + automaticallyImplyLeading) || + other.automaticallyImplyLeading == automaticallyImplyLeading) && + const DeepCollectionEquality().equals(other.title, title) && + const DeepCollectionEquality().equals(other.actions, actions) && + const DeepCollectionEquality() + .equals(other.flexibleSpace, flexibleSpace) && + const DeepCollectionEquality().equals(other.bottom, bottom) && + (identical(other.elevation, elevation) || + other.elevation == elevation) && + (identical(other.scrolledUnderElevation, scrolledUnderElevation) || + other.scrolledUnderElevation == scrolledUnderElevation) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.surfaceTintColor, surfaceTintColor) || + other.surfaceTintColor == surfaceTintColor) && + (identical(other.forceElevated, forceElevated) || + other.forceElevated == forceElevated) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.foregroundColor, foregroundColor) || + other.foregroundColor == foregroundColor) && + (identical(other.iconTheme, iconTheme) || + other.iconTheme == iconTheme) && + (identical(other.actionsIconTheme, actionsIconTheme) || + other.actionsIconTheme == actionsIconTheme) && + (identical(other.primary, primary) || other.primary == primary) && + (identical(other.centerTitle, centerTitle) || + other.centerTitle == centerTitle) && + (identical(other.excludeHeaderSemantics, excludeHeaderSemantics) || + other.excludeHeaderSemantics == excludeHeaderSemantics) && + (identical(other.titleSpacing, titleSpacing) || + other.titleSpacing == titleSpacing) && + (identical(other.collapsedHeight, collapsedHeight) || + other.collapsedHeight == collapsedHeight) && + (identical(other.expandedHeight, expandedHeight) || + other.expandedHeight == expandedHeight) && + (identical(other.floating, floating) || + other.floating == floating) && + (identical(other.pinned, pinned) || other.pinned == pinned) && + (identical(other.snap, snap) || other.snap == snap) && + (identical(other.stretch, stretch) || other.stretch == stretch) && + (identical(other.stretchTriggerOffset, stretchTriggerOffset) || + other.stretchTriggerOffset == stretchTriggerOffset) && + (identical(other.shape, shape) || other.shape == shape) && + (identical(other.toolbarHeight, toolbarHeight) || + other.toolbarHeight == toolbarHeight) && + (identical(other.leadingWidth, leadingWidth) || + other.leadingWidth == leadingWidth) && + (identical(other.toolbarTextStyle, toolbarTextStyle) || + other.toolbarTextStyle == toolbarTextStyle) && + (identical(other.titleTextStyle, titleTextStyle) || + other.titleTextStyle == titleTextStyle) && + (identical(other.systemOverlayStyle, systemOverlayStyle) || + other.systemOverlayStyle == systemOverlayStyle) && + (identical(other.forceMaterialTransparency, + forceMaterialTransparency) || + other.forceMaterialTransparency == forceMaterialTransparency) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.actionsPadding, actionsPadding) || + other.actionsPadding == actionsPadding)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(leading), + automaticallyImplyLeading, + const DeepCollectionEquality().hash(title), + const DeepCollectionEquality().hash(actions), + const DeepCollectionEquality().hash(flexibleSpace), + const DeepCollectionEquality().hash(bottom), + elevation, + scrolledUnderElevation, + shadowColor, + surfaceTintColor, + forceElevated, + backgroundColor, + foregroundColor, + iconTheme, + actionsIconTheme, + primary, + centerTitle, + excludeHeaderSemantics, + titleSpacing, + collapsedHeight, + expandedHeight, + floating, + pinned, + snap, + stretch, + stretchTriggerOffset, + shape, + toolbarHeight, + leadingWidth, + toolbarTextStyle, + titleTextStyle, + systemOverlayStyle, + forceMaterialTransparency, + clipBehavior, + actionsPadding + ]); + + @override + String toString() { + return 'StacSliverAppBar(leading: $leading, automaticallyImplyLeading: $automaticallyImplyLeading, title: $title, actions: $actions, flexibleSpace: $flexibleSpace, bottom: $bottom, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, forceElevated: $forceElevated, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, iconTheme: $iconTheme, actionsIconTheme: $actionsIconTheme, primary: $primary, centerTitle: $centerTitle, excludeHeaderSemantics: $excludeHeaderSemantics, titleSpacing: $titleSpacing, collapsedHeight: $collapsedHeight, expandedHeight: $expandedHeight, floating: $floating, pinned: $pinned, snap: $snap, stretch: $stretch, stretchTriggerOffset: $stretchTriggerOffset, shape: $shape, toolbarHeight: $toolbarHeight, leadingWidth: $leadingWidth, toolbarTextStyle: $toolbarTextStyle, titleTextStyle: $titleTextStyle, systemOverlayStyle: $systemOverlayStyle, forceMaterialTransparency: $forceMaterialTransparency, clipBehavior: $clipBehavior, actionsPadding: $actionsPadding)'; + } } /// @nodoc -abstract class $StacSliverAppBarCopyWith<$Res> { +abstract mixin class $StacSliverAppBarCopyWith<$Res> { factory $StacSliverAppBarCopyWith( - StacSliverAppBar value, $Res Function(StacSliverAppBar) then) = - _$StacSliverAppBarCopyWithImpl<$Res, StacSliverAppBar>; + StacSliverAppBar value, $Res Function(StacSliverAppBar) _then) = + _$StacSliverAppBarCopyWithImpl; @useResult $Res call( {Map? leading, @@ -121,14 +233,12 @@ abstract class $StacSliverAppBarCopyWith<$Res> { } /// @nodoc -class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> +class _$StacSliverAppBarCopyWithImpl<$Res> implements $StacSliverAppBarCopyWith<$Res> { - _$StacSliverAppBarCopyWithImpl(this._value, this._then); + _$StacSliverAppBarCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacSliverAppBar _self; + final $Res Function(StacSliverAppBar) _then; /// Create a copy of StacSliverAppBar /// with the given fields replaced by the non-null parameter values. @@ -171,148 +281,148 @@ class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> Object? clipBehavior = freezed, Object? actionsPadding = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( leading: freezed == leading - ? _value.leading + ? _self.leading : leading // ignore: cast_nullable_to_non_nullable as Map?, automaticallyImplyLeading: null == automaticallyImplyLeading - ? _value.automaticallyImplyLeading + ? _self.automaticallyImplyLeading : automaticallyImplyLeading // ignore: cast_nullable_to_non_nullable as bool, title: freezed == title - ? _value.title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as Map?, actions: freezed == actions - ? _value.actions + ? _self.actions : actions // ignore: cast_nullable_to_non_nullable as List>?, flexibleSpace: freezed == flexibleSpace - ? _value.flexibleSpace + ? _self.flexibleSpace : flexibleSpace // ignore: cast_nullable_to_non_nullable as Map?, bottom: freezed == bottom - ? _value.bottom + ? _self.bottom : bottom // ignore: cast_nullable_to_non_nullable as Map?, elevation: freezed == elevation - ? _value.elevation + ? _self.elevation : elevation // ignore: cast_nullable_to_non_nullable as double?, scrolledUnderElevation: freezed == scrolledUnderElevation - ? _value.scrolledUnderElevation + ? _self.scrolledUnderElevation : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable as double?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor + ? _self.surfaceTintColor : surfaceTintColor // ignore: cast_nullable_to_non_nullable as String?, forceElevated: null == forceElevated - ? _value.forceElevated + ? _self.forceElevated : forceElevated // ignore: cast_nullable_to_non_nullable as bool, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, foregroundColor: freezed == foregroundColor - ? _value.foregroundColor + ? _self.foregroundColor : foregroundColor // ignore: cast_nullable_to_non_nullable as String?, iconTheme: freezed == iconTheme - ? _value.iconTheme + ? _self.iconTheme : iconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, actionsIconTheme: freezed == actionsIconTheme - ? _value.actionsIconTheme + ? _self.actionsIconTheme : actionsIconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, primary: null == primary - ? _value.primary + ? _self.primary : primary // ignore: cast_nullable_to_non_nullable as bool, centerTitle: freezed == centerTitle - ? _value.centerTitle + ? _self.centerTitle : centerTitle // ignore: cast_nullable_to_non_nullable as bool?, excludeHeaderSemantics: null == excludeHeaderSemantics - ? _value.excludeHeaderSemantics + ? _self.excludeHeaderSemantics : excludeHeaderSemantics // ignore: cast_nullable_to_non_nullable as bool, titleSpacing: freezed == titleSpacing - ? _value.titleSpacing + ? _self.titleSpacing : titleSpacing // ignore: cast_nullable_to_non_nullable as double?, collapsedHeight: freezed == collapsedHeight - ? _value.collapsedHeight + ? _self.collapsedHeight : collapsedHeight // ignore: cast_nullable_to_non_nullable as double?, expandedHeight: freezed == expandedHeight - ? _value.expandedHeight + ? _self.expandedHeight : expandedHeight // ignore: cast_nullable_to_non_nullable as double?, floating: null == floating - ? _value.floating + ? _self.floating : floating // ignore: cast_nullable_to_non_nullable as bool, pinned: null == pinned - ? _value.pinned + ? _self.pinned : pinned // ignore: cast_nullable_to_non_nullable as bool, snap: null == snap - ? _value.snap + ? _self.snap : snap // ignore: cast_nullable_to_non_nullable as bool, stretch: null == stretch - ? _value.stretch + ? _self.stretch : stretch // ignore: cast_nullable_to_non_nullable as bool, stretchTriggerOffset: null == stretchTriggerOffset - ? _value.stretchTriggerOffset + ? _self.stretchTriggerOffset : stretchTriggerOffset // ignore: cast_nullable_to_non_nullable as double, shape: freezed == shape - ? _value.shape + ? _self.shape : shape // ignore: cast_nullable_to_non_nullable as StacShapeBorder?, toolbarHeight: null == toolbarHeight - ? _value.toolbarHeight + ? _self.toolbarHeight : toolbarHeight // ignore: cast_nullable_to_non_nullable as double, leadingWidth: freezed == leadingWidth - ? _value.leadingWidth + ? _self.leadingWidth : leadingWidth // ignore: cast_nullable_to_non_nullable as double?, toolbarTextStyle: freezed == toolbarTextStyle - ? _value.toolbarTextStyle + ? _self.toolbarTextStyle : toolbarTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle + ? _self.titleTextStyle : titleTextStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, systemOverlayStyle: freezed == systemOverlayStyle - ? _value.systemOverlayStyle + ? _self.systemOverlayStyle : systemOverlayStyle // ignore: cast_nullable_to_non_nullable as StacSystemUIOverlayStyle?, forceMaterialTransparency: null == forceMaterialTransparency - ? _value.forceMaterialTransparency + ? _self.forceMaterialTransparency : forceMaterialTransparency // ignore: cast_nullable_to_non_nullable as bool, clipBehavior: freezed == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip?, actionsPadding: freezed == actionsPadding - ? _value.actionsPadding + ? _self.actionsPadding : actionsPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, - ) as $Val); + )); } /// Create a copy of StacSliverAppBar @@ -320,12 +430,12 @@ class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get iconTheme { - if (_value.iconTheme == null) { + if (_self.iconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.iconTheme!, (value) { - return _then(_value.copyWith(iconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); }); } @@ -334,12 +444,12 @@ class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get actionsIconTheme { - if (_value.actionsIconTheme == null) { + if (_self.actionsIconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.actionsIconTheme!, (value) { - return _then(_value.copyWith(actionsIconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.actionsIconTheme!, (value) { + return _then(_self.copyWith(actionsIconTheme: value)); }); } @@ -348,12 +458,12 @@ class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> @override @pragma('vm:prefer-inline') $StacShapeBorderCopyWith<$Res>? get shape { - if (_value.shape == null) { + if (_self.shape == null) { return null; } - return $StacShapeBorderCopyWith<$Res>(_value.shape!, (value) { - return _then(_value.copyWith(shape: value) as $Val); + return $StacShapeBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); }); } @@ -362,12 +472,12 @@ class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get toolbarTextStyle { - if (_value.toolbarTextStyle == null) { + if (_self.toolbarTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.toolbarTextStyle!, (value) { - return _then(_value.copyWith(toolbarTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.toolbarTextStyle!, (value) { + return _then(_self.copyWith(toolbarTextStyle: value)); }); } @@ -376,12 +486,12 @@ class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get titleTextStyle { - if (_value.titleTextStyle == null) { + if (_self.titleTextStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.titleTextStyle!, (value) { - return _then(_value.copyWith(titleTextStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); }); } @@ -390,13 +500,13 @@ class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> @override @pragma('vm:prefer-inline') $StacSystemUIOverlayStyleCopyWith<$Res>? get systemOverlayStyle { - if (_value.systemOverlayStyle == null) { + if (_self.systemOverlayStyle == null) { return null; } - return $StacSystemUIOverlayStyleCopyWith<$Res>(_value.systemOverlayStyle!, + return $StacSystemUIOverlayStyleCopyWith<$Res>(_self.systemOverlayStyle!, (value) { - return _then(_value.copyWith(systemOverlayStyle: value) as $Val); + return _then(_self.copyWith(systemOverlayStyle: value)); }); } @@ -405,343 +515,87 @@ class _$StacSliverAppBarCopyWithImpl<$Res, $Val extends StacSliverAppBar> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get actionsPadding { - if (_value.actionsPadding == null) { + if (_self.actionsPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.actionsPadding!, (value) { - return _then(_value.copyWith(actionsPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.actionsPadding!, (value) { + return _then(_self.copyWith(actionsPadding: value)); }); } } /// @nodoc -abstract class _$$StacSliverAppBarImplCopyWith<$Res> - implements $StacSliverAppBarCopyWith<$Res> { - factory _$$StacSliverAppBarImplCopyWith(_$StacSliverAppBarImpl value, - $Res Function(_$StacSliverAppBarImpl) then) = - __$$StacSliverAppBarImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? leading, - bool automaticallyImplyLeading, - Map? title, - List>? actions, - Map? flexibleSpace, - Map? bottom, - double? elevation, - double? scrolledUnderElevation, - String? shadowColor, - String? surfaceTintColor, - bool forceElevated, - String? backgroundColor, - String? foregroundColor, - StacIconThemeData? iconTheme, - StacIconThemeData? actionsIconTheme, - bool primary, - bool? centerTitle, - bool excludeHeaderSemantics, - double? titleSpacing, - double? collapsedHeight, - double? expandedHeight, - bool floating, - bool pinned, - bool snap, - bool stretch, - double stretchTriggerOffset, - StacShapeBorder? shape, - double toolbarHeight, - double? leadingWidth, - StacTextStyle? toolbarTextStyle, - StacTextStyle? titleTextStyle, - StacSystemUIOverlayStyle? systemOverlayStyle, - bool forceMaterialTransparency, - Clip? clipBehavior, - StacEdgeInsets? actionsPadding}); +@JsonSerializable() +class _StacSliverAppBar implements StacSliverAppBar { + const _StacSliverAppBar( + {final Map? leading, + this.automaticallyImplyLeading = true, + final Map? title, + final List>? actions, + final Map? flexibleSpace, + final Map? bottom, + this.elevation, + this.scrolledUnderElevation, + this.shadowColor, + this.surfaceTintColor, + this.forceElevated = false, + this.backgroundColor, + this.foregroundColor, + this.iconTheme, + this.actionsIconTheme, + this.primary = true, + this.centerTitle, + this.excludeHeaderSemantics = false, + this.titleSpacing, + this.collapsedHeight, + this.expandedHeight, + this.floating = false, + this.pinned = true, + this.snap = false, + this.stretch = false, + this.stretchTriggerOffset = 100.0, + this.shape, + this.toolbarHeight = 64.0, + this.leadingWidth, + this.toolbarTextStyle, + this.titleTextStyle, + this.systemOverlayStyle, + this.forceMaterialTransparency = false, + this.clipBehavior, + this.actionsPadding}) + : _leading = leading, + _title = title, + _actions = actions, + _flexibleSpace = flexibleSpace, + _bottom = bottom; + factory _StacSliverAppBar.fromJson(Map json) => + _$StacSliverAppBarFromJson(json); + final Map? _leading; @override - $StacIconThemeDataCopyWith<$Res>? get iconTheme; - @override - $StacIconThemeDataCopyWith<$Res>? get actionsIconTheme; + Map? get leading { + final value = _leading; + if (value == null) return null; + if (_leading is EqualUnmodifiableMapView) return _leading; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + @override - $StacShapeBorderCopyWith<$Res>? get shape; + @JsonKey() + final bool automaticallyImplyLeading; + final Map? _title; @override - $StacTextStyleCopyWith<$Res>? get toolbarTextStyle; - @override - $StacTextStyleCopyWith<$Res>? get titleTextStyle; - @override - $StacSystemUIOverlayStyleCopyWith<$Res>? get systemOverlayStyle; - @override - $StacEdgeInsetsCopyWith<$Res>? get actionsPadding; -} - -/// @nodoc -class __$$StacSliverAppBarImplCopyWithImpl<$Res> - extends _$StacSliverAppBarCopyWithImpl<$Res, _$StacSliverAppBarImpl> - implements _$$StacSliverAppBarImplCopyWith<$Res> { - __$$StacSliverAppBarImplCopyWithImpl(_$StacSliverAppBarImpl _value, - $Res Function(_$StacSliverAppBarImpl) _then) - : super(_value, _then); - - /// Create a copy of StacSliverAppBar - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? leading = freezed, - Object? automaticallyImplyLeading = null, - Object? title = freezed, - Object? actions = freezed, - Object? flexibleSpace = freezed, - Object? bottom = freezed, - Object? elevation = freezed, - Object? scrolledUnderElevation = freezed, - Object? shadowColor = freezed, - Object? surfaceTintColor = freezed, - Object? forceElevated = null, - Object? backgroundColor = freezed, - Object? foregroundColor = freezed, - Object? iconTheme = freezed, - Object? actionsIconTheme = freezed, - Object? primary = null, - Object? centerTitle = freezed, - Object? excludeHeaderSemantics = null, - Object? titleSpacing = freezed, - Object? collapsedHeight = freezed, - Object? expandedHeight = freezed, - Object? floating = null, - Object? pinned = null, - Object? snap = null, - Object? stretch = null, - Object? stretchTriggerOffset = null, - Object? shape = freezed, - Object? toolbarHeight = null, - Object? leadingWidth = freezed, - Object? toolbarTextStyle = freezed, - Object? titleTextStyle = freezed, - Object? systemOverlayStyle = freezed, - Object? forceMaterialTransparency = null, - Object? clipBehavior = freezed, - Object? actionsPadding = freezed, - }) { - return _then(_$StacSliverAppBarImpl( - leading: freezed == leading - ? _value._leading - : leading // ignore: cast_nullable_to_non_nullable - as Map?, - automaticallyImplyLeading: null == automaticallyImplyLeading - ? _value.automaticallyImplyLeading - : automaticallyImplyLeading // ignore: cast_nullable_to_non_nullable - as bool, - title: freezed == title - ? _value._title - : title // ignore: cast_nullable_to_non_nullable - as Map?, - actions: freezed == actions - ? _value._actions - : actions // ignore: cast_nullable_to_non_nullable - as List>?, - flexibleSpace: freezed == flexibleSpace - ? _value._flexibleSpace - : flexibleSpace // ignore: cast_nullable_to_non_nullable - as Map?, - bottom: freezed == bottom - ? _value._bottom - : bottom // ignore: cast_nullable_to_non_nullable - as Map?, - elevation: freezed == elevation - ? _value.elevation - : elevation // ignore: cast_nullable_to_non_nullable - as double?, - scrolledUnderElevation: freezed == scrolledUnderElevation - ? _value.scrolledUnderElevation - : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable - as double?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - surfaceTintColor: freezed == surfaceTintColor - ? _value.surfaceTintColor - : surfaceTintColor // ignore: cast_nullable_to_non_nullable - as String?, - forceElevated: null == forceElevated - ? _value.forceElevated - : forceElevated // ignore: cast_nullable_to_non_nullable - as bool, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - foregroundColor: freezed == foregroundColor - ? _value.foregroundColor - : foregroundColor // ignore: cast_nullable_to_non_nullable - as String?, - iconTheme: freezed == iconTheme - ? _value.iconTheme - : iconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - actionsIconTheme: freezed == actionsIconTheme - ? _value.actionsIconTheme - : actionsIconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - primary: null == primary - ? _value.primary - : primary // ignore: cast_nullable_to_non_nullable - as bool, - centerTitle: freezed == centerTitle - ? _value.centerTitle - : centerTitle // ignore: cast_nullable_to_non_nullable - as bool?, - excludeHeaderSemantics: null == excludeHeaderSemantics - ? _value.excludeHeaderSemantics - : excludeHeaderSemantics // ignore: cast_nullable_to_non_nullable - as bool, - titleSpacing: freezed == titleSpacing - ? _value.titleSpacing - : titleSpacing // ignore: cast_nullable_to_non_nullable - as double?, - collapsedHeight: freezed == collapsedHeight - ? _value.collapsedHeight - : collapsedHeight // ignore: cast_nullable_to_non_nullable - as double?, - expandedHeight: freezed == expandedHeight - ? _value.expandedHeight - : expandedHeight // ignore: cast_nullable_to_non_nullable - as double?, - floating: null == floating - ? _value.floating - : floating // ignore: cast_nullable_to_non_nullable - as bool, - pinned: null == pinned - ? _value.pinned - : pinned // ignore: cast_nullable_to_non_nullable - as bool, - snap: null == snap - ? _value.snap - : snap // ignore: cast_nullable_to_non_nullable - as bool, - stretch: null == stretch - ? _value.stretch - : stretch // ignore: cast_nullable_to_non_nullable - as bool, - stretchTriggerOffset: null == stretchTriggerOffset - ? _value.stretchTriggerOffset - : stretchTriggerOffset // ignore: cast_nullable_to_non_nullable - as double, - shape: freezed == shape - ? _value.shape - : shape // ignore: cast_nullable_to_non_nullable - as StacShapeBorder?, - toolbarHeight: null == toolbarHeight - ? _value.toolbarHeight - : toolbarHeight // ignore: cast_nullable_to_non_nullable - as double, - leadingWidth: freezed == leadingWidth - ? _value.leadingWidth - : leadingWidth // ignore: cast_nullable_to_non_nullable - as double?, - toolbarTextStyle: freezed == toolbarTextStyle - ? _value.toolbarTextStyle - : toolbarTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - titleTextStyle: freezed == titleTextStyle - ? _value.titleTextStyle - : titleTextStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - systemOverlayStyle: freezed == systemOverlayStyle - ? _value.systemOverlayStyle - : systemOverlayStyle // ignore: cast_nullable_to_non_nullable - as StacSystemUIOverlayStyle?, - forceMaterialTransparency: null == forceMaterialTransparency - ? _value.forceMaterialTransparency - : forceMaterialTransparency // ignore: cast_nullable_to_non_nullable - as bool, - clipBehavior: freezed == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip?, - actionsPadding: freezed == actionsPadding - ? _value.actionsPadding - : actionsPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$StacSliverAppBarImpl implements _StacSliverAppBar { - const _$StacSliverAppBarImpl( - {final Map? leading, - this.automaticallyImplyLeading = true, - final Map? title, - final List>? actions, - final Map? flexibleSpace, - final Map? bottom, - this.elevation, - this.scrolledUnderElevation, - this.shadowColor, - this.surfaceTintColor, - this.forceElevated = false, - this.backgroundColor, - this.foregroundColor, - this.iconTheme, - this.actionsIconTheme, - this.primary = true, - this.centerTitle, - this.excludeHeaderSemantics = false, - this.titleSpacing, - this.collapsedHeight, - this.expandedHeight, - this.floating = false, - this.pinned = true, - this.snap = false, - this.stretch = false, - this.stretchTriggerOffset = 100.0, - this.shape, - this.toolbarHeight = 64.0, - this.leadingWidth, - this.toolbarTextStyle, - this.titleTextStyle, - this.systemOverlayStyle, - this.forceMaterialTransparency = false, - this.clipBehavior, - this.actionsPadding}) - : _leading = leading, - _title = title, - _actions = actions, - _flexibleSpace = flexibleSpace, - _bottom = bottom; - - factory _$StacSliverAppBarImpl.fromJson(Map json) => - _$$StacSliverAppBarImplFromJson(json); - - final Map? _leading; - @override - Map? get leading { - final value = _leading; - if (value == null) return null; - if (_leading is EqualUnmodifiableMapView) return _leading; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - @JsonKey() - final bool automaticallyImplyLeading; - final Map? _title; - @override - Map? get title { - final value = _title; - if (value == null) return null; - if (_title is EqualUnmodifiableMapView) return _title; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - final List>? _actions; + Map? get title { + final value = _title; + if (value == null) return null; + if (_title is EqualUnmodifiableMapView) return _title; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final List>? _actions; @override List>? get actions { final value = _actions; @@ -841,16 +695,26 @@ class _$StacSliverAppBarImpl implements _StacSliverAppBar { @override final StacEdgeInsets? actionsPadding; + /// Create a copy of StacSliverAppBar + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacSliverAppBar(leading: $leading, automaticallyImplyLeading: $automaticallyImplyLeading, title: $title, actions: $actions, flexibleSpace: $flexibleSpace, bottom: $bottom, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, forceElevated: $forceElevated, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, iconTheme: $iconTheme, actionsIconTheme: $actionsIconTheme, primary: $primary, centerTitle: $centerTitle, excludeHeaderSemantics: $excludeHeaderSemantics, titleSpacing: $titleSpacing, collapsedHeight: $collapsedHeight, expandedHeight: $expandedHeight, floating: $floating, pinned: $pinned, snap: $snap, stretch: $stretch, stretchTriggerOffset: $stretchTriggerOffset, shape: $shape, toolbarHeight: $toolbarHeight, leadingWidth: $leadingWidth, toolbarTextStyle: $toolbarTextStyle, titleTextStyle: $titleTextStyle, systemOverlayStyle: $systemOverlayStyle, forceMaterialTransparency: $forceMaterialTransparency, clipBehavior: $clipBehavior, actionsPadding: $actionsPadding)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSliverAppBarCopyWith<_StacSliverAppBar> get copyWith => + __$StacSliverAppBarCopyWithImpl<_StacSliverAppBar>(this, _$identity); + + @override + Map toJson() { + return _$StacSliverAppBarToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSliverAppBarImpl && + other is _StacSliverAppBar && const DeepCollectionEquality().equals(other._leading, _leading) && (identical(other.automaticallyImplyLeading, automaticallyImplyLeading) || @@ -957,140 +821,364 @@ class _$StacSliverAppBarImpl implements _StacSliverAppBar { actionsPadding ]); - /// Create a copy of StacSliverAppBar - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacSliverAppBarImplCopyWith<_$StacSliverAppBarImpl> get copyWith => - __$$StacSliverAppBarImplCopyWithImpl<_$StacSliverAppBarImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacSliverAppBarImplToJson( - this, - ); + String toString() { + return 'StacSliverAppBar(leading: $leading, automaticallyImplyLeading: $automaticallyImplyLeading, title: $title, actions: $actions, flexibleSpace: $flexibleSpace, bottom: $bottom, elevation: $elevation, scrolledUnderElevation: $scrolledUnderElevation, shadowColor: $shadowColor, surfaceTintColor: $surfaceTintColor, forceElevated: $forceElevated, backgroundColor: $backgroundColor, foregroundColor: $foregroundColor, iconTheme: $iconTheme, actionsIconTheme: $actionsIconTheme, primary: $primary, centerTitle: $centerTitle, excludeHeaderSemantics: $excludeHeaderSemantics, titleSpacing: $titleSpacing, collapsedHeight: $collapsedHeight, expandedHeight: $expandedHeight, floating: $floating, pinned: $pinned, snap: $snap, stretch: $stretch, stretchTriggerOffset: $stretchTriggerOffset, shape: $shape, toolbarHeight: $toolbarHeight, leadingWidth: $leadingWidth, toolbarTextStyle: $toolbarTextStyle, titleTextStyle: $titleTextStyle, systemOverlayStyle: $systemOverlayStyle, forceMaterialTransparency: $forceMaterialTransparency, clipBehavior: $clipBehavior, actionsPadding: $actionsPadding)'; } } -abstract class _StacSliverAppBar implements StacSliverAppBar { - const factory _StacSliverAppBar( - {final Map? leading, - final bool automaticallyImplyLeading, - final Map? title, - final List>? actions, - final Map? flexibleSpace, - final Map? bottom, - final double? elevation, - final double? scrolledUnderElevation, - final String? shadowColor, - final String? surfaceTintColor, - final bool forceElevated, - final String? backgroundColor, - final String? foregroundColor, - final StacIconThemeData? iconTheme, - final StacIconThemeData? actionsIconTheme, - final bool primary, - final bool? centerTitle, - final bool excludeHeaderSemantics, - final double? titleSpacing, - final double? collapsedHeight, - final double? expandedHeight, - final bool floating, - final bool pinned, - final bool snap, - final bool stretch, - final double stretchTriggerOffset, - final StacShapeBorder? shape, - final double toolbarHeight, - final double? leadingWidth, - final StacTextStyle? toolbarTextStyle, - final StacTextStyle? titleTextStyle, - final StacSystemUIOverlayStyle? systemOverlayStyle, - final bool forceMaterialTransparency, - final Clip? clipBehavior, - final StacEdgeInsets? actionsPadding}) = _$StacSliverAppBarImpl; - - factory _StacSliverAppBar.fromJson(Map json) = - _$StacSliverAppBarImpl.fromJson; - - @override - Map? get leading; - @override - bool get automaticallyImplyLeading; - @override - Map? get title; - @override - List>? get actions; - @override - Map? get flexibleSpace; - @override - Map? get bottom; - @override - double? get elevation; - @override - double? get scrolledUnderElevation; - @override - String? get shadowColor; - @override - String? get surfaceTintColor; - @override - bool get forceElevated; - @override - String? get backgroundColor; - @override - String? get foregroundColor; - @override - StacIconThemeData? get iconTheme; - @override - StacIconThemeData? get actionsIconTheme; - @override - bool get primary; - @override - bool? get centerTitle; - @override - bool get excludeHeaderSemantics; - @override - double? get titleSpacing; - @override - double? get collapsedHeight; +/// @nodoc +abstract mixin class _$StacSliverAppBarCopyWith<$Res> + implements $StacSliverAppBarCopyWith<$Res> { + factory _$StacSliverAppBarCopyWith( + _StacSliverAppBar value, $Res Function(_StacSliverAppBar) _then) = + __$StacSliverAppBarCopyWithImpl; @override - double? get expandedHeight; + @useResult + $Res call( + {Map? leading, + bool automaticallyImplyLeading, + Map? title, + List>? actions, + Map? flexibleSpace, + Map? bottom, + double? elevation, + double? scrolledUnderElevation, + String? shadowColor, + String? surfaceTintColor, + bool forceElevated, + String? backgroundColor, + String? foregroundColor, + StacIconThemeData? iconTheme, + StacIconThemeData? actionsIconTheme, + bool primary, + bool? centerTitle, + bool excludeHeaderSemantics, + double? titleSpacing, + double? collapsedHeight, + double? expandedHeight, + bool floating, + bool pinned, + bool snap, + bool stretch, + double stretchTriggerOffset, + StacShapeBorder? shape, + double toolbarHeight, + double? leadingWidth, + StacTextStyle? toolbarTextStyle, + StacTextStyle? titleTextStyle, + StacSystemUIOverlayStyle? systemOverlayStyle, + bool forceMaterialTransparency, + Clip? clipBehavior, + StacEdgeInsets? actionsPadding}); + @override - bool get floating; + $StacIconThemeDataCopyWith<$Res>? get iconTheme; @override - bool get pinned; + $StacIconThemeDataCopyWith<$Res>? get actionsIconTheme; @override - bool get snap; + $StacShapeBorderCopyWith<$Res>? get shape; @override - bool get stretch; + $StacTextStyleCopyWith<$Res>? get toolbarTextStyle; @override - double get stretchTriggerOffset; + $StacTextStyleCopyWith<$Res>? get titleTextStyle; @override - StacShapeBorder? - get shape; // StacAsyncCallback? onStretchTrigger, TODO: Implement StacAsyncCallback + $StacSystemUIOverlayStyleCopyWith<$Res>? get systemOverlayStyle; @override - double get toolbarHeight; + $StacEdgeInsetsCopyWith<$Res>? get actionsPadding; +} + +/// @nodoc +class __$StacSliverAppBarCopyWithImpl<$Res> + implements _$StacSliverAppBarCopyWith<$Res> { + __$StacSliverAppBarCopyWithImpl(this._self, this._then); + + final _StacSliverAppBar _self; + final $Res Function(_StacSliverAppBar) _then; + + /// Create a copy of StacSliverAppBar + /// with the given fields replaced by the non-null parameter values. @override - double? get leadingWidth; + @pragma('vm:prefer-inline') + $Res call({ + Object? leading = freezed, + Object? automaticallyImplyLeading = null, + Object? title = freezed, + Object? actions = freezed, + Object? flexibleSpace = freezed, + Object? bottom = freezed, + Object? elevation = freezed, + Object? scrolledUnderElevation = freezed, + Object? shadowColor = freezed, + Object? surfaceTintColor = freezed, + Object? forceElevated = null, + Object? backgroundColor = freezed, + Object? foregroundColor = freezed, + Object? iconTheme = freezed, + Object? actionsIconTheme = freezed, + Object? primary = null, + Object? centerTitle = freezed, + Object? excludeHeaderSemantics = null, + Object? titleSpacing = freezed, + Object? collapsedHeight = freezed, + Object? expandedHeight = freezed, + Object? floating = null, + Object? pinned = null, + Object? snap = null, + Object? stretch = null, + Object? stretchTriggerOffset = null, + Object? shape = freezed, + Object? toolbarHeight = null, + Object? leadingWidth = freezed, + Object? toolbarTextStyle = freezed, + Object? titleTextStyle = freezed, + Object? systemOverlayStyle = freezed, + Object? forceMaterialTransparency = null, + Object? clipBehavior = freezed, + Object? actionsPadding = freezed, + }) { + return _then(_StacSliverAppBar( + leading: freezed == leading + ? _self._leading + : leading // ignore: cast_nullable_to_non_nullable + as Map?, + automaticallyImplyLeading: null == automaticallyImplyLeading + ? _self.automaticallyImplyLeading + : automaticallyImplyLeading // ignore: cast_nullable_to_non_nullable + as bool, + title: freezed == title + ? _self._title + : title // ignore: cast_nullable_to_non_nullable + as Map?, + actions: freezed == actions + ? _self._actions + : actions // ignore: cast_nullable_to_non_nullable + as List>?, + flexibleSpace: freezed == flexibleSpace + ? _self._flexibleSpace + : flexibleSpace // ignore: cast_nullable_to_non_nullable + as Map?, + bottom: freezed == bottom + ? _self._bottom + : bottom // ignore: cast_nullable_to_non_nullable + as Map?, + elevation: freezed == elevation + ? _self.elevation + : elevation // ignore: cast_nullable_to_non_nullable + as double?, + scrolledUnderElevation: freezed == scrolledUnderElevation + ? _self.scrolledUnderElevation + : scrolledUnderElevation // ignore: cast_nullable_to_non_nullable + as double?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + surfaceTintColor: freezed == surfaceTintColor + ? _self.surfaceTintColor + : surfaceTintColor // ignore: cast_nullable_to_non_nullable + as String?, + forceElevated: null == forceElevated + ? _self.forceElevated + : forceElevated // ignore: cast_nullable_to_non_nullable + as bool, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + foregroundColor: freezed == foregroundColor + ? _self.foregroundColor + : foregroundColor // ignore: cast_nullable_to_non_nullable + as String?, + iconTheme: freezed == iconTheme + ? _self.iconTheme + : iconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + actionsIconTheme: freezed == actionsIconTheme + ? _self.actionsIconTheme + : actionsIconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + primary: null == primary + ? _self.primary + : primary // ignore: cast_nullable_to_non_nullable + as bool, + centerTitle: freezed == centerTitle + ? _self.centerTitle + : centerTitle // ignore: cast_nullable_to_non_nullable + as bool?, + excludeHeaderSemantics: null == excludeHeaderSemantics + ? _self.excludeHeaderSemantics + : excludeHeaderSemantics // ignore: cast_nullable_to_non_nullable + as bool, + titleSpacing: freezed == titleSpacing + ? _self.titleSpacing + : titleSpacing // ignore: cast_nullable_to_non_nullable + as double?, + collapsedHeight: freezed == collapsedHeight + ? _self.collapsedHeight + : collapsedHeight // ignore: cast_nullable_to_non_nullable + as double?, + expandedHeight: freezed == expandedHeight + ? _self.expandedHeight + : expandedHeight // ignore: cast_nullable_to_non_nullable + as double?, + floating: null == floating + ? _self.floating + : floating // ignore: cast_nullable_to_non_nullable + as bool, + pinned: null == pinned + ? _self.pinned + : pinned // ignore: cast_nullable_to_non_nullable + as bool, + snap: null == snap + ? _self.snap + : snap // ignore: cast_nullable_to_non_nullable + as bool, + stretch: null == stretch + ? _self.stretch + : stretch // ignore: cast_nullable_to_non_nullable + as bool, + stretchTriggerOffset: null == stretchTriggerOffset + ? _self.stretchTriggerOffset + : stretchTriggerOffset // ignore: cast_nullable_to_non_nullable + as double, + shape: freezed == shape + ? _self.shape + : shape // ignore: cast_nullable_to_non_nullable + as StacShapeBorder?, + toolbarHeight: null == toolbarHeight + ? _self.toolbarHeight + : toolbarHeight // ignore: cast_nullable_to_non_nullable + as double, + leadingWidth: freezed == leadingWidth + ? _self.leadingWidth + : leadingWidth // ignore: cast_nullable_to_non_nullable + as double?, + toolbarTextStyle: freezed == toolbarTextStyle + ? _self.toolbarTextStyle + : toolbarTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + titleTextStyle: freezed == titleTextStyle + ? _self.titleTextStyle + : titleTextStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + systemOverlayStyle: freezed == systemOverlayStyle + ? _self.systemOverlayStyle + : systemOverlayStyle // ignore: cast_nullable_to_non_nullable + as StacSystemUIOverlayStyle?, + forceMaterialTransparency: null == forceMaterialTransparency + ? _self.forceMaterialTransparency + : forceMaterialTransparency // ignore: cast_nullable_to_non_nullable + as bool, + clipBehavior: freezed == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip?, + actionsPadding: freezed == actionsPadding + ? _self.actionsPadding + : actionsPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + )); + } + + /// Create a copy of StacSliverAppBar + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get toolbarTextStyle; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get iconTheme { + if (_self.iconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); + }); + } + + /// Create a copy of StacSliverAppBar + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get titleTextStyle; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get actionsIconTheme { + if (_self.actionsIconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.actionsIconTheme!, (value) { + return _then(_self.copyWith(actionsIconTheme: value)); + }); + } + + /// Create a copy of StacSliverAppBar + /// with the given fields replaced by the non-null parameter values. @override - StacSystemUIOverlayStyle? get systemOverlayStyle; + @pragma('vm:prefer-inline') + $StacShapeBorderCopyWith<$Res>? get shape { + if (_self.shape == null) { + return null; + } + + return $StacShapeBorderCopyWith<$Res>(_self.shape!, (value) { + return _then(_self.copyWith(shape: value)); + }); + } + + /// Create a copy of StacSliverAppBar + /// with the given fields replaced by the non-null parameter values. @override - bool get forceMaterialTransparency; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get toolbarTextStyle { + if (_self.toolbarTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.toolbarTextStyle!, (value) { + return _then(_self.copyWith(toolbarTextStyle: value)); + }); + } + + /// Create a copy of StacSliverAppBar + /// with the given fields replaced by the non-null parameter values. @override - Clip? get clipBehavior; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get titleTextStyle { + if (_self.titleTextStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.titleTextStyle!, (value) { + return _then(_self.copyWith(titleTextStyle: value)); + }); + } + + /// Create a copy of StacSliverAppBar + /// with the given fields replaced by the non-null parameter values. @override - StacEdgeInsets? get actionsPadding; + @pragma('vm:prefer-inline') + $StacSystemUIOverlayStyleCopyWith<$Res>? get systemOverlayStyle { + if (_self.systemOverlayStyle == null) { + return null; + } + + return $StacSystemUIOverlayStyleCopyWith<$Res>(_self.systemOverlayStyle!, + (value) { + return _then(_self.copyWith(systemOverlayStyle: value)); + }); + } /// Create a copy of StacSliverAppBar /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSliverAppBarImplCopyWith<_$StacSliverAppBarImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get actionsPadding { + if (_self.actionsPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.actionsPadding!, (value) { + return _then(_self.copyWith(actionsPadding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.g.dart b/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.g.dart index a1f3b276..35227095 100644 --- a/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.g.dart +++ b/packages/stac/lib/src/parsers/stac_sliver_app_bar/stac_sliver_app_bar.g.dart @@ -6,9 +6,8 @@ part of 'stac_sliver_app_bar.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSliverAppBarImpl _$$StacSliverAppBarImplFromJson( - Map json) => - _$StacSliverAppBarImpl( +_StacSliverAppBar _$StacSliverAppBarFromJson(Map json) => + _StacSliverAppBar( leading: json['leading'] as Map?, automaticallyImplyLeading: json['automaticallyImplyLeading'] as bool? ?? true, @@ -69,8 +68,7 @@ _$StacSliverAppBarImpl _$$StacSliverAppBarImplFromJson( : StacEdgeInsets.fromJson(json['actionsPadding']), ); -Map _$$StacSliverAppBarImplToJson( - _$StacSliverAppBarImpl instance) => +Map _$StacSliverAppBarToJson(_StacSliverAppBar instance) => { 'leading': instance.leading, 'automaticallyImplyLeading': instance.automaticallyImplyLeading, diff --git a/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.dart b/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.dart index 0706d128..ec9435ab 100644 --- a/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.dart +++ b/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.dart @@ -6,7 +6,7 @@ part 'stac_spacer.freezed.dart'; part 'stac_spacer.g.dart'; @freezed -class StacSpacer with _$StacSpacer { +abstract class StacSpacer with _$StacSpacer { const factory StacSpacer({ @Default(1) int flex, }) = _StacSpacer; diff --git a/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.freezed.dart b/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.freezed.dart index 01aff95c..9917df1c 100644 --- a/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,82 +10,56 @@ part of 'stac_spacer.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSpacer _$StacSpacerFromJson(Map json) { - return _StacSpacer.fromJson(json); -} - /// @nodoc mixin _$StacSpacer { - int get flex => throw _privateConstructorUsedError; - - /// Serializes this StacSpacer to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get flex; /// Create a copy of StacSpacer /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSpacerCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacSpacerCopyWithImpl(this as StacSpacer, _$identity); -/// @nodoc -abstract class $StacSpacerCopyWith<$Res> { - factory $StacSpacerCopyWith( - StacSpacer value, $Res Function(StacSpacer) then) = - _$StacSpacerCopyWithImpl<$Res, StacSpacer>; - @useResult - $Res call({int flex}); -} + /// Serializes this StacSpacer to a JSON map. + Map toJson(); -/// @nodoc -class _$StacSpacerCopyWithImpl<$Res, $Val extends StacSpacer> - implements $StacSpacerCopyWith<$Res> { - _$StacSpacerCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSpacer && + (identical(other.flex, flex) || other.flex == flex)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, flex); - /// Create a copy of StacSpacer - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? flex = null, - }) { - return _then(_value.copyWith( - flex: null == flex - ? _value.flex - : flex // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + String toString() { + return 'StacSpacer(flex: $flex)'; } } /// @nodoc -abstract class _$$StacSpacerImplCopyWith<$Res> - implements $StacSpacerCopyWith<$Res> { - factory _$$StacSpacerImplCopyWith( - _$StacSpacerImpl value, $Res Function(_$StacSpacerImpl) then) = - __$$StacSpacerImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacSpacerCopyWith<$Res> { + factory $StacSpacerCopyWith( + StacSpacer value, $Res Function(StacSpacer) _then) = + _$StacSpacerCopyWithImpl; @useResult $Res call({int flex}); } /// @nodoc -class __$$StacSpacerImplCopyWithImpl<$Res> - extends _$StacSpacerCopyWithImpl<$Res, _$StacSpacerImpl> - implements _$$StacSpacerImplCopyWith<$Res> { - __$$StacSpacerImplCopyWithImpl( - _$StacSpacerImpl _value, $Res Function(_$StacSpacerImpl) _then) - : super(_value, _then); +class _$StacSpacerCopyWithImpl<$Res> implements $StacSpacerCopyWith<$Res> { + _$StacSpacerCopyWithImpl(this._self, this._then); + + final StacSpacer _self; + final $Res Function(StacSpacer) _then; /// Create a copy of StacSpacer /// with the given fields replaced by the non-null parameter values. @@ -93,9 +68,9 @@ class __$$StacSpacerImplCopyWithImpl<$Res> $Res call({ Object? flex = null, }) { - return _then(_$StacSpacerImpl( + return _then(_self.copyWith( flex: null == flex - ? _value.flex + ? _self.flex : flex // ignore: cast_nullable_to_non_nullable as int, )); @@ -104,26 +79,35 @@ class __$$StacSpacerImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacSpacerImpl implements _StacSpacer { - const _$StacSpacerImpl({this.flex = 1}); - - factory _$StacSpacerImpl.fromJson(Map json) => - _$$StacSpacerImplFromJson(json); +class _StacSpacer implements StacSpacer { + const _StacSpacer({this.flex = 1}); + factory _StacSpacer.fromJson(Map json) => + _$StacSpacerFromJson(json); @override @JsonKey() final int flex; + /// Create a copy of StacSpacer + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacSpacer(flex: $flex)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSpacerCopyWith<_StacSpacer> get copyWith => + __$StacSpacerCopyWithImpl<_StacSpacer>(this, _$identity); + + @override + Map toJson() { + return _$StacSpacerToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSpacerImpl && + other is _StacSpacer && (identical(other.flex, flex) || other.flex == flex)); } @@ -131,35 +115,44 @@ class _$StacSpacerImpl implements _StacSpacer { @override int get hashCode => Object.hash(runtimeType, flex); - /// Create a copy of StacSpacer - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacSpacerImplCopyWith<_$StacSpacerImpl> get copyWith => - __$$StacSpacerImplCopyWithImpl<_$StacSpacerImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacSpacerImplToJson( - this, - ); + String toString() { + return 'StacSpacer(flex: $flex)'; } } -abstract class _StacSpacer implements StacSpacer { - const factory _StacSpacer({final int flex}) = _$StacSpacerImpl; +/// @nodoc +abstract mixin class _$StacSpacerCopyWith<$Res> + implements $StacSpacerCopyWith<$Res> { + factory _$StacSpacerCopyWith( + _StacSpacer value, $Res Function(_StacSpacer) _then) = + __$StacSpacerCopyWithImpl; + @override + @useResult + $Res call({int flex}); +} - factory _StacSpacer.fromJson(Map json) = - _$StacSpacerImpl.fromJson; +/// @nodoc +class __$StacSpacerCopyWithImpl<$Res> implements _$StacSpacerCopyWith<$Res> { + __$StacSpacerCopyWithImpl(this._self, this._then); - @override - int get flex; + final _StacSpacer _self; + final $Res Function(_StacSpacer) _then; /// Create a copy of StacSpacer /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSpacerImplCopyWith<_$StacSpacerImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? flex = null, + }) { + return _then(_StacSpacer( + flex: null == flex + ? _self.flex + : flex // ignore: cast_nullable_to_non_nullable + as int, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.g.dart b/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.g.dart index dec35ca5..52bdd8a5 100644 --- a/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.g.dart +++ b/packages/stac/lib/src/parsers/stac_spacer/stac_spacer.g.dart @@ -6,12 +6,11 @@ part of 'stac_spacer.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSpacerImpl _$$StacSpacerImplFromJson(Map json) => - _$StacSpacerImpl( +_StacSpacer _$StacSpacerFromJson(Map json) => _StacSpacer( flex: (json['flex'] as num?)?.toInt() ?? 1, ); -Map _$$StacSpacerImplToJson(_$StacSpacerImpl instance) => +Map _$StacSpacerToJson(_StacSpacer instance) => { 'flex': instance.flex, }; diff --git a/packages/stac/lib/src/parsers/stac_stack/stac_stack.dart b/packages/stac/lib/src/parsers/stac_stack/stac_stack.dart index f4081b78..f36a2d50 100644 --- a/packages/stac/lib/src/parsers/stac_stack/stac_stack.dart +++ b/packages/stac/lib/src/parsers/stac_stack/stac_stack.dart @@ -8,7 +8,7 @@ part 'stac_stack.freezed.dart'; part 'stac_stack.g.dart'; @freezed -class StacStack with _$StacStack { +abstract class StacStack with _$StacStack { const factory StacStack({ @Default(StacAlignmentDirectional.topStart) StacAlignmentDirectional alignment, diff --git a/packages/stac/lib/src/parsers/stac_stack/stac_stack.freezed.dart b/packages/stac/lib/src/parsers/stac_stack/stac_stack.freezed.dart index 58305522..7109345a 100644 --- a/packages/stac/lib/src/parsers/stac_stack/stac_stack.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_stack/stac_stack.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,99 +10,57 @@ part of 'stac_stack.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacStack _$StacStackFromJson(Map json) { - return _StacStack.fromJson(json); -} - /// @nodoc mixin _$StacStack { - StacAlignmentDirectional get alignment => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - StackFit get fit => throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - List> get children => throw _privateConstructorUsedError; - - /// Serializes this StacStack to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacAlignmentDirectional get alignment; + Clip get clipBehavior; + StackFit get fit; + TextDirection? get textDirection; + List> get children; /// Create a copy of StacStack /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacStackCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacStackCopyWithImpl(this as StacStack, _$identity); -/// @nodoc -abstract class $StacStackCopyWith<$Res> { - factory $StacStackCopyWith(StacStack value, $Res Function(StacStack) then) = - _$StacStackCopyWithImpl<$Res, StacStack>; - @useResult - $Res call( - {StacAlignmentDirectional alignment, - Clip clipBehavior, - StackFit fit, - TextDirection? textDirection, - List> children}); -} + /// Serializes this StacStack to a JSON map. + Map toJson(); -/// @nodoc -class _$StacStackCopyWithImpl<$Res, $Val extends StacStack> - implements $StacStackCopyWith<$Res> { - _$StacStackCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacStack && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.fit, fit) || other.fit == fit) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + const DeepCollectionEquality().equals(other.children, children)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, alignment, clipBehavior, fit, + textDirection, const DeepCollectionEquality().hash(children)); - /// Create a copy of StacStack - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? alignment = null, - Object? clipBehavior = null, - Object? fit = null, - Object? textDirection = freezed, - Object? children = null, - }) { - return _then(_value.copyWith( - alignment: null == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as StacAlignmentDirectional, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - fit: null == fit - ? _value.fit - : fit // ignore: cast_nullable_to_non_nullable - as StackFit, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - children: null == children - ? _value.children - : children // ignore: cast_nullable_to_non_nullable - as List>, - ) as $Val); + String toString() { + return 'StacStack(alignment: $alignment, clipBehavior: $clipBehavior, fit: $fit, textDirection: $textDirection, children: $children)'; } } /// @nodoc -abstract class _$$StacStackImplCopyWith<$Res> - implements $StacStackCopyWith<$Res> { - factory _$$StacStackImplCopyWith( - _$StacStackImpl value, $Res Function(_$StacStackImpl) then) = - __$$StacStackImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacStackCopyWith<$Res> { + factory $StacStackCopyWith(StacStack value, $Res Function(StacStack) _then) = + _$StacStackCopyWithImpl; @useResult $Res call( {StacAlignmentDirectional alignment, @@ -112,12 +71,11 @@ abstract class _$$StacStackImplCopyWith<$Res> } /// @nodoc -class __$$StacStackImplCopyWithImpl<$Res> - extends _$StacStackCopyWithImpl<$Res, _$StacStackImpl> - implements _$$StacStackImplCopyWith<$Res> { - __$$StacStackImplCopyWithImpl( - _$StacStackImpl _value, $Res Function(_$StacStackImpl) _then) - : super(_value, _then); +class _$StacStackCopyWithImpl<$Res> implements $StacStackCopyWith<$Res> { + _$StacStackCopyWithImpl(this._self, this._then); + + final StacStack _self; + final $Res Function(StacStack) _then; /// Create a copy of StacStack /// with the given fields replaced by the non-null parameter values. @@ -130,25 +88,25 @@ class __$$StacStackImplCopyWithImpl<$Res> Object? textDirection = freezed, Object? children = null, }) { - return _then(_$StacStackImpl( + return _then(_self.copyWith( alignment: null == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as StacAlignmentDirectional, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, fit: null == fit - ? _value.fit + ? _self.fit : fit // ignore: cast_nullable_to_non_nullable as StackFit, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, children: null == children - ? _value._children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, )); @@ -157,17 +115,16 @@ class __$$StacStackImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacStackImpl implements _StacStack { - const _$StacStackImpl( +class _StacStack implements StacStack { + const _StacStack( {this.alignment = StacAlignmentDirectional.topStart, this.clipBehavior = Clip.hardEdge, this.fit = StackFit.loose, this.textDirection, final List> children = const []}) : _children = children; - - factory _$StacStackImpl.fromJson(Map json) => - _$$StacStackImplFromJson(json); + factory _StacStack.fromJson(Map json) => + _$StacStackFromJson(json); @override @JsonKey() @@ -189,16 +146,26 @@ class _$StacStackImpl implements _StacStack { return EqualUnmodifiableListView(_children); } + /// Create a copy of StacStack + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacStack(alignment: $alignment, clipBehavior: $clipBehavior, fit: $fit, textDirection: $textDirection, children: $children)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacStackCopyWith<_StacStack> get copyWith => + __$StacStackCopyWithImpl<_StacStack>(this, _$identity); + + @override + Map toJson() { + return _$StacStackToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacStackImpl && + other is _StacStack && (identical(other.alignment, alignment) || other.alignment == alignment) && (identical(other.clipBehavior, clipBehavior) || @@ -214,48 +181,69 @@ class _$StacStackImpl implements _StacStack { int get hashCode => Object.hash(runtimeType, alignment, clipBehavior, fit, textDirection, const DeepCollectionEquality().hash(_children)); - /// Create a copy of StacStack - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacStackImplCopyWith<_$StacStackImpl> get copyWith => - __$$StacStackImplCopyWithImpl<_$StacStackImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacStackImplToJson( - this, - ); + String toString() { + return 'StacStack(alignment: $alignment, clipBehavior: $clipBehavior, fit: $fit, textDirection: $textDirection, children: $children)'; } } -abstract class _StacStack implements StacStack { - const factory _StacStack( - {final StacAlignmentDirectional alignment, - final Clip clipBehavior, - final StackFit fit, - final TextDirection? textDirection, - final List> children}) = _$StacStackImpl; +/// @nodoc +abstract mixin class _$StacStackCopyWith<$Res> + implements $StacStackCopyWith<$Res> { + factory _$StacStackCopyWith( + _StacStack value, $Res Function(_StacStack) _then) = + __$StacStackCopyWithImpl; + @override + @useResult + $Res call( + {StacAlignmentDirectional alignment, + Clip clipBehavior, + StackFit fit, + TextDirection? textDirection, + List> children}); +} - factory _StacStack.fromJson(Map json) = - _$StacStackImpl.fromJson; +/// @nodoc +class __$StacStackCopyWithImpl<$Res> implements _$StacStackCopyWith<$Res> { + __$StacStackCopyWithImpl(this._self, this._then); - @override - StacAlignmentDirectional get alignment; - @override - Clip get clipBehavior; - @override - StackFit get fit; - @override - TextDirection? get textDirection; - @override - List> get children; + final _StacStack _self; + final $Res Function(_StacStack) _then; /// Create a copy of StacStack /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacStackImplCopyWith<_$StacStackImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? alignment = null, + Object? clipBehavior = null, + Object? fit = null, + Object? textDirection = freezed, + Object? children = null, + }) { + return _then(_StacStack( + alignment: null == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as StacAlignmentDirectional, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + fit: null == fit + ? _self.fit + : fit // ignore: cast_nullable_to_non_nullable + as StackFit, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_stack/stac_stack.g.dart b/packages/stac/lib/src/parsers/stac_stack/stac_stack.g.dart index 38816294..ddc33b35 100644 --- a/packages/stac/lib/src/parsers/stac_stack/stac_stack.g.dart +++ b/packages/stac/lib/src/parsers/stac_stack/stac_stack.g.dart @@ -6,8 +6,7 @@ part of 'stac_stack.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacStackImpl _$$StacStackImplFromJson(Map json) => - _$StacStackImpl( +_StacStack _$StacStackFromJson(Map json) => _StacStack( alignment: $enumDecodeNullable( _$StacAlignmentDirectionalEnumMap, json['alignment']) ?? StacAlignmentDirectional.topStart, @@ -23,7 +22,7 @@ _$StacStackImpl _$$StacStackImplFromJson(Map json) => const [], ); -Map _$$StacStackImplToJson(_$StacStackImpl instance) => +Map _$StacStackToJson(_StacStack instance) => { 'alignment': _$StacAlignmentDirectionalEnumMap[instance.alignment]!, 'clipBehavior': _$ClipEnumMap[instance.clipBehavior]!, diff --git a/packages/stac/lib/src/parsers/stac_switch/stac_switch.dart b/packages/stac/lib/src/parsers/stac_switch/stac_switch.dart index 55bce8ac..6f6a9229 100644 --- a/packages/stac/lib/src/parsers/stac_switch/stac_switch.dart +++ b/packages/stac/lib/src/parsers/stac_switch/stac_switch.dart @@ -11,7 +11,7 @@ part 'stac_switch.g.dart'; enum StacSwitchType { adaptive, cupertino, material } @freezed -class StacSwitch with _$StacSwitch { +abstract class StacSwitch with _$StacSwitch { const factory StacSwitch({ @Default(StacSwitchType.material) StacSwitchType switchType, @Default(false) value, diff --git a/packages/stac/lib/src/parsers/stac_switch/stac_switch.freezed.dart b/packages/stac/lib/src/parsers/stac_switch/stac_switch.freezed.dart index 7d77f9e2..bad0b405 100644 --- a/packages/stac/lib/src/parsers/stac_switch/stac_switch.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_switch/stac_switch.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,60 +10,143 @@ part of 'stac_switch.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSwitch _$StacSwitchFromJson(Map json) { - return _StacSwitch.fromJson(json); -} - /// @nodoc mixin _$StacSwitch { - StacSwitchType get switchType => throw _privateConstructorUsedError; - dynamic get value => throw _privateConstructorUsedError; - Map? get onChanged => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - String? get activeColor => throw _privateConstructorUsedError; - String? get activeTrackColor => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - String? get inactiveThumbColor => throw _privateConstructorUsedError; - String? get inactiveTrackColor => throw _privateConstructorUsedError; - String? get onLabelColor => throw _privateConstructorUsedError; - String? get offLabelColor => throw _privateConstructorUsedError; - double? get splashRadius => throw _privateConstructorUsedError; - DragStartBehavior get dragStartBehavior => throw _privateConstructorUsedError; - StacMaterialColor? get overlayColor => throw _privateConstructorUsedError; - StacMaterialColor? get thumbColor => throw _privateConstructorUsedError; - StacMaterialColor? get trackColor => throw _privateConstructorUsedError; - MaterialTapTargetSize? get materialTapTargetSize => - throw _privateConstructorUsedError; - StacMaterialColor? get trackOutlineColor => - throw _privateConstructorUsedError; - double? get trackOutlineWidth => throw _privateConstructorUsedError; - Map? get thumbIcon => throw _privateConstructorUsedError; - String? get inactiveThumbImage => throw _privateConstructorUsedError; - String? get activeThumbImage => throw _privateConstructorUsedError; - bool? get applyTheme => throw _privateConstructorUsedError; - bool? get applyCupertinoTheme => throw _privateConstructorUsedError; - - /// Serializes this StacSwitch to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacSwitchType get switchType; + dynamic get value; + Map? get onChanged; + bool get autofocus; + String? get activeColor; + String? get activeTrackColor; + String? get focusColor; + String? get hoverColor; + String? get inactiveThumbColor; + String? get inactiveTrackColor; + String? get onLabelColor; + String? get offLabelColor; + double? get splashRadius; + DragStartBehavior get dragStartBehavior; + StacMaterialColor? get overlayColor; + StacMaterialColor? get thumbColor; + StacMaterialColor? get trackColor; + MaterialTapTargetSize? get materialTapTargetSize; + StacMaterialColor? get trackOutlineColor; + double? get trackOutlineWidth; + Map? get thumbIcon; + String? get inactiveThumbImage; + String? get activeThumbImage; + bool? get applyTheme; + bool? get applyCupertinoTheme; /// Create a copy of StacSwitch /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSwitchCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacSwitchCopyWithImpl(this as StacSwitch, _$identity); + + /// Serializes this StacSwitch to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSwitch && + (identical(other.switchType, switchType) || + other.switchType == switchType) && + const DeepCollectionEquality().equals(other.value, value) && + const DeepCollectionEquality().equals(other.onChanged, onChanged) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.activeColor, activeColor) || + other.activeColor == activeColor) && + (identical(other.activeTrackColor, activeTrackColor) || + other.activeTrackColor == activeTrackColor) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.inactiveThumbColor, inactiveThumbColor) || + other.inactiveThumbColor == inactiveThumbColor) && + (identical(other.inactiveTrackColor, inactiveTrackColor) || + other.inactiveTrackColor == inactiveTrackColor) && + (identical(other.onLabelColor, onLabelColor) || + other.onLabelColor == onLabelColor) && + (identical(other.offLabelColor, offLabelColor) || + other.offLabelColor == offLabelColor) && + (identical(other.splashRadius, splashRadius) || + other.splashRadius == splashRadius) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical(other.overlayColor, overlayColor) || + other.overlayColor == overlayColor) && + (identical(other.thumbColor, thumbColor) || + other.thumbColor == thumbColor) && + (identical(other.trackColor, trackColor) || + other.trackColor == trackColor) && + (identical(other.materialTapTargetSize, materialTapTargetSize) || + other.materialTapTargetSize == materialTapTargetSize) && + (identical(other.trackOutlineColor, trackOutlineColor) || + other.trackOutlineColor == trackOutlineColor) && + (identical(other.trackOutlineWidth, trackOutlineWidth) || + other.trackOutlineWidth == trackOutlineWidth) && + const DeepCollectionEquality().equals(other.thumbIcon, thumbIcon) && + (identical(other.inactiveThumbImage, inactiveThumbImage) || + other.inactiveThumbImage == inactiveThumbImage) && + (identical(other.activeThumbImage, activeThumbImage) || + other.activeThumbImage == activeThumbImage) && + (identical(other.applyTheme, applyTheme) || + other.applyTheme == applyTheme) && + (identical(other.applyCupertinoTheme, applyCupertinoTheme) || + other.applyCupertinoTheme == applyCupertinoTheme)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + switchType, + const DeepCollectionEquality().hash(value), + const DeepCollectionEquality().hash(onChanged), + autofocus, + activeColor, + activeTrackColor, + focusColor, + hoverColor, + inactiveThumbColor, + inactiveTrackColor, + onLabelColor, + offLabelColor, + splashRadius, + dragStartBehavior, + overlayColor, + thumbColor, + trackColor, + materialTapTargetSize, + trackOutlineColor, + trackOutlineWidth, + const DeepCollectionEquality().hash(thumbIcon), + inactiveThumbImage, + activeThumbImage, + applyTheme, + applyCupertinoTheme + ]); + + @override + String toString() { + return 'StacSwitch(switchType: $switchType, value: $value, onChanged: $onChanged, autofocus: $autofocus, activeColor: $activeColor, activeTrackColor: $activeTrackColor, focusColor: $focusColor, hoverColor: $hoverColor, inactiveThumbColor: $inactiveThumbColor, inactiveTrackColor: $inactiveTrackColor, onLabelColor: $onLabelColor, offLabelColor: $offLabelColor, splashRadius: $splashRadius, dragStartBehavior: $dragStartBehavior, overlayColor: $overlayColor, thumbColor: $thumbColor, trackColor: $trackColor, materialTapTargetSize: $materialTapTargetSize, trackOutlineColor: $trackOutlineColor, trackOutlineWidth: $trackOutlineWidth, thumbIcon: $thumbIcon, inactiveThumbImage: $inactiveThumbImage, activeThumbImage: $activeThumbImage, applyTheme: $applyTheme, applyCupertinoTheme: $applyCupertinoTheme)'; + } } /// @nodoc -abstract class $StacSwitchCopyWith<$Res> { +abstract mixin class $StacSwitchCopyWith<$Res> { factory $StacSwitchCopyWith( - StacSwitch value, $Res Function(StacSwitch) then) = - _$StacSwitchCopyWithImpl<$Res, StacSwitch>; + StacSwitch value, $Res Function(StacSwitch) _then) = + _$StacSwitchCopyWithImpl; @useResult $Res call( {StacSwitchType switchType, @@ -98,14 +182,11 @@ abstract class $StacSwitchCopyWith<$Res> { } /// @nodoc -class _$StacSwitchCopyWithImpl<$Res, $Val extends StacSwitch> - implements $StacSwitchCopyWith<$Res> { - _$StacSwitchCopyWithImpl(this._value, this._then); +class _$StacSwitchCopyWithImpl<$Res> implements $StacSwitchCopyWith<$Res> { + _$StacSwitchCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacSwitch _self; + final $Res Function(StacSwitch) _then; /// Create a copy of StacSwitch /// with the given fields replaced by the non-null parameter values. @@ -138,108 +219,108 @@ class _$StacSwitchCopyWithImpl<$Res, $Val extends StacSwitch> Object? applyTheme = freezed, Object? applyCupertinoTheme = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( switchType: null == switchType - ? _value.switchType + ? _self.switchType : switchType // ignore: cast_nullable_to_non_nullable as StacSwitchType, value: freezed == value - ? _value.value + ? _self.value : value // ignore: cast_nullable_to_non_nullable as dynamic, onChanged: freezed == onChanged - ? _value.onChanged + ? _self.onChanged : onChanged // ignore: cast_nullable_to_non_nullable as Map?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, activeColor: freezed == activeColor - ? _value.activeColor + ? _self.activeColor : activeColor // ignore: cast_nullable_to_non_nullable as String?, activeTrackColor: freezed == activeTrackColor - ? _value.activeTrackColor + ? _self.activeTrackColor : activeTrackColor // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, inactiveThumbColor: freezed == inactiveThumbColor - ? _value.inactiveThumbColor + ? _self.inactiveThumbColor : inactiveThumbColor // ignore: cast_nullable_to_non_nullable as String?, inactiveTrackColor: freezed == inactiveTrackColor - ? _value.inactiveTrackColor + ? _self.inactiveTrackColor : inactiveTrackColor // ignore: cast_nullable_to_non_nullable as String?, onLabelColor: freezed == onLabelColor - ? _value.onLabelColor + ? _self.onLabelColor : onLabelColor // ignore: cast_nullable_to_non_nullable as String?, offLabelColor: freezed == offLabelColor - ? _value.offLabelColor + ? _self.offLabelColor : offLabelColor // ignore: cast_nullable_to_non_nullable as String?, splashRadius: freezed == splashRadius - ? _value.splashRadius + ? _self.splashRadius : splashRadius // ignore: cast_nullable_to_non_nullable as double?, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, overlayColor: freezed == overlayColor - ? _value.overlayColor + ? _self.overlayColor : overlayColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, thumbColor: freezed == thumbColor - ? _value.thumbColor + ? _self.thumbColor : thumbColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, trackColor: freezed == trackColor - ? _value.trackColor + ? _self.trackColor : trackColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, materialTapTargetSize: freezed == materialTapTargetSize - ? _value.materialTapTargetSize + ? _self.materialTapTargetSize : materialTapTargetSize // ignore: cast_nullable_to_non_nullable as MaterialTapTargetSize?, trackOutlineColor: freezed == trackOutlineColor - ? _value.trackOutlineColor + ? _self.trackOutlineColor : trackOutlineColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, trackOutlineWidth: freezed == trackOutlineWidth - ? _value.trackOutlineWidth + ? _self.trackOutlineWidth : trackOutlineWidth // ignore: cast_nullable_to_non_nullable as double?, thumbIcon: freezed == thumbIcon - ? _value.thumbIcon + ? _self.thumbIcon : thumbIcon // ignore: cast_nullable_to_non_nullable as Map?, inactiveThumbImage: freezed == inactiveThumbImage - ? _value.inactiveThumbImage + ? _self.inactiveThumbImage : inactiveThumbImage // ignore: cast_nullable_to_non_nullable as String?, activeThumbImage: freezed == activeThumbImage - ? _value.activeThumbImage + ? _self.activeThumbImage : activeThumbImage // ignore: cast_nullable_to_non_nullable as String?, applyTheme: freezed == applyTheme - ? _value.applyTheme + ? _self.applyTheme : applyTheme // ignore: cast_nullable_to_non_nullable as bool?, applyCupertinoTheme: freezed == applyCupertinoTheme - ? _value.applyCupertinoTheme + ? _self.applyCupertinoTheme : applyCupertinoTheme // ignore: cast_nullable_to_non_nullable as bool?, - ) as $Val); + )); } /// Create a copy of StacSwitch @@ -247,12 +328,12 @@ class _$StacSwitchCopyWithImpl<$Res, $Val extends StacSwitch> @override @pragma('vm:prefer-inline') $StacMaterialColorCopyWith<$Res>? get overlayColor { - if (_value.overlayColor == null) { + if (_self.overlayColor == null) { return null; } - return $StacMaterialColorCopyWith<$Res>(_value.overlayColor!, (value) { - return _then(_value.copyWith(overlayColor: value) as $Val); + return $StacMaterialColorCopyWith<$Res>(_self.overlayColor!, (value) { + return _then(_self.copyWith(overlayColor: value)); }); } @@ -261,12 +342,12 @@ class _$StacSwitchCopyWithImpl<$Res, $Val extends StacSwitch> @override @pragma('vm:prefer-inline') $StacMaterialColorCopyWith<$Res>? get thumbColor { - if (_value.thumbColor == null) { + if (_self.thumbColor == null) { return null; } - return $StacMaterialColorCopyWith<$Res>(_value.thumbColor!, (value) { - return _then(_value.copyWith(thumbColor: value) as $Val); + return $StacMaterialColorCopyWith<$Res>(_self.thumbColor!, (value) { + return _then(_self.copyWith(thumbColor: value)); }); } @@ -275,12 +356,12 @@ class _$StacSwitchCopyWithImpl<$Res, $Val extends StacSwitch> @override @pragma('vm:prefer-inline') $StacMaterialColorCopyWith<$Res>? get trackColor { - if (_value.trackColor == null) { + if (_self.trackColor == null) { return null; } - return $StacMaterialColorCopyWith<$Res>(_value.trackColor!, (value) { - return _then(_value.copyWith(trackColor: value) as $Val); + return $StacMaterialColorCopyWith<$Res>(_self.trackColor!, (value) { + return _then(_self.copyWith(trackColor: value)); }); } @@ -289,80 +370,292 @@ class _$StacSwitchCopyWithImpl<$Res, $Val extends StacSwitch> @override @pragma('vm:prefer-inline') $StacMaterialColorCopyWith<$Res>? get trackOutlineColor { - if (_value.trackOutlineColor == null) { + if (_self.trackOutlineColor == null) { return null; } - return $StacMaterialColorCopyWith<$Res>(_value.trackOutlineColor!, (value) { - return _then(_value.copyWith(trackOutlineColor: value) as $Val); + return $StacMaterialColorCopyWith<$Res>(_self.trackOutlineColor!, (value) { + return _then(_self.copyWith(trackOutlineColor: value)); }); } } /// @nodoc -abstract class _$$StacSwitchImplCopyWith<$Res> - implements $StacSwitchCopyWith<$Res> { - factory _$$StacSwitchImplCopyWith( - _$StacSwitchImpl value, $Res Function(_$StacSwitchImpl) then) = - __$$StacSwitchImplCopyWithImpl<$Res>; +@JsonSerializable() +class _StacSwitch implements StacSwitch { + const _StacSwitch( + {this.switchType = StacSwitchType.material, + this.value = false, + final Map? onChanged, + this.autofocus = false, + this.activeColor, + this.activeTrackColor, + this.focusColor, + this.hoverColor, + this.inactiveThumbColor, + this.inactiveTrackColor, + this.onLabelColor, + this.offLabelColor, + this.splashRadius, + this.dragStartBehavior = DragStartBehavior.start, + this.overlayColor, + this.thumbColor, + this.trackColor, + this.materialTapTargetSize, + this.trackOutlineColor, + this.trackOutlineWidth, + final Map? thumbIcon, + this.inactiveThumbImage, + this.activeThumbImage, + this.applyTheme, + this.applyCupertinoTheme}) + : _onChanged = onChanged, + _thumbIcon = thumbIcon; + factory _StacSwitch.fromJson(Map json) => + _$StacSwitchFromJson(json); + @override - @useResult - $Res call( - {StacSwitchType switchType, - dynamic value, - Map? onChanged, - bool autofocus, - String? activeColor, - String? activeTrackColor, - String? focusColor, - String? hoverColor, - String? inactiveThumbColor, - String? inactiveTrackColor, - String? onLabelColor, - String? offLabelColor, - double? splashRadius, - DragStartBehavior dragStartBehavior, - StacMaterialColor? overlayColor, - StacMaterialColor? thumbColor, - StacMaterialColor? trackColor, - MaterialTapTargetSize? materialTapTargetSize, - StacMaterialColor? trackOutlineColor, - double? trackOutlineWidth, - Map? thumbIcon, - String? inactiveThumbImage, - String? activeThumbImage, - bool? applyTheme, - bool? applyCupertinoTheme}); + @JsonKey() + final StacSwitchType switchType; + @override + @JsonKey() + final dynamic value; + final Map? _onChanged; + @override + Map? get onChanged { + final value = _onChanged; + if (value == null) return null; + if (_onChanged is EqualUnmodifiableMapView) return _onChanged; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } @override - $StacMaterialColorCopyWith<$Res>? get overlayColor; + @JsonKey() + final bool autofocus; @override - $StacMaterialColorCopyWith<$Res>? get thumbColor; + final String? activeColor; @override - $StacMaterialColorCopyWith<$Res>? get trackColor; + final String? activeTrackColor; @override - $StacMaterialColorCopyWith<$Res>? get trackOutlineColor; -} + final String? focusColor; + @override + final String? hoverColor; + @override + final String? inactiveThumbColor; + @override + final String? inactiveTrackColor; + @override + final String? onLabelColor; + @override + final String? offLabelColor; + @override + final double? splashRadius; + @override + @JsonKey() + final DragStartBehavior dragStartBehavior; + @override + final StacMaterialColor? overlayColor; + @override + final StacMaterialColor? thumbColor; + @override + final StacMaterialColor? trackColor; + @override + final MaterialTapTargetSize? materialTapTargetSize; + @override + final StacMaterialColor? trackOutlineColor; + @override + final double? trackOutlineWidth; + final Map? _thumbIcon; + @override + Map? get thumbIcon { + final value = _thumbIcon; + if (value == null) return null; + if (_thumbIcon is EqualUnmodifiableMapView) return _thumbIcon; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } -/// @nodoc -class __$$StacSwitchImplCopyWithImpl<$Res> - extends _$StacSwitchCopyWithImpl<$Res, _$StacSwitchImpl> - implements _$$StacSwitchImplCopyWith<$Res> { - __$$StacSwitchImplCopyWithImpl( - _$StacSwitchImpl _value, $Res Function(_$StacSwitchImpl) _then) - : super(_value, _then); + @override + final String? inactiveThumbImage; + @override + final String? activeThumbImage; + @override + final bool? applyTheme; + @override + final bool? applyCupertinoTheme; /// Create a copy of StacSwitch /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') + _$StacSwitchCopyWith<_StacSwitch> get copyWith => + __$StacSwitchCopyWithImpl<_StacSwitch>(this, _$identity); + @override - $Res call({ - Object? switchType = null, - Object? value = freezed, - Object? onChanged = freezed, - Object? autofocus = null, - Object? activeColor = freezed, - Object? activeTrackColor = freezed, + Map toJson() { + return _$StacSwitchToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _StacSwitch && + (identical(other.switchType, switchType) || + other.switchType == switchType) && + const DeepCollectionEquality().equals(other.value, value) && + const DeepCollectionEquality() + .equals(other._onChanged, _onChanged) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.activeColor, activeColor) || + other.activeColor == activeColor) && + (identical(other.activeTrackColor, activeTrackColor) || + other.activeTrackColor == activeTrackColor) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.inactiveThumbColor, inactiveThumbColor) || + other.inactiveThumbColor == inactiveThumbColor) && + (identical(other.inactiveTrackColor, inactiveTrackColor) || + other.inactiveTrackColor == inactiveTrackColor) && + (identical(other.onLabelColor, onLabelColor) || + other.onLabelColor == onLabelColor) && + (identical(other.offLabelColor, offLabelColor) || + other.offLabelColor == offLabelColor) && + (identical(other.splashRadius, splashRadius) || + other.splashRadius == splashRadius) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical(other.overlayColor, overlayColor) || + other.overlayColor == overlayColor) && + (identical(other.thumbColor, thumbColor) || + other.thumbColor == thumbColor) && + (identical(other.trackColor, trackColor) || + other.trackColor == trackColor) && + (identical(other.materialTapTargetSize, materialTapTargetSize) || + other.materialTapTargetSize == materialTapTargetSize) && + (identical(other.trackOutlineColor, trackOutlineColor) || + other.trackOutlineColor == trackOutlineColor) && + (identical(other.trackOutlineWidth, trackOutlineWidth) || + other.trackOutlineWidth == trackOutlineWidth) && + const DeepCollectionEquality() + .equals(other._thumbIcon, _thumbIcon) && + (identical(other.inactiveThumbImage, inactiveThumbImage) || + other.inactiveThumbImage == inactiveThumbImage) && + (identical(other.activeThumbImage, activeThumbImage) || + other.activeThumbImage == activeThumbImage) && + (identical(other.applyTheme, applyTheme) || + other.applyTheme == applyTheme) && + (identical(other.applyCupertinoTheme, applyCupertinoTheme) || + other.applyCupertinoTheme == applyCupertinoTheme)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + switchType, + const DeepCollectionEquality().hash(value), + const DeepCollectionEquality().hash(_onChanged), + autofocus, + activeColor, + activeTrackColor, + focusColor, + hoverColor, + inactiveThumbColor, + inactiveTrackColor, + onLabelColor, + offLabelColor, + splashRadius, + dragStartBehavior, + overlayColor, + thumbColor, + trackColor, + materialTapTargetSize, + trackOutlineColor, + trackOutlineWidth, + const DeepCollectionEquality().hash(_thumbIcon), + inactiveThumbImage, + activeThumbImage, + applyTheme, + applyCupertinoTheme + ]); + + @override + String toString() { + return 'StacSwitch(switchType: $switchType, value: $value, onChanged: $onChanged, autofocus: $autofocus, activeColor: $activeColor, activeTrackColor: $activeTrackColor, focusColor: $focusColor, hoverColor: $hoverColor, inactiveThumbColor: $inactiveThumbColor, inactiveTrackColor: $inactiveTrackColor, onLabelColor: $onLabelColor, offLabelColor: $offLabelColor, splashRadius: $splashRadius, dragStartBehavior: $dragStartBehavior, overlayColor: $overlayColor, thumbColor: $thumbColor, trackColor: $trackColor, materialTapTargetSize: $materialTapTargetSize, trackOutlineColor: $trackOutlineColor, trackOutlineWidth: $trackOutlineWidth, thumbIcon: $thumbIcon, inactiveThumbImage: $inactiveThumbImage, activeThumbImage: $activeThumbImage, applyTheme: $applyTheme, applyCupertinoTheme: $applyCupertinoTheme)'; + } +} + +/// @nodoc +abstract mixin class _$StacSwitchCopyWith<$Res> + implements $StacSwitchCopyWith<$Res> { + factory _$StacSwitchCopyWith( + _StacSwitch value, $Res Function(_StacSwitch) _then) = + __$StacSwitchCopyWithImpl; + @override + @useResult + $Res call( + {StacSwitchType switchType, + dynamic value, + Map? onChanged, + bool autofocus, + String? activeColor, + String? activeTrackColor, + String? focusColor, + String? hoverColor, + String? inactiveThumbColor, + String? inactiveTrackColor, + String? onLabelColor, + String? offLabelColor, + double? splashRadius, + DragStartBehavior dragStartBehavior, + StacMaterialColor? overlayColor, + StacMaterialColor? thumbColor, + StacMaterialColor? trackColor, + MaterialTapTargetSize? materialTapTargetSize, + StacMaterialColor? trackOutlineColor, + double? trackOutlineWidth, + Map? thumbIcon, + String? inactiveThumbImage, + String? activeThumbImage, + bool? applyTheme, + bool? applyCupertinoTheme}); + + @override + $StacMaterialColorCopyWith<$Res>? get overlayColor; + @override + $StacMaterialColorCopyWith<$Res>? get thumbColor; + @override + $StacMaterialColorCopyWith<$Res>? get trackColor; + @override + $StacMaterialColorCopyWith<$Res>? get trackOutlineColor; +} + +/// @nodoc +class __$StacSwitchCopyWithImpl<$Res> implements _$StacSwitchCopyWith<$Res> { + __$StacSwitchCopyWithImpl(this._self, this._then); + + final _StacSwitch _self; + final $Res Function(_StacSwitch) _then; + + /// Create a copy of StacSwitch + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? switchType = null, + Object? value = freezed, + Object? onChanged = freezed, + Object? autofocus = null, + Object? activeColor = freezed, + Object? activeTrackColor = freezed, Object? focusColor = freezed, Object? hoverColor = freezed, Object? inactiveThumbColor = freezed, @@ -383,408 +676,165 @@ class __$$StacSwitchImplCopyWithImpl<$Res> Object? applyTheme = freezed, Object? applyCupertinoTheme = freezed, }) { - return _then(_$StacSwitchImpl( + return _then(_StacSwitch( switchType: null == switchType - ? _value.switchType + ? _self.switchType : switchType // ignore: cast_nullable_to_non_nullable as StacSwitchType, - value: freezed == value ? _value.value! : value, + value: freezed == value + ? _self.value + : value // ignore: cast_nullable_to_non_nullable + as dynamic, onChanged: freezed == onChanged - ? _value._onChanged + ? _self._onChanged : onChanged // ignore: cast_nullable_to_non_nullable as Map?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, activeColor: freezed == activeColor - ? _value.activeColor + ? _self.activeColor : activeColor // ignore: cast_nullable_to_non_nullable as String?, activeTrackColor: freezed == activeTrackColor - ? _value.activeTrackColor + ? _self.activeTrackColor : activeTrackColor // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, inactiveThumbColor: freezed == inactiveThumbColor - ? _value.inactiveThumbColor + ? _self.inactiveThumbColor : inactiveThumbColor // ignore: cast_nullable_to_non_nullable as String?, inactiveTrackColor: freezed == inactiveTrackColor - ? _value.inactiveTrackColor + ? _self.inactiveTrackColor : inactiveTrackColor // ignore: cast_nullable_to_non_nullable as String?, onLabelColor: freezed == onLabelColor - ? _value.onLabelColor + ? _self.onLabelColor : onLabelColor // ignore: cast_nullable_to_non_nullable as String?, offLabelColor: freezed == offLabelColor - ? _value.offLabelColor + ? _self.offLabelColor : offLabelColor // ignore: cast_nullable_to_non_nullable as String?, splashRadius: freezed == splashRadius - ? _value.splashRadius + ? _self.splashRadius : splashRadius // ignore: cast_nullable_to_non_nullable as double?, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, overlayColor: freezed == overlayColor - ? _value.overlayColor + ? _self.overlayColor : overlayColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, thumbColor: freezed == thumbColor - ? _value.thumbColor + ? _self.thumbColor : thumbColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, trackColor: freezed == trackColor - ? _value.trackColor + ? _self.trackColor : trackColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, materialTapTargetSize: freezed == materialTapTargetSize - ? _value.materialTapTargetSize + ? _self.materialTapTargetSize : materialTapTargetSize // ignore: cast_nullable_to_non_nullable as MaterialTapTargetSize?, trackOutlineColor: freezed == trackOutlineColor - ? _value.trackOutlineColor + ? _self.trackOutlineColor : trackOutlineColor // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, trackOutlineWidth: freezed == trackOutlineWidth - ? _value.trackOutlineWidth + ? _self.trackOutlineWidth : trackOutlineWidth // ignore: cast_nullable_to_non_nullable as double?, thumbIcon: freezed == thumbIcon - ? _value._thumbIcon + ? _self._thumbIcon : thumbIcon // ignore: cast_nullable_to_non_nullable as Map?, inactiveThumbImage: freezed == inactiveThumbImage - ? _value.inactiveThumbImage + ? _self.inactiveThumbImage : inactiveThumbImage // ignore: cast_nullable_to_non_nullable as String?, activeThumbImage: freezed == activeThumbImage - ? _value.activeThumbImage + ? _self.activeThumbImage : activeThumbImage // ignore: cast_nullable_to_non_nullable as String?, applyTheme: freezed == applyTheme - ? _value.applyTheme + ? _self.applyTheme : applyTheme // ignore: cast_nullable_to_non_nullable as bool?, applyCupertinoTheme: freezed == applyCupertinoTheme - ? _value.applyCupertinoTheme + ? _self.applyCupertinoTheme : applyCupertinoTheme // ignore: cast_nullable_to_non_nullable as bool?, )); } -} -/// @nodoc -@JsonSerializable() -class _$StacSwitchImpl implements _StacSwitch { - const _$StacSwitchImpl( - {this.switchType = StacSwitchType.material, - this.value = false, - final Map? onChanged, - this.autofocus = false, - this.activeColor, - this.activeTrackColor, - this.focusColor, - this.hoverColor, - this.inactiveThumbColor, - this.inactiveTrackColor, - this.onLabelColor, - this.offLabelColor, - this.splashRadius, - this.dragStartBehavior = DragStartBehavior.start, - this.overlayColor, - this.thumbColor, - this.trackColor, - this.materialTapTargetSize, - this.trackOutlineColor, - this.trackOutlineWidth, - final Map? thumbIcon, - this.inactiveThumbImage, - this.activeThumbImage, - this.applyTheme, - this.applyCupertinoTheme}) - : _onChanged = onChanged, - _thumbIcon = thumbIcon; - - factory _$StacSwitchImpl.fromJson(Map json) => - _$$StacSwitchImplFromJson(json); - - @override - @JsonKey() - final StacSwitchType switchType; - @override - @JsonKey() - final dynamic value; - final Map? _onChanged; + /// Create a copy of StacSwitch + /// with the given fields replaced by the non-null parameter values. @override - Map? get onChanged { - final value = _onChanged; - if (value == null) return null; - if (_onChanged is EqualUnmodifiableMapView) return _onChanged; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } + @pragma('vm:prefer-inline') + $StacMaterialColorCopyWith<$Res>? get overlayColor { + if (_self.overlayColor == null) { + return null; + } - @override - @JsonKey() - final bool autofocus; - @override - final String? activeColor; - @override - final String? activeTrackColor; - @override - final String? focusColor; - @override - final String? hoverColor; - @override - final String? inactiveThumbColor; - @override - final String? inactiveTrackColor; - @override - final String? onLabelColor; - @override - final String? offLabelColor; - @override - final double? splashRadius; - @override - @JsonKey() - final DragStartBehavior dragStartBehavior; - @override - final StacMaterialColor? overlayColor; - @override - final StacMaterialColor? thumbColor; - @override - final StacMaterialColor? trackColor; - @override - final MaterialTapTargetSize? materialTapTargetSize; - @override - final StacMaterialColor? trackOutlineColor; - @override - final double? trackOutlineWidth; - final Map? _thumbIcon; - @override - Map? get thumbIcon { - final value = _thumbIcon; - if (value == null) return null; - if (_thumbIcon is EqualUnmodifiableMapView) return _thumbIcon; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); + return $StacMaterialColorCopyWith<$Res>(_self.overlayColor!, (value) { + return _then(_self.copyWith(overlayColor: value)); + }); } + /// Create a copy of StacSwitch + /// with the given fields replaced by the non-null parameter values. @override - final String? inactiveThumbImage; - @override - final String? activeThumbImage; - @override - final bool? applyTheme; - @override - final bool? applyCupertinoTheme; - - @override - String toString() { - return 'StacSwitch(switchType: $switchType, value: $value, onChanged: $onChanged, autofocus: $autofocus, activeColor: $activeColor, activeTrackColor: $activeTrackColor, focusColor: $focusColor, hoverColor: $hoverColor, inactiveThumbColor: $inactiveThumbColor, inactiveTrackColor: $inactiveTrackColor, onLabelColor: $onLabelColor, offLabelColor: $offLabelColor, splashRadius: $splashRadius, dragStartBehavior: $dragStartBehavior, overlayColor: $overlayColor, thumbColor: $thumbColor, trackColor: $trackColor, materialTapTargetSize: $materialTapTargetSize, trackOutlineColor: $trackOutlineColor, trackOutlineWidth: $trackOutlineWidth, thumbIcon: $thumbIcon, inactiveThumbImage: $inactiveThumbImage, activeThumbImage: $activeThumbImage, applyTheme: $applyTheme, applyCupertinoTheme: $applyCupertinoTheme)'; - } + @pragma('vm:prefer-inline') + $StacMaterialColorCopyWith<$Res>? get thumbColor { + if (_self.thumbColor == null) { + return null; + } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$StacSwitchImpl && - (identical(other.switchType, switchType) || - other.switchType == switchType) && - const DeepCollectionEquality().equals(other.value, value) && - const DeepCollectionEquality() - .equals(other._onChanged, _onChanged) && - (identical(other.autofocus, autofocus) || - other.autofocus == autofocus) && - (identical(other.activeColor, activeColor) || - other.activeColor == activeColor) && - (identical(other.activeTrackColor, activeTrackColor) || - other.activeTrackColor == activeTrackColor) && - (identical(other.focusColor, focusColor) || - other.focusColor == focusColor) && - (identical(other.hoverColor, hoverColor) || - other.hoverColor == hoverColor) && - (identical(other.inactiveThumbColor, inactiveThumbColor) || - other.inactiveThumbColor == inactiveThumbColor) && - (identical(other.inactiveTrackColor, inactiveTrackColor) || - other.inactiveTrackColor == inactiveTrackColor) && - (identical(other.onLabelColor, onLabelColor) || - other.onLabelColor == onLabelColor) && - (identical(other.offLabelColor, offLabelColor) || - other.offLabelColor == offLabelColor) && - (identical(other.splashRadius, splashRadius) || - other.splashRadius == splashRadius) && - (identical(other.dragStartBehavior, dragStartBehavior) || - other.dragStartBehavior == dragStartBehavior) && - (identical(other.overlayColor, overlayColor) || - other.overlayColor == overlayColor) && - (identical(other.thumbColor, thumbColor) || - other.thumbColor == thumbColor) && - (identical(other.trackColor, trackColor) || - other.trackColor == trackColor) && - (identical(other.materialTapTargetSize, materialTapTargetSize) || - other.materialTapTargetSize == materialTapTargetSize) && - (identical(other.trackOutlineColor, trackOutlineColor) || - other.trackOutlineColor == trackOutlineColor) && - (identical(other.trackOutlineWidth, trackOutlineWidth) || - other.trackOutlineWidth == trackOutlineWidth) && - const DeepCollectionEquality() - .equals(other._thumbIcon, _thumbIcon) && - (identical(other.inactiveThumbImage, inactiveThumbImage) || - other.inactiveThumbImage == inactiveThumbImage) && - (identical(other.activeThumbImage, activeThumbImage) || - other.activeThumbImage == activeThumbImage) && - (identical(other.applyTheme, applyTheme) || - other.applyTheme == applyTheme) && - (identical(other.applyCupertinoTheme, applyCupertinoTheme) || - other.applyCupertinoTheme == applyCupertinoTheme)); + return $StacMaterialColorCopyWith<$Res>(_self.thumbColor!, (value) { + return _then(_self.copyWith(thumbColor: value)); + }); } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hashAll([ - runtimeType, - switchType, - const DeepCollectionEquality().hash(value), - const DeepCollectionEquality().hash(_onChanged), - autofocus, - activeColor, - activeTrackColor, - focusColor, - hoverColor, - inactiveThumbColor, - inactiveTrackColor, - onLabelColor, - offLabelColor, - splashRadius, - dragStartBehavior, - overlayColor, - thumbColor, - trackColor, - materialTapTargetSize, - trackOutlineColor, - trackOutlineWidth, - const DeepCollectionEquality().hash(_thumbIcon), - inactiveThumbImage, - activeThumbImage, - applyTheme, - applyCupertinoTheme - ]); - /// Create a copy of StacSwitch /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacSwitchImplCopyWith<_$StacSwitchImpl> get copyWith => - __$$StacSwitchImplCopyWithImpl<_$StacSwitchImpl>(this, _$identity); + $StacMaterialColorCopyWith<$Res>? get trackColor { + if (_self.trackColor == null) { + return null; + } - @override - Map toJson() { - return _$$StacSwitchImplToJson( - this, - ); + return $StacMaterialColorCopyWith<$Res>(_self.trackColor!, (value) { + return _then(_self.copyWith(trackColor: value)); + }); } -} - -abstract class _StacSwitch implements StacSwitch { - const factory _StacSwitch( - {final StacSwitchType switchType, - final dynamic value, - final Map? onChanged, - final bool autofocus, - final String? activeColor, - final String? activeTrackColor, - final String? focusColor, - final String? hoverColor, - final String? inactiveThumbColor, - final String? inactiveTrackColor, - final String? onLabelColor, - final String? offLabelColor, - final double? splashRadius, - final DragStartBehavior dragStartBehavior, - final StacMaterialColor? overlayColor, - final StacMaterialColor? thumbColor, - final StacMaterialColor? trackColor, - final MaterialTapTargetSize? materialTapTargetSize, - final StacMaterialColor? trackOutlineColor, - final double? trackOutlineWidth, - final Map? thumbIcon, - final String? inactiveThumbImage, - final String? activeThumbImage, - final bool? applyTheme, - final bool? applyCupertinoTheme}) = _$StacSwitchImpl; - - factory _StacSwitch.fromJson(Map json) = - _$StacSwitchImpl.fromJson; - - @override - StacSwitchType get switchType; - @override - dynamic get value; - @override - Map? get onChanged; - @override - bool get autofocus; - @override - String? get activeColor; - @override - String? get activeTrackColor; - @override - String? get focusColor; - @override - String? get hoverColor; - @override - String? get inactiveThumbColor; - @override - String? get inactiveTrackColor; - @override - String? get onLabelColor; - @override - String? get offLabelColor; - @override - double? get splashRadius; - @override - DragStartBehavior get dragStartBehavior; - @override - StacMaterialColor? get overlayColor; - @override - StacMaterialColor? get thumbColor; - @override - StacMaterialColor? get trackColor; - @override - MaterialTapTargetSize? get materialTapTargetSize; - @override - StacMaterialColor? get trackOutlineColor; - @override - double? get trackOutlineWidth; - @override - Map? get thumbIcon; - @override - String? get inactiveThumbImage; - @override - String? get activeThumbImage; - @override - bool? get applyTheme; - @override - bool? get applyCupertinoTheme; /// Create a copy of StacSwitch /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSwitchImplCopyWith<_$StacSwitchImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacMaterialColorCopyWith<$Res>? get trackOutlineColor { + if (_self.trackOutlineColor == null) { + return null; + } + + return $StacMaterialColorCopyWith<$Res>(_self.trackOutlineColor!, (value) { + return _then(_self.copyWith(trackOutlineColor: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_switch/stac_switch.g.dart b/packages/stac/lib/src/parsers/stac_switch/stac_switch.g.dart index 723ba8ef..aca95e3b 100644 --- a/packages/stac/lib/src/parsers/stac_switch/stac_switch.g.dart +++ b/packages/stac/lib/src/parsers/stac_switch/stac_switch.g.dart @@ -6,8 +6,7 @@ part of 'stac_switch.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSwitchImpl _$$StacSwitchImplFromJson(Map json) => - _$StacSwitchImpl( +_StacSwitch _$StacSwitchFromJson(Map json) => _StacSwitch( switchType: $enumDecodeNullable(_$StacSwitchTypeEnumMap, json['switchType']) ?? StacSwitchType.material, @@ -52,7 +51,7 @@ _$StacSwitchImpl _$$StacSwitchImplFromJson(Map json) => applyCupertinoTheme: json['applyCupertinoTheme'] as bool?, ); -Map _$$StacSwitchImplToJson(_$StacSwitchImpl instance) => +Map _$StacSwitchToJson(_StacSwitch instance) => { 'switchType': _$StacSwitchTypeEnumMap[instance.switchType]!, 'value': instance.value, diff --git a/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.dart b/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.dart index 145016cd..ca8854d3 100644 --- a/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.dart +++ b/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.dart @@ -7,7 +7,7 @@ part 'stac_system_ui_overlay_style.freezed.dart'; part 'stac_system_ui_overlay_style.g.dart'; @freezed -class StacSystemUIOverlayStyle with _$StacSystemUIOverlayStyle { +abstract class StacSystemUIOverlayStyle with _$StacSystemUIOverlayStyle { const factory StacSystemUIOverlayStyle({ String? systemNavigationBarColor, String? systemNavigationBarDividerColor, diff --git a/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.freezed.dart b/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.freezed.dart index cb5e7a86..a08f3562 100644 --- a/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,132 +10,86 @@ part of 'stac_system_ui_overlay_style.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacSystemUIOverlayStyle _$StacSystemUIOverlayStyleFromJson( - Map json) { - return _StacSystemUIOverlayStyle.fromJson(json); -} - /// @nodoc mixin _$StacSystemUIOverlayStyle { - String? get systemNavigationBarColor => throw _privateConstructorUsedError; - String? get systemNavigationBarDividerColor => - throw _privateConstructorUsedError; - Brightness? get systemNavigationBarIconBrightness => - throw _privateConstructorUsedError; - bool? get systemNavigationBarContrastEnforced => - throw _privateConstructorUsedError; - String? get statusBarColor => throw _privateConstructorUsedError; - Brightness? get statusBarBrightness => throw _privateConstructorUsedError; - Brightness? get statusBarIconBrightness => throw _privateConstructorUsedError; - bool? get systemStatusBarContrastEnforced => - throw _privateConstructorUsedError; - - /// Serializes this StacSystemUIOverlayStyle to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get systemNavigationBarColor; + String? get systemNavigationBarDividerColor; + Brightness? get systemNavigationBarIconBrightness; + bool? get systemNavigationBarContrastEnforced; + String? get statusBarColor; + Brightness? get statusBarBrightness; + Brightness? get statusBarIconBrightness; + bool? get systemStatusBarContrastEnforced; /// Create a copy of StacSystemUIOverlayStyle /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacSystemUIOverlayStyleCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacSystemUIOverlayStyleCopyWithImpl( + this as StacSystemUIOverlayStyle, _$identity); -/// @nodoc -abstract class $StacSystemUIOverlayStyleCopyWith<$Res> { - factory $StacSystemUIOverlayStyleCopyWith(StacSystemUIOverlayStyle value, - $Res Function(StacSystemUIOverlayStyle) then) = - _$StacSystemUIOverlayStyleCopyWithImpl<$Res, StacSystemUIOverlayStyle>; - @useResult - $Res call( - {String? systemNavigationBarColor, - String? systemNavigationBarDividerColor, - Brightness? systemNavigationBarIconBrightness, - bool? systemNavigationBarContrastEnforced, - String? statusBarColor, - Brightness? statusBarBrightness, - Brightness? statusBarIconBrightness, - bool? systemStatusBarContrastEnforced}); -} + /// Serializes this StacSystemUIOverlayStyle to a JSON map. + Map toJson(); -/// @nodoc -class _$StacSystemUIOverlayStyleCopyWithImpl<$Res, - $Val extends StacSystemUIOverlayStyle> - implements $StacSystemUIOverlayStyleCopyWith<$Res> { - _$StacSystemUIOverlayStyleCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacSystemUIOverlayStyle && + (identical(other.systemNavigationBarColor, systemNavigationBarColor) || + other.systemNavigationBarColor == systemNavigationBarColor) && + (identical(other.systemNavigationBarDividerColor, + systemNavigationBarDividerColor) || + other.systemNavigationBarDividerColor == + systemNavigationBarDividerColor) && + (identical(other.systemNavigationBarIconBrightness, + systemNavigationBarIconBrightness) || + other.systemNavigationBarIconBrightness == + systemNavigationBarIconBrightness) && + (identical(other.systemNavigationBarContrastEnforced, + systemNavigationBarContrastEnforced) || + other.systemNavigationBarContrastEnforced == + systemNavigationBarContrastEnforced) && + (identical(other.statusBarColor, statusBarColor) || + other.statusBarColor == statusBarColor) && + (identical(other.statusBarBrightness, statusBarBrightness) || + other.statusBarBrightness == statusBarBrightness) && + (identical(other.statusBarIconBrightness, statusBarIconBrightness) || + other.statusBarIconBrightness == statusBarIconBrightness) && + (identical(other.systemStatusBarContrastEnforced, + systemStatusBarContrastEnforced) || + other.systemStatusBarContrastEnforced == + systemStatusBarContrastEnforced)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + systemNavigationBarColor, + systemNavigationBarDividerColor, + systemNavigationBarIconBrightness, + systemNavigationBarContrastEnforced, + statusBarColor, + statusBarBrightness, + statusBarIconBrightness, + systemStatusBarContrastEnforced); - /// Create a copy of StacSystemUIOverlayStyle - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? systemNavigationBarColor = freezed, - Object? systemNavigationBarDividerColor = freezed, - Object? systemNavigationBarIconBrightness = freezed, - Object? systemNavigationBarContrastEnforced = freezed, - Object? statusBarColor = freezed, - Object? statusBarBrightness = freezed, - Object? statusBarIconBrightness = freezed, - Object? systemStatusBarContrastEnforced = freezed, - }) { - return _then(_value.copyWith( - systemNavigationBarColor: freezed == systemNavigationBarColor - ? _value.systemNavigationBarColor - : systemNavigationBarColor // ignore: cast_nullable_to_non_nullable - as String?, - systemNavigationBarDividerColor: freezed == - systemNavigationBarDividerColor - ? _value.systemNavigationBarDividerColor - : systemNavigationBarDividerColor // ignore: cast_nullable_to_non_nullable - as String?, - systemNavigationBarIconBrightness: freezed == - systemNavigationBarIconBrightness - ? _value.systemNavigationBarIconBrightness - : systemNavigationBarIconBrightness // ignore: cast_nullable_to_non_nullable - as Brightness?, - systemNavigationBarContrastEnforced: freezed == - systemNavigationBarContrastEnforced - ? _value.systemNavigationBarContrastEnforced - : systemNavigationBarContrastEnforced // ignore: cast_nullable_to_non_nullable - as bool?, - statusBarColor: freezed == statusBarColor - ? _value.statusBarColor - : statusBarColor // ignore: cast_nullable_to_non_nullable - as String?, - statusBarBrightness: freezed == statusBarBrightness - ? _value.statusBarBrightness - : statusBarBrightness // ignore: cast_nullable_to_non_nullable - as Brightness?, - statusBarIconBrightness: freezed == statusBarIconBrightness - ? _value.statusBarIconBrightness - : statusBarIconBrightness // ignore: cast_nullable_to_non_nullable - as Brightness?, - systemStatusBarContrastEnforced: freezed == - systemStatusBarContrastEnforced - ? _value.systemStatusBarContrastEnforced - : systemStatusBarContrastEnforced // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + String toString() { + return 'StacSystemUIOverlayStyle(systemNavigationBarColor: $systemNavigationBarColor, systemNavigationBarDividerColor: $systemNavigationBarDividerColor, systemNavigationBarIconBrightness: $systemNavigationBarIconBrightness, systemNavigationBarContrastEnforced: $systemNavigationBarContrastEnforced, statusBarColor: $statusBarColor, statusBarBrightness: $statusBarBrightness, statusBarIconBrightness: $statusBarIconBrightness, systemStatusBarContrastEnforced: $systemStatusBarContrastEnforced)'; } } /// @nodoc -abstract class _$$StacSystemUIOverlayStyleImplCopyWith<$Res> - implements $StacSystemUIOverlayStyleCopyWith<$Res> { - factory _$$StacSystemUIOverlayStyleImplCopyWith( - _$StacSystemUIOverlayStyleImpl value, - $Res Function(_$StacSystemUIOverlayStyleImpl) then) = - __$$StacSystemUIOverlayStyleImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacSystemUIOverlayStyleCopyWith<$Res> { + factory $StacSystemUIOverlayStyleCopyWith(StacSystemUIOverlayStyle value, + $Res Function(StacSystemUIOverlayStyle) _then) = + _$StacSystemUIOverlayStyleCopyWithImpl; @useResult $Res call( {String? systemNavigationBarColor, @@ -148,14 +103,12 @@ abstract class _$$StacSystemUIOverlayStyleImplCopyWith<$Res> } /// @nodoc -class __$$StacSystemUIOverlayStyleImplCopyWithImpl<$Res> - extends _$StacSystemUIOverlayStyleCopyWithImpl<$Res, - _$StacSystemUIOverlayStyleImpl> - implements _$$StacSystemUIOverlayStyleImplCopyWith<$Res> { - __$$StacSystemUIOverlayStyleImplCopyWithImpl( - _$StacSystemUIOverlayStyleImpl _value, - $Res Function(_$StacSystemUIOverlayStyleImpl) _then) - : super(_value, _then); +class _$StacSystemUIOverlayStyleCopyWithImpl<$Res> + implements $StacSystemUIOverlayStyleCopyWith<$Res> { + _$StacSystemUIOverlayStyleCopyWithImpl(this._self, this._then); + + final StacSystemUIOverlayStyle _self; + final $Res Function(StacSystemUIOverlayStyle) _then; /// Create a copy of StacSystemUIOverlayStyle /// with the given fields replaced by the non-null parameter values. @@ -171,41 +124,41 @@ class __$$StacSystemUIOverlayStyleImplCopyWithImpl<$Res> Object? statusBarIconBrightness = freezed, Object? systemStatusBarContrastEnforced = freezed, }) { - return _then(_$StacSystemUIOverlayStyleImpl( + return _then(_self.copyWith( systemNavigationBarColor: freezed == systemNavigationBarColor - ? _value.systemNavigationBarColor + ? _self.systemNavigationBarColor : systemNavigationBarColor // ignore: cast_nullable_to_non_nullable as String?, systemNavigationBarDividerColor: freezed == systemNavigationBarDividerColor - ? _value.systemNavigationBarDividerColor + ? _self.systemNavigationBarDividerColor : systemNavigationBarDividerColor // ignore: cast_nullable_to_non_nullable as String?, systemNavigationBarIconBrightness: freezed == systemNavigationBarIconBrightness - ? _value.systemNavigationBarIconBrightness + ? _self.systemNavigationBarIconBrightness : systemNavigationBarIconBrightness // ignore: cast_nullable_to_non_nullable as Brightness?, systemNavigationBarContrastEnforced: freezed == systemNavigationBarContrastEnforced - ? _value.systemNavigationBarContrastEnforced + ? _self.systemNavigationBarContrastEnforced : systemNavigationBarContrastEnforced // ignore: cast_nullable_to_non_nullable as bool?, statusBarColor: freezed == statusBarColor - ? _value.statusBarColor + ? _self.statusBarColor : statusBarColor // ignore: cast_nullable_to_non_nullable as String?, statusBarBrightness: freezed == statusBarBrightness - ? _value.statusBarBrightness + ? _self.statusBarBrightness : statusBarBrightness // ignore: cast_nullable_to_non_nullable as Brightness?, statusBarIconBrightness: freezed == statusBarIconBrightness - ? _value.statusBarIconBrightness + ? _self.statusBarIconBrightness : statusBarIconBrightness // ignore: cast_nullable_to_non_nullable as Brightness?, systemStatusBarContrastEnforced: freezed == systemStatusBarContrastEnforced - ? _value.systemStatusBarContrastEnforced + ? _self.systemStatusBarContrastEnforced : systemStatusBarContrastEnforced // ignore: cast_nullable_to_non_nullable as bool?, )); @@ -214,8 +167,8 @@ class __$$StacSystemUIOverlayStyleImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacSystemUIOverlayStyleImpl implements _StacSystemUIOverlayStyle { - const _$StacSystemUIOverlayStyleImpl( +class _StacSystemUIOverlayStyle implements StacSystemUIOverlayStyle { + const _StacSystemUIOverlayStyle( {this.systemNavigationBarColor, this.systemNavigationBarDividerColor, this.systemNavigationBarIconBrightness, @@ -224,9 +177,8 @@ class _$StacSystemUIOverlayStyleImpl implements _StacSystemUIOverlayStyle { this.statusBarBrightness, this.statusBarIconBrightness, this.systemStatusBarContrastEnforced}); - - factory _$StacSystemUIOverlayStyleImpl.fromJson(Map json) => - _$$StacSystemUIOverlayStyleImplFromJson(json); + factory _StacSystemUIOverlayStyle.fromJson(Map json) => + _$StacSystemUIOverlayStyleFromJson(json); @override final String? systemNavigationBarColor; @@ -245,16 +197,27 @@ class _$StacSystemUIOverlayStyleImpl implements _StacSystemUIOverlayStyle { @override final bool? systemStatusBarContrastEnforced; + /// Create a copy of StacSystemUIOverlayStyle + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacSystemUIOverlayStyle(systemNavigationBarColor: $systemNavigationBarColor, systemNavigationBarDividerColor: $systemNavigationBarDividerColor, systemNavigationBarIconBrightness: $systemNavigationBarIconBrightness, systemNavigationBarContrastEnforced: $systemNavigationBarContrastEnforced, statusBarColor: $statusBarColor, statusBarBrightness: $statusBarBrightness, statusBarIconBrightness: $statusBarIconBrightness, systemStatusBarContrastEnforced: $systemStatusBarContrastEnforced)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacSystemUIOverlayStyleCopyWith<_StacSystemUIOverlayStyle> get copyWith => + __$StacSystemUIOverlayStyleCopyWithImpl<_StacSystemUIOverlayStyle>( + this, _$identity); + + @override + Map toJson() { + return _$StacSystemUIOverlayStyleToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacSystemUIOverlayStyleImpl && + other is _StacSystemUIOverlayStyle && (identical(other.systemNavigationBarColor, systemNavigationBarColor) || other.systemNavigationBarColor == systemNavigationBarColor) && (identical(other.systemNavigationBarDividerColor, @@ -294,59 +257,92 @@ class _$StacSystemUIOverlayStyleImpl implements _StacSystemUIOverlayStyle { statusBarIconBrightness, systemStatusBarContrastEnforced); - /// Create a copy of StacSystemUIOverlayStyle - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacSystemUIOverlayStyleImplCopyWith<_$StacSystemUIOverlayStyleImpl> - get copyWith => __$$StacSystemUIOverlayStyleImplCopyWithImpl< - _$StacSystemUIOverlayStyleImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacSystemUIOverlayStyleImplToJson( - this, - ); + String toString() { + return 'StacSystemUIOverlayStyle(systemNavigationBarColor: $systemNavigationBarColor, systemNavigationBarDividerColor: $systemNavigationBarDividerColor, systemNavigationBarIconBrightness: $systemNavigationBarIconBrightness, systemNavigationBarContrastEnforced: $systemNavigationBarContrastEnforced, statusBarColor: $statusBarColor, statusBarBrightness: $statusBarBrightness, statusBarIconBrightness: $statusBarIconBrightness, systemStatusBarContrastEnforced: $systemStatusBarContrastEnforced)'; } } -abstract class _StacSystemUIOverlayStyle implements StacSystemUIOverlayStyle { - const factory _StacSystemUIOverlayStyle( - {final String? systemNavigationBarColor, - final String? systemNavigationBarDividerColor, - final Brightness? systemNavigationBarIconBrightness, - final bool? systemNavigationBarContrastEnforced, - final String? statusBarColor, - final Brightness? statusBarBrightness, - final Brightness? statusBarIconBrightness, - final bool? systemStatusBarContrastEnforced}) = - _$StacSystemUIOverlayStyleImpl; +/// @nodoc +abstract mixin class _$StacSystemUIOverlayStyleCopyWith<$Res> + implements $StacSystemUIOverlayStyleCopyWith<$Res> { + factory _$StacSystemUIOverlayStyleCopyWith(_StacSystemUIOverlayStyle value, + $Res Function(_StacSystemUIOverlayStyle) _then) = + __$StacSystemUIOverlayStyleCopyWithImpl; + @override + @useResult + $Res call( + {String? systemNavigationBarColor, + String? systemNavigationBarDividerColor, + Brightness? systemNavigationBarIconBrightness, + bool? systemNavigationBarContrastEnforced, + String? statusBarColor, + Brightness? statusBarBrightness, + Brightness? statusBarIconBrightness, + bool? systemStatusBarContrastEnforced}); +} - factory _StacSystemUIOverlayStyle.fromJson(Map json) = - _$StacSystemUIOverlayStyleImpl.fromJson; +/// @nodoc +class __$StacSystemUIOverlayStyleCopyWithImpl<$Res> + implements _$StacSystemUIOverlayStyleCopyWith<$Res> { + __$StacSystemUIOverlayStyleCopyWithImpl(this._self, this._then); - @override - String? get systemNavigationBarColor; - @override - String? get systemNavigationBarDividerColor; - @override - Brightness? get systemNavigationBarIconBrightness; - @override - bool? get systemNavigationBarContrastEnforced; - @override - String? get statusBarColor; - @override - Brightness? get statusBarBrightness; - @override - Brightness? get statusBarIconBrightness; - @override - bool? get systemStatusBarContrastEnforced; + final _StacSystemUIOverlayStyle _self; + final $Res Function(_StacSystemUIOverlayStyle) _then; /// Create a copy of StacSystemUIOverlayStyle /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacSystemUIOverlayStyleImplCopyWith<_$StacSystemUIOverlayStyleImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? systemNavigationBarColor = freezed, + Object? systemNavigationBarDividerColor = freezed, + Object? systemNavigationBarIconBrightness = freezed, + Object? systemNavigationBarContrastEnforced = freezed, + Object? statusBarColor = freezed, + Object? statusBarBrightness = freezed, + Object? statusBarIconBrightness = freezed, + Object? systemStatusBarContrastEnforced = freezed, + }) { + return _then(_StacSystemUIOverlayStyle( + systemNavigationBarColor: freezed == systemNavigationBarColor + ? _self.systemNavigationBarColor + : systemNavigationBarColor // ignore: cast_nullable_to_non_nullable + as String?, + systemNavigationBarDividerColor: freezed == + systemNavigationBarDividerColor + ? _self.systemNavigationBarDividerColor + : systemNavigationBarDividerColor // ignore: cast_nullable_to_non_nullable + as String?, + systemNavigationBarIconBrightness: freezed == + systemNavigationBarIconBrightness + ? _self.systemNavigationBarIconBrightness + : systemNavigationBarIconBrightness // ignore: cast_nullable_to_non_nullable + as Brightness?, + systemNavigationBarContrastEnforced: freezed == + systemNavigationBarContrastEnforced + ? _self.systemNavigationBarContrastEnforced + : systemNavigationBarContrastEnforced // ignore: cast_nullable_to_non_nullable + as bool?, + statusBarColor: freezed == statusBarColor + ? _self.statusBarColor + : statusBarColor // ignore: cast_nullable_to_non_nullable + as String?, + statusBarBrightness: freezed == statusBarBrightness + ? _self.statusBarBrightness + : statusBarBrightness // ignore: cast_nullable_to_non_nullable + as Brightness?, + statusBarIconBrightness: freezed == statusBarIconBrightness + ? _self.statusBarIconBrightness + : statusBarIconBrightness // ignore: cast_nullable_to_non_nullable + as Brightness?, + systemStatusBarContrastEnforced: freezed == + systemStatusBarContrastEnforced + ? _self.systemStatusBarContrastEnforced + : systemStatusBarContrastEnforced // ignore: cast_nullable_to_non_nullable + as bool?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.g.dart b/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.g.dart index d3f4c8ee..f439a7ae 100644 --- a/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.g.dart +++ b/packages/stac/lib/src/parsers/stac_system_ui_olverlay_style/stac_system_ui_overlay_style.g.dart @@ -6,9 +6,9 @@ part of 'stac_system_ui_overlay_style.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacSystemUIOverlayStyleImpl _$$StacSystemUIOverlayStyleImplFromJson( +_StacSystemUIOverlayStyle _$StacSystemUIOverlayStyleFromJson( Map json) => - _$StacSystemUIOverlayStyleImpl( + _StacSystemUIOverlayStyle( systemNavigationBarColor: json['systemNavigationBarColor'] as String?, systemNavigationBarDividerColor: json['systemNavigationBarDividerColor'] as String?, @@ -25,8 +25,8 @@ _$StacSystemUIOverlayStyleImpl _$$StacSystemUIOverlayStyleImplFromJson( json['systemStatusBarContrastEnforced'] as bool?, ); -Map _$$StacSystemUIOverlayStyleImplToJson( - _$StacSystemUIOverlayStyleImpl instance) => +Map _$StacSystemUIOverlayStyleToJson( + _StacSystemUIOverlayStyle instance) => { 'systemNavigationBarColor': instance.systemNavigationBarColor, 'systemNavigationBarDividerColor': diff --git a/packages/stac/lib/src/parsers/stac_tab/stac_tab.dart b/packages/stac/lib/src/parsers/stac_tab/stac_tab.dart index a8a73c69..03f8693a 100644 --- a/packages/stac/lib/src/parsers/stac_tab/stac_tab.dart +++ b/packages/stac/lib/src/parsers/stac_tab/stac_tab.dart @@ -7,7 +7,7 @@ part 'stac_tab.freezed.dart'; part 'stac_tab.g.dart'; @freezed -class StacTab with _$StacTab { +abstract class StacTab with _$StacTab { const factory StacTab({ String? text, Map? icon, diff --git a/packages/stac/lib/src/parsers/stac_tab/stac_tab.freezed.dart b/packages/stac/lib/src/parsers/stac_tab/stac_tab.freezed.dart index a59b9f0f..f4b2c3fa 100644 --- a/packages/stac/lib/src/parsers/stac_tab/stac_tab.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_tab/stac_tab.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,36 +10,60 @@ part of 'stac_tab.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTab _$StacTabFromJson(Map json) { - return _StacTab.fromJson(json); -} - /// @nodoc mixin _$StacTab { - String? get text => throw _privateConstructorUsedError; - Map? get icon => throw _privateConstructorUsedError; - StacEdgeInsets? get iconMargin => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacTab to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get text; + Map? get icon; + StacEdgeInsets? get iconMargin; + double? get height; + Map? get child; /// Create a copy of StacTab /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $StacTabCopyWith get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTabCopyWith get copyWith => + _$StacTabCopyWithImpl(this as StacTab, _$identity); + + /// Serializes this StacTab to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTab && + (identical(other.text, text) || other.text == text) && + const DeepCollectionEquality().equals(other.icon, icon) && + (identical(other.iconMargin, iconMargin) || + other.iconMargin == iconMargin) && + (identical(other.height, height) || other.height == height) && + const DeepCollectionEquality().equals(other.child, child)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + text, + const DeepCollectionEquality().hash(icon), + iconMargin, + height, + const DeepCollectionEquality().hash(child)); + + @override + String toString() { + return 'StacTab(text: $text, icon: $icon, iconMargin: $iconMargin, height: $height, child: $child)'; + } } /// @nodoc -abstract class $StacTabCopyWith<$Res> { - factory $StacTabCopyWith(StacTab value, $Res Function(StacTab) then) = - _$StacTabCopyWithImpl<$Res, StacTab>; +abstract mixin class $StacTabCopyWith<$Res> { + factory $StacTabCopyWith(StacTab value, $Res Function(StacTab) _then) = + _$StacTabCopyWithImpl; @useResult $Res call( {String? text, @@ -51,14 +76,11 @@ abstract class $StacTabCopyWith<$Res> { } /// @nodoc -class _$StacTabCopyWithImpl<$Res, $Val extends StacTab> - implements $StacTabCopyWith<$Res> { - _$StacTabCopyWithImpl(this._value, this._then); +class _$StacTabCopyWithImpl<$Res> implements $StacTabCopyWith<$Res> { + _$StacTabCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTab _self; + final $Res Function(StacTab) _then; /// Create a copy of StacTab /// with the given fields replaced by the non-null parameter values. @@ -71,28 +93,28 @@ class _$StacTabCopyWithImpl<$Res, $Val extends StacTab> Object? height = freezed, Object? child = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( text: freezed == text - ? _value.text + ? _self.text : text // ignore: cast_nullable_to_non_nullable as String?, icon: freezed == icon - ? _value.icon + ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as Map?, iconMargin: freezed == iconMargin - ? _value.iconMargin + ? _self.iconMargin : iconMargin // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, child: freezed == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, - ) as $Val); + )); } /// Create a copy of StacTab @@ -100,82 +122,20 @@ class _$StacTabCopyWithImpl<$Res, $Val extends StacTab> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get iconMargin { - if (_value.iconMargin == null) { + if (_self.iconMargin == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.iconMargin!, (value) { - return _then(_value.copyWith(iconMargin: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.iconMargin!, (value) { + return _then(_self.copyWith(iconMargin: value)); }); } } -/// @nodoc -abstract class _$$StacTabImplCopyWith<$Res> implements $StacTabCopyWith<$Res> { - factory _$$StacTabImplCopyWith( - _$StacTabImpl value, $Res Function(_$StacTabImpl) then) = - __$$StacTabImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? text, - Map? icon, - StacEdgeInsets? iconMargin, - double? height, - Map? child}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get iconMargin; -} - -/// @nodoc -class __$$StacTabImplCopyWithImpl<$Res> - extends _$StacTabCopyWithImpl<$Res, _$StacTabImpl> - implements _$$StacTabImplCopyWith<$Res> { - __$$StacTabImplCopyWithImpl( - _$StacTabImpl _value, $Res Function(_$StacTabImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTab - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? text = freezed, - Object? icon = freezed, - Object? iconMargin = freezed, - Object? height = freezed, - Object? child = freezed, - }) { - return _then(_$StacTabImpl( - text: freezed == text - ? _value.text - : text // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value._icon - : icon // ignore: cast_nullable_to_non_nullable - as Map?, - iconMargin: freezed == iconMargin - ? _value.iconMargin - : iconMargin // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - child: freezed == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacTabImpl implements _StacTab { - const _$StacTabImpl( +class _StacTab implements StacTab { + const _StacTab( {this.text, final Map? icon, this.iconMargin, @@ -183,9 +143,8 @@ class _$StacTabImpl implements _StacTab { final Map? child}) : _icon = icon, _child = child; - - factory _$StacTabImpl.fromJson(Map json) => - _$$StacTabImplFromJson(json); + factory _StacTab.fromJson(Map json) => + _$StacTabFromJson(json); @override final String? text; @@ -213,16 +172,26 @@ class _$StacTabImpl implements _StacTab { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacTab + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTab(text: $text, icon: $icon, iconMargin: $iconMargin, height: $height, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTabCopyWith<_StacTab> get copyWith => + __$StacTabCopyWithImpl<_StacTab>(this, _$identity); + + @override + Map toJson() { + return _$StacTabToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTabImpl && + other is _StacTab && (identical(other.text, text) || other.text == text) && const DeepCollectionEquality().equals(other._icon, _icon) && (identical(other.iconMargin, iconMargin) || @@ -241,47 +210,84 @@ class _$StacTabImpl implements _StacTab { height, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacTab - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTabImplCopyWith<_$StacTabImpl> get copyWith => - __$$StacTabImplCopyWithImpl<_$StacTabImpl>(this, _$identity); + String toString() { + return 'StacTab(text: $text, icon: $icon, iconMargin: $iconMargin, height: $height, child: $child)'; + } +} +/// @nodoc +abstract mixin class _$StacTabCopyWith<$Res> implements $StacTabCopyWith<$Res> { + factory _$StacTabCopyWith(_StacTab value, $Res Function(_StacTab) _then) = + __$StacTabCopyWithImpl; @override - Map toJson() { - return _$$StacTabImplToJson( - this, - ); - } + @useResult + $Res call( + {String? text, + Map? icon, + StacEdgeInsets? iconMargin, + double? height, + Map? child}); + + @override + $StacEdgeInsetsCopyWith<$Res>? get iconMargin; } -abstract class _StacTab implements StacTab { - const factory _StacTab( - {final String? text, - final Map? icon, - final StacEdgeInsets? iconMargin, - final double? height, - final Map? child}) = _$StacTabImpl; +/// @nodoc +class __$StacTabCopyWithImpl<$Res> implements _$StacTabCopyWith<$Res> { + __$StacTabCopyWithImpl(this._self, this._then); - factory _StacTab.fromJson(Map json) = _$StacTabImpl.fromJson; + final _StacTab _self; + final $Res Function(_StacTab) _then; + /// Create a copy of StacTab + /// with the given fields replaced by the non-null parameter values. @override - String? get text; - @override - Map? get icon; - @override - StacEdgeInsets? get iconMargin; - @override - double? get height; - @override - Map? get child; + @pragma('vm:prefer-inline') + $Res call({ + Object? text = freezed, + Object? icon = freezed, + Object? iconMargin = freezed, + Object? height = freezed, + Object? child = freezed, + }) { + return _then(_StacTab( + text: freezed == text + ? _self.text + : text // ignore: cast_nullable_to_non_nullable + as String?, + icon: freezed == icon + ? _self._icon + : icon // ignore: cast_nullable_to_non_nullable + as Map?, + iconMargin: freezed == iconMargin + ? _self.iconMargin + : iconMargin // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } /// Create a copy of StacTab /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTabImplCopyWith<_$StacTabImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get iconMargin { + if (_self.iconMargin == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.iconMargin!, (value) { + return _then(_self.copyWith(iconMargin: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_tab/stac_tab.g.dart b/packages/stac/lib/src/parsers/stac_tab/stac_tab.g.dart index 35628cad..9000e93e 100644 --- a/packages/stac/lib/src/parsers/stac_tab/stac_tab.g.dart +++ b/packages/stac/lib/src/parsers/stac_tab/stac_tab.g.dart @@ -6,8 +6,7 @@ part of 'stac_tab.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTabImpl _$$StacTabImplFromJson(Map json) => - _$StacTabImpl( +_StacTab _$StacTabFromJson(Map json) => _StacTab( text: json['text'] as String?, icon: json['icon'] as Map?, iconMargin: json['iconMargin'] == null @@ -17,8 +16,7 @@ _$StacTabImpl _$$StacTabImplFromJson(Map json) => child: json['child'] as Map?, ); -Map _$$StacTabImplToJson(_$StacTabImpl instance) => - { +Map _$StacTabToJson(_StacTab instance) => { 'text': instance.text, 'icon': instance.icon, 'iconMargin': instance.iconMargin, diff --git a/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.dart b/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.dart index 6fd58751..64b2bd56 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.dart @@ -11,7 +11,7 @@ part 'stac_tab_bar.freezed.dart'; part 'stac_tab_bar.g.dart'; @freezed -class StacTabBar with _$StacTabBar { +abstract class StacTabBar with _$StacTabBar { const factory StacTabBar({ required List> tabs, @Default(0) int initialIndex, diff --git a/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.freezed.dart b/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.freezed.dart index de899c64..6e499e80 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,52 +10,116 @@ part of 'stac_tab_bar.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTabBar _$StacTabBarFromJson(Map json) { - return _StacTabBar.fromJson(json); -} - /// @nodoc mixin _$StacTabBar { - List> get tabs => throw _privateConstructorUsedError; - int get initialIndex => throw _privateConstructorUsedError; - bool get isScrollable => throw _privateConstructorUsedError; - StacEdgeInsets? get padding => throw _privateConstructorUsedError; - String? get indicatorColor => throw _privateConstructorUsedError; - bool get automaticIndicatorColorAdjustment => - throw _privateConstructorUsedError; - double get indicatorWeight => throw _privateConstructorUsedError; - StacEdgeInsets? get indicatorPadding => throw _privateConstructorUsedError; - TabBarIndicatorSize? get indicatorSize => throw _privateConstructorUsedError; - String? get labelColor => throw _privateConstructorUsedError; - StacTextStyle? get labelStyle => throw _privateConstructorUsedError; - StacEdgeInsets? get labelPadding => throw _privateConstructorUsedError; - String? get unselectedLabelColor => throw _privateConstructorUsedError; - StacTextStyle? get unselectedLabelStyle => throw _privateConstructorUsedError; - DragStartBehavior get dragStartBehavior => throw _privateConstructorUsedError; - bool? get enableFeedback => throw _privateConstructorUsedError; - StacScrollPhysics? get physics => throw _privateConstructorUsedError; - TabAlignment? get tabAlignment => throw _privateConstructorUsedError; - - /// Serializes this StacTabBar to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List> get tabs; + int get initialIndex; + bool get isScrollable; + StacEdgeInsets? get padding; + String? get indicatorColor; + bool get automaticIndicatorColorAdjustment; + double get indicatorWeight; + StacEdgeInsets? get indicatorPadding; + TabBarIndicatorSize? get indicatorSize; + String? get labelColor; + StacTextStyle? get labelStyle; + StacEdgeInsets? get labelPadding; + String? get unselectedLabelColor; + StacTextStyle? get unselectedLabelStyle; + DragStartBehavior get dragStartBehavior; + bool? get enableFeedback; + StacScrollPhysics? get physics; + TabAlignment? get tabAlignment; /// Create a copy of StacTabBar /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTabBarCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTabBarCopyWithImpl(this as StacTabBar, _$identity); + + /// Serializes this StacTabBar to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTabBar && + const DeepCollectionEquality().equals(other.tabs, tabs) && + (identical(other.initialIndex, initialIndex) || + other.initialIndex == initialIndex) && + (identical(other.isScrollable, isScrollable) || + other.isScrollable == isScrollable) && + (identical(other.padding, padding) || other.padding == padding) && + (identical(other.indicatorColor, indicatorColor) || + other.indicatorColor == indicatorColor) && + (identical(other.automaticIndicatorColorAdjustment, + automaticIndicatorColorAdjustment) || + other.automaticIndicatorColorAdjustment == + automaticIndicatorColorAdjustment) && + (identical(other.indicatorWeight, indicatorWeight) || + other.indicatorWeight == indicatorWeight) && + (identical(other.indicatorPadding, indicatorPadding) || + other.indicatorPadding == indicatorPadding) && + (identical(other.indicatorSize, indicatorSize) || + other.indicatorSize == indicatorSize) && + (identical(other.labelColor, labelColor) || + other.labelColor == labelColor) && + (identical(other.labelStyle, labelStyle) || + other.labelStyle == labelStyle) && + (identical(other.labelPadding, labelPadding) || + other.labelPadding == labelPadding) && + (identical(other.unselectedLabelColor, unselectedLabelColor) || + other.unselectedLabelColor == unselectedLabelColor) && + (identical(other.unselectedLabelStyle, unselectedLabelStyle) || + other.unselectedLabelStyle == unselectedLabelStyle) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical(other.enableFeedback, enableFeedback) || + other.enableFeedback == enableFeedback) && + (identical(other.physics, physics) || other.physics == physics) && + (identical(other.tabAlignment, tabAlignment) || + other.tabAlignment == tabAlignment)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(tabs), + initialIndex, + isScrollable, + padding, + indicatorColor, + automaticIndicatorColorAdjustment, + indicatorWeight, + indicatorPadding, + indicatorSize, + labelColor, + labelStyle, + labelPadding, + unselectedLabelColor, + unselectedLabelStyle, + dragStartBehavior, + enableFeedback, + physics, + tabAlignment); + + @override + String toString() { + return 'StacTabBar(tabs: $tabs, initialIndex: $initialIndex, isScrollable: $isScrollable, padding: $padding, indicatorColor: $indicatorColor, automaticIndicatorColorAdjustment: $automaticIndicatorColorAdjustment, indicatorWeight: $indicatorWeight, indicatorPadding: $indicatorPadding, indicatorSize: $indicatorSize, labelColor: $labelColor, labelStyle: $labelStyle, labelPadding: $labelPadding, unselectedLabelColor: $unselectedLabelColor, unselectedLabelStyle: $unselectedLabelStyle, dragStartBehavior: $dragStartBehavior, enableFeedback: $enableFeedback, physics: $physics, tabAlignment: $tabAlignment)'; + } } /// @nodoc -abstract class $StacTabBarCopyWith<$Res> { +abstract mixin class $StacTabBarCopyWith<$Res> { factory $StacTabBarCopyWith( - StacTabBar value, $Res Function(StacTabBar) then) = - _$StacTabBarCopyWithImpl<$Res, StacTabBar>; + StacTabBar value, $Res Function(StacTabBar) _then) = + _$StacTabBarCopyWithImpl; @useResult $Res call( {List> tabs, @@ -84,14 +149,11 @@ abstract class $StacTabBarCopyWith<$Res> { } /// @nodoc -class _$StacTabBarCopyWithImpl<$Res, $Val extends StacTabBar> - implements $StacTabBarCopyWith<$Res> { - _$StacTabBarCopyWithImpl(this._value, this._then); +class _$StacTabBarCopyWithImpl<$Res> implements $StacTabBarCopyWith<$Res> { + _$StacTabBarCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTabBar _self; + final $Res Function(StacTabBar) _then; /// Create a copy of StacTabBar /// with the given fields replaced by the non-null parameter values. @@ -117,81 +179,81 @@ class _$StacTabBarCopyWithImpl<$Res, $Val extends StacTabBar> Object? physics = freezed, Object? tabAlignment = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( tabs: null == tabs - ? _value.tabs + ? _self.tabs : tabs // ignore: cast_nullable_to_non_nullable as List>, initialIndex: null == initialIndex - ? _value.initialIndex + ? _self.initialIndex : initialIndex // ignore: cast_nullable_to_non_nullable as int, isScrollable: null == isScrollable - ? _value.isScrollable + ? _self.isScrollable : isScrollable // ignore: cast_nullable_to_non_nullable as bool, padding: freezed == padding - ? _value.padding + ? _self.padding : padding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, indicatorColor: freezed == indicatorColor - ? _value.indicatorColor + ? _self.indicatorColor : indicatorColor // ignore: cast_nullable_to_non_nullable as String?, automaticIndicatorColorAdjustment: null == automaticIndicatorColorAdjustment - ? _value.automaticIndicatorColorAdjustment + ? _self.automaticIndicatorColorAdjustment : automaticIndicatorColorAdjustment // ignore: cast_nullable_to_non_nullable as bool, indicatorWeight: null == indicatorWeight - ? _value.indicatorWeight + ? _self.indicatorWeight : indicatorWeight // ignore: cast_nullable_to_non_nullable as double, indicatorPadding: freezed == indicatorPadding - ? _value.indicatorPadding + ? _self.indicatorPadding : indicatorPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, indicatorSize: freezed == indicatorSize - ? _value.indicatorSize + ? _self.indicatorSize : indicatorSize // ignore: cast_nullable_to_non_nullable as TabBarIndicatorSize?, labelColor: freezed == labelColor - ? _value.labelColor + ? _self.labelColor : labelColor // ignore: cast_nullable_to_non_nullable as String?, labelStyle: freezed == labelStyle - ? _value.labelStyle + ? _self.labelStyle : labelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, labelPadding: freezed == labelPadding - ? _value.labelPadding + ? _self.labelPadding : labelPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, unselectedLabelColor: freezed == unselectedLabelColor - ? _value.unselectedLabelColor + ? _self.unselectedLabelColor : unselectedLabelColor // ignore: cast_nullable_to_non_nullable as String?, unselectedLabelStyle: freezed == unselectedLabelStyle - ? _value.unselectedLabelStyle + ? _self.unselectedLabelStyle : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, enableFeedback: freezed == enableFeedback - ? _value.enableFeedback + ? _self.enableFeedback : enableFeedback // ignore: cast_nullable_to_non_nullable as bool?, physics: freezed == physics - ? _value.physics + ? _self.physics : physics // ignore: cast_nullable_to_non_nullable as StacScrollPhysics?, tabAlignment: freezed == tabAlignment - ? _value.tabAlignment + ? _self.tabAlignment : tabAlignment // ignore: cast_nullable_to_non_nullable as TabAlignment?, - ) as $Val); + )); } /// Create a copy of StacTabBar @@ -199,12 +261,12 @@ class _$StacTabBarCopyWithImpl<$Res, $Val extends StacTabBar> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get padding { - if (_value.padding == null) { + if (_self.padding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.padding!, (value) { - return _then(_value.copyWith(padding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); }); } @@ -213,12 +275,12 @@ class _$StacTabBarCopyWithImpl<$Res, $Val extends StacTabBar> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get indicatorPadding { - if (_value.indicatorPadding == null) { + if (_self.indicatorPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.indicatorPadding!, (value) { - return _then(_value.copyWith(indicatorPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.indicatorPadding!, (value) { + return _then(_self.copyWith(indicatorPadding: value)); }); } @@ -227,12 +289,12 @@ class _$StacTabBarCopyWithImpl<$Res, $Val extends StacTabBar> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get labelStyle { - if (_value.labelStyle == null) { + if (_self.labelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.labelStyle!, (value) { - return _then(_value.copyWith(labelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); }); } @@ -241,12 +303,12 @@ class _$StacTabBarCopyWithImpl<$Res, $Val extends StacTabBar> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get labelPadding { - if (_value.labelPadding == null) { + if (_self.labelPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.labelPadding!, (value) { - return _then(_value.copyWith(labelPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.labelPadding!, (value) { + return _then(_self.copyWith(labelPadding: value)); }); } @@ -255,170 +317,20 @@ class _$StacTabBarCopyWithImpl<$Res, $Val extends StacTabBar> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle { - if (_value.unselectedLabelStyle == null) { + if (_self.unselectedLabelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.unselectedLabelStyle!, (value) { - return _then(_value.copyWith(unselectedLabelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.unselectedLabelStyle!, (value) { + return _then(_self.copyWith(unselectedLabelStyle: value)); }); } } -/// @nodoc -abstract class _$$StacTabBarImplCopyWith<$Res> - implements $StacTabBarCopyWith<$Res> { - factory _$$StacTabBarImplCopyWith( - _$StacTabBarImpl value, $Res Function(_$StacTabBarImpl) then) = - __$$StacTabBarImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {List> tabs, - int initialIndex, - bool isScrollable, - StacEdgeInsets? padding, - String? indicatorColor, - bool automaticIndicatorColorAdjustment, - double indicatorWeight, - StacEdgeInsets? indicatorPadding, - TabBarIndicatorSize? indicatorSize, - String? labelColor, - StacTextStyle? labelStyle, - StacEdgeInsets? labelPadding, - String? unselectedLabelColor, - StacTextStyle? unselectedLabelStyle, - DragStartBehavior dragStartBehavior, - bool? enableFeedback, - StacScrollPhysics? physics, - TabAlignment? tabAlignment}); - - @override - $StacEdgeInsetsCopyWith<$Res>? get padding; - @override - $StacEdgeInsetsCopyWith<$Res>? get indicatorPadding; - @override - $StacTextStyleCopyWith<$Res>? get labelStyle; - @override - $StacEdgeInsetsCopyWith<$Res>? get labelPadding; - @override - $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle; -} - -/// @nodoc -class __$$StacTabBarImplCopyWithImpl<$Res> - extends _$StacTabBarCopyWithImpl<$Res, _$StacTabBarImpl> - implements _$$StacTabBarImplCopyWith<$Res> { - __$$StacTabBarImplCopyWithImpl( - _$StacTabBarImpl _value, $Res Function(_$StacTabBarImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTabBar - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tabs = null, - Object? initialIndex = null, - Object? isScrollable = null, - Object? padding = freezed, - Object? indicatorColor = freezed, - Object? automaticIndicatorColorAdjustment = null, - Object? indicatorWeight = null, - Object? indicatorPadding = freezed, - Object? indicatorSize = freezed, - Object? labelColor = freezed, - Object? labelStyle = freezed, - Object? labelPadding = freezed, - Object? unselectedLabelColor = freezed, - Object? unselectedLabelStyle = freezed, - Object? dragStartBehavior = null, - Object? enableFeedback = freezed, - Object? physics = freezed, - Object? tabAlignment = freezed, - }) { - return _then(_$StacTabBarImpl( - tabs: null == tabs - ? _value._tabs - : tabs // ignore: cast_nullable_to_non_nullable - as List>, - initialIndex: null == initialIndex - ? _value.initialIndex - : initialIndex // ignore: cast_nullable_to_non_nullable - as int, - isScrollable: null == isScrollable - ? _value.isScrollable - : isScrollable // ignore: cast_nullable_to_non_nullable - as bool, - padding: freezed == padding - ? _value.padding - : padding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - indicatorColor: freezed == indicatorColor - ? _value.indicatorColor - : indicatorColor // ignore: cast_nullable_to_non_nullable - as String?, - automaticIndicatorColorAdjustment: null == - automaticIndicatorColorAdjustment - ? _value.automaticIndicatorColorAdjustment - : automaticIndicatorColorAdjustment // ignore: cast_nullable_to_non_nullable - as bool, - indicatorWeight: null == indicatorWeight - ? _value.indicatorWeight - : indicatorWeight // ignore: cast_nullable_to_non_nullable - as double, - indicatorPadding: freezed == indicatorPadding - ? _value.indicatorPadding - : indicatorPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - indicatorSize: freezed == indicatorSize - ? _value.indicatorSize - : indicatorSize // ignore: cast_nullable_to_non_nullable - as TabBarIndicatorSize?, - labelColor: freezed == labelColor - ? _value.labelColor - : labelColor // ignore: cast_nullable_to_non_nullable - as String?, - labelStyle: freezed == labelStyle - ? _value.labelStyle - : labelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - labelPadding: freezed == labelPadding - ? _value.labelPadding - : labelPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - unselectedLabelColor: freezed == unselectedLabelColor - ? _value.unselectedLabelColor - : unselectedLabelColor // ignore: cast_nullable_to_non_nullable - as String?, - unselectedLabelStyle: freezed == unselectedLabelStyle - ? _value.unselectedLabelStyle - : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior - : dragStartBehavior // ignore: cast_nullable_to_non_nullable - as DragStartBehavior, - enableFeedback: freezed == enableFeedback - ? _value.enableFeedback - : enableFeedback // ignore: cast_nullable_to_non_nullable - as bool?, - physics: freezed == physics - ? _value.physics - : physics // ignore: cast_nullable_to_non_nullable - as StacScrollPhysics?, - tabAlignment: freezed == tabAlignment - ? _value.tabAlignment - : tabAlignment // ignore: cast_nullable_to_non_nullable - as TabAlignment?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacTabBarImpl implements _StacTabBar { - const _$StacTabBarImpl( +class _StacTabBar implements StacTabBar { + const _StacTabBar( {required final List> tabs, this.initialIndex = 0, this.isScrollable = false, @@ -438,9 +350,8 @@ class _$StacTabBarImpl implements _StacTabBar { this.physics, this.tabAlignment}) : _tabs = tabs; - - factory _$StacTabBarImpl.fromJson(Map json) => - _$$StacTabBarImplFromJson(json); + factory _StacTabBar.fromJson(Map json) => + _$StacTabBarFromJson(json); final List> _tabs; @override @@ -490,16 +401,26 @@ class _$StacTabBarImpl implements _StacTabBar { @override final TabAlignment? tabAlignment; + /// Create a copy of StacTabBar + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTabBar(tabs: $tabs, initialIndex: $initialIndex, isScrollable: $isScrollable, padding: $padding, indicatorColor: $indicatorColor, automaticIndicatorColorAdjustment: $automaticIndicatorColorAdjustment, indicatorWeight: $indicatorWeight, indicatorPadding: $indicatorPadding, indicatorSize: $indicatorSize, labelColor: $labelColor, labelStyle: $labelStyle, labelPadding: $labelPadding, unselectedLabelColor: $unselectedLabelColor, unselectedLabelStyle: $unselectedLabelStyle, dragStartBehavior: $dragStartBehavior, enableFeedback: $enableFeedback, physics: $physics, tabAlignment: $tabAlignment)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTabBarCopyWith<_StacTabBar> get copyWith => + __$StacTabBarCopyWithImpl<_StacTabBar>(this, _$identity); + + @override + Map toJson() { + return _$StacTabBarToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTabBarImpl && + other is _StacTabBar && const DeepCollectionEquality().equals(other._tabs, _tabs) && (identical(other.initialIndex, initialIndex) || other.initialIndex == initialIndex) && @@ -560,87 +481,229 @@ class _$StacTabBarImpl implements _StacTabBar { physics, tabAlignment); - /// Create a copy of StacTabBar - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTabBarImplCopyWith<_$StacTabBarImpl> get copyWith => - __$$StacTabBarImplCopyWithImpl<_$StacTabBarImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacTabBarImplToJson( - this, - ); + String toString() { + return 'StacTabBar(tabs: $tabs, initialIndex: $initialIndex, isScrollable: $isScrollable, padding: $padding, indicatorColor: $indicatorColor, automaticIndicatorColorAdjustment: $automaticIndicatorColorAdjustment, indicatorWeight: $indicatorWeight, indicatorPadding: $indicatorPadding, indicatorSize: $indicatorSize, labelColor: $labelColor, labelStyle: $labelStyle, labelPadding: $labelPadding, unselectedLabelColor: $unselectedLabelColor, unselectedLabelStyle: $unselectedLabelStyle, dragStartBehavior: $dragStartBehavior, enableFeedback: $enableFeedback, physics: $physics, tabAlignment: $tabAlignment)'; } } -abstract class _StacTabBar implements StacTabBar { - const factory _StacTabBar( - {required final List> tabs, - final int initialIndex, - final bool isScrollable, - final StacEdgeInsets? padding, - final String? indicatorColor, - final bool automaticIndicatorColorAdjustment, - final double indicatorWeight, - final StacEdgeInsets? indicatorPadding, - final TabBarIndicatorSize? indicatorSize, - final String? labelColor, - final StacTextStyle? labelStyle, - final StacEdgeInsets? labelPadding, - final String? unselectedLabelColor, - final StacTextStyle? unselectedLabelStyle, - final DragStartBehavior dragStartBehavior, - final bool? enableFeedback, - final StacScrollPhysics? physics, - final TabAlignment? tabAlignment}) = _$StacTabBarImpl; - - factory _StacTabBar.fromJson(Map json) = - _$StacTabBarImpl.fromJson; - - @override - List> get tabs; - @override - int get initialIndex; - @override - bool get isScrollable; - @override - StacEdgeInsets? get padding; - @override - String? get indicatorColor; - @override - bool get automaticIndicatorColorAdjustment; - @override - double get indicatorWeight; +/// @nodoc +abstract mixin class _$StacTabBarCopyWith<$Res> + implements $StacTabBarCopyWith<$Res> { + factory _$StacTabBarCopyWith( + _StacTabBar value, $Res Function(_StacTabBar) _then) = + __$StacTabBarCopyWithImpl; @override - StacEdgeInsets? get indicatorPadding; + @useResult + $Res call( + {List> tabs, + int initialIndex, + bool isScrollable, + StacEdgeInsets? padding, + String? indicatorColor, + bool automaticIndicatorColorAdjustment, + double indicatorWeight, + StacEdgeInsets? indicatorPadding, + TabBarIndicatorSize? indicatorSize, + String? labelColor, + StacTextStyle? labelStyle, + StacEdgeInsets? labelPadding, + String? unselectedLabelColor, + StacTextStyle? unselectedLabelStyle, + DragStartBehavior dragStartBehavior, + bool? enableFeedback, + StacScrollPhysics? physics, + TabAlignment? tabAlignment}); + @override - TabBarIndicatorSize? get indicatorSize; + $StacEdgeInsetsCopyWith<$Res>? get padding; @override - String? get labelColor; + $StacEdgeInsetsCopyWith<$Res>? get indicatorPadding; @override - StacTextStyle? get labelStyle; + $StacTextStyleCopyWith<$Res>? get labelStyle; @override - StacEdgeInsets? get labelPadding; + $StacEdgeInsetsCopyWith<$Res>? get labelPadding; @override - String? get unselectedLabelColor; + $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle; +} + +/// @nodoc +class __$StacTabBarCopyWithImpl<$Res> implements _$StacTabBarCopyWith<$Res> { + __$StacTabBarCopyWithImpl(this._self, this._then); + + final _StacTabBar _self; + final $Res Function(_StacTabBar) _then; + + /// Create a copy of StacTabBar + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get unselectedLabelStyle; + @pragma('vm:prefer-inline') + $Res call({ + Object? tabs = null, + Object? initialIndex = null, + Object? isScrollable = null, + Object? padding = freezed, + Object? indicatorColor = freezed, + Object? automaticIndicatorColorAdjustment = null, + Object? indicatorWeight = null, + Object? indicatorPadding = freezed, + Object? indicatorSize = freezed, + Object? labelColor = freezed, + Object? labelStyle = freezed, + Object? labelPadding = freezed, + Object? unselectedLabelColor = freezed, + Object? unselectedLabelStyle = freezed, + Object? dragStartBehavior = null, + Object? enableFeedback = freezed, + Object? physics = freezed, + Object? tabAlignment = freezed, + }) { + return _then(_StacTabBar( + tabs: null == tabs + ? _self._tabs + : tabs // ignore: cast_nullable_to_non_nullable + as List>, + initialIndex: null == initialIndex + ? _self.initialIndex + : initialIndex // ignore: cast_nullable_to_non_nullable + as int, + isScrollable: null == isScrollable + ? _self.isScrollable + : isScrollable // ignore: cast_nullable_to_non_nullable + as bool, + padding: freezed == padding + ? _self.padding + : padding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + indicatorColor: freezed == indicatorColor + ? _self.indicatorColor + : indicatorColor // ignore: cast_nullable_to_non_nullable + as String?, + automaticIndicatorColorAdjustment: null == + automaticIndicatorColorAdjustment + ? _self.automaticIndicatorColorAdjustment + : automaticIndicatorColorAdjustment // ignore: cast_nullable_to_non_nullable + as bool, + indicatorWeight: null == indicatorWeight + ? _self.indicatorWeight + : indicatorWeight // ignore: cast_nullable_to_non_nullable + as double, + indicatorPadding: freezed == indicatorPadding + ? _self.indicatorPadding + : indicatorPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + indicatorSize: freezed == indicatorSize + ? _self.indicatorSize + : indicatorSize // ignore: cast_nullable_to_non_nullable + as TabBarIndicatorSize?, + labelColor: freezed == labelColor + ? _self.labelColor + : labelColor // ignore: cast_nullable_to_non_nullable + as String?, + labelStyle: freezed == labelStyle + ? _self.labelStyle + : labelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + labelPadding: freezed == labelPadding + ? _self.labelPadding + : labelPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + unselectedLabelColor: freezed == unselectedLabelColor + ? _self.unselectedLabelColor + : unselectedLabelColor // ignore: cast_nullable_to_non_nullable + as String?, + unselectedLabelStyle: freezed == unselectedLabelStyle + ? _self.unselectedLabelStyle + : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + enableFeedback: freezed == enableFeedback + ? _self.enableFeedback + : enableFeedback // ignore: cast_nullable_to_non_nullable + as bool?, + physics: freezed == physics + ? _self.physics + : physics // ignore: cast_nullable_to_non_nullable + as StacScrollPhysics?, + tabAlignment: freezed == tabAlignment + ? _self.tabAlignment + : tabAlignment // ignore: cast_nullable_to_non_nullable + as TabAlignment?, + )); + } + + /// Create a copy of StacTabBar + /// with the given fields replaced by the non-null parameter values. @override - DragStartBehavior get dragStartBehavior; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get padding { + if (_self.padding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.padding!, (value) { + return _then(_self.copyWith(padding: value)); + }); + } + + /// Create a copy of StacTabBar + /// with the given fields replaced by the non-null parameter values. @override - bool? get enableFeedback; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get indicatorPadding { + if (_self.indicatorPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.indicatorPadding!, (value) { + return _then(_self.copyWith(indicatorPadding: value)); + }); + } + + /// Create a copy of StacTabBar + /// with the given fields replaced by the non-null parameter values. @override - StacScrollPhysics? get physics; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get labelStyle { + if (_self.labelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); + }); + } + + /// Create a copy of StacTabBar + /// with the given fields replaced by the non-null parameter values. @override - TabAlignment? get tabAlignment; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get labelPadding { + if (_self.labelPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.labelPadding!, (value) { + return _then(_self.copyWith(labelPadding: value)); + }); + } /// Create a copy of StacTabBar /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTabBarImplCopyWith<_$StacTabBarImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle { + if (_self.unselectedLabelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.unselectedLabelStyle!, (value) { + return _then(_self.copyWith(unselectedLabelStyle: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.g.dart b/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.g.dart index ffaa93b0..c3034818 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.g.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar/stac_tab_bar.g.dart @@ -6,8 +6,7 @@ part of 'stac_tab_bar.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTabBarImpl _$$StacTabBarImplFromJson(Map json) => - _$StacTabBarImpl( +_StacTabBar _$StacTabBarFromJson(Map json) => _StacTabBar( tabs: (json['tabs'] as List) .map((e) => e as Map) .toList(), @@ -45,7 +44,7 @@ _$StacTabBarImpl _$$StacTabBarImplFromJson(Map json) => $enumDecodeNullable(_$TabAlignmentEnumMap, json['tabAlignment']), ); -Map _$$StacTabBarImplToJson(_$StacTabBarImpl instance) => +Map _$StacTabBarToJson(_StacTabBar instance) => { 'tabs': instance.tabs, 'initialIndex': instance.initialIndex, diff --git a/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.dart b/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.dart index 8093fb70..23afe384 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.dart @@ -9,7 +9,7 @@ part 'stac_tab_bar_theme_data.freezed.dart'; part 'stac_tab_bar_theme_data.g.dart'; @freezed -class StacTabBarThemeData with _$StacTabBarThemeData { +abstract class StacTabBarThemeData with _$StacTabBarThemeData { const factory StacTabBarThemeData({ StacBoxDecoration? indicator, String? indicatorColor, diff --git a/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.freezed.dart b/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.freezed.dart index 81469583..8ecfba82 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,43 +10,86 @@ part of 'stac_tab_bar_theme_data.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTabBarThemeData _$StacTabBarThemeDataFromJson(Map json) { - return _StacTabBarThemeData.fromJson(json); -} - /// @nodoc mixin _$StacTabBarThemeData { - StacBoxDecoration? get indicator => throw _privateConstructorUsedError; - String? get indicatorColor => throw _privateConstructorUsedError; - TabBarIndicatorSize? get indicatorSize => throw _privateConstructorUsedError; - String? get dividerColor => throw _privateConstructorUsedError; - String? get labelColor => throw _privateConstructorUsedError; - StacEdgeInsets? get labelPadding => throw _privateConstructorUsedError; - StacTextStyle? get labelStyle => throw _privateConstructorUsedError; - String? get unselectedLabelColor => throw _privateConstructorUsedError; - StacTextStyle? get unselectedLabelStyle => throw _privateConstructorUsedError; - String? get overlayColor => throw _privateConstructorUsedError; - - /// Serializes this StacTabBarThemeData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacBoxDecoration? get indicator; + String? get indicatorColor; + TabBarIndicatorSize? get indicatorSize; + String? get dividerColor; + String? get labelColor; + StacEdgeInsets? get labelPadding; + StacTextStyle? get labelStyle; + String? get unselectedLabelColor; + StacTextStyle? get unselectedLabelStyle; + String? get overlayColor; /// Create a copy of StacTabBarThemeData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTabBarThemeDataCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTabBarThemeDataCopyWithImpl( + this as StacTabBarThemeData, _$identity); + + /// Serializes this StacTabBarThemeData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTabBarThemeData && + (identical(other.indicator, indicator) || + other.indicator == indicator) && + (identical(other.indicatorColor, indicatorColor) || + other.indicatorColor == indicatorColor) && + (identical(other.indicatorSize, indicatorSize) || + other.indicatorSize == indicatorSize) && + (identical(other.dividerColor, dividerColor) || + other.dividerColor == dividerColor) && + (identical(other.labelColor, labelColor) || + other.labelColor == labelColor) && + (identical(other.labelPadding, labelPadding) || + other.labelPadding == labelPadding) && + (identical(other.labelStyle, labelStyle) || + other.labelStyle == labelStyle) && + (identical(other.unselectedLabelColor, unselectedLabelColor) || + other.unselectedLabelColor == unselectedLabelColor) && + (identical(other.unselectedLabelStyle, unselectedLabelStyle) || + other.unselectedLabelStyle == unselectedLabelStyle) && + (identical(other.overlayColor, overlayColor) || + other.overlayColor == overlayColor)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + indicator, + indicatorColor, + indicatorSize, + dividerColor, + labelColor, + labelPadding, + labelStyle, + unselectedLabelColor, + unselectedLabelStyle, + overlayColor); + + @override + String toString() { + return 'StacTabBarThemeData(indicator: $indicator, indicatorColor: $indicatorColor, indicatorSize: $indicatorSize, dividerColor: $dividerColor, labelColor: $labelColor, labelPadding: $labelPadding, labelStyle: $labelStyle, unselectedLabelColor: $unselectedLabelColor, unselectedLabelStyle: $unselectedLabelStyle, overlayColor: $overlayColor)'; + } } /// @nodoc -abstract class $StacTabBarThemeDataCopyWith<$Res> { +abstract mixin class $StacTabBarThemeDataCopyWith<$Res> { factory $StacTabBarThemeDataCopyWith( - StacTabBarThemeData value, $Res Function(StacTabBarThemeData) then) = - _$StacTabBarThemeDataCopyWithImpl<$Res, StacTabBarThemeData>; + StacTabBarThemeData value, $Res Function(StacTabBarThemeData) _then) = + _$StacTabBarThemeDataCopyWithImpl; @useResult $Res call( {StacBoxDecoration? indicator, @@ -66,14 +110,12 @@ abstract class $StacTabBarThemeDataCopyWith<$Res> { } /// @nodoc -class _$StacTabBarThemeDataCopyWithImpl<$Res, $Val extends StacTabBarThemeData> +class _$StacTabBarThemeDataCopyWithImpl<$Res> implements $StacTabBarThemeDataCopyWith<$Res> { - _$StacTabBarThemeDataCopyWithImpl(this._value, this._then); + _$StacTabBarThemeDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTabBarThemeData _self; + final $Res Function(StacTabBarThemeData) _then; /// Create a copy of StacTabBarThemeData /// with the given fields replaced by the non-null parameter values. @@ -91,48 +133,48 @@ class _$StacTabBarThemeDataCopyWithImpl<$Res, $Val extends StacTabBarThemeData> Object? unselectedLabelStyle = freezed, Object? overlayColor = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( indicator: freezed == indicator - ? _value.indicator + ? _self.indicator : indicator // ignore: cast_nullable_to_non_nullable as StacBoxDecoration?, indicatorColor: freezed == indicatorColor - ? _value.indicatorColor + ? _self.indicatorColor : indicatorColor // ignore: cast_nullable_to_non_nullable as String?, indicatorSize: freezed == indicatorSize - ? _value.indicatorSize + ? _self.indicatorSize : indicatorSize // ignore: cast_nullable_to_non_nullable as TabBarIndicatorSize?, dividerColor: freezed == dividerColor - ? _value.dividerColor + ? _self.dividerColor : dividerColor // ignore: cast_nullable_to_non_nullable as String?, labelColor: freezed == labelColor - ? _value.labelColor + ? _self.labelColor : labelColor // ignore: cast_nullable_to_non_nullable as String?, labelPadding: freezed == labelPadding - ? _value.labelPadding + ? _self.labelPadding : labelPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets?, labelStyle: freezed == labelStyle - ? _value.labelStyle + ? _self.labelStyle : labelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, unselectedLabelColor: freezed == unselectedLabelColor - ? _value.unselectedLabelColor + ? _self.unselectedLabelColor : unselectedLabelColor // ignore: cast_nullable_to_non_nullable as String?, unselectedLabelStyle: freezed == unselectedLabelStyle - ? _value.unselectedLabelStyle + ? _self.unselectedLabelStyle : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable as StacTextStyle?, overlayColor: freezed == overlayColor - ? _value.overlayColor + ? _self.overlayColor : overlayColor // ignore: cast_nullable_to_non_nullable as String?, - ) as $Val); + )); } /// Create a copy of StacTabBarThemeData @@ -140,12 +182,12 @@ class _$StacTabBarThemeDataCopyWithImpl<$Res, $Val extends StacTabBarThemeData> @override @pragma('vm:prefer-inline') $StacBoxDecorationCopyWith<$Res>? get indicator { - if (_value.indicator == null) { + if (_self.indicator == null) { return null; } - return $StacBoxDecorationCopyWith<$Res>(_value.indicator!, (value) { - return _then(_value.copyWith(indicator: value) as $Val); + return $StacBoxDecorationCopyWith<$Res>(_self.indicator!, (value) { + return _then(_self.copyWith(indicator: value)); }); } @@ -154,12 +196,12 @@ class _$StacTabBarThemeDataCopyWithImpl<$Res, $Val extends StacTabBarThemeData> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res>? get labelPadding { - if (_value.labelPadding == null) { + if (_self.labelPadding == null) { return null; } - return $StacEdgeInsetsCopyWith<$Res>(_value.labelPadding!, (value) { - return _then(_value.copyWith(labelPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.labelPadding!, (value) { + return _then(_self.copyWith(labelPadding: value)); }); } @@ -168,12 +210,12 @@ class _$StacTabBarThemeDataCopyWithImpl<$Res, $Val extends StacTabBarThemeData> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get labelStyle { - if (_value.labelStyle == null) { + if (_self.labelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.labelStyle!, (value) { - return _then(_value.copyWith(labelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); }); } @@ -182,119 +224,20 @@ class _$StacTabBarThemeDataCopyWithImpl<$Res, $Val extends StacTabBarThemeData> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle { - if (_value.unselectedLabelStyle == null) { + if (_self.unselectedLabelStyle == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.unselectedLabelStyle!, (value) { - return _then(_value.copyWith(unselectedLabelStyle: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.unselectedLabelStyle!, (value) { + return _then(_self.copyWith(unselectedLabelStyle: value)); }); } } -/// @nodoc -abstract class _$$StacTabBarThemeDataImplCopyWith<$Res> - implements $StacTabBarThemeDataCopyWith<$Res> { - factory _$$StacTabBarThemeDataImplCopyWith(_$StacTabBarThemeDataImpl value, - $Res Function(_$StacTabBarThemeDataImpl) then) = - __$$StacTabBarThemeDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacBoxDecoration? indicator, - String? indicatorColor, - TabBarIndicatorSize? indicatorSize, - String? dividerColor, - String? labelColor, - StacEdgeInsets? labelPadding, - StacTextStyle? labelStyle, - String? unselectedLabelColor, - StacTextStyle? unselectedLabelStyle, - String? overlayColor}); - - @override - $StacBoxDecorationCopyWith<$Res>? get indicator; - @override - $StacEdgeInsetsCopyWith<$Res>? get labelPadding; - @override - $StacTextStyleCopyWith<$Res>? get labelStyle; - @override - $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle; -} - -/// @nodoc -class __$$StacTabBarThemeDataImplCopyWithImpl<$Res> - extends _$StacTabBarThemeDataCopyWithImpl<$Res, _$StacTabBarThemeDataImpl> - implements _$$StacTabBarThemeDataImplCopyWith<$Res> { - __$$StacTabBarThemeDataImplCopyWithImpl(_$StacTabBarThemeDataImpl _value, - $Res Function(_$StacTabBarThemeDataImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTabBarThemeData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? indicator = freezed, - Object? indicatorColor = freezed, - Object? indicatorSize = freezed, - Object? dividerColor = freezed, - Object? labelColor = freezed, - Object? labelPadding = freezed, - Object? labelStyle = freezed, - Object? unselectedLabelColor = freezed, - Object? unselectedLabelStyle = freezed, - Object? overlayColor = freezed, - }) { - return _then(_$StacTabBarThemeDataImpl( - indicator: freezed == indicator - ? _value.indicator - : indicator // ignore: cast_nullable_to_non_nullable - as StacBoxDecoration?, - indicatorColor: freezed == indicatorColor - ? _value.indicatorColor - : indicatorColor // ignore: cast_nullable_to_non_nullable - as String?, - indicatorSize: freezed == indicatorSize - ? _value.indicatorSize - : indicatorSize // ignore: cast_nullable_to_non_nullable - as TabBarIndicatorSize?, - dividerColor: freezed == dividerColor - ? _value.dividerColor - : dividerColor // ignore: cast_nullable_to_non_nullable - as String?, - labelColor: freezed == labelColor - ? _value.labelColor - : labelColor // ignore: cast_nullable_to_non_nullable - as String?, - labelPadding: freezed == labelPadding - ? _value.labelPadding - : labelPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets?, - labelStyle: freezed == labelStyle - ? _value.labelStyle - : labelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - unselectedLabelColor: freezed == unselectedLabelColor - ? _value.unselectedLabelColor - : unselectedLabelColor // ignore: cast_nullable_to_non_nullable - as String?, - unselectedLabelStyle: freezed == unselectedLabelStyle - ? _value.unselectedLabelStyle - : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - overlayColor: freezed == overlayColor - ? _value.overlayColor - : overlayColor // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacTabBarThemeDataImpl implements _StacTabBarThemeData { - const _$StacTabBarThemeDataImpl( +class _StacTabBarThemeData implements StacTabBarThemeData { + const _StacTabBarThemeData( {this.indicator, this.indicatorColor, this.indicatorSize, @@ -305,9 +248,8 @@ class _$StacTabBarThemeDataImpl implements _StacTabBarThemeData { this.unselectedLabelColor, this.unselectedLabelStyle, this.overlayColor}); - - factory _$StacTabBarThemeDataImpl.fromJson(Map json) => - _$$StacTabBarThemeDataImplFromJson(json); + factory _StacTabBarThemeData.fromJson(Map json) => + _$StacTabBarThemeDataFromJson(json); @override final StacBoxDecoration? indicator; @@ -330,16 +272,27 @@ class _$StacTabBarThemeDataImpl implements _StacTabBarThemeData { @override final String? overlayColor; + /// Create a copy of StacTabBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTabBarThemeData(indicator: $indicator, indicatorColor: $indicatorColor, indicatorSize: $indicatorSize, dividerColor: $dividerColor, labelColor: $labelColor, labelPadding: $labelPadding, labelStyle: $labelStyle, unselectedLabelColor: $unselectedLabelColor, unselectedLabelStyle: $unselectedLabelStyle, overlayColor: $overlayColor)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTabBarThemeDataCopyWith<_StacTabBarThemeData> get copyWith => + __$StacTabBarThemeDataCopyWithImpl<_StacTabBarThemeData>( + this, _$identity); + + @override + Map toJson() { + return _$StacTabBarThemeDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTabBarThemeDataImpl && + other is _StacTabBarThemeData && (identical(other.indicator, indicator) || other.indicator == indicator) && (identical(other.indicatorColor, indicatorColor) || @@ -377,64 +330,165 @@ class _$StacTabBarThemeDataImpl implements _StacTabBarThemeData { unselectedLabelStyle, overlayColor); - /// Create a copy of StacTabBarThemeData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTabBarThemeDataImplCopyWith<_$StacTabBarThemeDataImpl> get copyWith => - __$$StacTabBarThemeDataImplCopyWithImpl<_$StacTabBarThemeDataImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$StacTabBarThemeDataImplToJson( - this, - ); + String toString() { + return 'StacTabBarThemeData(indicator: $indicator, indicatorColor: $indicatorColor, indicatorSize: $indicatorSize, dividerColor: $dividerColor, labelColor: $labelColor, labelPadding: $labelPadding, labelStyle: $labelStyle, unselectedLabelColor: $unselectedLabelColor, unselectedLabelStyle: $unselectedLabelStyle, overlayColor: $overlayColor)'; } } -abstract class _StacTabBarThemeData implements StacTabBarThemeData { - const factory _StacTabBarThemeData( - {final StacBoxDecoration? indicator, - final String? indicatorColor, - final TabBarIndicatorSize? indicatorSize, - final String? dividerColor, - final String? labelColor, - final StacEdgeInsets? labelPadding, - final StacTextStyle? labelStyle, - final String? unselectedLabelColor, - final StacTextStyle? unselectedLabelStyle, - final String? overlayColor}) = _$StacTabBarThemeDataImpl; - - factory _StacTabBarThemeData.fromJson(Map json) = - _$StacTabBarThemeDataImpl.fromJson; - - @override - StacBoxDecoration? get indicator; +/// @nodoc +abstract mixin class _$StacTabBarThemeDataCopyWith<$Res> + implements $StacTabBarThemeDataCopyWith<$Res> { + factory _$StacTabBarThemeDataCopyWith(_StacTabBarThemeData value, + $Res Function(_StacTabBarThemeData) _then) = + __$StacTabBarThemeDataCopyWithImpl; @override - String? get indicatorColor; + @useResult + $Res call( + {StacBoxDecoration? indicator, + String? indicatorColor, + TabBarIndicatorSize? indicatorSize, + String? dividerColor, + String? labelColor, + StacEdgeInsets? labelPadding, + StacTextStyle? labelStyle, + String? unselectedLabelColor, + StacTextStyle? unselectedLabelStyle, + String? overlayColor}); + @override - TabBarIndicatorSize? get indicatorSize; + $StacBoxDecorationCopyWith<$Res>? get indicator; @override - String? get dividerColor; + $StacEdgeInsetsCopyWith<$Res>? get labelPadding; @override - String? get labelColor; + $StacTextStyleCopyWith<$Res>? get labelStyle; @override - StacEdgeInsets? get labelPadding; + $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle; +} + +/// @nodoc +class __$StacTabBarThemeDataCopyWithImpl<$Res> + implements _$StacTabBarThemeDataCopyWith<$Res> { + __$StacTabBarThemeDataCopyWithImpl(this._self, this._then); + + final _StacTabBarThemeData _self; + final $Res Function(_StacTabBarThemeData) _then; + + /// Create a copy of StacTabBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get labelStyle; + @pragma('vm:prefer-inline') + $Res call({ + Object? indicator = freezed, + Object? indicatorColor = freezed, + Object? indicatorSize = freezed, + Object? dividerColor = freezed, + Object? labelColor = freezed, + Object? labelPadding = freezed, + Object? labelStyle = freezed, + Object? unselectedLabelColor = freezed, + Object? unselectedLabelStyle = freezed, + Object? overlayColor = freezed, + }) { + return _then(_StacTabBarThemeData( + indicator: freezed == indicator + ? _self.indicator + : indicator // ignore: cast_nullable_to_non_nullable + as StacBoxDecoration?, + indicatorColor: freezed == indicatorColor + ? _self.indicatorColor + : indicatorColor // ignore: cast_nullable_to_non_nullable + as String?, + indicatorSize: freezed == indicatorSize + ? _self.indicatorSize + : indicatorSize // ignore: cast_nullable_to_non_nullable + as TabBarIndicatorSize?, + dividerColor: freezed == dividerColor + ? _self.dividerColor + : dividerColor // ignore: cast_nullable_to_non_nullable + as String?, + labelColor: freezed == labelColor + ? _self.labelColor + : labelColor // ignore: cast_nullable_to_non_nullable + as String?, + labelPadding: freezed == labelPadding + ? _self.labelPadding + : labelPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets?, + labelStyle: freezed == labelStyle + ? _self.labelStyle + : labelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + unselectedLabelColor: freezed == unselectedLabelColor + ? _self.unselectedLabelColor + : unselectedLabelColor // ignore: cast_nullable_to_non_nullable + as String?, + unselectedLabelStyle: freezed == unselectedLabelStyle + ? _self.unselectedLabelStyle + : unselectedLabelStyle // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + overlayColor: freezed == overlayColor + ? _self.overlayColor + : overlayColor // ignore: cast_nullable_to_non_nullable + as String?, + )); + } + + /// Create a copy of StacTabBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - String? get unselectedLabelColor; + @pragma('vm:prefer-inline') + $StacBoxDecorationCopyWith<$Res>? get indicator { + if (_self.indicator == null) { + return null; + } + + return $StacBoxDecorationCopyWith<$Res>(_self.indicator!, (value) { + return _then(_self.copyWith(indicator: value)); + }); + } + + /// Create a copy of StacTabBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - StacTextStyle? get unselectedLabelStyle; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res>? get labelPadding { + if (_self.labelPadding == null) { + return null; + } + + return $StacEdgeInsetsCopyWith<$Res>(_self.labelPadding!, (value) { + return _then(_self.copyWith(labelPadding: value)); + }); + } + + /// Create a copy of StacTabBarThemeData + /// with the given fields replaced by the non-null parameter values. @override - String? get overlayColor; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get labelStyle { + if (_self.labelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.labelStyle!, (value) { + return _then(_self.copyWith(labelStyle: value)); + }); + } /// Create a copy of StacTabBarThemeData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTabBarThemeDataImplCopyWith<_$StacTabBarThemeDataImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get unselectedLabelStyle { + if (_self.unselectedLabelStyle == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.unselectedLabelStyle!, (value) { + return _then(_self.copyWith(unselectedLabelStyle: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.g.dart b/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.g.dart index f0cfad89..45d07e8d 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.g.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar_theme_data/stac_tab_bar_theme_data.g.dart @@ -6,9 +6,8 @@ part of 'stac_tab_bar_theme_data.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTabBarThemeDataImpl _$$StacTabBarThemeDataImplFromJson( - Map json) => - _$StacTabBarThemeDataImpl( +_StacTabBarThemeData _$StacTabBarThemeDataFromJson(Map json) => + _StacTabBarThemeData( indicator: json['indicator'] == null ? null : StacBoxDecoration.fromJson( @@ -31,8 +30,8 @@ _$StacTabBarThemeDataImpl _$$StacTabBarThemeDataImplFromJson( overlayColor: json['overlayColor'] as String?, ); -Map _$$StacTabBarThemeDataImplToJson( - _$StacTabBarThemeDataImpl instance) => +Map _$StacTabBarThemeDataToJson( + _StacTabBarThemeData instance) => { 'indicator': instance.indicator, 'indicatorColor': instance.indicatorColor, diff --git a/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.dart b/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.dart index 88cb4c2c..475e2bea 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.dart @@ -9,7 +9,7 @@ part 'stac_tab_bar_view.freezed.dart'; part 'stac_tab_bar_view.g.dart'; @freezed -class StacTabBarView with _$StacTabBarView { +abstract class StacTabBarView with _$StacTabBarView { const factory StacTabBarView({ required List> children, @Default(0) int initialIndex, diff --git a/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.freezed.dart b/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.freezed.dart index 5c1e6e1e..01691378 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,107 +10,68 @@ part of 'stac_tab_bar_view.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTabBarView _$StacTabBarViewFromJson(Map json) { - return _StacTabBarView.fromJson(json); -} - /// @nodoc mixin _$StacTabBarView { - List> get children => throw _privateConstructorUsedError; - int get initialIndex => throw _privateConstructorUsedError; - DragStartBehavior get dragStartBehavior => throw _privateConstructorUsedError; - StacScrollPhysics? get physics => throw _privateConstructorUsedError; - double get viewportFraction => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - - /// Serializes this StacTabBarView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List> get children; + int get initialIndex; + DragStartBehavior get dragStartBehavior; + StacScrollPhysics? get physics; + double get viewportFraction; + Clip get clipBehavior; /// Create a copy of StacTabBarView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTabBarViewCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacTabBarViewCopyWithImpl( + this as StacTabBarView, _$identity); -/// @nodoc -abstract class $StacTabBarViewCopyWith<$Res> { - factory $StacTabBarViewCopyWith( - StacTabBarView value, $Res Function(StacTabBarView) then) = - _$StacTabBarViewCopyWithImpl<$Res, StacTabBarView>; - @useResult - $Res call( - {List> children, - int initialIndex, - DragStartBehavior dragStartBehavior, - StacScrollPhysics? physics, - double viewportFraction, - Clip clipBehavior}); -} + /// Serializes this StacTabBarView to a JSON map. + Map toJson(); -/// @nodoc -class _$StacTabBarViewCopyWithImpl<$Res, $Val extends StacTabBarView> - implements $StacTabBarViewCopyWith<$Res> { - _$StacTabBarViewCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTabBarView && + const DeepCollectionEquality().equals(other.children, children) && + (identical(other.initialIndex, initialIndex) || + other.initialIndex == initialIndex) && + (identical(other.dragStartBehavior, dragStartBehavior) || + other.dragStartBehavior == dragStartBehavior) && + (identical(other.physics, physics) || other.physics == physics) && + (identical(other.viewportFraction, viewportFraction) || + other.viewportFraction == viewportFraction) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(children), + initialIndex, + dragStartBehavior, + physics, + viewportFraction, + clipBehavior); - /// Create a copy of StacTabBarView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? children = null, - Object? initialIndex = null, - Object? dragStartBehavior = null, - Object? physics = freezed, - Object? viewportFraction = null, - Object? clipBehavior = null, - }) { - return _then(_value.copyWith( - children: null == children - ? _value.children - : children // ignore: cast_nullable_to_non_nullable - as List>, - initialIndex: null == initialIndex - ? _value.initialIndex - : initialIndex // ignore: cast_nullable_to_non_nullable - as int, - dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior - : dragStartBehavior // ignore: cast_nullable_to_non_nullable - as DragStartBehavior, - physics: freezed == physics - ? _value.physics - : physics // ignore: cast_nullable_to_non_nullable - as StacScrollPhysics?, - viewportFraction: null == viewportFraction - ? _value.viewportFraction - : viewportFraction // ignore: cast_nullable_to_non_nullable - as double, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - ) as $Val); + String toString() { + return 'StacTabBarView(children: $children, initialIndex: $initialIndex, dragStartBehavior: $dragStartBehavior, physics: $physics, viewportFraction: $viewportFraction, clipBehavior: $clipBehavior)'; } } /// @nodoc -abstract class _$$StacTabBarViewImplCopyWith<$Res> - implements $StacTabBarViewCopyWith<$Res> { - factory _$$StacTabBarViewImplCopyWith(_$StacTabBarViewImpl value, - $Res Function(_$StacTabBarViewImpl) then) = - __$$StacTabBarViewImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacTabBarViewCopyWith<$Res> { + factory $StacTabBarViewCopyWith( + StacTabBarView value, $Res Function(StacTabBarView) _then) = + _$StacTabBarViewCopyWithImpl; @useResult $Res call( {List> children, @@ -121,12 +83,12 @@ abstract class _$$StacTabBarViewImplCopyWith<$Res> } /// @nodoc -class __$$StacTabBarViewImplCopyWithImpl<$Res> - extends _$StacTabBarViewCopyWithImpl<$Res, _$StacTabBarViewImpl> - implements _$$StacTabBarViewImplCopyWith<$Res> { - __$$StacTabBarViewImplCopyWithImpl( - _$StacTabBarViewImpl _value, $Res Function(_$StacTabBarViewImpl) _then) - : super(_value, _then); +class _$StacTabBarViewCopyWithImpl<$Res> + implements $StacTabBarViewCopyWith<$Res> { + _$StacTabBarViewCopyWithImpl(this._self, this._then); + + final StacTabBarView _self; + final $Res Function(StacTabBarView) _then; /// Create a copy of StacTabBarView /// with the given fields replaced by the non-null parameter values. @@ -140,29 +102,29 @@ class __$$StacTabBarViewImplCopyWithImpl<$Res> Object? viewportFraction = null, Object? clipBehavior = null, }) { - return _then(_$StacTabBarViewImpl( + return _then(_self.copyWith( children: null == children - ? _value._children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, initialIndex: null == initialIndex - ? _value.initialIndex + ? _self.initialIndex : initialIndex // ignore: cast_nullable_to_non_nullable as int, dragStartBehavior: null == dragStartBehavior - ? _value.dragStartBehavior + ? _self.dragStartBehavior : dragStartBehavior // ignore: cast_nullable_to_non_nullable as DragStartBehavior, physics: freezed == physics - ? _value.physics + ? _self.physics : physics // ignore: cast_nullable_to_non_nullable as StacScrollPhysics?, viewportFraction: null == viewportFraction - ? _value.viewportFraction + ? _self.viewportFraction : viewportFraction // ignore: cast_nullable_to_non_nullable as double, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, )); @@ -171,8 +133,8 @@ class __$$StacTabBarViewImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacTabBarViewImpl implements _StacTabBarView { - const _$StacTabBarViewImpl( +class _StacTabBarView implements StacTabBarView { + const _StacTabBarView( {required final List> children, this.initialIndex = 0, this.dragStartBehavior = DragStartBehavior.start, @@ -180,9 +142,8 @@ class _$StacTabBarViewImpl implements _StacTabBarView { this.viewportFraction = 1.0, this.clipBehavior = Clip.hardEdge}) : _children = children; - - factory _$StacTabBarViewImpl.fromJson(Map json) => - _$$StacTabBarViewImplFromJson(json); + factory _StacTabBarView.fromJson(Map json) => + _$StacTabBarViewFromJson(json); final List> _children; @override @@ -207,16 +168,26 @@ class _$StacTabBarViewImpl implements _StacTabBarView { @JsonKey() final Clip clipBehavior; + /// Create a copy of StacTabBarView + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTabBarView(children: $children, initialIndex: $initialIndex, dragStartBehavior: $dragStartBehavior, physics: $physics, viewportFraction: $viewportFraction, clipBehavior: $clipBehavior)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTabBarViewCopyWith<_StacTabBarView> get copyWith => + __$StacTabBarViewCopyWithImpl<_StacTabBarView>(this, _$identity); + + @override + Map toJson() { + return _$StacTabBarViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTabBarViewImpl && + other is _StacTabBarView && const DeepCollectionEquality().equals(other._children, _children) && (identical(other.initialIndex, initialIndex) || other.initialIndex == initialIndex) && @@ -240,52 +211,76 @@ class _$StacTabBarViewImpl implements _StacTabBarView { viewportFraction, clipBehavior); - /// Create a copy of StacTabBarView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTabBarViewImplCopyWith<_$StacTabBarViewImpl> get copyWith => - __$$StacTabBarViewImplCopyWithImpl<_$StacTabBarViewImpl>( - this, _$identity); + String toString() { + return 'StacTabBarView(children: $children, initialIndex: $initialIndex, dragStartBehavior: $dragStartBehavior, physics: $physics, viewportFraction: $viewportFraction, clipBehavior: $clipBehavior)'; + } +} +/// @nodoc +abstract mixin class _$StacTabBarViewCopyWith<$Res> + implements $StacTabBarViewCopyWith<$Res> { + factory _$StacTabBarViewCopyWith( + _StacTabBarView value, $Res Function(_StacTabBarView) _then) = + __$StacTabBarViewCopyWithImpl; @override - Map toJson() { - return _$$StacTabBarViewImplToJson( - this, - ); - } + @useResult + $Res call( + {List> children, + int initialIndex, + DragStartBehavior dragStartBehavior, + StacScrollPhysics? physics, + double viewportFraction, + Clip clipBehavior}); } -abstract class _StacTabBarView implements StacTabBarView { - const factory _StacTabBarView( - {required final List> children, - final int initialIndex, - final DragStartBehavior dragStartBehavior, - final StacScrollPhysics? physics, - final double viewportFraction, - final Clip clipBehavior}) = _$StacTabBarViewImpl; +/// @nodoc +class __$StacTabBarViewCopyWithImpl<$Res> + implements _$StacTabBarViewCopyWith<$Res> { + __$StacTabBarViewCopyWithImpl(this._self, this._then); - factory _StacTabBarView.fromJson(Map json) = - _$StacTabBarViewImpl.fromJson; - - @override - List> get children; - @override - int get initialIndex; - @override - DragStartBehavior get dragStartBehavior; - @override - StacScrollPhysics? get physics; - @override - double get viewportFraction; - @override - Clip get clipBehavior; + final _StacTabBarView _self; + final $Res Function(_StacTabBarView) _then; /// Create a copy of StacTabBarView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTabBarViewImplCopyWith<_$StacTabBarViewImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? children = null, + Object? initialIndex = null, + Object? dragStartBehavior = null, + Object? physics = freezed, + Object? viewportFraction = null, + Object? clipBehavior = null, + }) { + return _then(_StacTabBarView( + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + initialIndex: null == initialIndex + ? _self.initialIndex + : initialIndex // ignore: cast_nullable_to_non_nullable + as int, + dragStartBehavior: null == dragStartBehavior + ? _self.dragStartBehavior + : dragStartBehavior // ignore: cast_nullable_to_non_nullable + as DragStartBehavior, + physics: freezed == physics + ? _self.physics + : physics // ignore: cast_nullable_to_non_nullable + as StacScrollPhysics?, + viewportFraction: null == viewportFraction + ? _self.viewportFraction + : viewportFraction // ignore: cast_nullable_to_non_nullable + as double, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.g.dart b/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.g.dart index 3d236017..903a65bb 100644 --- a/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.g.dart +++ b/packages/stac/lib/src/parsers/stac_tab_bar_view/stac_tab_bar_view.g.dart @@ -6,8 +6,8 @@ part of 'stac_tab_bar_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTabBarViewImpl _$$StacTabBarViewImplFromJson(Map json) => - _$StacTabBarViewImpl( +_StacTabBarView _$StacTabBarViewFromJson(Map json) => + _StacTabBarView( children: (json['children'] as List) .map((e) => e as Map) .toList(), @@ -21,8 +21,7 @@ _$StacTabBarViewImpl _$$StacTabBarViewImplFromJson(Map json) => Clip.hardEdge, ); -Map _$$StacTabBarViewImplToJson( - _$StacTabBarViewImpl instance) => +Map _$StacTabBarViewToJson(_StacTabBarView instance) => { 'children': instance.children, 'initialIndex': instance.initialIndex, diff --git a/packages/stac/lib/src/parsers/stac_table/stac_table.dart b/packages/stac/lib/src/parsers/stac_table/stac_table.dart index 034ee647..04799e51 100644 --- a/packages/stac/lib/src/parsers/stac_table/stac_table.dart +++ b/packages/stac/lib/src/parsers/stac_table/stac_table.dart @@ -15,7 +15,7 @@ enum StacTableColumnWidthType { } @freezed -class StacTable with _$StacTable { +abstract class StacTable with _$StacTable { const factory StacTable({ @Default([]) List children, Map? columnWidths, @@ -32,7 +32,7 @@ class StacTable with _$StacTable { } @freezed -class StacTableRow with _$StacTableRow { +abstract class StacTableRow with _$StacTableRow { const factory StacTableRow({ StacBoxDecoration? decoration, @Default([]) List> children, @@ -43,7 +43,7 @@ class StacTableRow with _$StacTableRow { } @freezed -class StacTableBorder with _$StacTableBorder { +abstract class StacTableBorder with _$StacTableBorder { const factory StacTableBorder({ @Default('#000000') String color, @Default(1.0) double width, @@ -56,7 +56,7 @@ class StacTableBorder with _$StacTableBorder { } @freezed -class StacTableColumnWidth with _$StacTableColumnWidth { +abstract class StacTableColumnWidth with _$StacTableColumnWidth { const factory StacTableColumnWidth({ @Default(StacTableColumnWidthType.flexColumnWidth) StacTableColumnWidthType type, diff --git a/packages/stac/lib/src/parsers/stac_table/stac_table.freezed.dart b/packages/stac/lib/src/parsers/stac_table/stac_table.freezed.dart index 6df648da..ef045935 100644 --- a/packages/stac/lib/src/parsers/stac_table/stac_table.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_table/stac_table.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,42 +10,71 @@ part of 'stac_table.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTable _$StacTableFromJson(Map json) { - return _StacTable.fromJson(json); -} - /// @nodoc mixin _$StacTable { - List get children => throw _privateConstructorUsedError; - Map? get columnWidths => - throw _privateConstructorUsedError; - StacTableColumnWidth? get defaultColumnWidth => - throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - StacTableBorder? get border => throw _privateConstructorUsedError; - TableCellVerticalAlignment get defaultVerticalAlignment => - throw _privateConstructorUsedError; - TextBaseline? get textBaseline => throw _privateConstructorUsedError; - - /// Serializes this StacTable to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List get children; + Map? get columnWidths; + StacTableColumnWidth? get defaultColumnWidth; + TextDirection? get textDirection; + StacTableBorder? get border; + TableCellVerticalAlignment get defaultVerticalAlignment; + TextBaseline? get textBaseline; /// Create a copy of StacTable /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTableCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTableCopyWithImpl(this as StacTable, _$identity); + + /// Serializes this StacTable to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTable && + const DeepCollectionEquality().equals(other.children, children) && + const DeepCollectionEquality() + .equals(other.columnWidths, columnWidths) && + (identical(other.defaultColumnWidth, defaultColumnWidth) || + other.defaultColumnWidth == defaultColumnWidth) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + (identical(other.border, border) || other.border == border) && + (identical( + other.defaultVerticalAlignment, defaultVerticalAlignment) || + other.defaultVerticalAlignment == defaultVerticalAlignment) && + (identical(other.textBaseline, textBaseline) || + other.textBaseline == textBaseline)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(children), + const DeepCollectionEquality().hash(columnWidths), + defaultColumnWidth, + textDirection, + border, + defaultVerticalAlignment, + textBaseline); + + @override + String toString() { + return 'StacTable(children: $children, columnWidths: $columnWidths, defaultColumnWidth: $defaultColumnWidth, textDirection: $textDirection, border: $border, defaultVerticalAlignment: $defaultVerticalAlignment, textBaseline: $textBaseline)'; + } } /// @nodoc -abstract class $StacTableCopyWith<$Res> { - factory $StacTableCopyWith(StacTable value, $Res Function(StacTable) then) = - _$StacTableCopyWithImpl<$Res, StacTable>; +abstract mixin class $StacTableCopyWith<$Res> { + factory $StacTableCopyWith(StacTable value, $Res Function(StacTable) _then) = + _$StacTableCopyWithImpl; @useResult $Res call( {List children, @@ -60,14 +90,11 @@ abstract class $StacTableCopyWith<$Res> { } /// @nodoc -class _$StacTableCopyWithImpl<$Res, $Val extends StacTable> - implements $StacTableCopyWith<$Res> { - _$StacTableCopyWithImpl(this._value, this._then); +class _$StacTableCopyWithImpl<$Res> implements $StacTableCopyWith<$Res> { + _$StacTableCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTable _self; + final $Res Function(StacTable) _then; /// Create a copy of StacTable /// with the given fields replaced by the non-null parameter values. @@ -82,36 +109,36 @@ class _$StacTableCopyWithImpl<$Res, $Val extends StacTable> Object? defaultVerticalAlignment = null, Object? textBaseline = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( children: null == children - ? _value.children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List, columnWidths: freezed == columnWidths - ? _value.columnWidths + ? _self.columnWidths : columnWidths // ignore: cast_nullable_to_non_nullable as Map?, defaultColumnWidth: freezed == defaultColumnWidth - ? _value.defaultColumnWidth + ? _self.defaultColumnWidth : defaultColumnWidth // ignore: cast_nullable_to_non_nullable as StacTableColumnWidth?, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, border: freezed == border - ? _value.border + ? _self.border : border // ignore: cast_nullable_to_non_nullable as StacTableBorder?, defaultVerticalAlignment: null == defaultVerticalAlignment - ? _value.defaultVerticalAlignment + ? _self.defaultVerticalAlignment : defaultVerticalAlignment // ignore: cast_nullable_to_non_nullable as TableCellVerticalAlignment, textBaseline: freezed == textBaseline - ? _value.textBaseline + ? _self.textBaseline : textBaseline // ignore: cast_nullable_to_non_nullable as TextBaseline?, - ) as $Val); + )); } /// Create a copy of StacTable @@ -119,13 +146,13 @@ class _$StacTableCopyWithImpl<$Res, $Val extends StacTable> @override @pragma('vm:prefer-inline') $StacTableColumnWidthCopyWith<$Res>? get defaultColumnWidth { - if (_value.defaultColumnWidth == null) { + if (_self.defaultColumnWidth == null) { return null; } - return $StacTableColumnWidthCopyWith<$Res>(_value.defaultColumnWidth!, + return $StacTableColumnWidthCopyWith<$Res>(_self.defaultColumnWidth!, (value) { - return _then(_value.copyWith(defaultColumnWidth: value) as $Val); + return _then(_self.copyWith(defaultColumnWidth: value)); }); } @@ -134,97 +161,20 @@ class _$StacTableCopyWithImpl<$Res, $Val extends StacTable> @override @pragma('vm:prefer-inline') $StacTableBorderCopyWith<$Res>? get border { - if (_value.border == null) { + if (_self.border == null) { return null; } - return $StacTableBorderCopyWith<$Res>(_value.border!, (value) { - return _then(_value.copyWith(border: value) as $Val); + return $StacTableBorderCopyWith<$Res>(_self.border!, (value) { + return _then(_self.copyWith(border: value)); }); } } -/// @nodoc -abstract class _$$StacTableImplCopyWith<$Res> - implements $StacTableCopyWith<$Res> { - factory _$$StacTableImplCopyWith( - _$StacTableImpl value, $Res Function(_$StacTableImpl) then) = - __$$StacTableImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {List children, - Map? columnWidths, - StacTableColumnWidth? defaultColumnWidth, - TextDirection? textDirection, - StacTableBorder? border, - TableCellVerticalAlignment defaultVerticalAlignment, - TextBaseline? textBaseline}); - - @override - $StacTableColumnWidthCopyWith<$Res>? get defaultColumnWidth; - @override - $StacTableBorderCopyWith<$Res>? get border; -} - -/// @nodoc -class __$$StacTableImplCopyWithImpl<$Res> - extends _$StacTableCopyWithImpl<$Res, _$StacTableImpl> - implements _$$StacTableImplCopyWith<$Res> { - __$$StacTableImplCopyWithImpl( - _$StacTableImpl _value, $Res Function(_$StacTableImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTable - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? children = null, - Object? columnWidths = freezed, - Object? defaultColumnWidth = freezed, - Object? textDirection = freezed, - Object? border = freezed, - Object? defaultVerticalAlignment = null, - Object? textBaseline = freezed, - }) { - return _then(_$StacTableImpl( - children: null == children - ? _value._children - : children // ignore: cast_nullable_to_non_nullable - as List, - columnWidths: freezed == columnWidths - ? _value._columnWidths - : columnWidths // ignore: cast_nullable_to_non_nullable - as Map?, - defaultColumnWidth: freezed == defaultColumnWidth - ? _value.defaultColumnWidth - : defaultColumnWidth // ignore: cast_nullable_to_non_nullable - as StacTableColumnWidth?, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - border: freezed == border - ? _value.border - : border // ignore: cast_nullable_to_non_nullable - as StacTableBorder?, - defaultVerticalAlignment: null == defaultVerticalAlignment - ? _value.defaultVerticalAlignment - : defaultVerticalAlignment // ignore: cast_nullable_to_non_nullable - as TableCellVerticalAlignment, - textBaseline: freezed == textBaseline - ? _value.textBaseline - : textBaseline // ignore: cast_nullable_to_non_nullable - as TextBaseline?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacTableImpl implements _StacTable { - const _$StacTableImpl( +class _StacTable implements StacTable { + const _StacTable( {final List children = const [], final Map? columnWidths, this.defaultColumnWidth, @@ -234,9 +184,8 @@ class _$StacTableImpl implements _StacTable { this.textBaseline}) : _children = children, _columnWidths = columnWidths; - - factory _$StacTableImpl.fromJson(Map json) => - _$$StacTableImplFromJson(json); + factory _StacTable.fromJson(Map json) => + _$StacTableFromJson(json); final List _children; @override @@ -269,16 +218,26 @@ class _$StacTableImpl implements _StacTable { @override final TextBaseline? textBaseline; + /// Create a copy of StacTable + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTable(children: $children, columnWidths: $columnWidths, defaultColumnWidth: $defaultColumnWidth, textDirection: $textDirection, border: $border, defaultVerticalAlignment: $defaultVerticalAlignment, textBaseline: $textBaseline)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTableCopyWith<_StacTable> get copyWith => + __$StacTableCopyWithImpl<_StacTable>(this, _$identity); + + @override + Map toJson() { + return _$StacTableToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTableImpl && + other is _StacTable && const DeepCollectionEquality().equals(other._children, _children) && const DeepCollectionEquality() .equals(other._columnWidths, _columnWidths) && @@ -306,82 +265,159 @@ class _$StacTableImpl implements _StacTable { defaultVerticalAlignment, textBaseline); - /// Create a copy of StacTable - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacTableImplCopyWith<_$StacTableImpl> get copyWith => - __$$StacTableImplCopyWithImpl<_$StacTableImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacTableImplToJson( - this, - ); + String toString() { + return 'StacTable(children: $children, columnWidths: $columnWidths, defaultColumnWidth: $defaultColumnWidth, textDirection: $textDirection, border: $border, defaultVerticalAlignment: $defaultVerticalAlignment, textBaseline: $textBaseline)'; } } -abstract class _StacTable implements StacTable { - const factory _StacTable( - {final List children, - final Map? columnWidths, - final StacTableColumnWidth? defaultColumnWidth, - final TextDirection? textDirection, - final StacTableBorder? border, - final TableCellVerticalAlignment defaultVerticalAlignment, - final TextBaseline? textBaseline}) = _$StacTableImpl; - - factory _StacTable.fromJson(Map json) = - _$StacTableImpl.fromJson; - - @override - List get children; - @override - Map? get columnWidths; +/// @nodoc +abstract mixin class _$StacTableCopyWith<$Res> + implements $StacTableCopyWith<$Res> { + factory _$StacTableCopyWith( + _StacTable value, $Res Function(_StacTable) _then) = + __$StacTableCopyWithImpl; @override - StacTableColumnWidth? get defaultColumnWidth; + @useResult + $Res call( + {List children, + Map? columnWidths, + StacTableColumnWidth? defaultColumnWidth, + TextDirection? textDirection, + StacTableBorder? border, + TableCellVerticalAlignment defaultVerticalAlignment, + TextBaseline? textBaseline}); + @override - TextDirection? get textDirection; + $StacTableColumnWidthCopyWith<$Res>? get defaultColumnWidth; @override - StacTableBorder? get border; + $StacTableBorderCopyWith<$Res>? get border; +} + +/// @nodoc +class __$StacTableCopyWithImpl<$Res> implements _$StacTableCopyWith<$Res> { + __$StacTableCopyWithImpl(this._self, this._then); + + final _StacTable _self; + final $Res Function(_StacTable) _then; + + /// Create a copy of StacTable + /// with the given fields replaced by the non-null parameter values. @override - TableCellVerticalAlignment get defaultVerticalAlignment; + @pragma('vm:prefer-inline') + $Res call({ + Object? children = null, + Object? columnWidths = freezed, + Object? defaultColumnWidth = freezed, + Object? textDirection = freezed, + Object? border = freezed, + Object? defaultVerticalAlignment = null, + Object? textBaseline = freezed, + }) { + return _then(_StacTable( + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List, + columnWidths: freezed == columnWidths + ? _self._columnWidths + : columnWidths // ignore: cast_nullable_to_non_nullable + as Map?, + defaultColumnWidth: freezed == defaultColumnWidth + ? _self.defaultColumnWidth + : defaultColumnWidth // ignore: cast_nullable_to_non_nullable + as StacTableColumnWidth?, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + border: freezed == border + ? _self.border + : border // ignore: cast_nullable_to_non_nullable + as StacTableBorder?, + defaultVerticalAlignment: null == defaultVerticalAlignment + ? _self.defaultVerticalAlignment + : defaultVerticalAlignment // ignore: cast_nullable_to_non_nullable + as TableCellVerticalAlignment, + textBaseline: freezed == textBaseline + ? _self.textBaseline + : textBaseline // ignore: cast_nullable_to_non_nullable + as TextBaseline?, + )); + } + + /// Create a copy of StacTable + /// with the given fields replaced by the non-null parameter values. @override - TextBaseline? get textBaseline; + @pragma('vm:prefer-inline') + $StacTableColumnWidthCopyWith<$Res>? get defaultColumnWidth { + if (_self.defaultColumnWidth == null) { + return null; + } + + return $StacTableColumnWidthCopyWith<$Res>(_self.defaultColumnWidth!, + (value) { + return _then(_self.copyWith(defaultColumnWidth: value)); + }); + } /// Create a copy of StacTable /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTableImplCopyWith<_$StacTableImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $StacTableBorderCopyWith<$Res>? get border { + if (_self.border == null) { + return null; + } -StacTableRow _$StacTableRowFromJson(Map json) { - return _StacTableRow.fromJson(json); + return $StacTableBorderCopyWith<$Res>(_self.border!, (value) { + return _then(_self.copyWith(border: value)); + }); + } } /// @nodoc mixin _$StacTableRow { - StacBoxDecoration? get decoration => throw _privateConstructorUsedError; - List> get children => throw _privateConstructorUsedError; - - /// Serializes this StacTableRow to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacBoxDecoration? get decoration; + List> get children; /// Create a copy of StacTableRow /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTableRowCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTableRowCopyWithImpl( + this as StacTableRow, _$identity); + + /// Serializes this StacTableRow to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTableRow && + (identical(other.decoration, decoration) || + other.decoration == decoration) && + const DeepCollectionEquality().equals(other.children, children)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, decoration, const DeepCollectionEquality().hash(children)); + + @override + String toString() { + return 'StacTableRow(decoration: $decoration, children: $children)'; + } } /// @nodoc -abstract class $StacTableRowCopyWith<$Res> { +abstract mixin class $StacTableRowCopyWith<$Res> { factory $StacTableRowCopyWith( - StacTableRow value, $Res Function(StacTableRow) then) = - _$StacTableRowCopyWithImpl<$Res, StacTableRow>; + StacTableRow value, $Res Function(StacTableRow) _then) = + _$StacTableRowCopyWithImpl; @useResult $Res call( {StacBoxDecoration? decoration, List> children}); @@ -390,14 +426,11 @@ abstract class $StacTableRowCopyWith<$Res> { } /// @nodoc -class _$StacTableRowCopyWithImpl<$Res, $Val extends StacTableRow> - implements $StacTableRowCopyWith<$Res> { - _$StacTableRowCopyWithImpl(this._value, this._then); +class _$StacTableRowCopyWithImpl<$Res> implements $StacTableRowCopyWith<$Res> { + _$StacTableRowCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTableRow _self; + final $Res Function(StacTableRow) _then; /// Create a copy of StacTableRow /// with the given fields replaced by the non-null parameter values. @@ -407,16 +440,16 @@ class _$StacTableRowCopyWithImpl<$Res, $Val extends StacTableRow> Object? decoration = freezed, Object? children = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( decoration: freezed == decoration - ? _value.decoration + ? _self.decoration : decoration // ignore: cast_nullable_to_non_nullable as StacBoxDecoration?, children: null == children - ? _value.children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, - ) as $Val); + )); } /// Create a copy of StacTableRow @@ -424,69 +457,24 @@ class _$StacTableRowCopyWithImpl<$Res, $Val extends StacTableRow> @override @pragma('vm:prefer-inline') $StacBoxDecorationCopyWith<$Res>? get decoration { - if (_value.decoration == null) { + if (_self.decoration == null) { return null; } - return $StacBoxDecorationCopyWith<$Res>(_value.decoration!, (value) { - return _then(_value.copyWith(decoration: value) as $Val); + return $StacBoxDecorationCopyWith<$Res>(_self.decoration!, (value) { + return _then(_self.copyWith(decoration: value)); }); } } /// @nodoc -abstract class _$$StacTableRowImplCopyWith<$Res> - implements $StacTableRowCopyWith<$Res> { - factory _$$StacTableRowImplCopyWith( - _$StacTableRowImpl value, $Res Function(_$StacTableRowImpl) then) = - __$$StacTableRowImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacBoxDecoration? decoration, List> children}); - - @override - $StacBoxDecorationCopyWith<$Res>? get decoration; -} - -/// @nodoc -class __$$StacTableRowImplCopyWithImpl<$Res> - extends _$StacTableRowCopyWithImpl<$Res, _$StacTableRowImpl> - implements _$$StacTableRowImplCopyWith<$Res> { - __$$StacTableRowImplCopyWithImpl( - _$StacTableRowImpl _value, $Res Function(_$StacTableRowImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTableRow - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? decoration = freezed, - Object? children = null, - }) { - return _then(_$StacTableRowImpl( - decoration: freezed == decoration - ? _value.decoration - : decoration // ignore: cast_nullable_to_non_nullable - as StacBoxDecoration?, - children: null == children - ? _value._children - : children // ignore: cast_nullable_to_non_nullable - as List>, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$StacTableRowImpl implements _StacTableRow { - const _$StacTableRowImpl( - {this.decoration, final List> children = const []}) - : _children = children; - - factory _$StacTableRowImpl.fromJson(Map json) => - _$$StacTableRowImplFromJson(json); +@JsonSerializable() +class _StacTableRow implements StacTableRow { + const _StacTableRow( + {this.decoration, final List> children = const []}) + : _children = children; + factory _StacTableRow.fromJson(Map json) => + _$StacTableRowFromJson(json); @override final StacBoxDecoration? decoration; @@ -499,16 +487,26 @@ class _$StacTableRowImpl implements _StacTableRow { return EqualUnmodifiableListView(_children); } + /// Create a copy of StacTableRow + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTableRow(decoration: $decoration, children: $children)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTableRowCopyWith<_StacTableRow> get copyWith => + __$StacTableRowCopyWithImpl<_StacTableRow>(this, _$identity); + + @override + Map toJson() { + return _$StacTableRowToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTableRowImpl && + other is _StacTableRow && (identical(other.decoration, decoration) || other.decoration == decoration) && const DeepCollectionEquality().equals(other._children, _children)); @@ -519,69 +517,116 @@ class _$StacTableRowImpl implements _StacTableRow { int get hashCode => Object.hash( runtimeType, decoration, const DeepCollectionEquality().hash(_children)); - /// Create a copy of StacTableRow - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTableRowImplCopyWith<_$StacTableRowImpl> get copyWith => - __$$StacTableRowImplCopyWithImpl<_$StacTableRowImpl>(this, _$identity); + String toString() { + return 'StacTableRow(decoration: $decoration, children: $children)'; + } +} +/// @nodoc +abstract mixin class _$StacTableRowCopyWith<$Res> + implements $StacTableRowCopyWith<$Res> { + factory _$StacTableRowCopyWith( + _StacTableRow value, $Res Function(_StacTableRow) _then) = + __$StacTableRowCopyWithImpl; @override - Map toJson() { - return _$$StacTableRowImplToJson( - this, - ); - } + @useResult + $Res call( + {StacBoxDecoration? decoration, List> children}); + + @override + $StacBoxDecorationCopyWith<$Res>? get decoration; } -abstract class _StacTableRow implements StacTableRow { - const factory _StacTableRow( - {final StacBoxDecoration? decoration, - final List> children}) = _$StacTableRowImpl; +/// @nodoc +class __$StacTableRowCopyWithImpl<$Res> + implements _$StacTableRowCopyWith<$Res> { + __$StacTableRowCopyWithImpl(this._self, this._then); - factory _StacTableRow.fromJson(Map json) = - _$StacTableRowImpl.fromJson; + final _StacTableRow _self; + final $Res Function(_StacTableRow) _then; + /// Create a copy of StacTableRow + /// with the given fields replaced by the non-null parameter values. @override - StacBoxDecoration? get decoration; - @override - List> get children; + @pragma('vm:prefer-inline') + $Res call({ + Object? decoration = freezed, + Object? children = null, + }) { + return _then(_StacTableRow( + decoration: freezed == decoration + ? _self.decoration + : decoration // ignore: cast_nullable_to_non_nullable + as StacBoxDecoration?, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + )); + } /// Create a copy of StacTableRow /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTableRowImplCopyWith<_$StacTableRowImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $StacBoxDecorationCopyWith<$Res>? get decoration { + if (_self.decoration == null) { + return null; + } -StacTableBorder _$StacTableBorderFromJson(Map json) { - return _StacTableBorder.fromJson(json); + return $StacBoxDecorationCopyWith<$Res>(_self.decoration!, (value) { + return _then(_self.copyWith(decoration: value)); + }); + } } /// @nodoc mixin _$StacTableBorder { - String get color => throw _privateConstructorUsedError; - double get width => throw _privateConstructorUsedError; - BorderStyle get style => throw _privateConstructorUsedError; - StacBorderRadius get borderRadius => throw _privateConstructorUsedError; - - /// Serializes this StacTableBorder to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get color; + double get width; + BorderStyle get style; + StacBorderRadius get borderRadius; /// Create a copy of StacTableBorder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTableBorderCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTableBorderCopyWithImpl( + this as StacTableBorder, _$identity); + + /// Serializes this StacTableBorder to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTableBorder && + (identical(other.color, color) || other.color == color) && + (identical(other.width, width) || other.width == width) && + (identical(other.style, style) || other.style == style) && + (identical(other.borderRadius, borderRadius) || + other.borderRadius == borderRadius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, color, width, style, borderRadius); + + @override + String toString() { + return 'StacTableBorder(color: $color, width: $width, style: $style, borderRadius: $borderRadius)'; + } } /// @nodoc -abstract class $StacTableBorderCopyWith<$Res> { +abstract mixin class $StacTableBorderCopyWith<$Res> { factory $StacTableBorderCopyWith( - StacTableBorder value, $Res Function(StacTableBorder) then) = - _$StacTableBorderCopyWithImpl<$Res, StacTableBorder>; + StacTableBorder value, $Res Function(StacTableBorder) _then) = + _$StacTableBorderCopyWithImpl; @useResult $Res call( {String color, @@ -593,14 +638,12 @@ abstract class $StacTableBorderCopyWith<$Res> { } /// @nodoc -class _$StacTableBorderCopyWithImpl<$Res, $Val extends StacTableBorder> +class _$StacTableBorderCopyWithImpl<$Res> implements $StacTableBorderCopyWith<$Res> { - _$StacTableBorderCopyWithImpl(this._value, this._then); + _$StacTableBorderCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTableBorder _self; + final $Res Function(StacTableBorder) _then; /// Create a copy of StacTableBorder /// with the given fields replaced by the non-null parameter values. @@ -612,24 +655,24 @@ class _$StacTableBorderCopyWithImpl<$Res, $Val extends StacTableBorder> Object? style = null, Object? borderRadius = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( color: null == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as double, style: null == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as BorderStyle, borderRadius: null == borderRadius - ? _value.borderRadius + ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable as StacBorderRadius, - ) as $Val); + )); } /// Create a copy of StacTableBorder @@ -637,80 +680,22 @@ class _$StacTableBorderCopyWithImpl<$Res, $Val extends StacTableBorder> @override @pragma('vm:prefer-inline') $StacBorderRadiusCopyWith<$Res> get borderRadius { - return $StacBorderRadiusCopyWith<$Res>(_value.borderRadius, (value) { - return _then(_value.copyWith(borderRadius: value) as $Val); + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); }); } } -/// @nodoc -abstract class _$$StacTableBorderImplCopyWith<$Res> - implements $StacTableBorderCopyWith<$Res> { - factory _$$StacTableBorderImplCopyWith(_$StacTableBorderImpl value, - $Res Function(_$StacTableBorderImpl) then) = - __$$StacTableBorderImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String color, - double width, - BorderStyle style, - StacBorderRadius borderRadius}); - - @override - $StacBorderRadiusCopyWith<$Res> get borderRadius; -} - -/// @nodoc -class __$$StacTableBorderImplCopyWithImpl<$Res> - extends _$StacTableBorderCopyWithImpl<$Res, _$StacTableBorderImpl> - implements _$$StacTableBorderImplCopyWith<$Res> { - __$$StacTableBorderImplCopyWithImpl( - _$StacTableBorderImpl _value, $Res Function(_$StacTableBorderImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTableBorder - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? color = null, - Object? width = null, - Object? style = null, - Object? borderRadius = null, - }) { - return _then(_$StacTableBorderImpl( - color: null == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as double, - style: null == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as BorderStyle, - borderRadius: null == borderRadius - ? _value.borderRadius - : borderRadius // ignore: cast_nullable_to_non_nullable - as StacBorderRadius, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacTableBorderImpl implements _StacTableBorder { - const _$StacTableBorderImpl( +class _StacTableBorder implements StacTableBorder { + const _StacTableBorder( {this.color = '#000000', this.width = 1.0, this.style = BorderStyle.solid, this.borderRadius = const StacBorderRadius()}); - - factory _$StacTableBorderImpl.fromJson(Map json) => - _$$StacTableBorderImplFromJson(json); + factory _StacTableBorder.fromJson(Map json) => + _$StacTableBorderFromJson(json); @override @JsonKey() @@ -725,16 +710,26 @@ class _$StacTableBorderImpl implements _StacTableBorder { @JsonKey() final StacBorderRadius borderRadius; + /// Create a copy of StacTableBorder + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTableBorder(color: $color, width: $width, style: $style, borderRadius: $borderRadius)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTableBorderCopyWith<_StacTableBorder> get copyWith => + __$StacTableBorderCopyWithImpl<_StacTableBorder>(this, _$identity); + + @override + Map toJson() { + return _$StacTableBorderToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTableBorderImpl && + other is _StacTableBorder && (identical(other.color, color) || other.color == color) && (identical(other.width, width) || other.width == width) && (identical(other.style, style) || other.style == style) && @@ -747,128 +742,130 @@ class _$StacTableBorderImpl implements _StacTableBorder { int get hashCode => Object.hash(runtimeType, color, width, style, borderRadius); - /// Create a copy of StacTableBorder - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTableBorderImplCopyWith<_$StacTableBorderImpl> get copyWith => - __$$StacTableBorderImplCopyWithImpl<_$StacTableBorderImpl>( - this, _$identity); + String toString() { + return 'StacTableBorder(color: $color, width: $width, style: $style, borderRadius: $borderRadius)'; + } +} +/// @nodoc +abstract mixin class _$StacTableBorderCopyWith<$Res> + implements $StacTableBorderCopyWith<$Res> { + factory _$StacTableBorderCopyWith( + _StacTableBorder value, $Res Function(_StacTableBorder) _then) = + __$StacTableBorderCopyWithImpl; @override - Map toJson() { - return _$$StacTableBorderImplToJson( - this, - ); - } + @useResult + $Res call( + {String color, + double width, + BorderStyle style, + StacBorderRadius borderRadius}); + + @override + $StacBorderRadiusCopyWith<$Res> get borderRadius; } -abstract class _StacTableBorder implements StacTableBorder { - const factory _StacTableBorder( - {final String color, - final double width, - final BorderStyle style, - final StacBorderRadius borderRadius}) = _$StacTableBorderImpl; +/// @nodoc +class __$StacTableBorderCopyWithImpl<$Res> + implements _$StacTableBorderCopyWith<$Res> { + __$StacTableBorderCopyWithImpl(this._self, this._then); - factory _StacTableBorder.fromJson(Map json) = - _$StacTableBorderImpl.fromJson; + final _StacTableBorder _self; + final $Res Function(_StacTableBorder) _then; + /// Create a copy of StacTableBorder + /// with the given fields replaced by the non-null parameter values. @override - String get color; - @override - double get width; - @override - BorderStyle get style; - @override - StacBorderRadius get borderRadius; + @pragma('vm:prefer-inline') + $Res call({ + Object? color = null, + Object? width = null, + Object? style = null, + Object? borderRadius = null, + }) { + return _then(_StacTableBorder( + color: null == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as double, + style: null == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as BorderStyle, + borderRadius: null == borderRadius + ? _self.borderRadius + : borderRadius // ignore: cast_nullable_to_non_nullable + as StacBorderRadius, + )); + } /// Create a copy of StacTableBorder /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTableBorderImplCopyWith<_$StacTableBorderImpl> get copyWith => - throw _privateConstructorUsedError; -} - -StacTableColumnWidth _$StacTableColumnWidthFromJson(Map json) { - return _StacTableColumnWidth.fromJson(json); + @pragma('vm:prefer-inline') + $StacBorderRadiusCopyWith<$Res> get borderRadius { + return $StacBorderRadiusCopyWith<$Res>(_self.borderRadius, (value) { + return _then(_self.copyWith(borderRadius: value)); + }); + } } /// @nodoc mixin _$StacTableColumnWidth { - StacTableColumnWidthType get type => throw _privateConstructorUsedError; - double? get value => throw _privateConstructorUsedError; - - /// Serializes this StacTableColumnWidth to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacTableColumnWidthType get type; + double? get value; /// Create a copy of StacTableColumnWidth /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTableColumnWidthCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacTableColumnWidthCopyWithImpl( + this as StacTableColumnWidth, _$identity); -/// @nodoc -abstract class $StacTableColumnWidthCopyWith<$Res> { - factory $StacTableColumnWidthCopyWith(StacTableColumnWidth value, - $Res Function(StacTableColumnWidth) then) = - _$StacTableColumnWidthCopyWithImpl<$Res, StacTableColumnWidth>; - @useResult - $Res call({StacTableColumnWidthType type, double? value}); -} + /// Serializes this StacTableColumnWidth to a JSON map. + Map toJson(); -/// @nodoc -class _$StacTableColumnWidthCopyWithImpl<$Res, - $Val extends StacTableColumnWidth> - implements $StacTableColumnWidthCopyWith<$Res> { - _$StacTableColumnWidthCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTableColumnWidth && + (identical(other.type, type) || other.type == type) && + (identical(other.value, value) || other.value == value)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, type, value); - /// Create a copy of StacTableColumnWidth - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? type = null, - Object? value = freezed, - }) { - return _then(_value.copyWith( - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as StacTableColumnWidthType, - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as double?, - ) as $Val); + String toString() { + return 'StacTableColumnWidth(type: $type, value: $value)'; } } /// @nodoc -abstract class _$$StacTableColumnWidthImplCopyWith<$Res> - implements $StacTableColumnWidthCopyWith<$Res> { - factory _$$StacTableColumnWidthImplCopyWith(_$StacTableColumnWidthImpl value, - $Res Function(_$StacTableColumnWidthImpl) then) = - __$$StacTableColumnWidthImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacTableColumnWidthCopyWith<$Res> { + factory $StacTableColumnWidthCopyWith(StacTableColumnWidth value, + $Res Function(StacTableColumnWidth) _then) = + _$StacTableColumnWidthCopyWithImpl; @useResult $Res call({StacTableColumnWidthType type, double? value}); } /// @nodoc -class __$$StacTableColumnWidthImplCopyWithImpl<$Res> - extends _$StacTableColumnWidthCopyWithImpl<$Res, _$StacTableColumnWidthImpl> - implements _$$StacTableColumnWidthImplCopyWith<$Res> { - __$$StacTableColumnWidthImplCopyWithImpl(_$StacTableColumnWidthImpl _value, - $Res Function(_$StacTableColumnWidthImpl) _then) - : super(_value, _then); +class _$StacTableColumnWidthCopyWithImpl<$Res> + implements $StacTableColumnWidthCopyWith<$Res> { + _$StacTableColumnWidthCopyWithImpl(this._self, this._then); + + final StacTableColumnWidth _self; + final $Res Function(StacTableColumnWidth) _then; /// Create a copy of StacTableColumnWidth /// with the given fields replaced by the non-null parameter values. @@ -878,13 +875,13 @@ class __$$StacTableColumnWidthImplCopyWithImpl<$Res> Object? type = null, Object? value = freezed, }) { - return _then(_$StacTableColumnWidthImpl( + return _then(_self.copyWith( type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as StacTableColumnWidthType, value: freezed == value - ? _value.value + ? _self.value : value // ignore: cast_nullable_to_non_nullable as double?, )); @@ -893,12 +890,11 @@ class __$$StacTableColumnWidthImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacTableColumnWidthImpl implements _StacTableColumnWidth { - const _$StacTableColumnWidthImpl( +class _StacTableColumnWidth implements StacTableColumnWidth { + const _StacTableColumnWidth( {this.type = StacTableColumnWidthType.flexColumnWidth, this.value}); - - factory _$StacTableColumnWidthImpl.fromJson(Map json) => - _$$StacTableColumnWidthImplFromJson(json); + factory _StacTableColumnWidth.fromJson(Map json) => + _$StacTableColumnWidthFromJson(json); @override @JsonKey() @@ -906,16 +902,27 @@ class _$StacTableColumnWidthImpl implements _StacTableColumnWidth { @override final double? value; + /// Create a copy of StacTableColumnWidth + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTableColumnWidth(type: $type, value: $value)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTableColumnWidthCopyWith<_StacTableColumnWidth> get copyWith => + __$StacTableColumnWidthCopyWithImpl<_StacTableColumnWidth>( + this, _$identity); + + @override + Map toJson() { + return _$StacTableColumnWidthToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTableColumnWidthImpl && + other is _StacTableColumnWidth && (identical(other.type, type) || other.type == type) && (identical(other.value, value) || other.value == value)); } @@ -924,41 +931,50 @@ class _$StacTableColumnWidthImpl implements _StacTableColumnWidth { @override int get hashCode => Object.hash(runtimeType, type, value); - /// Create a copy of StacTableColumnWidth - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacTableColumnWidthImplCopyWith<_$StacTableColumnWidthImpl> - get copyWith => - __$$StacTableColumnWidthImplCopyWithImpl<_$StacTableColumnWidthImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacTableColumnWidthImplToJson( - this, - ); + String toString() { + return 'StacTableColumnWidth(type: $type, value: $value)'; } } -abstract class _StacTableColumnWidth implements StacTableColumnWidth { - const factory _StacTableColumnWidth( - {final StacTableColumnWidthType type, - final double? value}) = _$StacTableColumnWidthImpl; +/// @nodoc +abstract mixin class _$StacTableColumnWidthCopyWith<$Res> + implements $StacTableColumnWidthCopyWith<$Res> { + factory _$StacTableColumnWidthCopyWith(_StacTableColumnWidth value, + $Res Function(_StacTableColumnWidth) _then) = + __$StacTableColumnWidthCopyWithImpl; + @override + @useResult + $Res call({StacTableColumnWidthType type, double? value}); +} - factory _StacTableColumnWidth.fromJson(Map json) = - _$StacTableColumnWidthImpl.fromJson; +/// @nodoc +class __$StacTableColumnWidthCopyWithImpl<$Res> + implements _$StacTableColumnWidthCopyWith<$Res> { + __$StacTableColumnWidthCopyWithImpl(this._self, this._then); - @override - StacTableColumnWidthType get type; - @override - double? get value; + final _StacTableColumnWidth _self; + final $Res Function(_StacTableColumnWidth) _then; /// Create a copy of StacTableColumnWidth /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTableColumnWidthImplCopyWith<_$StacTableColumnWidthImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? type = null, + Object? value = freezed, + }) { + return _then(_StacTableColumnWidth( + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as StacTableColumnWidthType, + value: freezed == value + ? _self.value + : value // ignore: cast_nullable_to_non_nullable + as double?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_table/stac_table.g.dart b/packages/stac/lib/src/parsers/stac_table/stac_table.g.dart index 13f386ca..98ffd079 100644 --- a/packages/stac/lib/src/parsers/stac_table/stac_table.g.dart +++ b/packages/stac/lib/src/parsers/stac_table/stac_table.g.dart @@ -6,8 +6,7 @@ part of 'stac_table.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTableImpl _$$StacTableImplFromJson(Map json) => - _$StacTableImpl( +_StacTable _$StacTableFromJson(Map json) => _StacTable( children: (json['children'] as List?) ?.map((e) => StacTableRow.fromJson(e as Map)) .toList() ?? @@ -33,7 +32,7 @@ _$StacTableImpl _$$StacTableImplFromJson(Map json) => $enumDecodeNullable(_$TextBaselineEnumMap, json['textBaseline']), ); -Map _$$StacTableImplToJson(_$StacTableImpl instance) => +Map _$StacTableToJson(_StacTable instance) => { 'children': instance.children, 'columnWidths': @@ -65,8 +64,8 @@ const _$TextBaselineEnumMap = { TextBaseline.ideographic: 'ideographic', }; -_$StacTableRowImpl _$$StacTableRowImplFromJson(Map json) => - _$StacTableRowImpl( +_StacTableRow _$StacTableRowFromJson(Map json) => + _StacTableRow( decoration: json['decoration'] == null ? null : StacBoxDecoration.fromJson( @@ -77,15 +76,14 @@ _$StacTableRowImpl _$$StacTableRowImplFromJson(Map json) => const [], ); -Map _$$StacTableRowImplToJson(_$StacTableRowImpl instance) => +Map _$StacTableRowToJson(_StacTableRow instance) => { 'decoration': instance.decoration, 'children': instance.children, }; -_$StacTableBorderImpl _$$StacTableBorderImplFromJson( - Map json) => - _$StacTableBorderImpl( +_StacTableBorder _$StacTableBorderFromJson(Map json) => + _StacTableBorder( color: json['color'] as String? ?? '#000000', width: (json['width'] as num?)?.toDouble() ?? 1.0, style: $enumDecodeNullable(_$BorderStyleEnumMap, json['style']) ?? @@ -95,8 +93,7 @@ _$StacTableBorderImpl _$$StacTableBorderImplFromJson( : StacBorderRadius.fromJson(json['borderRadius']), ); -Map _$$StacTableBorderImplToJson( - _$StacTableBorderImpl instance) => +Map _$StacTableBorderToJson(_StacTableBorder instance) => { 'color': instance.color, 'width': instance.width, @@ -109,17 +106,17 @@ const _$BorderStyleEnumMap = { BorderStyle.solid: 'solid', }; -_$StacTableColumnWidthImpl _$$StacTableColumnWidthImplFromJson( +_StacTableColumnWidth _$StacTableColumnWidthFromJson( Map json) => - _$StacTableColumnWidthImpl( + _StacTableColumnWidth( type: $enumDecodeNullable( _$StacTableColumnWidthTypeEnumMap, json['type']) ?? StacTableColumnWidthType.flexColumnWidth, value: (json['value'] as num?)?.toDouble(), ); -Map _$$StacTableColumnWidthImplToJson( - _$StacTableColumnWidthImpl instance) => +Map _$StacTableColumnWidthToJson( + _StacTableColumnWidth instance) => { 'type': _$StacTableColumnWidthTypeEnumMap[instance.type]!, 'value': instance.value, diff --git a/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.dart b/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.dart index fdaf81ca..7b0d0558 100644 --- a/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.dart +++ b/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.dart @@ -7,7 +7,7 @@ part 'stac_table_cell.freezed.dart'; part 'stac_table_cell.g.dart'; @freezed -class StacTableCell with _$StacTableCell { +abstract class StacTableCell with _$StacTableCell { const factory StacTableCell({ TableCellVerticalAlignment? verticalAlignment, Map? child, diff --git a/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.freezed.dart b/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.freezed.dart index ca0b0efa..9c53b49c 100644 --- a/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,80 +10,51 @@ part of 'stac_table_cell.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTableCell _$StacTableCellFromJson(Map json) { - return _StacTableCell.fromJson(json); -} - /// @nodoc mixin _$StacTableCell { - TableCellVerticalAlignment? get verticalAlignment => - throw _privateConstructorUsedError; - Map? get child => throw _privateConstructorUsedError; - - /// Serializes this StacTableCell to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + TableCellVerticalAlignment? get verticalAlignment; + Map? get child; /// Create a copy of StacTableCell /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTableCellCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacTableCellCopyWithImpl( + this as StacTableCell, _$identity); -/// @nodoc -abstract class $StacTableCellCopyWith<$Res> { - factory $StacTableCellCopyWith( - StacTableCell value, $Res Function(StacTableCell) then) = - _$StacTableCellCopyWithImpl<$Res, StacTableCell>; - @useResult - $Res call( - {TableCellVerticalAlignment? verticalAlignment, - Map? child}); -} + /// Serializes this StacTableCell to a JSON map. + Map toJson(); -/// @nodoc -class _$StacTableCellCopyWithImpl<$Res, $Val extends StacTableCell> - implements $StacTableCellCopyWith<$Res> { - _$StacTableCellCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTableCell && + (identical(other.verticalAlignment, verticalAlignment) || + other.verticalAlignment == verticalAlignment) && + const DeepCollectionEquality().equals(other.child, child)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, verticalAlignment, + const DeepCollectionEquality().hash(child)); - /// Create a copy of StacTableCell - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? verticalAlignment = freezed, - Object? child = freezed, - }) { - return _then(_value.copyWith( - verticalAlignment: freezed == verticalAlignment - ? _value.verticalAlignment - : verticalAlignment // ignore: cast_nullable_to_non_nullable - as TableCellVerticalAlignment?, - child: freezed == child - ? _value.child - : child // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + String toString() { + return 'StacTableCell(verticalAlignment: $verticalAlignment, child: $child)'; } } /// @nodoc -abstract class _$$StacTableCellImplCopyWith<$Res> - implements $StacTableCellCopyWith<$Res> { - factory _$$StacTableCellImplCopyWith( - _$StacTableCellImpl value, $Res Function(_$StacTableCellImpl) then) = - __$$StacTableCellImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacTableCellCopyWith<$Res> { + factory $StacTableCellCopyWith( + StacTableCell value, $Res Function(StacTableCell) _then) = + _$StacTableCellCopyWithImpl; @useResult $Res call( {TableCellVerticalAlignment? verticalAlignment, @@ -90,12 +62,12 @@ abstract class _$$StacTableCellImplCopyWith<$Res> } /// @nodoc -class __$$StacTableCellImplCopyWithImpl<$Res> - extends _$StacTableCellCopyWithImpl<$Res, _$StacTableCellImpl> - implements _$$StacTableCellImplCopyWith<$Res> { - __$$StacTableCellImplCopyWithImpl( - _$StacTableCellImpl _value, $Res Function(_$StacTableCellImpl) _then) - : super(_value, _then); +class _$StacTableCellCopyWithImpl<$Res> + implements $StacTableCellCopyWith<$Res> { + _$StacTableCellCopyWithImpl(this._self, this._then); + + final StacTableCell _self; + final $Res Function(StacTableCell) _then; /// Create a copy of StacTableCell /// with the given fields replaced by the non-null parameter values. @@ -105,13 +77,13 @@ class __$$StacTableCellImplCopyWithImpl<$Res> Object? verticalAlignment = freezed, Object? child = freezed, }) { - return _then(_$StacTableCellImpl( + return _then(_self.copyWith( verticalAlignment: freezed == verticalAlignment - ? _value.verticalAlignment + ? _self.verticalAlignment : verticalAlignment // ignore: cast_nullable_to_non_nullable as TableCellVerticalAlignment?, child: freezed == child - ? _value._child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -120,13 +92,12 @@ class __$$StacTableCellImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacTableCellImpl implements _StacTableCell { - const _$StacTableCellImpl( +class _StacTableCell implements StacTableCell { + const _StacTableCell( {this.verticalAlignment, final Map? child}) : _child = child; - - factory _$StacTableCellImpl.fromJson(Map json) => - _$$StacTableCellImplFromJson(json); + factory _StacTableCell.fromJson(Map json) => + _$StacTableCellFromJson(json); @override final TableCellVerticalAlignment? verticalAlignment; @@ -140,16 +111,26 @@ class _$StacTableCellImpl implements _StacTableCell { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacTableCell + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTableCell(verticalAlignment: $verticalAlignment, child: $child)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTableCellCopyWith<_StacTableCell> get copyWith => + __$StacTableCellCopyWithImpl<_StacTableCell>(this, _$identity); + + @override + Map toJson() { + return _$StacTableCellToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTableCellImpl && + other is _StacTableCell && (identical(other.verticalAlignment, verticalAlignment) || other.verticalAlignment == verticalAlignment) && const DeepCollectionEquality().equals(other._child, _child)); @@ -160,39 +141,52 @@ class _$StacTableCellImpl implements _StacTableCell { int get hashCode => Object.hash(runtimeType, verticalAlignment, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacTableCell - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacTableCellImplCopyWith<_$StacTableCellImpl> get copyWith => - __$$StacTableCellImplCopyWithImpl<_$StacTableCellImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacTableCellImplToJson( - this, - ); + String toString() { + return 'StacTableCell(verticalAlignment: $verticalAlignment, child: $child)'; } } -abstract class _StacTableCell implements StacTableCell { - const factory _StacTableCell( - {final TableCellVerticalAlignment? verticalAlignment, - final Map? child}) = _$StacTableCellImpl; +/// @nodoc +abstract mixin class _$StacTableCellCopyWith<$Res> + implements $StacTableCellCopyWith<$Res> { + factory _$StacTableCellCopyWith( + _StacTableCell value, $Res Function(_StacTableCell) _then) = + __$StacTableCellCopyWithImpl; + @override + @useResult + $Res call( + {TableCellVerticalAlignment? verticalAlignment, + Map? child}); +} - factory _StacTableCell.fromJson(Map json) = - _$StacTableCellImpl.fromJson; +/// @nodoc +class __$StacTableCellCopyWithImpl<$Res> + implements _$StacTableCellCopyWith<$Res> { + __$StacTableCellCopyWithImpl(this._self, this._then); - @override - TableCellVerticalAlignment? get verticalAlignment; - @override - Map? get child; + final _StacTableCell _self; + final $Res Function(_StacTableCell) _then; /// Create a copy of StacTableCell /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTableCellImplCopyWith<_$StacTableCellImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? verticalAlignment = freezed, + Object? child = freezed, + }) { + return _then(_StacTableCell( + verticalAlignment: freezed == verticalAlignment + ? _self.verticalAlignment + : verticalAlignment // ignore: cast_nullable_to_non_nullable + as TableCellVerticalAlignment?, + child: freezed == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.g.dart b/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.g.dart index 0b5ce890..80f4c607 100644 --- a/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.g.dart +++ b/packages/stac/lib/src/parsers/stac_table_cell/stac_table_cell.g.dart @@ -6,14 +6,14 @@ part of 'stac_table_cell.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTableCellImpl _$$StacTableCellImplFromJson(Map json) => - _$StacTableCellImpl( +_StacTableCell _$StacTableCellFromJson(Map json) => + _StacTableCell( verticalAlignment: $enumDecodeNullable( _$TableCellVerticalAlignmentEnumMap, json['verticalAlignment']), child: json['child'] as Map?, ); -Map _$$StacTableCellImplToJson(_$StacTableCellImpl instance) => +Map _$StacTableCellToJson(_StacTableCell instance) => { 'verticalAlignment': _$TableCellVerticalAlignmentEnumMap[instance.verticalAlignment], diff --git a/packages/stac/lib/src/parsers/stac_text/stac_text.dart b/packages/stac/lib/src/parsers/stac_text/stac_text.dart index 9bbbf840..8a255050 100644 --- a/packages/stac/lib/src/parsers/stac_text/stac_text.dart +++ b/packages/stac/lib/src/parsers/stac_text/stac_text.dart @@ -8,7 +8,7 @@ part 'stac_text.freezed.dart'; part 'stac_text.g.dart'; @freezed -class StacText with _$StacText { +abstract class StacText with _$StacText { const factory StacText({ required String data, @Default([]) List children, @@ -29,7 +29,7 @@ class StacText with _$StacText { } @freezed -class StacTextSpan with _$StacTextSpan { +abstract class StacTextSpan with _$StacTextSpan { const factory StacTextSpan({ String? data, StacTextStyle? style, diff --git a/packages/stac/lib/src/parsers/stac_text/stac_text.freezed.dart b/packages/stac/lib/src/parsers/stac_text/stac_text.freezed.dart index e94c321a..e4b0b827 100644 --- a/packages/stac/lib/src/parsers/stac_text/stac_text.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_text/stac_text.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,44 +10,89 @@ part of 'stac_text.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacText _$StacTextFromJson(Map json) { - return _StacText.fromJson(json); -} - /// @nodoc mixin _$StacText { - String get data => throw _privateConstructorUsedError; - List get children => throw _privateConstructorUsedError; - StacTextStyle? get style => throw _privateConstructorUsedError; - TextAlign? get textAlign => throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - bool? get softWrap => throw _privateConstructorUsedError; - TextOverflow? get overflow => throw _privateConstructorUsedError; - double? get textScaleFactor => throw _privateConstructorUsedError; - int? get maxLines => throw _privateConstructorUsedError; - String? get semanticsLabel => throw _privateConstructorUsedError; - TextWidthBasis? get textWidthBasis => throw _privateConstructorUsedError; - String? get selectionColor => throw _privateConstructorUsedError; - - /// Serializes this StacText to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get data; + List get children; + StacTextStyle? get style; + TextAlign? get textAlign; + TextDirection? get textDirection; + bool? get softWrap; + TextOverflow? get overflow; + double? get textScaleFactor; + int? get maxLines; + String? get semanticsLabel; + TextWidthBasis? get textWidthBasis; + String? get selectionColor; /// Create a copy of StacText /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTextCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTextCopyWithImpl(this as StacText, _$identity); + + /// Serializes this StacText to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacText && + (identical(other.data, data) || other.data == data) && + const DeepCollectionEquality().equals(other.children, children) && + (identical(other.style, style) || other.style == style) && + (identical(other.textAlign, textAlign) || + other.textAlign == textAlign) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + (identical(other.softWrap, softWrap) || + other.softWrap == softWrap) && + (identical(other.overflow, overflow) || + other.overflow == overflow) && + (identical(other.textScaleFactor, textScaleFactor) || + other.textScaleFactor == textScaleFactor) && + (identical(other.maxLines, maxLines) || + other.maxLines == maxLines) && + (identical(other.semanticsLabel, semanticsLabel) || + other.semanticsLabel == semanticsLabel) && + (identical(other.textWidthBasis, textWidthBasis) || + other.textWidthBasis == textWidthBasis) && + (identical(other.selectionColor, selectionColor) || + other.selectionColor == selectionColor)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + data, + const DeepCollectionEquality().hash(children), + style, + textAlign, + textDirection, + softWrap, + overflow, + textScaleFactor, + maxLines, + semanticsLabel, + textWidthBasis, + selectionColor); + + @override + String toString() { + return 'StacText(data: $data, children: $children, style: $style, textAlign: $textAlign, textDirection: $textDirection, softWrap: $softWrap, overflow: $overflow, textScaleFactor: $textScaleFactor, maxLines: $maxLines, semanticsLabel: $semanticsLabel, textWidthBasis: $textWidthBasis, selectionColor: $selectionColor)'; + } } /// @nodoc -abstract class $StacTextCopyWith<$Res> { - factory $StacTextCopyWith(StacText value, $Res Function(StacText) then) = - _$StacTextCopyWithImpl<$Res, StacText>; +abstract mixin class $StacTextCopyWith<$Res> { + factory $StacTextCopyWith(StacText value, $Res Function(StacText) _then) = + _$StacTextCopyWithImpl; @useResult $Res call( {String data, @@ -66,14 +112,11 @@ abstract class $StacTextCopyWith<$Res> { } /// @nodoc -class _$StacTextCopyWithImpl<$Res, $Val extends StacText> - implements $StacTextCopyWith<$Res> { - _$StacTextCopyWithImpl(this._value, this._then); +class _$StacTextCopyWithImpl<$Res> implements $StacTextCopyWith<$Res> { + _$StacTextCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacText _self; + final $Res Function(StacText) _then; /// Create a copy of StacText /// with the given fields replaced by the non-null parameter values. @@ -93,56 +136,56 @@ class _$StacTextCopyWithImpl<$Res, $Val extends StacText> Object? textWidthBasis = freezed, Object? selectionColor = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( data: null == data - ? _value.data + ? _self.data : data // ignore: cast_nullable_to_non_nullable as String, children: null == children - ? _value.children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacTextStyle?, textAlign: freezed == textAlign - ? _value.textAlign + ? _self.textAlign : textAlign // ignore: cast_nullable_to_non_nullable as TextAlign?, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, softWrap: freezed == softWrap - ? _value.softWrap + ? _self.softWrap : softWrap // ignore: cast_nullable_to_non_nullable as bool?, overflow: freezed == overflow - ? _value.overflow + ? _self.overflow : overflow // ignore: cast_nullable_to_non_nullable as TextOverflow?, textScaleFactor: freezed == textScaleFactor - ? _value.textScaleFactor + ? _self.textScaleFactor : textScaleFactor // ignore: cast_nullable_to_non_nullable as double?, maxLines: freezed == maxLines - ? _value.maxLines + ? _self.maxLines : maxLines // ignore: cast_nullable_to_non_nullable as int?, semanticsLabel: freezed == semanticsLabel - ? _value.semanticsLabel + ? _self.semanticsLabel : semanticsLabel // ignore: cast_nullable_to_non_nullable as String?, textWidthBasis: freezed == textWidthBasis - ? _value.textWidthBasis + ? _self.textWidthBasis : textWidthBasis // ignore: cast_nullable_to_non_nullable as TextWidthBasis?, selectionColor: freezed == selectionColor - ? _value.selectionColor + ? _self.selectionColor : selectionColor // ignore: cast_nullable_to_non_nullable as String?, - ) as $Val); + )); } /// Create a copy of StacText @@ -150,125 +193,20 @@ class _$StacTextCopyWithImpl<$Res, $Val extends StacText> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } } -/// @nodoc -abstract class _$$StacTextImplCopyWith<$Res> - implements $StacTextCopyWith<$Res> { - factory _$$StacTextImplCopyWith( - _$StacTextImpl value, $Res Function(_$StacTextImpl) then) = - __$$StacTextImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String data, - List children, - StacTextStyle? style, - TextAlign? textAlign, - TextDirection? textDirection, - bool? softWrap, - TextOverflow? overflow, - double? textScaleFactor, - int? maxLines, - String? semanticsLabel, - TextWidthBasis? textWidthBasis, - String? selectionColor}); - - @override - $StacTextStyleCopyWith<$Res>? get style; -} - -/// @nodoc -class __$$StacTextImplCopyWithImpl<$Res> - extends _$StacTextCopyWithImpl<$Res, _$StacTextImpl> - implements _$$StacTextImplCopyWith<$Res> { - __$$StacTextImplCopyWithImpl( - _$StacTextImpl _value, $Res Function(_$StacTextImpl) _then) - : super(_value, _then); - - /// Create a copy of StacText - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - Object? children = null, - Object? style = freezed, - Object? textAlign = freezed, - Object? textDirection = freezed, - Object? softWrap = freezed, - Object? overflow = freezed, - Object? textScaleFactor = freezed, - Object? maxLines = freezed, - Object? semanticsLabel = freezed, - Object? textWidthBasis = freezed, - Object? selectionColor = freezed, - }) { - return _then(_$StacTextImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as String, - children: null == children - ? _value._children - : children // ignore: cast_nullable_to_non_nullable - as List, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - textAlign: freezed == textAlign - ? _value.textAlign - : textAlign // ignore: cast_nullable_to_non_nullable - as TextAlign?, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - softWrap: freezed == softWrap - ? _value.softWrap - : softWrap // ignore: cast_nullable_to_non_nullable - as bool?, - overflow: freezed == overflow - ? _value.overflow - : overflow // ignore: cast_nullable_to_non_nullable - as TextOverflow?, - textScaleFactor: freezed == textScaleFactor - ? _value.textScaleFactor - : textScaleFactor // ignore: cast_nullable_to_non_nullable - as double?, - maxLines: freezed == maxLines - ? _value.maxLines - : maxLines // ignore: cast_nullable_to_non_nullable - as int?, - semanticsLabel: freezed == semanticsLabel - ? _value.semanticsLabel - : semanticsLabel // ignore: cast_nullable_to_non_nullable - as String?, - textWidthBasis: freezed == textWidthBasis - ? _value.textWidthBasis - : textWidthBasis // ignore: cast_nullable_to_non_nullable - as TextWidthBasis?, - selectionColor: freezed == selectionColor - ? _value.selectionColor - : selectionColor // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacTextImpl implements _StacText { - const _$StacTextImpl( +class _StacText implements StacText { + const _StacText( {required this.data, final List children = const [], this.style, @@ -282,9 +220,8 @@ class _$StacTextImpl implements _StacText { this.textWidthBasis, this.selectionColor}) : _children = children; - - factory _$StacTextImpl.fromJson(Map json) => - _$$StacTextImplFromJson(json); + factory _StacText.fromJson(Map json) => + _$StacTextFromJson(json); @override final String data; @@ -318,16 +255,26 @@ class _$StacTextImpl implements _StacText { @override final String? selectionColor; + /// Create a copy of StacText + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacText(data: $data, children: $children, style: $style, textAlign: $textAlign, textDirection: $textDirection, softWrap: $softWrap, overflow: $overflow, textScaleFactor: $textScaleFactor, maxLines: $maxLines, semanticsLabel: $semanticsLabel, textWidthBasis: $textWidthBasis, selectionColor: $selectionColor)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTextCopyWith<_StacText> get copyWith => + __$StacTextCopyWithImpl<_StacText>(this, _$identity); + + @override + Map toJson() { + return _$StacTextToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTextImpl && + other is _StacText && (identical(other.data, data) || other.data == data) && const DeepCollectionEquality().equals(other._children, _children) && (identical(other.style, style) || other.style == style) && @@ -368,175 +315,184 @@ class _$StacTextImpl implements _StacText { textWidthBasis, selectionColor); - /// Create a copy of StacText - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTextImplCopyWith<_$StacTextImpl> get copyWith => - __$$StacTextImplCopyWithImpl<_$StacTextImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacTextImplToJson( - this, - ); + String toString() { + return 'StacText(data: $data, children: $children, style: $style, textAlign: $textAlign, textDirection: $textDirection, softWrap: $softWrap, overflow: $overflow, textScaleFactor: $textScaleFactor, maxLines: $maxLines, semanticsLabel: $semanticsLabel, textWidthBasis: $textWidthBasis, selectionColor: $selectionColor)'; } } -abstract class _StacText implements StacText { - const factory _StacText( - {required final String data, - final List children, - final StacTextStyle? style, - final TextAlign? textAlign, - final TextDirection? textDirection, - final bool? softWrap, - final TextOverflow? overflow, - final double? textScaleFactor, - final int? maxLines, - final String? semanticsLabel, - final TextWidthBasis? textWidthBasis, - final String? selectionColor}) = _$StacTextImpl; - - factory _StacText.fromJson(Map json) = - _$StacTextImpl.fromJson; - - @override - String get data; - @override - List get children; - @override - StacTextStyle? get style; - @override - TextAlign? get textAlign; - @override - TextDirection? get textDirection; - @override - bool? get softWrap; - @override - TextOverflow? get overflow; - @override - double? get textScaleFactor; - @override - int? get maxLines; - @override - String? get semanticsLabel; - @override - TextWidthBasis? get textWidthBasis; - @override - String? get selectionColor; - - /// Create a copy of StacText - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTextImplCopyWith<_$StacTextImpl> get copyWith => - throw _privateConstructorUsedError; -} - -StacTextSpan _$StacTextSpanFromJson(Map json) { - return _StacTextSpan.fromJson(json); -} - -/// @nodoc -mixin _$StacTextSpan { - String? get data => throw _privateConstructorUsedError; - StacTextStyle? get style => throw _privateConstructorUsedError; - Map? get onTap => throw _privateConstructorUsedError; - - /// Serializes this StacTextSpan to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of StacTextSpan - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $StacTextSpanCopyWith get copyWith => - throw _privateConstructorUsedError; -} - /// @nodoc -abstract class $StacTextSpanCopyWith<$Res> { - factory $StacTextSpanCopyWith( - StacTextSpan value, $Res Function(StacTextSpan) then) = - _$StacTextSpanCopyWithImpl<$Res, StacTextSpan>; +abstract mixin class _$StacTextCopyWith<$Res> + implements $StacTextCopyWith<$Res> { + factory _$StacTextCopyWith(_StacText value, $Res Function(_StacText) _then) = + __$StacTextCopyWithImpl; + @override @useResult - $Res call({String? data, StacTextStyle? style, Map? onTap}); + $Res call( + {String data, + List children, + StacTextStyle? style, + TextAlign? textAlign, + TextDirection? textDirection, + bool? softWrap, + TextOverflow? overflow, + double? textScaleFactor, + int? maxLines, + String? semanticsLabel, + TextWidthBasis? textWidthBasis, + String? selectionColor}); + @override $StacTextStyleCopyWith<$Res>? get style; } /// @nodoc -class _$StacTextSpanCopyWithImpl<$Res, $Val extends StacTextSpan> - implements $StacTextSpanCopyWith<$Res> { - _$StacTextSpanCopyWithImpl(this._value, this._then); +class __$StacTextCopyWithImpl<$Res> implements _$StacTextCopyWith<$Res> { + __$StacTextCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final _StacText _self; + final $Res Function(_StacText) _then; - /// Create a copy of StacTextSpan + /// Create a copy of StacText /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ - Object? data = freezed, + Object? data = null, + Object? children = null, Object? style = freezed, - Object? onTap = freezed, + Object? textAlign = freezed, + Object? textDirection = freezed, + Object? softWrap = freezed, + Object? overflow = freezed, + Object? textScaleFactor = freezed, + Object? maxLines = freezed, + Object? semanticsLabel = freezed, + Object? textWidthBasis = freezed, + Object? selectionColor = freezed, }) { - return _then(_value.copyWith( - data: freezed == data - ? _value.data + return _then(_StacText( + data: null == data + ? _self.data : data // ignore: cast_nullable_to_non_nullable - as String?, + as String, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacTextStyle?, - onTap: freezed == onTap - ? _value.onTap - : onTap // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + textAlign: freezed == textAlign + ? _self.textAlign + : textAlign // ignore: cast_nullable_to_non_nullable + as TextAlign?, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + softWrap: freezed == softWrap + ? _self.softWrap + : softWrap // ignore: cast_nullable_to_non_nullable + as bool?, + overflow: freezed == overflow + ? _self.overflow + : overflow // ignore: cast_nullable_to_non_nullable + as TextOverflow?, + textScaleFactor: freezed == textScaleFactor + ? _self.textScaleFactor + : textScaleFactor // ignore: cast_nullable_to_non_nullable + as double?, + maxLines: freezed == maxLines + ? _self.maxLines + : maxLines // ignore: cast_nullable_to_non_nullable + as int?, + semanticsLabel: freezed == semanticsLabel + ? _self.semanticsLabel + : semanticsLabel // ignore: cast_nullable_to_non_nullable + as String?, + textWidthBasis: freezed == textWidthBasis + ? _self.textWidthBasis + : textWidthBasis // ignore: cast_nullable_to_non_nullable + as TextWidthBasis?, + selectionColor: freezed == selectionColor + ? _self.selectionColor + : selectionColor // ignore: cast_nullable_to_non_nullable + as String?, + )); } - /// Create a copy of StacTextSpan + /// Create a copy of StacText /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } } /// @nodoc -abstract class _$$StacTextSpanImplCopyWith<$Res> - implements $StacTextSpanCopyWith<$Res> { - factory _$$StacTextSpanImplCopyWith( - _$StacTextSpanImpl value, $Res Function(_$StacTextSpanImpl) then) = - __$$StacTextSpanImplCopyWithImpl<$Res>; +mixin _$StacTextSpan { + String? get data; + StacTextStyle? get style; + Map? get onTap; + + /// Create a copy of StacTextSpan + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $StacTextSpanCopyWith get copyWith => + _$StacTextSpanCopyWithImpl( + this as StacTextSpan, _$identity); + + /// Serializes this StacTextSpan to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTextSpan && + (identical(other.data, data) || other.data == data) && + (identical(other.style, style) || other.style == style) && + const DeepCollectionEquality().equals(other.onTap, onTap)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) @override + int get hashCode => Object.hash( + runtimeType, data, style, const DeepCollectionEquality().hash(onTap)); + + @override + String toString() { + return 'StacTextSpan(data: $data, style: $style, onTap: $onTap)'; + } +} + +/// @nodoc +abstract mixin class $StacTextSpanCopyWith<$Res> { + factory $StacTextSpanCopyWith( + StacTextSpan value, $Res Function(StacTextSpan) _then) = + _$StacTextSpanCopyWithImpl; @useResult $Res call({String? data, StacTextStyle? style, Map? onTap}); - @override $StacTextStyleCopyWith<$Res>? get style; } /// @nodoc -class __$$StacTextSpanImplCopyWithImpl<$Res> - extends _$StacTextSpanCopyWithImpl<$Res, _$StacTextSpanImpl> - implements _$$StacTextSpanImplCopyWith<$Res> { - __$$StacTextSpanImplCopyWithImpl( - _$StacTextSpanImpl _value, $Res Function(_$StacTextSpanImpl) _then) - : super(_value, _then); +class _$StacTextSpanCopyWithImpl<$Res> implements $StacTextSpanCopyWith<$Res> { + _$StacTextSpanCopyWithImpl(this._self, this._then); + + final StacTextSpan _self; + final $Res Function(StacTextSpan) _then; /// Create a copy of StacTextSpan /// with the given fields replaced by the non-null parameter values. @@ -547,32 +503,45 @@ class __$$StacTextSpanImplCopyWithImpl<$Res> Object? style = freezed, Object? onTap = freezed, }) { - return _then(_$StacTextSpanImpl( + return _then(_self.copyWith( data: freezed == data - ? _value.data + ? _self.data : data // ignore: cast_nullable_to_non_nullable as String?, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacTextStyle?, onTap: freezed == onTap - ? _value._onTap + ? _self.onTap : onTap // ignore: cast_nullable_to_non_nullable as Map?, )); } + + /// Create a copy of StacTextSpan + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } } /// @nodoc @JsonSerializable() -class _$StacTextSpanImpl implements _StacTextSpan { - const _$StacTextSpanImpl( +class _StacTextSpan implements StacTextSpan { + const _StacTextSpan( {this.data, this.style, final Map? onTap}) : _onTap = onTap; - - factory _$StacTextSpanImpl.fromJson(Map json) => - _$$StacTextSpanImplFromJson(json); + factory _StacTextSpan.fromJson(Map json) => + _$StacTextSpanFromJson(json); @override final String? data; @@ -588,16 +557,26 @@ class _$StacTextSpanImpl implements _StacTextSpan { return EqualUnmodifiableMapView(value); } + /// Create a copy of StacTextSpan + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTextSpan(data: $data, style: $style, onTap: $onTap)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTextSpanCopyWith<_StacTextSpan> get copyWith => + __$StacTextSpanCopyWithImpl<_StacTextSpan>(this, _$identity); + + @override + Map toJson() { + return _$StacTextSpanToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTextSpanImpl && + other is _StacTextSpan && (identical(other.data, data) || other.data == data) && (identical(other.style, style) || other.style == style) && const DeepCollectionEquality().equals(other._onTap, _onTap)); @@ -608,42 +587,72 @@ class _$StacTextSpanImpl implements _StacTextSpan { int get hashCode => Object.hash( runtimeType, data, style, const DeepCollectionEquality().hash(_onTap)); - /// Create a copy of StacTextSpan - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTextSpanImplCopyWith<_$StacTextSpanImpl> get copyWith => - __$$StacTextSpanImplCopyWithImpl<_$StacTextSpanImpl>(this, _$identity); + String toString() { + return 'StacTextSpan(data: $data, style: $style, onTap: $onTap)'; + } +} +/// @nodoc +abstract mixin class _$StacTextSpanCopyWith<$Res> + implements $StacTextSpanCopyWith<$Res> { + factory _$StacTextSpanCopyWith( + _StacTextSpan value, $Res Function(_StacTextSpan) _then) = + __$StacTextSpanCopyWithImpl; @override - Map toJson() { - return _$$StacTextSpanImplToJson( - this, - ); - } + @useResult + $Res call({String? data, StacTextStyle? style, Map? onTap}); + + @override + $StacTextStyleCopyWith<$Res>? get style; } -abstract class _StacTextSpan implements StacTextSpan { - const factory _StacTextSpan( - {final String? data, - final StacTextStyle? style, - final Map? onTap}) = _$StacTextSpanImpl; +/// @nodoc +class __$StacTextSpanCopyWithImpl<$Res> + implements _$StacTextSpanCopyWith<$Res> { + __$StacTextSpanCopyWithImpl(this._self, this._then); - factory _StacTextSpan.fromJson(Map json) = - _$StacTextSpanImpl.fromJson; + final _StacTextSpan _self; + final $Res Function(_StacTextSpan) _then; + /// Create a copy of StacTextSpan + /// with the given fields replaced by the non-null parameter values. @override - String? get data; - @override - StacTextStyle? get style; - @override - Map? get onTap; + @pragma('vm:prefer-inline') + $Res call({ + Object? data = freezed, + Object? style = freezed, + Object? onTap = freezed, + }) { + return _then(_StacTextSpan( + data: freezed == data + ? _self.data + : data // ignore: cast_nullable_to_non_nullable + as String?, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + onTap: freezed == onTap + ? _self._onTap + : onTap // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } /// Create a copy of StacTextSpan /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTextSpanImplCopyWith<_$StacTextSpanImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_text/stac_text.g.dart b/packages/stac/lib/src/parsers/stac_text/stac_text.g.dart index e5061511..f273981e 100644 --- a/packages/stac/lib/src/parsers/stac_text/stac_text.g.dart +++ b/packages/stac/lib/src/parsers/stac_text/stac_text.g.dart @@ -6,8 +6,7 @@ part of 'stac_text.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTextImpl _$$StacTextImplFromJson(Map json) => - _$StacTextImpl( +_StacText _$StacTextFromJson(Map json) => _StacText( data: json['data'] as String, children: (json['children'] as List?) ?.map((e) => StacTextSpan.fromJson(e as Map)) @@ -28,8 +27,7 @@ _$StacTextImpl _$$StacTextImplFromJson(Map json) => selectionColor: json['selectionColor'] as String?, ); -Map _$$StacTextImplToJson(_$StacTextImpl instance) => - { +Map _$StacTextToJson(_StacText instance) => { 'data': instance.data, 'children': instance.children, 'style': instance.style, @@ -70,15 +68,15 @@ const _$TextWidthBasisEnumMap = { TextWidthBasis.longestLine: 'longestLine', }; -_$StacTextSpanImpl _$$StacTextSpanImplFromJson(Map json) => - _$StacTextSpanImpl( +_StacTextSpan _$StacTextSpanFromJson(Map json) => + _StacTextSpan( data: json['data'] as String?, style: json['style'] == null ? null : StacTextStyle.fromJson(json['style']), onTap: json['onTap'] as Map?, ); -Map _$$StacTextSpanImplToJson(_$StacTextSpanImpl instance) => +Map _$StacTextSpanToJson(_StacTextSpan instance) => { 'data': instance.data, 'style': instance.style, diff --git a/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.dart b/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.dart index 60bc4729..ad8933c6 100644 --- a/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.dart +++ b/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.dart @@ -8,7 +8,7 @@ part 'stac_text_button.freezed.dart'; part 'stac_text_button.g.dart'; @freezed -class StacTextButton with _$StacTextButton { +abstract class StacTextButton with _$StacTextButton { const factory StacTextButton({ Map? onPressed, Map? onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.freezed.dart b/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.freezed.dart index 4746c240..134a20f8 100644 --- a/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,42 +10,77 @@ part of 'stac_text_button.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTextButton _$StacTextButtonFromJson(Map json) { - return _StacTextButton.fromJson(json); -} - /// @nodoc mixin _$StacTextButton { - Map? get onPressed => throw _privateConstructorUsedError; - Map? get onLongPress => throw _privateConstructorUsedError; - Map? get onHover => throw _privateConstructorUsedError; - Map? get onFocusChange => throw _privateConstructorUsedError; - StacButtonStyle? get style => throw _privateConstructorUsedError; - dynamic get autofocus => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - bool get isSemanticButton => throw _privateConstructorUsedError; - Map get child => throw _privateConstructorUsedError; - - /// Serializes this StacTextButton to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get onPressed; + Map? get onLongPress; + Map? get onHover; + Map? get onFocusChange; + StacButtonStyle? get style; + dynamic get autofocus; + Clip get clipBehavior; + bool get isSemanticButton; + Map get child; /// Create a copy of StacTextButton /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTextButtonCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTextButtonCopyWithImpl( + this as StacTextButton, _$identity); + + /// Serializes this StacTextButton to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTextButton && + const DeepCollectionEquality().equals(other.onPressed, onPressed) && + const DeepCollectionEquality() + .equals(other.onLongPress, onLongPress) && + const DeepCollectionEquality().equals(other.onHover, onHover) && + const DeepCollectionEquality() + .equals(other.onFocusChange, onFocusChange) && + (identical(other.style, style) || other.style == style) && + const DeepCollectionEquality().equals(other.autofocus, autofocus) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + (identical(other.isSemanticButton, isSemanticButton) || + other.isSemanticButton == isSemanticButton) && + const DeepCollectionEquality().equals(other.child, child)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(onPressed), + const DeepCollectionEquality().hash(onLongPress), + const DeepCollectionEquality().hash(onHover), + const DeepCollectionEquality().hash(onFocusChange), + style, + const DeepCollectionEquality().hash(autofocus), + clipBehavior, + isSemanticButton, + const DeepCollectionEquality().hash(child)); + + @override + String toString() { + return 'StacTextButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, isSemanticButton: $isSemanticButton, child: $child)'; + } } /// @nodoc -abstract class $StacTextButtonCopyWith<$Res> { +abstract mixin class $StacTextButtonCopyWith<$Res> { factory $StacTextButtonCopyWith( - StacTextButton value, $Res Function(StacTextButton) then) = - _$StacTextButtonCopyWithImpl<$Res, StacTextButton>; + StacTextButton value, $Res Function(StacTextButton) _then) = + _$StacTextButtonCopyWithImpl; @useResult $Res call( {Map? onPressed, @@ -61,14 +97,12 @@ abstract class $StacTextButtonCopyWith<$Res> { } /// @nodoc -class _$StacTextButtonCopyWithImpl<$Res, $Val extends StacTextButton> +class _$StacTextButtonCopyWithImpl<$Res> implements $StacTextButtonCopyWith<$Res> { - _$StacTextButtonCopyWithImpl(this._value, this._then); + _$StacTextButtonCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTextButton _self; + final $Res Function(StacTextButton) _then; /// Create a copy of StacTextButton /// with the given fields replaced by the non-null parameter values. @@ -85,44 +119,44 @@ class _$StacTextButtonCopyWithImpl<$Res, $Val extends StacTextButton> Object? isSemanticButton = null, Object? child = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( onPressed: freezed == onPressed - ? _value.onPressed + ? _self.onPressed : onPressed // ignore: cast_nullable_to_non_nullable as Map?, onLongPress: freezed == onLongPress - ? _value.onLongPress + ? _self.onLongPress : onLongPress // ignore: cast_nullable_to_non_nullable as Map?, onHover: freezed == onHover - ? _value.onHover + ? _self.onHover : onHover // ignore: cast_nullable_to_non_nullable as Map?, onFocusChange: freezed == onFocusChange - ? _value.onFocusChange + ? _self.onFocusChange : onFocusChange // ignore: cast_nullable_to_non_nullable as Map?, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, autofocus: freezed == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as dynamic, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, isSemanticButton: null == isSemanticButton - ? _value.isSemanticButton + ? _self.isSemanticButton : isSemanticButton // ignore: cast_nullable_to_non_nullable as bool, child: null == child - ? _value.child + ? _self.child : child // ignore: cast_nullable_to_non_nullable as Map, - ) as $Val); + )); } /// Create a copy of StacTextButton @@ -130,104 +164,20 @@ class _$StacTextButtonCopyWithImpl<$Res, $Val extends StacTextButton> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } } -/// @nodoc -abstract class _$$StacTextButtonImplCopyWith<$Res> - implements $StacTextButtonCopyWith<$Res> { - factory _$$StacTextButtonImplCopyWith(_$StacTextButtonImpl value, - $Res Function(_$StacTextButtonImpl) then) = - __$$StacTextButtonImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {Map? onPressed, - Map? onLongPress, - Map? onHover, - Map? onFocusChange, - StacButtonStyle? style, - dynamic autofocus, - Clip clipBehavior, - bool isSemanticButton, - Map child}); - - @override - $StacButtonStyleCopyWith<$Res>? get style; -} - -/// @nodoc -class __$$StacTextButtonImplCopyWithImpl<$Res> - extends _$StacTextButtonCopyWithImpl<$Res, _$StacTextButtonImpl> - implements _$$StacTextButtonImplCopyWith<$Res> { - __$$StacTextButtonImplCopyWithImpl( - _$StacTextButtonImpl _value, $Res Function(_$StacTextButtonImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTextButton - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? onPressed = freezed, - Object? onLongPress = freezed, - Object? onHover = freezed, - Object? onFocusChange = freezed, - Object? style = freezed, - Object? autofocus = freezed, - Object? clipBehavior = null, - Object? isSemanticButton = null, - Object? child = null, - }) { - return _then(_$StacTextButtonImpl( - onPressed: freezed == onPressed - ? _value._onPressed - : onPressed // ignore: cast_nullable_to_non_nullable - as Map?, - onLongPress: freezed == onLongPress - ? _value._onLongPress - : onLongPress // ignore: cast_nullable_to_non_nullable - as Map?, - onHover: freezed == onHover - ? _value._onHover - : onHover // ignore: cast_nullable_to_non_nullable - as Map?, - onFocusChange: freezed == onFocusChange - ? _value._onFocusChange - : onFocusChange // ignore: cast_nullable_to_non_nullable - as Map?, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - autofocus: freezed == autofocus ? _value.autofocus! : autofocus, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - isSemanticButton: null == isSemanticButton - ? _value.isSemanticButton - : isSemanticButton // ignore: cast_nullable_to_non_nullable - as bool, - child: null == child - ? _value._child - : child // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacTextButtonImpl implements _StacTextButton { - const _$StacTextButtonImpl( +class _StacTextButton implements StacTextButton { + const _StacTextButton( {final Map? onPressed, final Map? onLongPress, final Map? onHover, @@ -242,9 +192,8 @@ class _$StacTextButtonImpl implements _StacTextButton { _onHover = onHover, _onFocusChange = onFocusChange, _child = child; - - factory _$StacTextButtonImpl.fromJson(Map json) => - _$$StacTextButtonImplFromJson(json); + factory _StacTextButton.fromJson(Map json) => + _$StacTextButtonFromJson(json); final Map? _onPressed; @override @@ -305,16 +254,26 @@ class _$StacTextButtonImpl implements _StacTextButton { return EqualUnmodifiableMapView(_child); } + /// Create a copy of StacTextButton + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTextButtonCopyWith<_StacTextButton> get copyWith => + __$StacTextButtonCopyWithImpl<_StacTextButton>(this, _$identity); + @override - String toString() { - return 'StacTextButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, isSemanticButton: $isSemanticButton, child: $child)'; + Map toJson() { + return _$StacTextButtonToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTextButtonImpl && + other is _StacTextButton && const DeepCollectionEquality() .equals(other._onPressed, _onPressed) && const DeepCollectionEquality() @@ -345,61 +304,111 @@ class _$StacTextButtonImpl implements _StacTextButton { isSemanticButton, const DeepCollectionEquality().hash(_child)); - /// Create a copy of StacTextButton - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTextButtonImplCopyWith<_$StacTextButtonImpl> get copyWith => - __$$StacTextButtonImplCopyWithImpl<_$StacTextButtonImpl>( - this, _$identity); + String toString() { + return 'StacTextButton(onPressed: $onPressed, onLongPress: $onLongPress, onHover: $onHover, onFocusChange: $onFocusChange, style: $style, autofocus: $autofocus, clipBehavior: $clipBehavior, isSemanticButton: $isSemanticButton, child: $child)'; + } +} +/// @nodoc +abstract mixin class _$StacTextButtonCopyWith<$Res> + implements $StacTextButtonCopyWith<$Res> { + factory _$StacTextButtonCopyWith( + _StacTextButton value, $Res Function(_StacTextButton) _then) = + __$StacTextButtonCopyWithImpl; @override - Map toJson() { - return _$$StacTextButtonImplToJson( - this, - ); - } + @useResult + $Res call( + {Map? onPressed, + Map? onLongPress, + Map? onHover, + Map? onFocusChange, + StacButtonStyle? style, + dynamic autofocus, + Clip clipBehavior, + bool isSemanticButton, + Map child}); + + @override + $StacButtonStyleCopyWith<$Res>? get style; } -abstract class _StacTextButton implements StacTextButton { - const factory _StacTextButton( - {final Map? onPressed, - final Map? onLongPress, - final Map? onHover, - final Map? onFocusChange, - final StacButtonStyle? style, - final dynamic autofocus, - final Clip clipBehavior, - final bool isSemanticButton, - required final Map child}) = _$StacTextButtonImpl; +/// @nodoc +class __$StacTextButtonCopyWithImpl<$Res> + implements _$StacTextButtonCopyWith<$Res> { + __$StacTextButtonCopyWithImpl(this._self, this._then); - factory _StacTextButton.fromJson(Map json) = - _$StacTextButtonImpl.fromJson; + final _StacTextButton _self; + final $Res Function(_StacTextButton) _then; + /// Create a copy of StacTextButton + /// with the given fields replaced by the non-null parameter values. @override - Map? get onPressed; - @override - Map? get onLongPress; - @override - Map? get onHover; - @override - Map? get onFocusChange; - @override - StacButtonStyle? get style; - @override - dynamic get autofocus; - @override - Clip get clipBehavior; - @override - bool get isSemanticButton; - @override - Map get child; + @pragma('vm:prefer-inline') + $Res call({ + Object? onPressed = freezed, + Object? onLongPress = freezed, + Object? onHover = freezed, + Object? onFocusChange = freezed, + Object? style = freezed, + Object? autofocus = freezed, + Object? clipBehavior = null, + Object? isSemanticButton = null, + Object? child = null, + }) { + return _then(_StacTextButton( + onPressed: freezed == onPressed + ? _self._onPressed + : onPressed // ignore: cast_nullable_to_non_nullable + as Map?, + onLongPress: freezed == onLongPress + ? _self._onLongPress + : onLongPress // ignore: cast_nullable_to_non_nullable + as Map?, + onHover: freezed == onHover + ? _self._onHover + : onHover // ignore: cast_nullable_to_non_nullable + as Map?, + onFocusChange: freezed == onFocusChange + ? _self._onFocusChange + : onFocusChange // ignore: cast_nullable_to_non_nullable + as Map?, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + autofocus: freezed == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as dynamic, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + isSemanticButton: null == isSemanticButton + ? _self.isSemanticButton + : isSemanticButton // ignore: cast_nullable_to_non_nullable + as bool, + child: null == child + ? _self._child + : child // ignore: cast_nullable_to_non_nullable + as Map, + )); + } /// Create a copy of StacTextButton /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTextButtonImplCopyWith<_$StacTextButtonImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.g.dart b/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.g.dart index 6663f226..8faaa5ed 100644 --- a/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.g.dart +++ b/packages/stac/lib/src/parsers/stac_text_button/stac_text_button.g.dart @@ -6,8 +6,8 @@ part of 'stac_text_button.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTextButtonImpl _$$StacTextButtonImplFromJson(Map json) => - _$StacTextButtonImpl( +_StacTextButton _$StacTextButtonFromJson(Map json) => + _StacTextButton( onPressed: json['onPressed'] as Map?, onLongPress: json['onLongPress'] as Map?, onHover: json['onHover'] as Map?, @@ -22,8 +22,7 @@ _$StacTextButtonImpl _$$StacTextButtonImplFromJson(Map json) => child: json['child'] as Map, ); -Map _$$StacTextButtonImplToJson( - _$StacTextButtonImpl instance) => +Map _$StacTextButtonToJson(_StacTextButton instance) => { 'onPressed': instance.onPressed, 'onLongPress': instance.onLongPress, diff --git a/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.dart b/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.dart index e51a3087..b0810fac 100644 --- a/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.dart +++ b/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.dart @@ -11,7 +11,7 @@ part 'stac_text_field.freezed.dart'; part 'stac_text_field.g.dart'; @freezed -class StacTextField with _$StacTextField { +abstract class StacTextField with _$StacTextField { const factory StacTextField({ StacInputDecoration? decoration, @Default('') String initialValue, diff --git a/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.freezed.dart b/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.freezed.dart index e66df8a6..e07ce021 100644 --- a/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,61 +10,144 @@ part of 'stac_text_field.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTextField _$StacTextFieldFromJson(Map json) { - return _StacTextField.fromJson(json); -} - /// @nodoc mixin _$StacTextField { - StacInputDecoration? get decoration => throw _privateConstructorUsedError; - String get initialValue => throw _privateConstructorUsedError; - StacTextInputType? get keyboardType => throw _privateConstructorUsedError; - TextInputAction? get textInputAction => throw _privateConstructorUsedError; - TextCapitalization get textCapitalization => - throw _privateConstructorUsedError; - StacTextStyle? get style => throw _privateConstructorUsedError; - TextAlign get textAlign => throw _privateConstructorUsedError; - StacTextAlignVertical? get textAlignVertical => - throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - bool get readOnly => throw _privateConstructorUsedError; - bool? get showCursor => throw _privateConstructorUsedError; - dynamic get expands => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - String get obscuringCharacter => throw _privateConstructorUsedError; - int? get maxLines => throw _privateConstructorUsedError; - int? get minLines => throw _privateConstructorUsedError; - int? get maxLength => throw _privateConstructorUsedError; - bool get obscureText => throw _privateConstructorUsedError; - bool get enableSuggestions => throw _privateConstructorUsedError; - bool? get enabled => throw _privateConstructorUsedError; - double get cursorWidth => throw _privateConstructorUsedError; - double? get cursorHeight => throw _privateConstructorUsedError; - String? get cursorColor => throw _privateConstructorUsedError; - String? get hintText => throw _privateConstructorUsedError; - List get inputFormatters => - throw _privateConstructorUsedError; - - /// Serializes this StacTextField to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + StacInputDecoration? get decoration; + String get initialValue; + StacTextInputType? get keyboardType; + TextInputAction? get textInputAction; + TextCapitalization get textCapitalization; + StacTextStyle? get style; + TextAlign get textAlign; + StacTextAlignVertical? get textAlignVertical; + TextDirection? get textDirection; + bool get readOnly; + bool? get showCursor; + dynamic get expands; + bool get autofocus; + String get obscuringCharacter; + int? get maxLines; + int? get minLines; + int? get maxLength; + bool get obscureText; + bool get enableSuggestions; + bool? get enabled; + double get cursorWidth; + double? get cursorHeight; + String? get cursorColor; + String? get hintText; + List get inputFormatters; /// Create a copy of StacTextField /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTextFieldCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTextFieldCopyWithImpl( + this as StacTextField, _$identity); + + /// Serializes this StacTextField to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTextField && + (identical(other.decoration, decoration) || + other.decoration == decoration) && + (identical(other.initialValue, initialValue) || + other.initialValue == initialValue) && + (identical(other.keyboardType, keyboardType) || + other.keyboardType == keyboardType) && + (identical(other.textInputAction, textInputAction) || + other.textInputAction == textInputAction) && + (identical(other.textCapitalization, textCapitalization) || + other.textCapitalization == textCapitalization) && + (identical(other.style, style) || other.style == style) && + (identical(other.textAlign, textAlign) || + other.textAlign == textAlign) && + (identical(other.textAlignVertical, textAlignVertical) || + other.textAlignVertical == textAlignVertical) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + (identical(other.readOnly, readOnly) || + other.readOnly == readOnly) && + (identical(other.showCursor, showCursor) || + other.showCursor == showCursor) && + const DeepCollectionEquality().equals(other.expands, expands) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.obscuringCharacter, obscuringCharacter) || + other.obscuringCharacter == obscuringCharacter) && + (identical(other.maxLines, maxLines) || + other.maxLines == maxLines) && + (identical(other.minLines, minLines) || + other.minLines == minLines) && + (identical(other.maxLength, maxLength) || + other.maxLength == maxLength) && + (identical(other.obscureText, obscureText) || + other.obscureText == obscureText) && + (identical(other.enableSuggestions, enableSuggestions) || + other.enableSuggestions == enableSuggestions) && + (identical(other.enabled, enabled) || other.enabled == enabled) && + (identical(other.cursorWidth, cursorWidth) || + other.cursorWidth == cursorWidth) && + (identical(other.cursorHeight, cursorHeight) || + other.cursorHeight == cursorHeight) && + (identical(other.cursorColor, cursorColor) || + other.cursorColor == cursorColor) && + (identical(other.hintText, hintText) || + other.hintText == hintText) && + const DeepCollectionEquality() + .equals(other.inputFormatters, inputFormatters)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + decoration, + initialValue, + keyboardType, + textInputAction, + textCapitalization, + style, + textAlign, + textAlignVertical, + textDirection, + readOnly, + showCursor, + const DeepCollectionEquality().hash(expands), + autofocus, + obscuringCharacter, + maxLines, + minLines, + maxLength, + obscureText, + enableSuggestions, + enabled, + cursorWidth, + cursorHeight, + cursorColor, + hintText, + const DeepCollectionEquality().hash(inputFormatters) + ]); + + @override + String toString() { + return 'StacTextField(decoration: $decoration, initialValue: $initialValue, keyboardType: $keyboardType, textInputAction: $textInputAction, textCapitalization: $textCapitalization, style: $style, textAlign: $textAlign, textAlignVertical: $textAlignVertical, textDirection: $textDirection, readOnly: $readOnly, showCursor: $showCursor, expands: $expands, autofocus: $autofocus, obscuringCharacter: $obscuringCharacter, maxLines: $maxLines, minLines: $minLines, maxLength: $maxLength, obscureText: $obscureText, enableSuggestions: $enableSuggestions, enabled: $enabled, cursorWidth: $cursorWidth, cursorHeight: $cursorHeight, cursorColor: $cursorColor, hintText: $hintText, inputFormatters: $inputFormatters)'; + } } /// @nodoc -abstract class $StacTextFieldCopyWith<$Res> { +abstract mixin class $StacTextFieldCopyWith<$Res> { factory $StacTextFieldCopyWith( - StacTextField value, $Res Function(StacTextField) then) = - _$StacTextFieldCopyWithImpl<$Res, StacTextField>; + StacTextField value, $Res Function(StacTextField) _then) = + _$StacTextFieldCopyWithImpl; @useResult $Res call( {StacInputDecoration? decoration, @@ -97,14 +181,12 @@ abstract class $StacTextFieldCopyWith<$Res> { } /// @nodoc -class _$StacTextFieldCopyWithImpl<$Res, $Val extends StacTextField> +class _$StacTextFieldCopyWithImpl<$Res> implements $StacTextFieldCopyWith<$Res> { - _$StacTextFieldCopyWithImpl(this._value, this._then); + _$StacTextFieldCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTextField _self; + final $Res Function(StacTextField) _then; /// Create a copy of StacTextField /// with the given fields replaced by the non-null parameter values. @@ -137,108 +219,108 @@ class _$StacTextFieldCopyWithImpl<$Res, $Val extends StacTextField> Object? hintText = freezed, Object? inputFormatters = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( decoration: freezed == decoration - ? _value.decoration + ? _self.decoration : decoration // ignore: cast_nullable_to_non_nullable as StacInputDecoration?, initialValue: null == initialValue - ? _value.initialValue + ? _self.initialValue : initialValue // ignore: cast_nullable_to_non_nullable as String, keyboardType: freezed == keyboardType - ? _value.keyboardType + ? _self.keyboardType : keyboardType // ignore: cast_nullable_to_non_nullable as StacTextInputType?, textInputAction: freezed == textInputAction - ? _value.textInputAction + ? _self.textInputAction : textInputAction // ignore: cast_nullable_to_non_nullable as TextInputAction?, textCapitalization: null == textCapitalization - ? _value.textCapitalization + ? _self.textCapitalization : textCapitalization // ignore: cast_nullable_to_non_nullable as TextCapitalization, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacTextStyle?, textAlign: null == textAlign - ? _value.textAlign + ? _self.textAlign : textAlign // ignore: cast_nullable_to_non_nullable as TextAlign, textAlignVertical: freezed == textAlignVertical - ? _value.textAlignVertical + ? _self.textAlignVertical : textAlignVertical // ignore: cast_nullable_to_non_nullable as StacTextAlignVertical?, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, readOnly: null == readOnly - ? _value.readOnly + ? _self.readOnly : readOnly // ignore: cast_nullable_to_non_nullable as bool, showCursor: freezed == showCursor - ? _value.showCursor + ? _self.showCursor : showCursor // ignore: cast_nullable_to_non_nullable as bool?, expands: freezed == expands - ? _value.expands + ? _self.expands : expands // ignore: cast_nullable_to_non_nullable as dynamic, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, obscuringCharacter: null == obscuringCharacter - ? _value.obscuringCharacter + ? _self.obscuringCharacter : obscuringCharacter // ignore: cast_nullable_to_non_nullable as String, maxLines: freezed == maxLines - ? _value.maxLines + ? _self.maxLines : maxLines // ignore: cast_nullable_to_non_nullable as int?, minLines: freezed == minLines - ? _value.minLines + ? _self.minLines : minLines // ignore: cast_nullable_to_non_nullable as int?, maxLength: freezed == maxLength - ? _value.maxLength + ? _self.maxLength : maxLength // ignore: cast_nullable_to_non_nullable as int?, obscureText: null == obscureText - ? _value.obscureText + ? _self.obscureText : obscureText // ignore: cast_nullable_to_non_nullable as bool, enableSuggestions: null == enableSuggestions - ? _value.enableSuggestions + ? _self.enableSuggestions : enableSuggestions // ignore: cast_nullable_to_non_nullable as bool, enabled: freezed == enabled - ? _value.enabled + ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable as bool?, cursorWidth: null == cursorWidth - ? _value.cursorWidth + ? _self.cursorWidth : cursorWidth // ignore: cast_nullable_to_non_nullable as double, cursorHeight: freezed == cursorHeight - ? _value.cursorHeight + ? _self.cursorHeight : cursorHeight // ignore: cast_nullable_to_non_nullable as double?, cursorColor: freezed == cursorColor - ? _value.cursorColor + ? _self.cursorColor : cursorColor // ignore: cast_nullable_to_non_nullable as String?, hintText: freezed == hintText - ? _value.hintText + ? _self.hintText : hintText // ignore: cast_nullable_to_non_nullable as String?, inputFormatters: null == inputFormatters - ? _value.inputFormatters + ? _self.inputFormatters : inputFormatters // ignore: cast_nullable_to_non_nullable as List, - ) as $Val); + )); } /// Create a copy of StacTextField @@ -246,12 +328,12 @@ class _$StacTextFieldCopyWithImpl<$Res, $Val extends StacTextField> @override @pragma('vm:prefer-inline') $StacInputDecorationCopyWith<$Res>? get decoration { - if (_value.decoration == null) { + if (_self.decoration == null) { return null; } - return $StacInputDecorationCopyWith<$Res>(_value.decoration!, (value) { - return _then(_value.copyWith(decoration: value) as $Val); + return $StacInputDecorationCopyWith<$Res>(_self.decoration!, (value) { + return _then(_self.copyWith(decoration: value)); }); } @@ -260,202 +342,20 @@ class _$StacTextFieldCopyWithImpl<$Res, $Val extends StacTextField> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } } -/// @nodoc -abstract class _$$StacTextFieldImplCopyWith<$Res> - implements $StacTextFieldCopyWith<$Res> { - factory _$$StacTextFieldImplCopyWith( - _$StacTextFieldImpl value, $Res Function(_$StacTextFieldImpl) then) = - __$$StacTextFieldImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {StacInputDecoration? decoration, - String initialValue, - StacTextInputType? keyboardType, - TextInputAction? textInputAction, - TextCapitalization textCapitalization, - StacTextStyle? style, - TextAlign textAlign, - StacTextAlignVertical? textAlignVertical, - TextDirection? textDirection, - bool readOnly, - bool? showCursor, - dynamic expands, - bool autofocus, - String obscuringCharacter, - int? maxLines, - int? minLines, - int? maxLength, - bool obscureText, - bool enableSuggestions, - bool? enabled, - double cursorWidth, - double? cursorHeight, - String? cursorColor, - String? hintText, - List inputFormatters}); - - @override - $StacInputDecorationCopyWith<$Res>? get decoration; - @override - $StacTextStyleCopyWith<$Res>? get style; -} - -/// @nodoc -class __$$StacTextFieldImplCopyWithImpl<$Res> - extends _$StacTextFieldCopyWithImpl<$Res, _$StacTextFieldImpl> - implements _$$StacTextFieldImplCopyWith<$Res> { - __$$StacTextFieldImplCopyWithImpl( - _$StacTextFieldImpl _value, $Res Function(_$StacTextFieldImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTextField - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? decoration = freezed, - Object? initialValue = null, - Object? keyboardType = freezed, - Object? textInputAction = freezed, - Object? textCapitalization = null, - Object? style = freezed, - Object? textAlign = null, - Object? textAlignVertical = freezed, - Object? textDirection = freezed, - Object? readOnly = null, - Object? showCursor = freezed, - Object? expands = freezed, - Object? autofocus = null, - Object? obscuringCharacter = null, - Object? maxLines = freezed, - Object? minLines = freezed, - Object? maxLength = freezed, - Object? obscureText = null, - Object? enableSuggestions = null, - Object? enabled = freezed, - Object? cursorWidth = null, - Object? cursorHeight = freezed, - Object? cursorColor = freezed, - Object? hintText = freezed, - Object? inputFormatters = null, - }) { - return _then(_$StacTextFieldImpl( - decoration: freezed == decoration - ? _value.decoration - : decoration // ignore: cast_nullable_to_non_nullable - as StacInputDecoration?, - initialValue: null == initialValue - ? _value.initialValue - : initialValue // ignore: cast_nullable_to_non_nullable - as String, - keyboardType: freezed == keyboardType - ? _value.keyboardType - : keyboardType // ignore: cast_nullable_to_non_nullable - as StacTextInputType?, - textInputAction: freezed == textInputAction - ? _value.textInputAction - : textInputAction // ignore: cast_nullable_to_non_nullable - as TextInputAction?, - textCapitalization: null == textCapitalization - ? _value.textCapitalization - : textCapitalization // ignore: cast_nullable_to_non_nullable - as TextCapitalization, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - textAlign: null == textAlign - ? _value.textAlign - : textAlign // ignore: cast_nullable_to_non_nullable - as TextAlign, - textAlignVertical: freezed == textAlignVertical - ? _value.textAlignVertical - : textAlignVertical // ignore: cast_nullable_to_non_nullable - as StacTextAlignVertical?, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - readOnly: null == readOnly - ? _value.readOnly - : readOnly // ignore: cast_nullable_to_non_nullable - as bool, - showCursor: freezed == showCursor - ? _value.showCursor - : showCursor // ignore: cast_nullable_to_non_nullable - as bool?, - expands: freezed == expands ? _value.expands! : expands, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - obscuringCharacter: null == obscuringCharacter - ? _value.obscuringCharacter - : obscuringCharacter // ignore: cast_nullable_to_non_nullable - as String, - maxLines: freezed == maxLines - ? _value.maxLines - : maxLines // ignore: cast_nullable_to_non_nullable - as int?, - minLines: freezed == minLines - ? _value.minLines - : minLines // ignore: cast_nullable_to_non_nullable - as int?, - maxLength: freezed == maxLength - ? _value.maxLength - : maxLength // ignore: cast_nullable_to_non_nullable - as int?, - obscureText: null == obscureText - ? _value.obscureText - : obscureText // ignore: cast_nullable_to_non_nullable - as bool, - enableSuggestions: null == enableSuggestions - ? _value.enableSuggestions - : enableSuggestions // ignore: cast_nullable_to_non_nullable - as bool, - enabled: freezed == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool?, - cursorWidth: null == cursorWidth - ? _value.cursorWidth - : cursorWidth // ignore: cast_nullable_to_non_nullable - as double, - cursorHeight: freezed == cursorHeight - ? _value.cursorHeight - : cursorHeight // ignore: cast_nullable_to_non_nullable - as double?, - cursorColor: freezed == cursorColor - ? _value.cursorColor - : cursorColor // ignore: cast_nullable_to_non_nullable - as String?, - hintText: freezed == hintText - ? _value.hintText - : hintText // ignore: cast_nullable_to_non_nullable - as String?, - inputFormatters: null == inputFormatters - ? _value._inputFormatters - : inputFormatters // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - /// @nodoc @JsonSerializable() -class _$StacTextFieldImpl implements _StacTextField { - const _$StacTextFieldImpl( +class _StacTextField implements StacTextField { + const _StacTextField( {this.decoration, this.initialValue = '', this.keyboardType, @@ -482,9 +382,8 @@ class _$StacTextFieldImpl implements _StacTextField { this.hintText, final List inputFormatters = const []}) : _inputFormatters = inputFormatters; - - factory _$StacTextFieldImpl.fromJson(Map json) => - _$$StacTextFieldImplFromJson(json); + factory _StacTextField.fromJson(Map json) => + _$StacTextFieldFromJson(json); @override final StacInputDecoration? decoration; @@ -553,16 +452,26 @@ class _$StacTextFieldImpl implements _StacTextField { return EqualUnmodifiableListView(_inputFormatters); } + /// Create a copy of StacTextField + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTextField(decoration: $decoration, initialValue: $initialValue, keyboardType: $keyboardType, textInputAction: $textInputAction, textCapitalization: $textCapitalization, style: $style, textAlign: $textAlign, textAlignVertical: $textAlignVertical, textDirection: $textDirection, readOnly: $readOnly, showCursor: $showCursor, expands: $expands, autofocus: $autofocus, obscuringCharacter: $obscuringCharacter, maxLines: $maxLines, minLines: $minLines, maxLength: $maxLength, obscureText: $obscureText, enableSuggestions: $enableSuggestions, enabled: $enabled, cursorWidth: $cursorWidth, cursorHeight: $cursorHeight, cursorColor: $cursorColor, hintText: $hintText, inputFormatters: $inputFormatters)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTextFieldCopyWith<_StacTextField> get copyWith => + __$StacTextFieldCopyWithImpl<_StacTextField>(this, _$identity); + + @override + Map toJson() { + return _$StacTextFieldToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTextFieldImpl && + other is _StacTextField && (identical(other.decoration, decoration) || other.decoration == decoration) && (identical(other.initialValue, initialValue) || @@ -643,108 +552,223 @@ class _$StacTextFieldImpl implements _StacTextField { const DeepCollectionEquality().hash(_inputFormatters) ]); - /// Create a copy of StacTextField - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacTextFieldImplCopyWith<_$StacTextFieldImpl> get copyWith => - __$$StacTextFieldImplCopyWithImpl<_$StacTextFieldImpl>(this, _$identity); - - @override - Map toJson() { - return _$$StacTextFieldImplToJson( - this, - ); + String toString() { + return 'StacTextField(decoration: $decoration, initialValue: $initialValue, keyboardType: $keyboardType, textInputAction: $textInputAction, textCapitalization: $textCapitalization, style: $style, textAlign: $textAlign, textAlignVertical: $textAlignVertical, textDirection: $textDirection, readOnly: $readOnly, showCursor: $showCursor, expands: $expands, autofocus: $autofocus, obscuringCharacter: $obscuringCharacter, maxLines: $maxLines, minLines: $minLines, maxLength: $maxLength, obscureText: $obscureText, enableSuggestions: $enableSuggestions, enabled: $enabled, cursorWidth: $cursorWidth, cursorHeight: $cursorHeight, cursorColor: $cursorColor, hintText: $hintText, inputFormatters: $inputFormatters)'; } } -abstract class _StacTextField implements StacTextField { - const factory _StacTextField( - {final StacInputDecoration? decoration, - final String initialValue, - final StacTextInputType? keyboardType, - final TextInputAction? textInputAction, - final TextCapitalization textCapitalization, - final StacTextStyle? style, - final TextAlign textAlign, - final StacTextAlignVertical? textAlignVertical, - final TextDirection? textDirection, - final bool readOnly, - final bool? showCursor, - final dynamic expands, - final bool autofocus, - final String obscuringCharacter, - final int? maxLines, - final int? minLines, - final int? maxLength, - final bool obscureText, - final bool enableSuggestions, - final bool? enabled, - final double cursorWidth, - final double? cursorHeight, - final String? cursorColor, - final String? hintText, - final List inputFormatters}) = _$StacTextFieldImpl; - - factory _StacTextField.fromJson(Map json) = - _$StacTextFieldImpl.fromJson; - - @override - StacInputDecoration? get decoration; - @override - String get initialValue; - @override - StacTextInputType? get keyboardType; - @override - TextInputAction? get textInputAction; - @override - TextCapitalization get textCapitalization; - @override - StacTextStyle? get style; - @override - TextAlign get textAlign; - @override - StacTextAlignVertical? get textAlignVertical; - @override - TextDirection? get textDirection; - @override - bool get readOnly; - @override - bool? get showCursor; - @override - dynamic get expands; - @override - bool get autofocus; - @override - String get obscuringCharacter; - @override - int? get maxLines; - @override - int? get minLines; - @override - int? get maxLength; - @override - bool get obscureText; - @override - bool get enableSuggestions; - @override - bool? get enabled; +/// @nodoc +abstract mixin class _$StacTextFieldCopyWith<$Res> + implements $StacTextFieldCopyWith<$Res> { + factory _$StacTextFieldCopyWith( + _StacTextField value, $Res Function(_StacTextField) _then) = + __$StacTextFieldCopyWithImpl; @override - double get cursorWidth; + @useResult + $Res call( + {StacInputDecoration? decoration, + String initialValue, + StacTextInputType? keyboardType, + TextInputAction? textInputAction, + TextCapitalization textCapitalization, + StacTextStyle? style, + TextAlign textAlign, + StacTextAlignVertical? textAlignVertical, + TextDirection? textDirection, + bool readOnly, + bool? showCursor, + dynamic expands, + bool autofocus, + String obscuringCharacter, + int? maxLines, + int? minLines, + int? maxLength, + bool obscureText, + bool enableSuggestions, + bool? enabled, + double cursorWidth, + double? cursorHeight, + String? cursorColor, + String? hintText, + List inputFormatters}); + @override - double? get cursorHeight; + $StacInputDecorationCopyWith<$Res>? get decoration; @override - String? get cursorColor; + $StacTextStyleCopyWith<$Res>? get style; +} + +/// @nodoc +class __$StacTextFieldCopyWithImpl<$Res> + implements _$StacTextFieldCopyWith<$Res> { + __$StacTextFieldCopyWithImpl(this._self, this._then); + + final _StacTextField _self; + final $Res Function(_StacTextField) _then; + + /// Create a copy of StacTextField + /// with the given fields replaced by the non-null parameter values. @override - String? get hintText; + @pragma('vm:prefer-inline') + $Res call({ + Object? decoration = freezed, + Object? initialValue = null, + Object? keyboardType = freezed, + Object? textInputAction = freezed, + Object? textCapitalization = null, + Object? style = freezed, + Object? textAlign = null, + Object? textAlignVertical = freezed, + Object? textDirection = freezed, + Object? readOnly = null, + Object? showCursor = freezed, + Object? expands = freezed, + Object? autofocus = null, + Object? obscuringCharacter = null, + Object? maxLines = freezed, + Object? minLines = freezed, + Object? maxLength = freezed, + Object? obscureText = null, + Object? enableSuggestions = null, + Object? enabled = freezed, + Object? cursorWidth = null, + Object? cursorHeight = freezed, + Object? cursorColor = freezed, + Object? hintText = freezed, + Object? inputFormatters = null, + }) { + return _then(_StacTextField( + decoration: freezed == decoration + ? _self.decoration + : decoration // ignore: cast_nullable_to_non_nullable + as StacInputDecoration?, + initialValue: null == initialValue + ? _self.initialValue + : initialValue // ignore: cast_nullable_to_non_nullable + as String, + keyboardType: freezed == keyboardType + ? _self.keyboardType + : keyboardType // ignore: cast_nullable_to_non_nullable + as StacTextInputType?, + textInputAction: freezed == textInputAction + ? _self.textInputAction + : textInputAction // ignore: cast_nullable_to_non_nullable + as TextInputAction?, + textCapitalization: null == textCapitalization + ? _self.textCapitalization + : textCapitalization // ignore: cast_nullable_to_non_nullable + as TextCapitalization, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + textAlign: null == textAlign + ? _self.textAlign + : textAlign // ignore: cast_nullable_to_non_nullable + as TextAlign, + textAlignVertical: freezed == textAlignVertical + ? _self.textAlignVertical + : textAlignVertical // ignore: cast_nullable_to_non_nullable + as StacTextAlignVertical?, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + readOnly: null == readOnly + ? _self.readOnly + : readOnly // ignore: cast_nullable_to_non_nullable + as bool, + showCursor: freezed == showCursor + ? _self.showCursor + : showCursor // ignore: cast_nullable_to_non_nullable + as bool?, + expands: freezed == expands + ? _self.expands + : expands // ignore: cast_nullable_to_non_nullable + as dynamic, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + obscuringCharacter: null == obscuringCharacter + ? _self.obscuringCharacter + : obscuringCharacter // ignore: cast_nullable_to_non_nullable + as String, + maxLines: freezed == maxLines + ? _self.maxLines + : maxLines // ignore: cast_nullable_to_non_nullable + as int?, + minLines: freezed == minLines + ? _self.minLines + : minLines // ignore: cast_nullable_to_non_nullable + as int?, + maxLength: freezed == maxLength + ? _self.maxLength + : maxLength // ignore: cast_nullable_to_non_nullable + as int?, + obscureText: null == obscureText + ? _self.obscureText + : obscureText // ignore: cast_nullable_to_non_nullable + as bool, + enableSuggestions: null == enableSuggestions + ? _self.enableSuggestions + : enableSuggestions // ignore: cast_nullable_to_non_nullable + as bool, + enabled: freezed == enabled + ? _self.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool?, + cursorWidth: null == cursorWidth + ? _self.cursorWidth + : cursorWidth // ignore: cast_nullable_to_non_nullable + as double, + cursorHeight: freezed == cursorHeight + ? _self.cursorHeight + : cursorHeight // ignore: cast_nullable_to_non_nullable + as double?, + cursorColor: freezed == cursorColor + ? _self.cursorColor + : cursorColor // ignore: cast_nullable_to_non_nullable + as String?, + hintText: freezed == hintText + ? _self.hintText + : hintText // ignore: cast_nullable_to_non_nullable + as String?, + inputFormatters: null == inputFormatters + ? _self._inputFormatters + : inputFormatters // ignore: cast_nullable_to_non_nullable + as List, + )); + } + + /// Create a copy of StacTextField + /// with the given fields replaced by the non-null parameter values. @override - List get inputFormatters; + @pragma('vm:prefer-inline') + $StacInputDecorationCopyWith<$Res>? get decoration { + if (_self.decoration == null) { + return null; + } + + return $StacInputDecorationCopyWith<$Res>(_self.decoration!, (value) { + return _then(_self.copyWith(decoration: value)); + }); + } /// Create a copy of StacTextField /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTextFieldImplCopyWith<_$StacTextFieldImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.g.dart b/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.g.dart index dd140998..e76bfd3d 100644 --- a/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.g.dart +++ b/packages/stac/lib/src/parsers/stac_text_field/stac_text_field.g.dart @@ -6,8 +6,8 @@ part of 'stac_text_field.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTextFieldImpl _$$StacTextFieldImplFromJson(Map json) => - _$StacTextFieldImpl( +_StacTextField _$StacTextFieldFromJson(Map json) => + _StacTextField( decoration: json['decoration'] == null ? null : StacInputDecoration.fromJson( @@ -50,7 +50,7 @@ _$StacTextFieldImpl _$$StacTextFieldImplFromJson(Map json) => const [], ); -Map _$$StacTextFieldImplToJson(_$StacTextFieldImpl instance) => +Map _$StacTextFieldToJson(_StacTextField instance) => { 'decoration': instance.decoration, 'initialValue': instance.initialValue, diff --git a/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.dart b/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.dart index 58409da8..4030fada 100644 --- a/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.dart +++ b/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.dart @@ -14,7 +14,7 @@ part 'stac_text_form_field.freezed.dart'; part 'stac_text_form_field.g.dart'; @freezed -class StacTextFormField with _$StacTextFormField { +abstract class StacTextFormField with _$StacTextFormField { const factory StacTextFormField({ String? id, String? compareId, diff --git a/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.freezed.dart b/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.freezed.dart index f08e4bdf..94496f95 100644 --- a/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,75 +10,193 @@ part of 'stac_text_form_field.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTextFormField _$StacTextFormFieldFromJson(Map json) { - return _StacTextFormField.fromJson(json); -} - /// @nodoc mixin _$StacTextFormField { - String? get id => throw _privateConstructorUsedError; - String? get compareId => throw _privateConstructorUsedError; - StacInputDecoration? get decoration => throw _privateConstructorUsedError; - String? get initialValue => throw _privateConstructorUsedError; - StacTextInputType? get keyboardType => throw _privateConstructorUsedError; - TextInputAction? get textInputAction => throw _privateConstructorUsedError; - TextCapitalization get textCapitalization => - throw _privateConstructorUsedError; - StacTextStyle? get style => throw _privateConstructorUsedError; - TextAlign get textAlign => throw _privateConstructorUsedError; - StacTextAlignVertical? get textAlignVertical => - throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - bool get readOnly => throw _privateConstructorUsedError; - bool? get showCursor => throw _privateConstructorUsedError; - bool get autofocus => throw _privateConstructorUsedError; - String get obscuringCharacter => throw _privateConstructorUsedError; - int? get maxLines => throw _privateConstructorUsedError; - int? get minLines => throw _privateConstructorUsedError; - int? get maxLength => throw _privateConstructorUsedError; - bool? get obscureText => throw _privateConstructorUsedError; - bool get autocorrect => throw _privateConstructorUsedError; - SmartDashesType? get smartDashesType => throw _privateConstructorUsedError; - SmartQuotesType? get smartQuotesType => throw _privateConstructorUsedError; - MaxLengthEnforcement? get maxLengthEnforcement => - throw _privateConstructorUsedError; - bool get expands => throw _privateConstructorUsedError; - Brightness? get keyboardAppearance => throw _privateConstructorUsedError; - StacEdgeInsets get scrollPadding => throw _privateConstructorUsedError; - String? get restorationId => throw _privateConstructorUsedError; - bool get enableIMEPersonalizedLearning => throw _privateConstructorUsedError; - bool get enableSuggestions => throw _privateConstructorUsedError; - bool? get enabled => throw _privateConstructorUsedError; - double get cursorWidth => throw _privateConstructorUsedError; - double? get cursorHeight => throw _privateConstructorUsedError; - String? get cursorColor => throw _privateConstructorUsedError; - String? get hintText => throw _privateConstructorUsedError; - AutovalidateMode? get autovalidateMode => throw _privateConstructorUsedError; - List get inputFormatters => - throw _privateConstructorUsedError; - List get validatorRules => - throw _privateConstructorUsedError; - - /// Serializes this StacTextFormField to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get id; + String? get compareId; + StacInputDecoration? get decoration; + String? get initialValue; + StacTextInputType? get keyboardType; + TextInputAction? get textInputAction; + TextCapitalization get textCapitalization; + StacTextStyle? get style; + TextAlign get textAlign; + StacTextAlignVertical? get textAlignVertical; + TextDirection? get textDirection; + bool get readOnly; + bool? get showCursor; + bool get autofocus; + String get obscuringCharacter; + int? get maxLines; + int? get minLines; + int? get maxLength; + bool? get obscureText; + bool get autocorrect; + SmartDashesType? get smartDashesType; + SmartQuotesType? get smartQuotesType; + MaxLengthEnforcement? get maxLengthEnforcement; + bool get expands; + Brightness? get keyboardAppearance; + StacEdgeInsets get scrollPadding; + String? get restorationId; + bool get enableIMEPersonalizedLearning; + bool get enableSuggestions; + bool? get enabled; + double get cursorWidth; + double? get cursorHeight; + String? get cursorColor; + String? get hintText; + AutovalidateMode? get autovalidateMode; + List get inputFormatters; + List get validatorRules; /// Create a copy of StacTextFormField /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTextFormFieldCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacTextFormFieldCopyWithImpl( + this as StacTextFormField, _$identity); + + /// Serializes this StacTextFormField to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTextFormField && + (identical(other.id, id) || other.id == id) && + (identical(other.compareId, compareId) || + other.compareId == compareId) && + (identical(other.decoration, decoration) || + other.decoration == decoration) && + (identical(other.initialValue, initialValue) || + other.initialValue == initialValue) && + (identical(other.keyboardType, keyboardType) || + other.keyboardType == keyboardType) && + (identical(other.textInputAction, textInputAction) || + other.textInputAction == textInputAction) && + (identical(other.textCapitalization, textCapitalization) || + other.textCapitalization == textCapitalization) && + (identical(other.style, style) || other.style == style) && + (identical(other.textAlign, textAlign) || + other.textAlign == textAlign) && + (identical(other.textAlignVertical, textAlignVertical) || + other.textAlignVertical == textAlignVertical) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + (identical(other.readOnly, readOnly) || + other.readOnly == readOnly) && + (identical(other.showCursor, showCursor) || + other.showCursor == showCursor) && + (identical(other.autofocus, autofocus) || + other.autofocus == autofocus) && + (identical(other.obscuringCharacter, obscuringCharacter) || + other.obscuringCharacter == obscuringCharacter) && + (identical(other.maxLines, maxLines) || + other.maxLines == maxLines) && + (identical(other.minLines, minLines) || + other.minLines == minLines) && + (identical(other.maxLength, maxLength) || + other.maxLength == maxLength) && + (identical(other.obscureText, obscureText) || + other.obscureText == obscureText) && + (identical(other.autocorrect, autocorrect) || + other.autocorrect == autocorrect) && + (identical(other.smartDashesType, smartDashesType) || + other.smartDashesType == smartDashesType) && + (identical(other.smartQuotesType, smartQuotesType) || + other.smartQuotesType == smartQuotesType) && + (identical(other.maxLengthEnforcement, maxLengthEnforcement) || + other.maxLengthEnforcement == maxLengthEnforcement) && + (identical(other.expands, expands) || other.expands == expands) && + (identical(other.keyboardAppearance, keyboardAppearance) || + other.keyboardAppearance == keyboardAppearance) && + (identical(other.scrollPadding, scrollPadding) || + other.scrollPadding == scrollPadding) && + (identical(other.restorationId, restorationId) || + other.restorationId == restorationId) && + (identical(other.enableIMEPersonalizedLearning, + enableIMEPersonalizedLearning) || + other.enableIMEPersonalizedLearning == + enableIMEPersonalizedLearning) && + (identical(other.enableSuggestions, enableSuggestions) || + other.enableSuggestions == enableSuggestions) && + (identical(other.enabled, enabled) || other.enabled == enabled) && + (identical(other.cursorWidth, cursorWidth) || + other.cursorWidth == cursorWidth) && + (identical(other.cursorHeight, cursorHeight) || + other.cursorHeight == cursorHeight) && + (identical(other.cursorColor, cursorColor) || + other.cursorColor == cursorColor) && + (identical(other.hintText, hintText) || + other.hintText == hintText) && + (identical(other.autovalidateMode, autovalidateMode) || + other.autovalidateMode == autovalidateMode) && + const DeepCollectionEquality() + .equals(other.inputFormatters, inputFormatters) && + const DeepCollectionEquality() + .equals(other.validatorRules, validatorRules)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + compareId, + decoration, + initialValue, + keyboardType, + textInputAction, + textCapitalization, + style, + textAlign, + textAlignVertical, + textDirection, + readOnly, + showCursor, + autofocus, + obscuringCharacter, + maxLines, + minLines, + maxLength, + obscureText, + autocorrect, + smartDashesType, + smartQuotesType, + maxLengthEnforcement, + expands, + keyboardAppearance, + scrollPadding, + restorationId, + enableIMEPersonalizedLearning, + enableSuggestions, + enabled, + cursorWidth, + cursorHeight, + cursorColor, + hintText, + autovalidateMode, + const DeepCollectionEquality().hash(inputFormatters), + const DeepCollectionEquality().hash(validatorRules) + ]); + + @override + String toString() { + return 'StacTextFormField(id: $id, compareId: $compareId, decoration: $decoration, initialValue: $initialValue, keyboardType: $keyboardType, textInputAction: $textInputAction, textCapitalization: $textCapitalization, style: $style, textAlign: $textAlign, textAlignVertical: $textAlignVertical, textDirection: $textDirection, readOnly: $readOnly, showCursor: $showCursor, autofocus: $autofocus, obscuringCharacter: $obscuringCharacter, maxLines: $maxLines, minLines: $minLines, maxLength: $maxLength, obscureText: $obscureText, autocorrect: $autocorrect, smartDashesType: $smartDashesType, smartQuotesType: $smartQuotesType, maxLengthEnforcement: $maxLengthEnforcement, expands: $expands, keyboardAppearance: $keyboardAppearance, scrollPadding: $scrollPadding, restorationId: $restorationId, enableIMEPersonalizedLearning: $enableIMEPersonalizedLearning, enableSuggestions: $enableSuggestions, enabled: $enabled, cursorWidth: $cursorWidth, cursorHeight: $cursorHeight, cursorColor: $cursorColor, hintText: $hintText, autovalidateMode: $autovalidateMode, inputFormatters: $inputFormatters, validatorRules: $validatorRules)'; + } } /// @nodoc -abstract class $StacTextFormFieldCopyWith<$Res> { +abstract mixin class $StacTextFormFieldCopyWith<$Res> { factory $StacTextFormFieldCopyWith( - StacTextFormField value, $Res Function(StacTextFormField) then) = - _$StacTextFormFieldCopyWithImpl<$Res, StacTextFormField>; + StacTextFormField value, $Res Function(StacTextFormField) _then) = + _$StacTextFormFieldCopyWithImpl; @useResult $Res call( {String? id, @@ -124,14 +243,12 @@ abstract class $StacTextFormFieldCopyWith<$Res> { } /// @nodoc -class _$StacTextFormFieldCopyWithImpl<$Res, $Val extends StacTextFormField> +class _$StacTextFormFieldCopyWithImpl<$Res> implements $StacTextFormFieldCopyWith<$Res> { - _$StacTextFormFieldCopyWithImpl(this._value, this._then); + _$StacTextFormFieldCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTextFormField _self; + final $Res Function(StacTextFormField) _then; /// Create a copy of StacTextFormField /// with the given fields replaced by the non-null parameter values. @@ -176,156 +293,156 @@ class _$StacTextFormFieldCopyWithImpl<$Res, $Val extends StacTextFormField> Object? inputFormatters = null, Object? validatorRules = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: freezed == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String?, compareId: freezed == compareId - ? _value.compareId + ? _self.compareId : compareId // ignore: cast_nullable_to_non_nullable as String?, decoration: freezed == decoration - ? _value.decoration + ? _self.decoration : decoration // ignore: cast_nullable_to_non_nullable as StacInputDecoration?, initialValue: freezed == initialValue - ? _value.initialValue + ? _self.initialValue : initialValue // ignore: cast_nullable_to_non_nullable as String?, keyboardType: freezed == keyboardType - ? _value.keyboardType + ? _self.keyboardType : keyboardType // ignore: cast_nullable_to_non_nullable as StacTextInputType?, textInputAction: freezed == textInputAction - ? _value.textInputAction + ? _self.textInputAction : textInputAction // ignore: cast_nullable_to_non_nullable as TextInputAction?, textCapitalization: null == textCapitalization - ? _value.textCapitalization + ? _self.textCapitalization : textCapitalization // ignore: cast_nullable_to_non_nullable as TextCapitalization, style: freezed == style - ? _value.style + ? _self.style : style // ignore: cast_nullable_to_non_nullable as StacTextStyle?, textAlign: null == textAlign - ? _value.textAlign + ? _self.textAlign : textAlign // ignore: cast_nullable_to_non_nullable as TextAlign, textAlignVertical: freezed == textAlignVertical - ? _value.textAlignVertical + ? _self.textAlignVertical : textAlignVertical // ignore: cast_nullable_to_non_nullable as StacTextAlignVertical?, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, readOnly: null == readOnly - ? _value.readOnly + ? _self.readOnly : readOnly // ignore: cast_nullable_to_non_nullable as bool, showCursor: freezed == showCursor - ? _value.showCursor + ? _self.showCursor : showCursor // ignore: cast_nullable_to_non_nullable as bool?, autofocus: null == autofocus - ? _value.autofocus + ? _self.autofocus : autofocus // ignore: cast_nullable_to_non_nullable as bool, obscuringCharacter: null == obscuringCharacter - ? _value.obscuringCharacter + ? _self.obscuringCharacter : obscuringCharacter // ignore: cast_nullable_to_non_nullable as String, maxLines: freezed == maxLines - ? _value.maxLines + ? _self.maxLines : maxLines // ignore: cast_nullable_to_non_nullable as int?, minLines: freezed == minLines - ? _value.minLines + ? _self.minLines : minLines // ignore: cast_nullable_to_non_nullable as int?, maxLength: freezed == maxLength - ? _value.maxLength + ? _self.maxLength : maxLength // ignore: cast_nullable_to_non_nullable as int?, obscureText: freezed == obscureText - ? _value.obscureText + ? _self.obscureText : obscureText // ignore: cast_nullable_to_non_nullable as bool?, autocorrect: null == autocorrect - ? _value.autocorrect + ? _self.autocorrect : autocorrect // ignore: cast_nullable_to_non_nullable as bool, smartDashesType: freezed == smartDashesType - ? _value.smartDashesType + ? _self.smartDashesType : smartDashesType // ignore: cast_nullable_to_non_nullable as SmartDashesType?, smartQuotesType: freezed == smartQuotesType - ? _value.smartQuotesType + ? _self.smartQuotesType : smartQuotesType // ignore: cast_nullable_to_non_nullable as SmartQuotesType?, maxLengthEnforcement: freezed == maxLengthEnforcement - ? _value.maxLengthEnforcement + ? _self.maxLengthEnforcement : maxLengthEnforcement // ignore: cast_nullable_to_non_nullable as MaxLengthEnforcement?, expands: null == expands - ? _value.expands + ? _self.expands : expands // ignore: cast_nullable_to_non_nullable as bool, keyboardAppearance: freezed == keyboardAppearance - ? _value.keyboardAppearance + ? _self.keyboardAppearance : keyboardAppearance // ignore: cast_nullable_to_non_nullable as Brightness?, scrollPadding: null == scrollPadding - ? _value.scrollPadding + ? _self.scrollPadding : scrollPadding // ignore: cast_nullable_to_non_nullable as StacEdgeInsets, restorationId: freezed == restorationId - ? _value.restorationId + ? _self.restorationId : restorationId // ignore: cast_nullable_to_non_nullable as String?, enableIMEPersonalizedLearning: null == enableIMEPersonalizedLearning - ? _value.enableIMEPersonalizedLearning + ? _self.enableIMEPersonalizedLearning : enableIMEPersonalizedLearning // ignore: cast_nullable_to_non_nullable as bool, enableSuggestions: null == enableSuggestions - ? _value.enableSuggestions + ? _self.enableSuggestions : enableSuggestions // ignore: cast_nullable_to_non_nullable as bool, enabled: freezed == enabled - ? _value.enabled + ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable as bool?, cursorWidth: null == cursorWidth - ? _value.cursorWidth + ? _self.cursorWidth : cursorWidth // ignore: cast_nullable_to_non_nullable as double, cursorHeight: freezed == cursorHeight - ? _value.cursorHeight + ? _self.cursorHeight : cursorHeight // ignore: cast_nullable_to_non_nullable as double?, cursorColor: freezed == cursorColor - ? _value.cursorColor + ? _self.cursorColor : cursorColor // ignore: cast_nullable_to_non_nullable as String?, hintText: freezed == hintText - ? _value.hintText + ? _self.hintText : hintText // ignore: cast_nullable_to_non_nullable as String?, autovalidateMode: freezed == autovalidateMode - ? _value.autovalidateMode + ? _self.autovalidateMode : autovalidateMode // ignore: cast_nullable_to_non_nullable as AutovalidateMode?, inputFormatters: null == inputFormatters - ? _value.inputFormatters + ? _self.inputFormatters : inputFormatters // ignore: cast_nullable_to_non_nullable as List, validatorRules: null == validatorRules - ? _value.validatorRules + ? _self.validatorRules : validatorRules // ignore: cast_nullable_to_non_nullable as List, - ) as $Val); + )); } /// Create a copy of StacTextFormField @@ -333,12 +450,12 @@ class _$StacTextFormFieldCopyWithImpl<$Res, $Val extends StacTextFormField> @override @pragma('vm:prefer-inline') $StacInputDecorationCopyWith<$Res>? get decoration { - if (_value.decoration == null) { + if (_self.decoration == null) { return null; } - return $StacInputDecorationCopyWith<$Res>(_value.decoration!, (value) { - return _then(_value.copyWith(decoration: value) as $Val); + return $StacInputDecorationCopyWith<$Res>(_self.decoration!, (value) { + return _then(_self.copyWith(decoration: value)); }); } @@ -347,12 +464,12 @@ class _$StacTextFormFieldCopyWithImpl<$Res, $Val extends StacTextFormField> @override @pragma('vm:prefer-inline') $StacTextStyleCopyWith<$Res>? get style { - if (_value.style == null) { + if (_self.style == null) { return null; } - return $StacTextStyleCopyWith<$Res>(_value.style!, (value) { - return _then(_value.copyWith(style: value) as $Val); + return $StacTextStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); }); } @@ -361,323 +478,63 @@ class _$StacTextFormFieldCopyWithImpl<$Res, $Val extends StacTextFormField> @override @pragma('vm:prefer-inline') $StacEdgeInsetsCopyWith<$Res> get scrollPadding { - return $StacEdgeInsetsCopyWith<$Res>(_value.scrollPadding, (value) { - return _then(_value.copyWith(scrollPadding: value) as $Val); + return $StacEdgeInsetsCopyWith<$Res>(_self.scrollPadding, (value) { + return _then(_self.copyWith(scrollPadding: value)); }); } } /// @nodoc -abstract class _$$StacTextFormFieldImplCopyWith<$Res> - implements $StacTextFormFieldCopyWith<$Res> { - factory _$$StacTextFormFieldImplCopyWith(_$StacTextFormFieldImpl value, - $Res Function(_$StacTextFormFieldImpl) then) = - __$$StacTextFormFieldImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String? id, - String? compareId, - StacInputDecoration? decoration, - String? initialValue, - StacTextInputType? keyboardType, - TextInputAction? textInputAction, - TextCapitalization textCapitalization, - StacTextStyle? style, - TextAlign textAlign, - StacTextAlignVertical? textAlignVertical, - TextDirection? textDirection, - bool readOnly, - bool? showCursor, - bool autofocus, - String obscuringCharacter, - int? maxLines, - int? minLines, - int? maxLength, - bool? obscureText, - bool autocorrect, - SmartDashesType? smartDashesType, - SmartQuotesType? smartQuotesType, - MaxLengthEnforcement? maxLengthEnforcement, - bool expands, - Brightness? keyboardAppearance, - StacEdgeInsets scrollPadding, - String? restorationId, - bool enableIMEPersonalizedLearning, - bool enableSuggestions, - bool? enabled, - double cursorWidth, - double? cursorHeight, - String? cursorColor, - String? hintText, - AutovalidateMode? autovalidateMode, - List inputFormatters, - List validatorRules}); +@JsonSerializable() +class _StacTextFormField implements StacTextFormField { + const _StacTextFormField( + {this.id, + this.compareId, + this.decoration, + this.initialValue, + this.keyboardType, + this.textInputAction, + this.textCapitalization = TextCapitalization.none, + this.style, + this.textAlign = TextAlign.start, + this.textAlignVertical, + this.textDirection, + this.readOnly = false, + this.showCursor, + this.autofocus = false, + this.obscuringCharacter = '•', + this.maxLines, + this.minLines, + this.maxLength, + this.obscureText, + this.autocorrect = true, + this.smartDashesType, + this.smartQuotesType, + this.maxLengthEnforcement, + this.expands = false, + this.keyboardAppearance, + this.scrollPadding = + const StacEdgeInsets(bottom: 20, top: 20, left: 20, right: 20), + this.restorationId, + this.enableIMEPersonalizedLearning = true, + this.enableSuggestions = true, + this.enabled, + this.cursorWidth = 2, + this.cursorHeight, + this.cursorColor, + this.hintText, + this.autovalidateMode, + final List inputFormatters = const [], + final List validatorRules = const []}) + : _inputFormatters = inputFormatters, + _validatorRules = validatorRules; + factory _StacTextFormField.fromJson(Map json) => + _$StacTextFormFieldFromJson(json); @override - $StacInputDecorationCopyWith<$Res>? get decoration; + final String? id; @override - $StacTextStyleCopyWith<$Res>? get style; - @override - $StacEdgeInsetsCopyWith<$Res> get scrollPadding; -} - -/// @nodoc -class __$$StacTextFormFieldImplCopyWithImpl<$Res> - extends _$StacTextFormFieldCopyWithImpl<$Res, _$StacTextFormFieldImpl> - implements _$$StacTextFormFieldImplCopyWith<$Res> { - __$$StacTextFormFieldImplCopyWithImpl(_$StacTextFormFieldImpl _value, - $Res Function(_$StacTextFormFieldImpl) _then) - : super(_value, _then); - - /// Create a copy of StacTextFormField - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = freezed, - Object? compareId = freezed, - Object? decoration = freezed, - Object? initialValue = freezed, - Object? keyboardType = freezed, - Object? textInputAction = freezed, - Object? textCapitalization = null, - Object? style = freezed, - Object? textAlign = null, - Object? textAlignVertical = freezed, - Object? textDirection = freezed, - Object? readOnly = null, - Object? showCursor = freezed, - Object? autofocus = null, - Object? obscuringCharacter = null, - Object? maxLines = freezed, - Object? minLines = freezed, - Object? maxLength = freezed, - Object? obscureText = freezed, - Object? autocorrect = null, - Object? smartDashesType = freezed, - Object? smartQuotesType = freezed, - Object? maxLengthEnforcement = freezed, - Object? expands = null, - Object? keyboardAppearance = freezed, - Object? scrollPadding = null, - Object? restorationId = freezed, - Object? enableIMEPersonalizedLearning = null, - Object? enableSuggestions = null, - Object? enabled = freezed, - Object? cursorWidth = null, - Object? cursorHeight = freezed, - Object? cursorColor = freezed, - Object? hintText = freezed, - Object? autovalidateMode = freezed, - Object? inputFormatters = null, - Object? validatorRules = null, - }) { - return _then(_$StacTextFormFieldImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String?, - compareId: freezed == compareId - ? _value.compareId - : compareId // ignore: cast_nullable_to_non_nullable - as String?, - decoration: freezed == decoration - ? _value.decoration - : decoration // ignore: cast_nullable_to_non_nullable - as StacInputDecoration?, - initialValue: freezed == initialValue - ? _value.initialValue - : initialValue // ignore: cast_nullable_to_non_nullable - as String?, - keyboardType: freezed == keyboardType - ? _value.keyboardType - : keyboardType // ignore: cast_nullable_to_non_nullable - as StacTextInputType?, - textInputAction: freezed == textInputAction - ? _value.textInputAction - : textInputAction // ignore: cast_nullable_to_non_nullable - as TextInputAction?, - textCapitalization: null == textCapitalization - ? _value.textCapitalization - : textCapitalization // ignore: cast_nullable_to_non_nullable - as TextCapitalization, - style: freezed == style - ? _value.style - : style // ignore: cast_nullable_to_non_nullable - as StacTextStyle?, - textAlign: null == textAlign - ? _value.textAlign - : textAlign // ignore: cast_nullable_to_non_nullable - as TextAlign, - textAlignVertical: freezed == textAlignVertical - ? _value.textAlignVertical - : textAlignVertical // ignore: cast_nullable_to_non_nullable - as StacTextAlignVertical?, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - readOnly: null == readOnly - ? _value.readOnly - : readOnly // ignore: cast_nullable_to_non_nullable - as bool, - showCursor: freezed == showCursor - ? _value.showCursor - : showCursor // ignore: cast_nullable_to_non_nullable - as bool?, - autofocus: null == autofocus - ? _value.autofocus - : autofocus // ignore: cast_nullable_to_non_nullable - as bool, - obscuringCharacter: null == obscuringCharacter - ? _value.obscuringCharacter - : obscuringCharacter // ignore: cast_nullable_to_non_nullable - as String, - maxLines: freezed == maxLines - ? _value.maxLines - : maxLines // ignore: cast_nullable_to_non_nullable - as int?, - minLines: freezed == minLines - ? _value.minLines - : minLines // ignore: cast_nullable_to_non_nullable - as int?, - maxLength: freezed == maxLength - ? _value.maxLength - : maxLength // ignore: cast_nullable_to_non_nullable - as int?, - obscureText: freezed == obscureText - ? _value.obscureText - : obscureText // ignore: cast_nullable_to_non_nullable - as bool?, - autocorrect: null == autocorrect - ? _value.autocorrect - : autocorrect // ignore: cast_nullable_to_non_nullable - as bool, - smartDashesType: freezed == smartDashesType - ? _value.smartDashesType - : smartDashesType // ignore: cast_nullable_to_non_nullable - as SmartDashesType?, - smartQuotesType: freezed == smartQuotesType - ? _value.smartQuotesType - : smartQuotesType // ignore: cast_nullable_to_non_nullable - as SmartQuotesType?, - maxLengthEnforcement: freezed == maxLengthEnforcement - ? _value.maxLengthEnforcement - : maxLengthEnforcement // ignore: cast_nullable_to_non_nullable - as MaxLengthEnforcement?, - expands: null == expands - ? _value.expands - : expands // ignore: cast_nullable_to_non_nullable - as bool, - keyboardAppearance: freezed == keyboardAppearance - ? _value.keyboardAppearance - : keyboardAppearance // ignore: cast_nullable_to_non_nullable - as Brightness?, - scrollPadding: null == scrollPadding - ? _value.scrollPadding - : scrollPadding // ignore: cast_nullable_to_non_nullable - as StacEdgeInsets, - restorationId: freezed == restorationId - ? _value.restorationId - : restorationId // ignore: cast_nullable_to_non_nullable - as String?, - enableIMEPersonalizedLearning: null == enableIMEPersonalizedLearning - ? _value.enableIMEPersonalizedLearning - : enableIMEPersonalizedLearning // ignore: cast_nullable_to_non_nullable - as bool, - enableSuggestions: null == enableSuggestions - ? _value.enableSuggestions - : enableSuggestions // ignore: cast_nullable_to_non_nullable - as bool, - enabled: freezed == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool?, - cursorWidth: null == cursorWidth - ? _value.cursorWidth - : cursorWidth // ignore: cast_nullable_to_non_nullable - as double, - cursorHeight: freezed == cursorHeight - ? _value.cursorHeight - : cursorHeight // ignore: cast_nullable_to_non_nullable - as double?, - cursorColor: freezed == cursorColor - ? _value.cursorColor - : cursorColor // ignore: cast_nullable_to_non_nullable - as String?, - hintText: freezed == hintText - ? _value.hintText - : hintText // ignore: cast_nullable_to_non_nullable - as String?, - autovalidateMode: freezed == autovalidateMode - ? _value.autovalidateMode - : autovalidateMode // ignore: cast_nullable_to_non_nullable - as AutovalidateMode?, - inputFormatters: null == inputFormatters - ? _value._inputFormatters - : inputFormatters // ignore: cast_nullable_to_non_nullable - as List, - validatorRules: null == validatorRules - ? _value._validatorRules - : validatorRules // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$StacTextFormFieldImpl implements _StacTextFormField { - const _$StacTextFormFieldImpl( - {this.id, - this.compareId, - this.decoration, - this.initialValue, - this.keyboardType, - this.textInputAction, - this.textCapitalization = TextCapitalization.none, - this.style, - this.textAlign = TextAlign.start, - this.textAlignVertical, - this.textDirection, - this.readOnly = false, - this.showCursor, - this.autofocus = false, - this.obscuringCharacter = '•', - this.maxLines, - this.minLines, - this.maxLength, - this.obscureText, - this.autocorrect = true, - this.smartDashesType, - this.smartQuotesType, - this.maxLengthEnforcement, - this.expands = false, - this.keyboardAppearance, - this.scrollPadding = - const StacEdgeInsets(bottom: 20, top: 20, left: 20, right: 20), - this.restorationId, - this.enableIMEPersonalizedLearning = true, - this.enableSuggestions = true, - this.enabled, - this.cursorWidth = 2, - this.cursorHeight, - this.cursorColor, - this.hintText, - this.autovalidateMode, - final List inputFormatters = const [], - final List validatorRules = const []}) - : _inputFormatters = inputFormatters, - _validatorRules = validatorRules; - - factory _$StacTextFormFieldImpl.fromJson(Map json) => - _$$StacTextFormFieldImplFromJson(json); - - @override - final String? id; - @override - final String? compareId; + final String? compareId; @override final StacInputDecoration? decoration; @override @@ -773,16 +630,26 @@ class _$StacTextFormFieldImpl implements _StacTextFormField { return EqualUnmodifiableListView(_validatorRules); } + /// Create a copy of StacTextFormField + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTextFormField(id: $id, compareId: $compareId, decoration: $decoration, initialValue: $initialValue, keyboardType: $keyboardType, textInputAction: $textInputAction, textCapitalization: $textCapitalization, style: $style, textAlign: $textAlign, textAlignVertical: $textAlignVertical, textDirection: $textDirection, readOnly: $readOnly, showCursor: $showCursor, autofocus: $autofocus, obscuringCharacter: $obscuringCharacter, maxLines: $maxLines, minLines: $minLines, maxLength: $maxLength, obscureText: $obscureText, autocorrect: $autocorrect, smartDashesType: $smartDashesType, smartQuotesType: $smartQuotesType, maxLengthEnforcement: $maxLengthEnforcement, expands: $expands, keyboardAppearance: $keyboardAppearance, scrollPadding: $scrollPadding, restorationId: $restorationId, enableIMEPersonalizedLearning: $enableIMEPersonalizedLearning, enableSuggestions: $enableSuggestions, enabled: $enabled, cursorWidth: $cursorWidth, cursorHeight: $cursorHeight, cursorColor: $cursorColor, hintText: $hintText, autovalidateMode: $autovalidateMode, inputFormatters: $inputFormatters, validatorRules: $validatorRules)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTextFormFieldCopyWith<_StacTextFormField> get copyWith => + __$StacTextFormFieldCopyWithImpl<_StacTextFormField>(this, _$identity); + + @override + Map toJson() { + return _$StacTextFormFieldToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTextFormFieldImpl && + other is _StacTextFormField && (identical(other.id, id) || other.id == id) && (identical(other.compareId, compareId) || other.compareId == compareId) && @@ -900,146 +767,307 @@ class _$StacTextFormFieldImpl implements _StacTextFormField { const DeepCollectionEquality().hash(_validatorRules) ]); - /// Create a copy of StacTextFormField - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacTextFormFieldImplCopyWith<_$StacTextFormFieldImpl> get copyWith => - __$$StacTextFormFieldImplCopyWithImpl<_$StacTextFormFieldImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacTextFormFieldImplToJson( - this, - ); + String toString() { + return 'StacTextFormField(id: $id, compareId: $compareId, decoration: $decoration, initialValue: $initialValue, keyboardType: $keyboardType, textInputAction: $textInputAction, textCapitalization: $textCapitalization, style: $style, textAlign: $textAlign, textAlignVertical: $textAlignVertical, textDirection: $textDirection, readOnly: $readOnly, showCursor: $showCursor, autofocus: $autofocus, obscuringCharacter: $obscuringCharacter, maxLines: $maxLines, minLines: $minLines, maxLength: $maxLength, obscureText: $obscureText, autocorrect: $autocorrect, smartDashesType: $smartDashesType, smartQuotesType: $smartQuotesType, maxLengthEnforcement: $maxLengthEnforcement, expands: $expands, keyboardAppearance: $keyboardAppearance, scrollPadding: $scrollPadding, restorationId: $restorationId, enableIMEPersonalizedLearning: $enableIMEPersonalizedLearning, enableSuggestions: $enableSuggestions, enabled: $enabled, cursorWidth: $cursorWidth, cursorHeight: $cursorHeight, cursorColor: $cursorColor, hintText: $hintText, autovalidateMode: $autovalidateMode, inputFormatters: $inputFormatters, validatorRules: $validatorRules)'; } } -abstract class _StacTextFormField implements StacTextFormField { - const factory _StacTextFormField( - {final String? id, - final String? compareId, - final StacInputDecoration? decoration, - final String? initialValue, - final StacTextInputType? keyboardType, - final TextInputAction? textInputAction, - final TextCapitalization textCapitalization, - final StacTextStyle? style, - final TextAlign textAlign, - final StacTextAlignVertical? textAlignVertical, - final TextDirection? textDirection, - final bool readOnly, - final bool? showCursor, - final bool autofocus, - final String obscuringCharacter, - final int? maxLines, - final int? minLines, - final int? maxLength, - final bool? obscureText, - final bool autocorrect, - final SmartDashesType? smartDashesType, - final SmartQuotesType? smartQuotesType, - final MaxLengthEnforcement? maxLengthEnforcement, - final bool expands, - final Brightness? keyboardAppearance, - final StacEdgeInsets scrollPadding, - final String? restorationId, - final bool enableIMEPersonalizedLearning, - final bool enableSuggestions, - final bool? enabled, - final double cursorWidth, - final double? cursorHeight, - final String? cursorColor, - final String? hintText, - final AutovalidateMode? autovalidateMode, - final List inputFormatters, - final List validatorRules}) = - _$StacTextFormFieldImpl; - - factory _StacTextFormField.fromJson(Map json) = - _$StacTextFormFieldImpl.fromJson; - - @override - String? get id; - @override - String? get compareId; - @override - StacInputDecoration? get decoration; - @override - String? get initialValue; - @override - StacTextInputType? get keyboardType; - @override - TextInputAction? get textInputAction; - @override - TextCapitalization get textCapitalization; - @override - StacTextStyle? get style; - @override - TextAlign get textAlign; - @override - StacTextAlignVertical? get textAlignVertical; +/// @nodoc +abstract mixin class _$StacTextFormFieldCopyWith<$Res> + implements $StacTextFormFieldCopyWith<$Res> { + factory _$StacTextFormFieldCopyWith( + _StacTextFormField value, $Res Function(_StacTextFormField) _then) = + __$StacTextFormFieldCopyWithImpl; @override - TextDirection? get textDirection; - @override - bool get readOnly; - @override - bool? get showCursor; - @override - bool get autofocus; - @override - String get obscuringCharacter; - @override - int? get maxLines; - @override - int? get minLines; - @override - int? get maxLength; - @override - bool? get obscureText; - @override - bool get autocorrect; - @override - SmartDashesType? get smartDashesType; - @override - SmartQuotesType? get smartQuotesType; - @override - MaxLengthEnforcement? get maxLengthEnforcement; - @override - bool get expands; - @override - Brightness? get keyboardAppearance; - @override - StacEdgeInsets get scrollPadding; - @override - String? get restorationId; - @override - bool get enableIMEPersonalizedLearning; - @override - bool get enableSuggestions; - @override - bool? get enabled; - @override - double get cursorWidth; + @useResult + $Res call( + {String? id, + String? compareId, + StacInputDecoration? decoration, + String? initialValue, + StacTextInputType? keyboardType, + TextInputAction? textInputAction, + TextCapitalization textCapitalization, + StacTextStyle? style, + TextAlign textAlign, + StacTextAlignVertical? textAlignVertical, + TextDirection? textDirection, + bool readOnly, + bool? showCursor, + bool autofocus, + String obscuringCharacter, + int? maxLines, + int? minLines, + int? maxLength, + bool? obscureText, + bool autocorrect, + SmartDashesType? smartDashesType, + SmartQuotesType? smartQuotesType, + MaxLengthEnforcement? maxLengthEnforcement, + bool expands, + Brightness? keyboardAppearance, + StacEdgeInsets scrollPadding, + String? restorationId, + bool enableIMEPersonalizedLearning, + bool enableSuggestions, + bool? enabled, + double cursorWidth, + double? cursorHeight, + String? cursorColor, + String? hintText, + AutovalidateMode? autovalidateMode, + List inputFormatters, + List validatorRules}); + @override - double? get cursorHeight; + $StacInputDecorationCopyWith<$Res>? get decoration; @override - String? get cursorColor; + $StacTextStyleCopyWith<$Res>? get style; @override - String? get hintText; + $StacEdgeInsetsCopyWith<$Res> get scrollPadding; +} + +/// @nodoc +class __$StacTextFormFieldCopyWithImpl<$Res> + implements _$StacTextFormFieldCopyWith<$Res> { + __$StacTextFormFieldCopyWithImpl(this._self, this._then); + + final _StacTextFormField _self; + final $Res Function(_StacTextFormField) _then; + + /// Create a copy of StacTextFormField + /// with the given fields replaced by the non-null parameter values. @override - AutovalidateMode? get autovalidateMode; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = freezed, + Object? compareId = freezed, + Object? decoration = freezed, + Object? initialValue = freezed, + Object? keyboardType = freezed, + Object? textInputAction = freezed, + Object? textCapitalization = null, + Object? style = freezed, + Object? textAlign = null, + Object? textAlignVertical = freezed, + Object? textDirection = freezed, + Object? readOnly = null, + Object? showCursor = freezed, + Object? autofocus = null, + Object? obscuringCharacter = null, + Object? maxLines = freezed, + Object? minLines = freezed, + Object? maxLength = freezed, + Object? obscureText = freezed, + Object? autocorrect = null, + Object? smartDashesType = freezed, + Object? smartQuotesType = freezed, + Object? maxLengthEnforcement = freezed, + Object? expands = null, + Object? keyboardAppearance = freezed, + Object? scrollPadding = null, + Object? restorationId = freezed, + Object? enableIMEPersonalizedLearning = null, + Object? enableSuggestions = null, + Object? enabled = freezed, + Object? cursorWidth = null, + Object? cursorHeight = freezed, + Object? cursorColor = freezed, + Object? hintText = freezed, + Object? autovalidateMode = freezed, + Object? inputFormatters = null, + Object? validatorRules = null, + }) { + return _then(_StacTextFormField( + id: freezed == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + compareId: freezed == compareId + ? _self.compareId + : compareId // ignore: cast_nullable_to_non_nullable + as String?, + decoration: freezed == decoration + ? _self.decoration + : decoration // ignore: cast_nullable_to_non_nullable + as StacInputDecoration?, + initialValue: freezed == initialValue + ? _self.initialValue + : initialValue // ignore: cast_nullable_to_non_nullable + as String?, + keyboardType: freezed == keyboardType + ? _self.keyboardType + : keyboardType // ignore: cast_nullable_to_non_nullable + as StacTextInputType?, + textInputAction: freezed == textInputAction + ? _self.textInputAction + : textInputAction // ignore: cast_nullable_to_non_nullable + as TextInputAction?, + textCapitalization: null == textCapitalization + ? _self.textCapitalization + : textCapitalization // ignore: cast_nullable_to_non_nullable + as TextCapitalization, + style: freezed == style + ? _self.style + : style // ignore: cast_nullable_to_non_nullable + as StacTextStyle?, + textAlign: null == textAlign + ? _self.textAlign + : textAlign // ignore: cast_nullable_to_non_nullable + as TextAlign, + textAlignVertical: freezed == textAlignVertical + ? _self.textAlignVertical + : textAlignVertical // ignore: cast_nullable_to_non_nullable + as StacTextAlignVertical?, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + readOnly: null == readOnly + ? _self.readOnly + : readOnly // ignore: cast_nullable_to_non_nullable + as bool, + showCursor: freezed == showCursor + ? _self.showCursor + : showCursor // ignore: cast_nullable_to_non_nullable + as bool?, + autofocus: null == autofocus + ? _self.autofocus + : autofocus // ignore: cast_nullable_to_non_nullable + as bool, + obscuringCharacter: null == obscuringCharacter + ? _self.obscuringCharacter + : obscuringCharacter // ignore: cast_nullable_to_non_nullable + as String, + maxLines: freezed == maxLines + ? _self.maxLines + : maxLines // ignore: cast_nullable_to_non_nullable + as int?, + minLines: freezed == minLines + ? _self.minLines + : minLines // ignore: cast_nullable_to_non_nullable + as int?, + maxLength: freezed == maxLength + ? _self.maxLength + : maxLength // ignore: cast_nullable_to_non_nullable + as int?, + obscureText: freezed == obscureText + ? _self.obscureText + : obscureText // ignore: cast_nullable_to_non_nullable + as bool?, + autocorrect: null == autocorrect + ? _self.autocorrect + : autocorrect // ignore: cast_nullable_to_non_nullable + as bool, + smartDashesType: freezed == smartDashesType + ? _self.smartDashesType + : smartDashesType // ignore: cast_nullable_to_non_nullable + as SmartDashesType?, + smartQuotesType: freezed == smartQuotesType + ? _self.smartQuotesType + : smartQuotesType // ignore: cast_nullable_to_non_nullable + as SmartQuotesType?, + maxLengthEnforcement: freezed == maxLengthEnforcement + ? _self.maxLengthEnforcement + : maxLengthEnforcement // ignore: cast_nullable_to_non_nullable + as MaxLengthEnforcement?, + expands: null == expands + ? _self.expands + : expands // ignore: cast_nullable_to_non_nullable + as bool, + keyboardAppearance: freezed == keyboardAppearance + ? _self.keyboardAppearance + : keyboardAppearance // ignore: cast_nullable_to_non_nullable + as Brightness?, + scrollPadding: null == scrollPadding + ? _self.scrollPadding + : scrollPadding // ignore: cast_nullable_to_non_nullable + as StacEdgeInsets, + restorationId: freezed == restorationId + ? _self.restorationId + : restorationId // ignore: cast_nullable_to_non_nullable + as String?, + enableIMEPersonalizedLearning: null == enableIMEPersonalizedLearning + ? _self.enableIMEPersonalizedLearning + : enableIMEPersonalizedLearning // ignore: cast_nullable_to_non_nullable + as bool, + enableSuggestions: null == enableSuggestions + ? _self.enableSuggestions + : enableSuggestions // ignore: cast_nullable_to_non_nullable + as bool, + enabled: freezed == enabled + ? _self.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool?, + cursorWidth: null == cursorWidth + ? _self.cursorWidth + : cursorWidth // ignore: cast_nullable_to_non_nullable + as double, + cursorHeight: freezed == cursorHeight + ? _self.cursorHeight + : cursorHeight // ignore: cast_nullable_to_non_nullable + as double?, + cursorColor: freezed == cursorColor + ? _self.cursorColor + : cursorColor // ignore: cast_nullable_to_non_nullable + as String?, + hintText: freezed == hintText + ? _self.hintText + : hintText // ignore: cast_nullable_to_non_nullable + as String?, + autovalidateMode: freezed == autovalidateMode + ? _self.autovalidateMode + : autovalidateMode // ignore: cast_nullable_to_non_nullable + as AutovalidateMode?, + inputFormatters: null == inputFormatters + ? _self._inputFormatters + : inputFormatters // ignore: cast_nullable_to_non_nullable + as List, + validatorRules: null == validatorRules + ? _self._validatorRules + : validatorRules // ignore: cast_nullable_to_non_nullable + as List, + )); + } + + /// Create a copy of StacTextFormField + /// with the given fields replaced by the non-null parameter values. @override - List get inputFormatters; + @pragma('vm:prefer-inline') + $StacInputDecorationCopyWith<$Res>? get decoration { + if (_self.decoration == null) { + return null; + } + + return $StacInputDecorationCopyWith<$Res>(_self.decoration!, (value) { + return _then(_self.copyWith(decoration: value)); + }); + } + + /// Create a copy of StacTextFormField + /// with the given fields replaced by the non-null parameter values. @override - List get validatorRules; + @pragma('vm:prefer-inline') + $StacTextStyleCopyWith<$Res>? get style { + if (_self.style == null) { + return null; + } + + return $StacTextStyleCopyWith<$Res>(_self.style!, (value) { + return _then(_self.copyWith(style: value)); + }); + } /// Create a copy of StacTextFormField /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTextFormFieldImplCopyWith<_$StacTextFormFieldImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacEdgeInsetsCopyWith<$Res> get scrollPadding { + return $StacEdgeInsetsCopyWith<$Res>(_self.scrollPadding, (value) { + return _then(_self.copyWith(scrollPadding: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.g.dart b/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.g.dart index 372d10f5..c1f40411 100644 --- a/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.g.dart +++ b/packages/stac/lib/src/parsers/stac_text_form_field/stac_text_form_field.g.dart @@ -6,9 +6,8 @@ part of 'stac_text_form_field.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTextFormFieldImpl _$$StacTextFormFieldImplFromJson( - Map json) => - _$StacTextFormFieldImpl( +_StacTextFormField _$StacTextFormFieldFromJson(Map json) => + _StacTextFormField( id: json['id'] as String?, compareId: json['compareId'] as String?, decoration: json['decoration'] == null @@ -75,8 +74,7 @@ _$StacTextFormFieldImpl _$$StacTextFormFieldImplFromJson( const [], ); -Map _$$StacTextFormFieldImplToJson( - _$StacTextFormFieldImpl instance) => +Map _$StacTextFormFieldToJson(_StacTextFormField instance) => { 'id': instance.id, 'compareId': instance.compareId, diff --git a/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.dart b/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.dart index f0b6a6c0..d3024353 100644 --- a/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.dart +++ b/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.dart @@ -7,7 +7,7 @@ part 'stac_text_style.freezed.dart'; part 'stac_text_style.g.dart'; @freezed -class StacTextStyle with _$StacTextStyle { +abstract class StacTextStyle with _$StacTextStyle { const factory StacTextStyle({ @Default(true) bool inherit, String? color, diff --git a/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.freezed.dart b/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.freezed.dart index 36a67d99..54ebe756 100644 --- a/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,156 +10,95 @@ part of 'stac_text_style.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTextStyle _$StacTextStyleFromJson(Map json) { - return _StacTextStyle.fromJson(json); -} - /// @nodoc mixin _$StacTextStyle { - bool get inherit => throw _privateConstructorUsedError; - String? get color => throw _privateConstructorUsedError; - String? get backgroundColor => throw _privateConstructorUsedError; - String? get styleFromTheme => throw _privateConstructorUsedError; - double? get fontSize => throw _privateConstructorUsedError; - StacFontWeight? get fontWeight => throw _privateConstructorUsedError; - FontStyle? get fontStyle => throw _privateConstructorUsedError; - String? get fontFamily => throw _privateConstructorUsedError; - List? get fontFamilyFallback => throw _privateConstructorUsedError; - double? get letterSpacing => throw _privateConstructorUsedError; - double? get wordSpacing => throw _privateConstructorUsedError; - TextBaseline? get textBaseline => throw _privateConstructorUsedError; - double? get height => throw _privateConstructorUsedError; - - /// Serializes this StacTextStyle to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + bool get inherit; + String? get color; + String? get backgroundColor; + String? get styleFromTheme; + double? get fontSize; + StacFontWeight? get fontWeight; + FontStyle? get fontStyle; + String? get fontFamily; + List? get fontFamilyFallback; + double? get letterSpacing; + double? get wordSpacing; + TextBaseline? get textBaseline; + double? get height; /// Create a copy of StacTextStyle /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacTextStyleCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacTextStyleCopyWithImpl( + this as StacTextStyle, _$identity); -/// @nodoc -abstract class $StacTextStyleCopyWith<$Res> { - factory $StacTextStyleCopyWith( - StacTextStyle value, $Res Function(StacTextStyle) then) = - _$StacTextStyleCopyWithImpl<$Res, StacTextStyle>; - @useResult - $Res call( - {bool inherit, - String? color, - String? backgroundColor, - String? styleFromTheme, - double? fontSize, - StacFontWeight? fontWeight, - FontStyle? fontStyle, - String? fontFamily, - List? fontFamilyFallback, - double? letterSpacing, - double? wordSpacing, - TextBaseline? textBaseline, - double? height}); -} + /// Serializes this StacTextStyle to a JSON map. + Map toJson(); -/// @nodoc -class _$StacTextStyleCopyWithImpl<$Res, $Val extends StacTextStyle> - implements $StacTextStyleCopyWith<$Res> { - _$StacTextStyleCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTextStyle && + (identical(other.inherit, inherit) || other.inherit == inherit) && + (identical(other.color, color) || other.color == color) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.styleFromTheme, styleFromTheme) || + other.styleFromTheme == styleFromTheme) && + (identical(other.fontSize, fontSize) || + other.fontSize == fontSize) && + (identical(other.fontWeight, fontWeight) || + other.fontWeight == fontWeight) && + (identical(other.fontStyle, fontStyle) || + other.fontStyle == fontStyle) && + (identical(other.fontFamily, fontFamily) || + other.fontFamily == fontFamily) && + const DeepCollectionEquality() + .equals(other.fontFamilyFallback, fontFamilyFallback) && + (identical(other.letterSpacing, letterSpacing) || + other.letterSpacing == letterSpacing) && + (identical(other.wordSpacing, wordSpacing) || + other.wordSpacing == wordSpacing) && + (identical(other.textBaseline, textBaseline) || + other.textBaseline == textBaseline) && + (identical(other.height, height) || other.height == height)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + inherit, + color, + backgroundColor, + styleFromTheme, + fontSize, + fontWeight, + fontStyle, + fontFamily, + const DeepCollectionEquality().hash(fontFamilyFallback), + letterSpacing, + wordSpacing, + textBaseline, + height); - /// Create a copy of StacTextStyle - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? inherit = null, - Object? color = freezed, - Object? backgroundColor = freezed, - Object? styleFromTheme = freezed, - Object? fontSize = freezed, - Object? fontWeight = freezed, - Object? fontStyle = freezed, - Object? fontFamily = freezed, - Object? fontFamilyFallback = freezed, - Object? letterSpacing = freezed, - Object? wordSpacing = freezed, - Object? textBaseline = freezed, - Object? height = freezed, - }) { - return _then(_value.copyWith( - inherit: null == inherit - ? _value.inherit - : inherit // ignore: cast_nullable_to_non_nullable - as bool, - color: freezed == color - ? _value.color - : color // ignore: cast_nullable_to_non_nullable - as String?, - backgroundColor: freezed == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - styleFromTheme: freezed == styleFromTheme - ? _value.styleFromTheme - : styleFromTheme // ignore: cast_nullable_to_non_nullable - as String?, - fontSize: freezed == fontSize - ? _value.fontSize - : fontSize // ignore: cast_nullable_to_non_nullable - as double?, - fontWeight: freezed == fontWeight - ? _value.fontWeight - : fontWeight // ignore: cast_nullable_to_non_nullable - as StacFontWeight?, - fontStyle: freezed == fontStyle - ? _value.fontStyle - : fontStyle // ignore: cast_nullable_to_non_nullable - as FontStyle?, - fontFamily: freezed == fontFamily - ? _value.fontFamily - : fontFamily // ignore: cast_nullable_to_non_nullable - as String?, - fontFamilyFallback: freezed == fontFamilyFallback - ? _value.fontFamilyFallback - : fontFamilyFallback // ignore: cast_nullable_to_non_nullable - as List?, - letterSpacing: freezed == letterSpacing - ? _value.letterSpacing - : letterSpacing // ignore: cast_nullable_to_non_nullable - as double?, - wordSpacing: freezed == wordSpacing - ? _value.wordSpacing - : wordSpacing // ignore: cast_nullable_to_non_nullable - as double?, - textBaseline: freezed == textBaseline - ? _value.textBaseline - : textBaseline // ignore: cast_nullable_to_non_nullable - as TextBaseline?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as double?, - ) as $Val); + String toString() { + return 'StacTextStyle(inherit: $inherit, color: $color, backgroundColor: $backgroundColor, styleFromTheme: $styleFromTheme, fontSize: $fontSize, fontWeight: $fontWeight, fontStyle: $fontStyle, fontFamily: $fontFamily, fontFamilyFallback: $fontFamilyFallback, letterSpacing: $letterSpacing, wordSpacing: $wordSpacing, textBaseline: $textBaseline, height: $height)'; } } /// @nodoc -abstract class _$$StacTextStyleImplCopyWith<$Res> - implements $StacTextStyleCopyWith<$Res> { - factory _$$StacTextStyleImplCopyWith( - _$StacTextStyleImpl value, $Res Function(_$StacTextStyleImpl) then) = - __$$StacTextStyleImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacTextStyleCopyWith<$Res> { + factory $StacTextStyleCopyWith( + StacTextStyle value, $Res Function(StacTextStyle) _then) = + _$StacTextStyleCopyWithImpl; @useResult $Res call( {bool inherit, @@ -177,12 +117,12 @@ abstract class _$$StacTextStyleImplCopyWith<$Res> } /// @nodoc -class __$$StacTextStyleImplCopyWithImpl<$Res> - extends _$StacTextStyleCopyWithImpl<$Res, _$StacTextStyleImpl> - implements _$$StacTextStyleImplCopyWith<$Res> { - __$$StacTextStyleImplCopyWithImpl( - _$StacTextStyleImpl _value, $Res Function(_$StacTextStyleImpl) _then) - : super(_value, _then); +class _$StacTextStyleCopyWithImpl<$Res> + implements $StacTextStyleCopyWith<$Res> { + _$StacTextStyleCopyWithImpl(this._self, this._then); + + final StacTextStyle _self; + final $Res Function(StacTextStyle) _then; /// Create a copy of StacTextStyle /// with the given fields replaced by the non-null parameter values. @@ -203,57 +143,57 @@ class __$$StacTextStyleImplCopyWithImpl<$Res> Object? textBaseline = freezed, Object? height = freezed, }) { - return _then(_$StacTextStyleImpl( + return _then(_self.copyWith( inherit: null == inherit - ? _value.inherit + ? _self.inherit : inherit // ignore: cast_nullable_to_non_nullable as bool, color: freezed == color - ? _value.color + ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?, backgroundColor: freezed == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String?, styleFromTheme: freezed == styleFromTheme - ? _value.styleFromTheme + ? _self.styleFromTheme : styleFromTheme // ignore: cast_nullable_to_non_nullable as String?, fontSize: freezed == fontSize - ? _value.fontSize + ? _self.fontSize : fontSize // ignore: cast_nullable_to_non_nullable as double?, fontWeight: freezed == fontWeight - ? _value.fontWeight + ? _self.fontWeight : fontWeight // ignore: cast_nullable_to_non_nullable as StacFontWeight?, fontStyle: freezed == fontStyle - ? _value.fontStyle + ? _self.fontStyle : fontStyle // ignore: cast_nullable_to_non_nullable as FontStyle?, fontFamily: freezed == fontFamily - ? _value.fontFamily + ? _self.fontFamily : fontFamily // ignore: cast_nullable_to_non_nullable as String?, fontFamilyFallback: freezed == fontFamilyFallback - ? _value._fontFamilyFallback + ? _self.fontFamilyFallback : fontFamilyFallback // ignore: cast_nullable_to_non_nullable as List?, letterSpacing: freezed == letterSpacing - ? _value.letterSpacing + ? _self.letterSpacing : letterSpacing // ignore: cast_nullable_to_non_nullable as double?, wordSpacing: freezed == wordSpacing - ? _value.wordSpacing + ? _self.wordSpacing : wordSpacing // ignore: cast_nullable_to_non_nullable as double?, textBaseline: freezed == textBaseline - ? _value.textBaseline + ? _self.textBaseline : textBaseline // ignore: cast_nullable_to_non_nullable as TextBaseline?, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as double?, )); @@ -262,8 +202,8 @@ class __$$StacTextStyleImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacTextStyleImpl implements _StacTextStyle { - const _$StacTextStyleImpl( +class _StacTextStyle implements StacTextStyle { + const _StacTextStyle( {this.inherit = true, this.color, this.backgroundColor, @@ -278,9 +218,8 @@ class _$StacTextStyleImpl implements _StacTextStyle { this.textBaseline, this.height}) : _fontFamilyFallback = fontFamilyFallback; - - factory _$StacTextStyleImpl.fromJson(Map json) => - _$$StacTextStyleImplFromJson(json); + factory _StacTextStyle.fromJson(Map json) => + _$StacTextStyleFromJson(json); @override @JsonKey() @@ -319,16 +258,26 @@ class _$StacTextStyleImpl implements _StacTextStyle { @override final double? height; + /// Create a copy of StacTextStyle + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacTextStyle(inherit: $inherit, color: $color, backgroundColor: $backgroundColor, styleFromTheme: $styleFromTheme, fontSize: $fontSize, fontWeight: $fontWeight, fontStyle: $fontStyle, fontFamily: $fontFamily, fontFamilyFallback: $fontFamilyFallback, letterSpacing: $letterSpacing, wordSpacing: $wordSpacing, textBaseline: $textBaseline, height: $height)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacTextStyleCopyWith<_StacTextStyle> get copyWith => + __$StacTextStyleCopyWithImpl<_StacTextStyle>(this, _$identity); + + @override + Map toJson() { + return _$StacTextStyleToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacTextStyleImpl && + other is _StacTextStyle && (identical(other.inherit, inherit) || other.inherit == inherit) && (identical(other.color, color) || other.color == color) && (identical(other.backgroundColor, backgroundColor) || @@ -372,72 +321,118 @@ class _$StacTextStyleImpl implements _StacTextStyle { textBaseline, height); - /// Create a copy of StacTextStyle - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacTextStyleImplCopyWith<_$StacTextStyleImpl> get copyWith => - __$$StacTextStyleImplCopyWithImpl<_$StacTextStyleImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacTextStyleImplToJson( - this, - ); + String toString() { + return 'StacTextStyle(inherit: $inherit, color: $color, backgroundColor: $backgroundColor, styleFromTheme: $styleFromTheme, fontSize: $fontSize, fontWeight: $fontWeight, fontStyle: $fontStyle, fontFamily: $fontFamily, fontFamilyFallback: $fontFamilyFallback, letterSpacing: $letterSpacing, wordSpacing: $wordSpacing, textBaseline: $textBaseline, height: $height)'; } } -abstract class _StacTextStyle implements StacTextStyle { - const factory _StacTextStyle( - {final bool inherit, - final String? color, - final String? backgroundColor, - final String? styleFromTheme, - final double? fontSize, - final StacFontWeight? fontWeight, - final FontStyle? fontStyle, - final String? fontFamily, - final List? fontFamilyFallback, - final double? letterSpacing, - final double? wordSpacing, - final TextBaseline? textBaseline, - final double? height}) = _$StacTextStyleImpl; +/// @nodoc +abstract mixin class _$StacTextStyleCopyWith<$Res> + implements $StacTextStyleCopyWith<$Res> { + factory _$StacTextStyleCopyWith( + _StacTextStyle value, $Res Function(_StacTextStyle) _then) = + __$StacTextStyleCopyWithImpl; + @override + @useResult + $Res call( + {bool inherit, + String? color, + String? backgroundColor, + String? styleFromTheme, + double? fontSize, + StacFontWeight? fontWeight, + FontStyle? fontStyle, + String? fontFamily, + List? fontFamilyFallback, + double? letterSpacing, + double? wordSpacing, + TextBaseline? textBaseline, + double? height}); +} - factory _StacTextStyle.fromJson(Map json) = - _$StacTextStyleImpl.fromJson; +/// @nodoc +class __$StacTextStyleCopyWithImpl<$Res> + implements _$StacTextStyleCopyWith<$Res> { + __$StacTextStyleCopyWithImpl(this._self, this._then); - @override - bool get inherit; - @override - String? get color; - @override - String? get backgroundColor; - @override - String? get styleFromTheme; - @override - double? get fontSize; - @override - StacFontWeight? get fontWeight; - @override - FontStyle? get fontStyle; - @override - String? get fontFamily; - @override - List? get fontFamilyFallback; - @override - double? get letterSpacing; - @override - double? get wordSpacing; - @override - TextBaseline? get textBaseline; - @override - double? get height; + final _StacTextStyle _self; + final $Res Function(_StacTextStyle) _then; /// Create a copy of StacTextStyle /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacTextStyleImplCopyWith<_$StacTextStyleImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? inherit = null, + Object? color = freezed, + Object? backgroundColor = freezed, + Object? styleFromTheme = freezed, + Object? fontSize = freezed, + Object? fontWeight = freezed, + Object? fontStyle = freezed, + Object? fontFamily = freezed, + Object? fontFamilyFallback = freezed, + Object? letterSpacing = freezed, + Object? wordSpacing = freezed, + Object? textBaseline = freezed, + Object? height = freezed, + }) { + return _then(_StacTextStyle( + inherit: null == inherit + ? _self.inherit + : inherit // ignore: cast_nullable_to_non_nullable + as bool, + color: freezed == color + ? _self.color + : color // ignore: cast_nullable_to_non_nullable + as String?, + backgroundColor: freezed == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + styleFromTheme: freezed == styleFromTheme + ? _self.styleFromTheme + : styleFromTheme // ignore: cast_nullable_to_non_nullable + as String?, + fontSize: freezed == fontSize + ? _self.fontSize + : fontSize // ignore: cast_nullable_to_non_nullable + as double?, + fontWeight: freezed == fontWeight + ? _self.fontWeight + : fontWeight // ignore: cast_nullable_to_non_nullable + as StacFontWeight?, + fontStyle: freezed == fontStyle + ? _self.fontStyle + : fontStyle // ignore: cast_nullable_to_non_nullable + as FontStyle?, + fontFamily: freezed == fontFamily + ? _self.fontFamily + : fontFamily // ignore: cast_nullable_to_non_nullable + as String?, + fontFamilyFallback: freezed == fontFamilyFallback + ? _self._fontFamilyFallback + : fontFamilyFallback // ignore: cast_nullable_to_non_nullable + as List?, + letterSpacing: freezed == letterSpacing + ? _self.letterSpacing + : letterSpacing // ignore: cast_nullable_to_non_nullable + as double?, + wordSpacing: freezed == wordSpacing + ? _self.wordSpacing + : wordSpacing // ignore: cast_nullable_to_non_nullable + as double?, + textBaseline: freezed == textBaseline + ? _self.textBaseline + : textBaseline // ignore: cast_nullable_to_non_nullable + as TextBaseline?, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as double?, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.g.dart b/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.g.dart index 16126fbc..07ccb2d9 100644 --- a/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.g.dart +++ b/packages/stac/lib/src/parsers/stac_text_style/stac_text_style.g.dart @@ -6,8 +6,8 @@ part of 'stac_text_style.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacTextStyleImpl _$$StacTextStyleImplFromJson(Map json) => - _$StacTextStyleImpl( +_StacTextStyle _$StacTextStyleFromJson(Map json) => + _StacTextStyle( inherit: json['inherit'] as bool? ?? true, color: json['color'] as String?, backgroundColor: json['backgroundColor'] as String?, @@ -27,7 +27,7 @@ _$StacTextStyleImpl _$$StacTextStyleImplFromJson(Map json) => height: (json['height'] as num?)?.toDouble(), ); -Map _$$StacTextStyleImplToJson(_$StacTextStyleImpl instance) => +Map _$StacTextStyleToJson(_StacTextStyle instance) => { 'inherit': instance.inherit, 'color': instance.color, diff --git a/packages/stac/lib/src/parsers/stac_theme/stac_theme.dart b/packages/stac/lib/src/parsers/stac_theme/stac_theme.dart index 6a07a29a..d5c64648 100644 --- a/packages/stac/lib/src/parsers/stac_theme/stac_theme.dart +++ b/packages/stac/lib/src/parsers/stac_theme/stac_theme.dart @@ -21,7 +21,7 @@ part 'stac_theme.freezed.dart'; part 'stac_theme.g.dart'; @freezed -class StacTheme with _$StacTheme { +abstract class StacTheme with _$StacTheme { const factory StacTheme({ bool? applyElevationOverlayColor, StacInputDecorationTheme? inputDecorationTheme, diff --git a/packages/stac/lib/src/parsers/stac_theme/stac_theme.freezed.dart b/packages/stac/lib/src/parsers/stac_theme/stac_theme.freezed.dart index f0a3f6da..0d1148a0 100644 --- a/packages/stac/lib/src/parsers/stac_theme/stac_theme.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_theme/stac_theme.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,84 +10,207 @@ part of 'stac_theme.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacTheme _$StacThemeFromJson(Map json) { - return _StacTheme.fromJson(json); -} - /// @nodoc mixin _$StacTheme { - bool? get applyElevationOverlayColor => throw _privateConstructorUsedError; - StacInputDecorationTheme? get inputDecorationTheme => - throw _privateConstructorUsedError; - bool? get useMaterial3 => throw _privateConstructorUsedError; - Brightness? get brightness => throw _privateConstructorUsedError; - String? get canvasColor => throw _privateConstructorUsedError; - String? get cardColor => throw _privateConstructorUsedError; - StacColorScheme? get colorScheme => throw _privateConstructorUsedError; - String? get colorSchemeSeed => throw _privateConstructorUsedError; - String? get dialogBackgroundColor => throw _privateConstructorUsedError; - String? get disabledColor => throw _privateConstructorUsedError; - String? get dividerColor => throw _privateConstructorUsedError; - String? get focusColor => throw _privateConstructorUsedError; - String? get highlightColor => throw _privateConstructorUsedError; - String? get hintColor => throw _privateConstructorUsedError; - String? get hoverColor => throw _privateConstructorUsedError; - String? get indicatorColor => throw _privateConstructorUsedError; - String? get primaryColor => throw _privateConstructorUsedError; - String? get primaryColorDark => throw _privateConstructorUsedError; - String? get primaryColorLight => throw _privateConstructorUsedError; - StacMaterialColor? get primarySwatch => throw _privateConstructorUsedError; - String? get scaffoldBackgroundColor => throw _privateConstructorUsedError; - String? get secondaryHeaderColor => throw _privateConstructorUsedError; - String? get shadowColor => throw _privateConstructorUsedError; - String? get splashColor => throw _privateConstructorUsedError; - String? get unselectedWidgetColor => throw _privateConstructorUsedError; - String? get fontFamily => throw _privateConstructorUsedError; - List? get fontFamilyFallback => throw _privateConstructorUsedError; - StacAppBarTheme? get appBarTheme => throw _privateConstructorUsedError; - StacButtonStyle? get elevatedButtonTheme => - throw _privateConstructorUsedError; - StacButtonStyle? get outlinedButtonTheme => - throw _privateConstructorUsedError; - StacButtonStyle? get iconButtonTheme => throw _privateConstructorUsedError; - StacIconThemeData? get iconTheme => throw _privateConstructorUsedError; - StacIconThemeData? get primaryIconTheme => throw _privateConstructorUsedError; - StacDialogTheme? get dialogTheme => throw _privateConstructorUsedError; - StacFloatingActionButtonThemeData? get floatingActionButtonTheme => - throw _privateConstructorUsedError; - StacButtonStyle? get textButtonTheme => throw _privateConstructorUsedError; - StacBottomAppBarTheme? get bottomAppBarTheme => - throw _privateConstructorUsedError; - StacBottomNavBarThemeData? get bottomNavigationBarTheme => - throw _privateConstructorUsedError; - StacBottomSheetThemeData? get bottomSheetTheme => - throw _privateConstructorUsedError; - StacCardThemeData? get cardTheme => throw _privateConstructorUsedError; - StacListTileThemeData? get listTileTheme => - throw _privateConstructorUsedError; - StacNavigationBarThemeData? get navigationBarTheme => - throw _privateConstructorUsedError; - StacTabBarThemeData? get tabBarTheme => throw _privateConstructorUsedError; - - /// Serializes this StacTheme to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + bool? get applyElevationOverlayColor; + StacInputDecorationTheme? get inputDecorationTheme; + bool? get useMaterial3; + Brightness? get brightness; + String? get canvasColor; + String? get cardColor; + StacColorScheme? get colorScheme; + String? get colorSchemeSeed; + String? get dialogBackgroundColor; + String? get disabledColor; + String? get dividerColor; + String? get focusColor; + String? get highlightColor; + String? get hintColor; + String? get hoverColor; + String? get indicatorColor; + String? get primaryColor; + String? get primaryColorDark; + String? get primaryColorLight; + StacMaterialColor? get primarySwatch; + String? get scaffoldBackgroundColor; + String? get secondaryHeaderColor; + String? get shadowColor; + String? get splashColor; + String? get unselectedWidgetColor; + String? get fontFamily; + List? get fontFamilyFallback; + StacAppBarTheme? get appBarTheme; + StacButtonStyle? get elevatedButtonTheme; + StacButtonStyle? get outlinedButtonTheme; + StacButtonStyle? get iconButtonTheme; + StacIconThemeData? get iconTheme; + StacIconThemeData? get primaryIconTheme; + StacDialogTheme? get dialogTheme; + StacFloatingActionButtonThemeData? get floatingActionButtonTheme; + StacButtonStyle? get textButtonTheme; + StacBottomAppBarTheme? get bottomAppBarTheme; + StacBottomNavBarThemeData? get bottomNavigationBarTheme; + StacBottomSheetThemeData? get bottomSheetTheme; + StacCardThemeData? get cardTheme; + StacListTileThemeData? get listTileTheme; + StacNavigationBarThemeData? get navigationBarTheme; + StacTabBarThemeData? get tabBarTheme; /// Create a copy of StacTheme /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacThemeCopyWith get copyWith => - throw _privateConstructorUsedError; + _$StacThemeCopyWithImpl(this as StacTheme, _$identity); + + /// Serializes this StacTheme to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacTheme && + (identical(other.applyElevationOverlayColor, applyElevationOverlayColor) || + other.applyElevationOverlayColor == + applyElevationOverlayColor) && + (identical(other.inputDecorationTheme, inputDecorationTheme) || + other.inputDecorationTheme == inputDecorationTheme) && + (identical(other.useMaterial3, useMaterial3) || + other.useMaterial3 == useMaterial3) && + (identical(other.brightness, brightness) || + other.brightness == brightness) && + (identical(other.canvasColor, canvasColor) || + other.canvasColor == canvasColor) && + (identical(other.cardColor, cardColor) || + other.cardColor == cardColor) && + (identical(other.colorScheme, colorScheme) || + other.colorScheme == colorScheme) && + (identical(other.colorSchemeSeed, colorSchemeSeed) || + other.colorSchemeSeed == colorSchemeSeed) && + (identical(other.dialogBackgroundColor, dialogBackgroundColor) || + other.dialogBackgroundColor == dialogBackgroundColor) && + (identical(other.disabledColor, disabledColor) || + other.disabledColor == disabledColor) && + (identical(other.dividerColor, dividerColor) || + other.dividerColor == dividerColor) && + (identical(other.focusColor, focusColor) || + other.focusColor == focusColor) && + (identical(other.highlightColor, highlightColor) || + other.highlightColor == highlightColor) && + (identical(other.hintColor, hintColor) || + other.hintColor == hintColor) && + (identical(other.hoverColor, hoverColor) || + other.hoverColor == hoverColor) && + (identical(other.indicatorColor, indicatorColor) || + other.indicatorColor == indicatorColor) && + (identical(other.primaryColor, primaryColor) || + other.primaryColor == primaryColor) && + (identical(other.primaryColorDark, primaryColorDark) || + other.primaryColorDark == primaryColorDark) && + (identical(other.primaryColorLight, primaryColorLight) || + other.primaryColorLight == primaryColorLight) && + (identical(other.primarySwatch, primarySwatch) || + other.primarySwatch == primarySwatch) && + (identical(other.scaffoldBackgroundColor, scaffoldBackgroundColor) || + other.scaffoldBackgroundColor == scaffoldBackgroundColor) && + (identical(other.secondaryHeaderColor, secondaryHeaderColor) || + other.secondaryHeaderColor == secondaryHeaderColor) && + (identical(other.shadowColor, shadowColor) || + other.shadowColor == shadowColor) && + (identical(other.splashColor, splashColor) || + other.splashColor == splashColor) && + (identical(other.unselectedWidgetColor, unselectedWidgetColor) || + other.unselectedWidgetColor == unselectedWidgetColor) && + (identical(other.fontFamily, fontFamily) || + other.fontFamily == fontFamily) && + const DeepCollectionEquality() + .equals(other.fontFamilyFallback, fontFamilyFallback) && + (identical(other.appBarTheme, appBarTheme) || + other.appBarTheme == appBarTheme) && + (identical(other.elevatedButtonTheme, elevatedButtonTheme) || + other.elevatedButtonTheme == elevatedButtonTheme) && + (identical(other.outlinedButtonTheme, outlinedButtonTheme) || + other.outlinedButtonTheme == outlinedButtonTheme) && + (identical(other.iconButtonTheme, iconButtonTheme) || + other.iconButtonTheme == iconButtonTheme) && + (identical(other.iconTheme, iconTheme) || + other.iconTheme == iconTheme) && + (identical(other.primaryIconTheme, primaryIconTheme) || other.primaryIconTheme == primaryIconTheme) && + (identical(other.dialogTheme, dialogTheme) || other.dialogTheme == dialogTheme) && + (identical(other.floatingActionButtonTheme, floatingActionButtonTheme) || other.floatingActionButtonTheme == floatingActionButtonTheme) && + (identical(other.textButtonTheme, textButtonTheme) || other.textButtonTheme == textButtonTheme) && + (identical(other.bottomAppBarTheme, bottomAppBarTheme) || other.bottomAppBarTheme == bottomAppBarTheme) && + (identical(other.bottomNavigationBarTheme, bottomNavigationBarTheme) || other.bottomNavigationBarTheme == bottomNavigationBarTheme) && + (identical(other.bottomSheetTheme, bottomSheetTheme) || other.bottomSheetTheme == bottomSheetTheme) && + (identical(other.cardTheme, cardTheme) || other.cardTheme == cardTheme) && + (identical(other.listTileTheme, listTileTheme) || other.listTileTheme == listTileTheme) && + (identical(other.navigationBarTheme, navigationBarTheme) || other.navigationBarTheme == navigationBarTheme) && + (identical(other.tabBarTheme, tabBarTheme) || other.tabBarTheme == tabBarTheme)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + applyElevationOverlayColor, + inputDecorationTheme, + useMaterial3, + brightness, + canvasColor, + cardColor, + colorScheme, + colorSchemeSeed, + dialogBackgroundColor, + disabledColor, + dividerColor, + focusColor, + highlightColor, + hintColor, + hoverColor, + indicatorColor, + primaryColor, + primaryColorDark, + primaryColorLight, + primarySwatch, + scaffoldBackgroundColor, + secondaryHeaderColor, + shadowColor, + splashColor, + unselectedWidgetColor, + fontFamily, + const DeepCollectionEquality().hash(fontFamilyFallback), + appBarTheme, + elevatedButtonTheme, + outlinedButtonTheme, + iconButtonTheme, + iconTheme, + primaryIconTheme, + dialogTheme, + floatingActionButtonTheme, + textButtonTheme, + bottomAppBarTheme, + bottomNavigationBarTheme, + bottomSheetTheme, + cardTheme, + listTileTheme, + navigationBarTheme, + tabBarTheme + ]); + + @override + String toString() { + return 'StacTheme(applyElevationOverlayColor: $applyElevationOverlayColor, inputDecorationTheme: $inputDecorationTheme, useMaterial3: $useMaterial3, brightness: $brightness, canvasColor: $canvasColor, cardColor: $cardColor, colorScheme: $colorScheme, colorSchemeSeed: $colorSchemeSeed, dialogBackgroundColor: $dialogBackgroundColor, disabledColor: $disabledColor, dividerColor: $dividerColor, focusColor: $focusColor, highlightColor: $highlightColor, hintColor: $hintColor, hoverColor: $hoverColor, indicatorColor: $indicatorColor, primaryColor: $primaryColor, primaryColorDark: $primaryColorDark, primaryColorLight: $primaryColorLight, primarySwatch: $primarySwatch, scaffoldBackgroundColor: $scaffoldBackgroundColor, secondaryHeaderColor: $secondaryHeaderColor, shadowColor: $shadowColor, splashColor: $splashColor, unselectedWidgetColor: $unselectedWidgetColor, fontFamily: $fontFamily, fontFamilyFallback: $fontFamilyFallback, appBarTheme: $appBarTheme, elevatedButtonTheme: $elevatedButtonTheme, outlinedButtonTheme: $outlinedButtonTheme, iconButtonTheme: $iconButtonTheme, iconTheme: $iconTheme, primaryIconTheme: $primaryIconTheme, dialogTheme: $dialogTheme, floatingActionButtonTheme: $floatingActionButtonTheme, textButtonTheme: $textButtonTheme, bottomAppBarTheme: $bottomAppBarTheme, bottomNavigationBarTheme: $bottomNavigationBarTheme, bottomSheetTheme: $bottomSheetTheme, cardTheme: $cardTheme, listTileTheme: $listTileTheme, navigationBarTheme: $navigationBarTheme, tabBarTheme: $tabBarTheme)'; + } } /// @nodoc -abstract class $StacThemeCopyWith<$Res> { - factory $StacThemeCopyWith(StacTheme value, $Res Function(StacTheme) then) = - _$StacThemeCopyWithImpl<$Res, StacTheme>; +abstract mixin class $StacThemeCopyWith<$Res> { + factory $StacThemeCopyWith(StacTheme value, $Res Function(StacTheme) _then) = + _$StacThemeCopyWithImpl; @useResult $Res call( {bool? applyElevationOverlayColor, @@ -156,14 +280,11 @@ abstract class $StacThemeCopyWith<$Res> { } /// @nodoc -class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> - implements $StacThemeCopyWith<$Res> { - _$StacThemeCopyWithImpl(this._value, this._then); +class _$StacThemeCopyWithImpl<$Res> implements $StacThemeCopyWith<$Res> { + _$StacThemeCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final StacTheme _self; + final $Res Function(StacTheme) _then; /// Create a copy of StacTheme /// with the given fields replaced by the non-null parameter values. @@ -214,180 +335,180 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> Object? navigationBarTheme = freezed, Object? tabBarTheme = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( applyElevationOverlayColor: freezed == applyElevationOverlayColor - ? _value.applyElevationOverlayColor + ? _self.applyElevationOverlayColor : applyElevationOverlayColor // ignore: cast_nullable_to_non_nullable as bool?, inputDecorationTheme: freezed == inputDecorationTheme - ? _value.inputDecorationTheme + ? _self.inputDecorationTheme : inputDecorationTheme // ignore: cast_nullable_to_non_nullable as StacInputDecorationTheme?, useMaterial3: freezed == useMaterial3 - ? _value.useMaterial3 + ? _self.useMaterial3 : useMaterial3 // ignore: cast_nullable_to_non_nullable as bool?, brightness: freezed == brightness - ? _value.brightness + ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable as Brightness?, canvasColor: freezed == canvasColor - ? _value.canvasColor + ? _self.canvasColor : canvasColor // ignore: cast_nullable_to_non_nullable as String?, cardColor: freezed == cardColor - ? _value.cardColor + ? _self.cardColor : cardColor // ignore: cast_nullable_to_non_nullable as String?, colorScheme: freezed == colorScheme - ? _value.colorScheme + ? _self.colorScheme : colorScheme // ignore: cast_nullable_to_non_nullable as StacColorScheme?, colorSchemeSeed: freezed == colorSchemeSeed - ? _value.colorSchemeSeed + ? _self.colorSchemeSeed : colorSchemeSeed // ignore: cast_nullable_to_non_nullable as String?, dialogBackgroundColor: freezed == dialogBackgroundColor - ? _value.dialogBackgroundColor + ? _self.dialogBackgroundColor : dialogBackgroundColor // ignore: cast_nullable_to_non_nullable as String?, disabledColor: freezed == disabledColor - ? _value.disabledColor + ? _self.disabledColor : disabledColor // ignore: cast_nullable_to_non_nullable as String?, dividerColor: freezed == dividerColor - ? _value.dividerColor + ? _self.dividerColor : dividerColor // ignore: cast_nullable_to_non_nullable as String?, focusColor: freezed == focusColor - ? _value.focusColor + ? _self.focusColor : focusColor // ignore: cast_nullable_to_non_nullable as String?, highlightColor: freezed == highlightColor - ? _value.highlightColor + ? _self.highlightColor : highlightColor // ignore: cast_nullable_to_non_nullable as String?, hintColor: freezed == hintColor - ? _value.hintColor + ? _self.hintColor : hintColor // ignore: cast_nullable_to_non_nullable as String?, hoverColor: freezed == hoverColor - ? _value.hoverColor + ? _self.hoverColor : hoverColor // ignore: cast_nullable_to_non_nullable as String?, indicatorColor: freezed == indicatorColor - ? _value.indicatorColor + ? _self.indicatorColor : indicatorColor // ignore: cast_nullable_to_non_nullable as String?, primaryColor: freezed == primaryColor - ? _value.primaryColor + ? _self.primaryColor : primaryColor // ignore: cast_nullable_to_non_nullable as String?, primaryColorDark: freezed == primaryColorDark - ? _value.primaryColorDark + ? _self.primaryColorDark : primaryColorDark // ignore: cast_nullable_to_non_nullable as String?, primaryColorLight: freezed == primaryColorLight - ? _value.primaryColorLight + ? _self.primaryColorLight : primaryColorLight // ignore: cast_nullable_to_non_nullable as String?, primarySwatch: freezed == primarySwatch - ? _value.primarySwatch + ? _self.primarySwatch : primarySwatch // ignore: cast_nullable_to_non_nullable as StacMaterialColor?, scaffoldBackgroundColor: freezed == scaffoldBackgroundColor - ? _value.scaffoldBackgroundColor + ? _self.scaffoldBackgroundColor : scaffoldBackgroundColor // ignore: cast_nullable_to_non_nullable as String?, secondaryHeaderColor: freezed == secondaryHeaderColor - ? _value.secondaryHeaderColor + ? _self.secondaryHeaderColor : secondaryHeaderColor // ignore: cast_nullable_to_non_nullable as String?, shadowColor: freezed == shadowColor - ? _value.shadowColor + ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable as String?, splashColor: freezed == splashColor - ? _value.splashColor + ? _self.splashColor : splashColor // ignore: cast_nullable_to_non_nullable as String?, unselectedWidgetColor: freezed == unselectedWidgetColor - ? _value.unselectedWidgetColor + ? _self.unselectedWidgetColor : unselectedWidgetColor // ignore: cast_nullable_to_non_nullable as String?, fontFamily: freezed == fontFamily - ? _value.fontFamily + ? _self.fontFamily : fontFamily // ignore: cast_nullable_to_non_nullable as String?, fontFamilyFallback: freezed == fontFamilyFallback - ? _value.fontFamilyFallback + ? _self.fontFamilyFallback : fontFamilyFallback // ignore: cast_nullable_to_non_nullable as List?, appBarTheme: freezed == appBarTheme - ? _value.appBarTheme + ? _self.appBarTheme : appBarTheme // ignore: cast_nullable_to_non_nullable as StacAppBarTheme?, elevatedButtonTheme: freezed == elevatedButtonTheme - ? _value.elevatedButtonTheme + ? _self.elevatedButtonTheme : elevatedButtonTheme // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, outlinedButtonTheme: freezed == outlinedButtonTheme - ? _value.outlinedButtonTheme + ? _self.outlinedButtonTheme : outlinedButtonTheme // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, iconButtonTheme: freezed == iconButtonTheme - ? _value.iconButtonTheme + ? _self.iconButtonTheme : iconButtonTheme // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, iconTheme: freezed == iconTheme - ? _value.iconTheme + ? _self.iconTheme : iconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, primaryIconTheme: freezed == primaryIconTheme - ? _value.primaryIconTheme + ? _self.primaryIconTheme : primaryIconTheme // ignore: cast_nullable_to_non_nullable as StacIconThemeData?, dialogTheme: freezed == dialogTheme - ? _value.dialogTheme + ? _self.dialogTheme : dialogTheme // ignore: cast_nullable_to_non_nullable as StacDialogTheme?, floatingActionButtonTheme: freezed == floatingActionButtonTheme - ? _value.floatingActionButtonTheme + ? _self.floatingActionButtonTheme : floatingActionButtonTheme // ignore: cast_nullable_to_non_nullable as StacFloatingActionButtonThemeData?, textButtonTheme: freezed == textButtonTheme - ? _value.textButtonTheme + ? _self.textButtonTheme : textButtonTheme // ignore: cast_nullable_to_non_nullable as StacButtonStyle?, bottomAppBarTheme: freezed == bottomAppBarTheme - ? _value.bottomAppBarTheme + ? _self.bottomAppBarTheme : bottomAppBarTheme // ignore: cast_nullable_to_non_nullable as StacBottomAppBarTheme?, bottomNavigationBarTheme: freezed == bottomNavigationBarTheme - ? _value.bottomNavigationBarTheme + ? _self.bottomNavigationBarTheme : bottomNavigationBarTheme // ignore: cast_nullable_to_non_nullable as StacBottomNavBarThemeData?, bottomSheetTheme: freezed == bottomSheetTheme - ? _value.bottomSheetTheme + ? _self.bottomSheetTheme : bottomSheetTheme // ignore: cast_nullable_to_non_nullable as StacBottomSheetThemeData?, cardTheme: freezed == cardTheme - ? _value.cardTheme + ? _self.cardTheme : cardTheme // ignore: cast_nullable_to_non_nullable as StacCardThemeData?, listTileTheme: freezed == listTileTheme - ? _value.listTileTheme + ? _self.listTileTheme : listTileTheme // ignore: cast_nullable_to_non_nullable as StacListTileThemeData?, navigationBarTheme: freezed == navigationBarTheme - ? _value.navigationBarTheme + ? _self.navigationBarTheme : navigationBarTheme // ignore: cast_nullable_to_non_nullable as StacNavigationBarThemeData?, tabBarTheme: freezed == tabBarTheme - ? _value.tabBarTheme + ? _self.tabBarTheme : tabBarTheme // ignore: cast_nullable_to_non_nullable as StacTabBarThemeData?, - ) as $Val); + )); } /// Create a copy of StacTheme @@ -395,13 +516,13 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacInputDecorationThemeCopyWith<$Res>? get inputDecorationTheme { - if (_value.inputDecorationTheme == null) { + if (_self.inputDecorationTheme == null) { return null; } - return $StacInputDecorationThemeCopyWith<$Res>(_value.inputDecorationTheme!, + return $StacInputDecorationThemeCopyWith<$Res>(_self.inputDecorationTheme!, (value) { - return _then(_value.copyWith(inputDecorationTheme: value) as $Val); + return _then(_self.copyWith(inputDecorationTheme: value)); }); } @@ -410,12 +531,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacColorSchemeCopyWith<$Res>? get colorScheme { - if (_value.colorScheme == null) { + if (_self.colorScheme == null) { return null; } - return $StacColorSchemeCopyWith<$Res>(_value.colorScheme!, (value) { - return _then(_value.copyWith(colorScheme: value) as $Val); + return $StacColorSchemeCopyWith<$Res>(_self.colorScheme!, (value) { + return _then(_self.copyWith(colorScheme: value)); }); } @@ -424,12 +545,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacMaterialColorCopyWith<$Res>? get primarySwatch { - if (_value.primarySwatch == null) { + if (_self.primarySwatch == null) { return null; } - return $StacMaterialColorCopyWith<$Res>(_value.primarySwatch!, (value) { - return _then(_value.copyWith(primarySwatch: value) as $Val); + return $StacMaterialColorCopyWith<$Res>(_self.primarySwatch!, (value) { + return _then(_self.copyWith(primarySwatch: value)); }); } @@ -438,12 +559,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacAppBarThemeCopyWith<$Res>? get appBarTheme { - if (_value.appBarTheme == null) { + if (_self.appBarTheme == null) { return null; } - return $StacAppBarThemeCopyWith<$Res>(_value.appBarTheme!, (value) { - return _then(_value.copyWith(appBarTheme: value) as $Val); + return $StacAppBarThemeCopyWith<$Res>(_self.appBarTheme!, (value) { + return _then(_self.copyWith(appBarTheme: value)); }); } @@ -452,12 +573,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get elevatedButtonTheme { - if (_value.elevatedButtonTheme == null) { + if (_self.elevatedButtonTheme == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.elevatedButtonTheme!, (value) { - return _then(_value.copyWith(elevatedButtonTheme: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.elevatedButtonTheme!, (value) { + return _then(_self.copyWith(elevatedButtonTheme: value)); }); } @@ -466,12 +587,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get outlinedButtonTheme { - if (_value.outlinedButtonTheme == null) { + if (_self.outlinedButtonTheme == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.outlinedButtonTheme!, (value) { - return _then(_value.copyWith(outlinedButtonTheme: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.outlinedButtonTheme!, (value) { + return _then(_self.copyWith(outlinedButtonTheme: value)); }); } @@ -480,12 +601,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get iconButtonTheme { - if (_value.iconButtonTheme == null) { + if (_self.iconButtonTheme == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.iconButtonTheme!, (value) { - return _then(_value.copyWith(iconButtonTheme: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.iconButtonTheme!, (value) { + return _then(_self.copyWith(iconButtonTheme: value)); }); } @@ -494,12 +615,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get iconTheme { - if (_value.iconTheme == null) { + if (_self.iconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.iconTheme!, (value) { - return _then(_value.copyWith(iconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); }); } @@ -508,12 +629,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacIconThemeDataCopyWith<$Res>? get primaryIconTheme { - if (_value.primaryIconTheme == null) { + if (_self.primaryIconTheme == null) { return null; } - return $StacIconThemeDataCopyWith<$Res>(_value.primaryIconTheme!, (value) { - return _then(_value.copyWith(primaryIconTheme: value) as $Val); + return $StacIconThemeDataCopyWith<$Res>(_self.primaryIconTheme!, (value) { + return _then(_self.copyWith(primaryIconTheme: value)); }); } @@ -522,12 +643,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacDialogThemeCopyWith<$Res>? get dialogTheme { - if (_value.dialogTheme == null) { + if (_self.dialogTheme == null) { return null; } - return $StacDialogThemeCopyWith<$Res>(_value.dialogTheme!, (value) { - return _then(_value.copyWith(dialogTheme: value) as $Val); + return $StacDialogThemeCopyWith<$Res>(_self.dialogTheme!, (value) { + return _then(_self.copyWith(dialogTheme: value)); }); } @@ -537,13 +658,13 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @pragma('vm:prefer-inline') $StacFloatingActionButtonThemeDataCopyWith<$Res>? get floatingActionButtonTheme { - if (_value.floatingActionButtonTheme == null) { + if (_self.floatingActionButtonTheme == null) { return null; } return $StacFloatingActionButtonThemeDataCopyWith<$Res>( - _value.floatingActionButtonTheme!, (value) { - return _then(_value.copyWith(floatingActionButtonTheme: value) as $Val); + _self.floatingActionButtonTheme!, (value) { + return _then(_self.copyWith(floatingActionButtonTheme: value)); }); } @@ -552,12 +673,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacButtonStyleCopyWith<$Res>? get textButtonTheme { - if (_value.textButtonTheme == null) { + if (_self.textButtonTheme == null) { return null; } - return $StacButtonStyleCopyWith<$Res>(_value.textButtonTheme!, (value) { - return _then(_value.copyWith(textButtonTheme: value) as $Val); + return $StacButtonStyleCopyWith<$Res>(_self.textButtonTheme!, (value) { + return _then(_self.copyWith(textButtonTheme: value)); }); } @@ -566,13 +687,13 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacBottomAppBarThemeCopyWith<$Res>? get bottomAppBarTheme { - if (_value.bottomAppBarTheme == null) { + if (_self.bottomAppBarTheme == null) { return null; } - return $StacBottomAppBarThemeCopyWith<$Res>(_value.bottomAppBarTheme!, + return $StacBottomAppBarThemeCopyWith<$Res>(_self.bottomAppBarTheme!, (value) { - return _then(_value.copyWith(bottomAppBarTheme: value) as $Val); + return _then(_self.copyWith(bottomAppBarTheme: value)); }); } @@ -581,13 +702,13 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacBottomNavBarThemeDataCopyWith<$Res>? get bottomNavigationBarTheme { - if (_value.bottomNavigationBarTheme == null) { + if (_self.bottomNavigationBarTheme == null) { return null; } return $StacBottomNavBarThemeDataCopyWith<$Res>( - _value.bottomNavigationBarTheme!, (value) { - return _then(_value.copyWith(bottomNavigationBarTheme: value) as $Val); + _self.bottomNavigationBarTheme!, (value) { + return _then(_self.copyWith(bottomNavigationBarTheme: value)); }); } @@ -596,13 +717,13 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacBottomSheetThemeDataCopyWith<$Res>? get bottomSheetTheme { - if (_value.bottomSheetTheme == null) { + if (_self.bottomSheetTheme == null) { return null; } - return $StacBottomSheetThemeDataCopyWith<$Res>(_value.bottomSheetTheme!, + return $StacBottomSheetThemeDataCopyWith<$Res>(_self.bottomSheetTheme!, (value) { - return _then(_value.copyWith(bottomSheetTheme: value) as $Val); + return _then(_self.copyWith(bottomSheetTheme: value)); }); } @@ -611,12 +732,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacCardThemeDataCopyWith<$Res>? get cardTheme { - if (_value.cardTheme == null) { + if (_self.cardTheme == null) { return null; } - return $StacCardThemeDataCopyWith<$Res>(_value.cardTheme!, (value) { - return _then(_value.copyWith(cardTheme: value) as $Val); + return $StacCardThemeDataCopyWith<$Res>(_self.cardTheme!, (value) { + return _then(_self.copyWith(cardTheme: value)); }); } @@ -625,12 +746,12 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacListTileThemeDataCopyWith<$Res>? get listTileTheme { - if (_value.listTileTheme == null) { + if (_self.listTileTheme == null) { return null; } - return $StacListTileThemeDataCopyWith<$Res>(_value.listTileTheme!, (value) { - return _then(_value.copyWith(listTileTheme: value) as $Val); + return $StacListTileThemeDataCopyWith<$Res>(_self.listTileTheme!, (value) { + return _then(_self.copyWith(listTileTheme: value)); }); } @@ -639,13 +760,13 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacNavigationBarThemeDataCopyWith<$Res>? get navigationBarTheme { - if (_value.navigationBarTheme == null) { + if (_self.navigationBarTheme == null) { return null; } - return $StacNavigationBarThemeDataCopyWith<$Res>(_value.navigationBarTheme!, + return $StacNavigationBarThemeDataCopyWith<$Res>(_self.navigationBarTheme!, (value) { - return _then(_value.copyWith(navigationBarTheme: value) as $Val); + return _then(_self.copyWith(navigationBarTheme: value)); }); } @@ -654,502 +775,183 @@ class _$StacThemeCopyWithImpl<$Res, $Val extends StacTheme> @override @pragma('vm:prefer-inline') $StacTabBarThemeDataCopyWith<$Res>? get tabBarTheme { - if (_value.tabBarTheme == null) { + if (_self.tabBarTheme == null) { return null; } - return $StacTabBarThemeDataCopyWith<$Res>(_value.tabBarTheme!, (value) { - return _then(_value.copyWith(tabBarTheme: value) as $Val); + return $StacTabBarThemeDataCopyWith<$Res>(_self.tabBarTheme!, (value) { + return _then(_self.copyWith(tabBarTheme: value)); }); } } /// @nodoc -abstract class _$$StacThemeImplCopyWith<$Res> - implements $StacThemeCopyWith<$Res> { - factory _$$StacThemeImplCopyWith( - _$StacThemeImpl value, $Res Function(_$StacThemeImpl) then) = - __$$StacThemeImplCopyWithImpl<$Res>; +@JsonSerializable() +class _StacTheme implements StacTheme { + const _StacTheme( + {this.applyElevationOverlayColor, + this.inputDecorationTheme, + this.useMaterial3, + this.brightness, + this.canvasColor, + this.cardColor, + this.colorScheme, + this.colorSchemeSeed, + this.dialogBackgroundColor, + this.disabledColor, + this.dividerColor, + this.focusColor, + this.highlightColor, + this.hintColor, + this.hoverColor, + this.indicatorColor, + this.primaryColor, + this.primaryColorDark, + this.primaryColorLight, + this.primarySwatch, + this.scaffoldBackgroundColor, + this.secondaryHeaderColor, + this.shadowColor, + this.splashColor, + this.unselectedWidgetColor, + this.fontFamily, + final List? fontFamilyFallback, + this.appBarTheme, + this.elevatedButtonTheme, + this.outlinedButtonTheme, + this.iconButtonTheme, + this.iconTheme, + this.primaryIconTheme, + this.dialogTheme, + this.floatingActionButtonTheme, + this.textButtonTheme, + this.bottomAppBarTheme, + this.bottomNavigationBarTheme, + this.bottomSheetTheme, + this.cardTheme, + this.listTileTheme, + this.navigationBarTheme, + this.tabBarTheme}) + : _fontFamilyFallback = fontFamilyFallback; + factory _StacTheme.fromJson(Map json) => + _$StacThemeFromJson(json); + @override - @useResult - $Res call( - {bool? applyElevationOverlayColor, - StacInputDecorationTheme? inputDecorationTheme, - bool? useMaterial3, - Brightness? brightness, - String? canvasColor, - String? cardColor, - StacColorScheme? colorScheme, - String? colorSchemeSeed, - String? dialogBackgroundColor, - String? disabledColor, - String? dividerColor, - String? focusColor, - String? highlightColor, - String? hintColor, - String? hoverColor, - String? indicatorColor, - String? primaryColor, - String? primaryColorDark, - String? primaryColorLight, - StacMaterialColor? primarySwatch, - String? scaffoldBackgroundColor, - String? secondaryHeaderColor, - String? shadowColor, - String? splashColor, - String? unselectedWidgetColor, - String? fontFamily, - List? fontFamilyFallback, - StacAppBarTheme? appBarTheme, - StacButtonStyle? elevatedButtonTheme, - StacButtonStyle? outlinedButtonTheme, - StacButtonStyle? iconButtonTheme, - StacIconThemeData? iconTheme, - StacIconThemeData? primaryIconTheme, - StacDialogTheme? dialogTheme, - StacFloatingActionButtonThemeData? floatingActionButtonTheme, - StacButtonStyle? textButtonTheme, - StacBottomAppBarTheme? bottomAppBarTheme, - StacBottomNavBarThemeData? bottomNavigationBarTheme, - StacBottomSheetThemeData? bottomSheetTheme, - StacCardThemeData? cardTheme, - StacListTileThemeData? listTileTheme, - StacNavigationBarThemeData? navigationBarTheme, - StacTabBarThemeData? tabBarTheme}); - + final bool? applyElevationOverlayColor; @override - $StacInputDecorationThemeCopyWith<$Res>? get inputDecorationTheme; + final StacInputDecorationTheme? inputDecorationTheme; @override - $StacColorSchemeCopyWith<$Res>? get colorScheme; + final bool? useMaterial3; @override - $StacMaterialColorCopyWith<$Res>? get primarySwatch; + final Brightness? brightness; @override - $StacAppBarThemeCopyWith<$Res>? get appBarTheme; + final String? canvasColor; @override - $StacButtonStyleCopyWith<$Res>? get elevatedButtonTheme; + final String? cardColor; @override - $StacButtonStyleCopyWith<$Res>? get outlinedButtonTheme; + final StacColorScheme? colorScheme; @override - $StacButtonStyleCopyWith<$Res>? get iconButtonTheme; + final String? colorSchemeSeed; @override - $StacIconThemeDataCopyWith<$Res>? get iconTheme; + final String? dialogBackgroundColor; @override - $StacIconThemeDataCopyWith<$Res>? get primaryIconTheme; + final String? disabledColor; @override - $StacDialogThemeCopyWith<$Res>? get dialogTheme; + final String? dividerColor; @override - $StacFloatingActionButtonThemeDataCopyWith<$Res>? - get floatingActionButtonTheme; + final String? focusColor; @override - $StacButtonStyleCopyWith<$Res>? get textButtonTheme; + final String? highlightColor; @override - $StacBottomAppBarThemeCopyWith<$Res>? get bottomAppBarTheme; + final String? hintColor; @override - $StacBottomNavBarThemeDataCopyWith<$Res>? get bottomNavigationBarTheme; + final String? hoverColor; @override - $StacBottomSheetThemeDataCopyWith<$Res>? get bottomSheetTheme; + final String? indicatorColor; @override - $StacCardThemeDataCopyWith<$Res>? get cardTheme; + final String? primaryColor; @override - $StacListTileThemeDataCopyWith<$Res>? get listTileTheme; + final String? primaryColorDark; @override - $StacNavigationBarThemeDataCopyWith<$Res>? get navigationBarTheme; + final String? primaryColorLight; @override - $StacTabBarThemeDataCopyWith<$Res>? get tabBarTheme; -} + final StacMaterialColor? primarySwatch; + @override + final String? scaffoldBackgroundColor; + @override + final String? secondaryHeaderColor; + @override + final String? shadowColor; + @override + final String? splashColor; + @override + final String? unselectedWidgetColor; + @override + final String? fontFamily; + final List? _fontFamilyFallback; + @override + List? get fontFamilyFallback { + final value = _fontFamilyFallback; + if (value == null) return null; + if (_fontFamilyFallback is EqualUnmodifiableListView) + return _fontFamilyFallback; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } -/// @nodoc -class __$$StacThemeImplCopyWithImpl<$Res> - extends _$StacThemeCopyWithImpl<$Res, _$StacThemeImpl> - implements _$$StacThemeImplCopyWith<$Res> { - __$$StacThemeImplCopyWithImpl( - _$StacThemeImpl _value, $Res Function(_$StacThemeImpl) _then) - : super(_value, _then); + @override + final StacAppBarTheme? appBarTheme; + @override + final StacButtonStyle? elevatedButtonTheme; + @override + final StacButtonStyle? outlinedButtonTheme; + @override + final StacButtonStyle? iconButtonTheme; + @override + final StacIconThemeData? iconTheme; + @override + final StacIconThemeData? primaryIconTheme; + @override + final StacDialogTheme? dialogTheme; + @override + final StacFloatingActionButtonThemeData? floatingActionButtonTheme; + @override + final StacButtonStyle? textButtonTheme; + @override + final StacBottomAppBarTheme? bottomAppBarTheme; + @override + final StacBottomNavBarThemeData? bottomNavigationBarTheme; + @override + final StacBottomSheetThemeData? bottomSheetTheme; + @override + final StacCardThemeData? cardTheme; + @override + final StacListTileThemeData? listTileTheme; + @override + final StacNavigationBarThemeData? navigationBarTheme; + @override + final StacTabBarThemeData? tabBarTheme; /// Create a copy of StacTheme /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') + _$StacThemeCopyWith<_StacTheme> get copyWith => + __$StacThemeCopyWithImpl<_StacTheme>(this, _$identity); + @override - $Res call({ - Object? applyElevationOverlayColor = freezed, - Object? inputDecorationTheme = freezed, - Object? useMaterial3 = freezed, - Object? brightness = freezed, - Object? canvasColor = freezed, - Object? cardColor = freezed, - Object? colorScheme = freezed, - Object? colorSchemeSeed = freezed, - Object? dialogBackgroundColor = freezed, - Object? disabledColor = freezed, - Object? dividerColor = freezed, - Object? focusColor = freezed, - Object? highlightColor = freezed, - Object? hintColor = freezed, - Object? hoverColor = freezed, - Object? indicatorColor = freezed, - Object? primaryColor = freezed, - Object? primaryColorDark = freezed, - Object? primaryColorLight = freezed, - Object? primarySwatch = freezed, - Object? scaffoldBackgroundColor = freezed, - Object? secondaryHeaderColor = freezed, - Object? shadowColor = freezed, - Object? splashColor = freezed, - Object? unselectedWidgetColor = freezed, - Object? fontFamily = freezed, - Object? fontFamilyFallback = freezed, - Object? appBarTheme = freezed, - Object? elevatedButtonTheme = freezed, - Object? outlinedButtonTheme = freezed, - Object? iconButtonTheme = freezed, - Object? iconTheme = freezed, - Object? primaryIconTheme = freezed, - Object? dialogTheme = freezed, - Object? floatingActionButtonTheme = freezed, - Object? textButtonTheme = freezed, - Object? bottomAppBarTheme = freezed, - Object? bottomNavigationBarTheme = freezed, - Object? bottomSheetTheme = freezed, - Object? cardTheme = freezed, - Object? listTileTheme = freezed, - Object? navigationBarTheme = freezed, - Object? tabBarTheme = freezed, - }) { - return _then(_$StacThemeImpl( - applyElevationOverlayColor: freezed == applyElevationOverlayColor - ? _value.applyElevationOverlayColor - : applyElevationOverlayColor // ignore: cast_nullable_to_non_nullable - as bool?, - inputDecorationTheme: freezed == inputDecorationTheme - ? _value.inputDecorationTheme - : inputDecorationTheme // ignore: cast_nullable_to_non_nullable - as StacInputDecorationTheme?, - useMaterial3: freezed == useMaterial3 - ? _value.useMaterial3 - : useMaterial3 // ignore: cast_nullable_to_non_nullable - as bool?, - brightness: freezed == brightness - ? _value.brightness - : brightness // ignore: cast_nullable_to_non_nullable - as Brightness?, - canvasColor: freezed == canvasColor - ? _value.canvasColor - : canvasColor // ignore: cast_nullable_to_non_nullable - as String?, - cardColor: freezed == cardColor - ? _value.cardColor - : cardColor // ignore: cast_nullable_to_non_nullable - as String?, - colorScheme: freezed == colorScheme - ? _value.colorScheme - : colorScheme // ignore: cast_nullable_to_non_nullable - as StacColorScheme?, - colorSchemeSeed: freezed == colorSchemeSeed - ? _value.colorSchemeSeed - : colorSchemeSeed // ignore: cast_nullable_to_non_nullable - as String?, - dialogBackgroundColor: freezed == dialogBackgroundColor - ? _value.dialogBackgroundColor - : dialogBackgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - disabledColor: freezed == disabledColor - ? _value.disabledColor - : disabledColor // ignore: cast_nullable_to_non_nullable - as String?, - dividerColor: freezed == dividerColor - ? _value.dividerColor - : dividerColor // ignore: cast_nullable_to_non_nullable - as String?, - focusColor: freezed == focusColor - ? _value.focusColor - : focusColor // ignore: cast_nullable_to_non_nullable - as String?, - highlightColor: freezed == highlightColor - ? _value.highlightColor - : highlightColor // ignore: cast_nullable_to_non_nullable - as String?, - hintColor: freezed == hintColor - ? _value.hintColor - : hintColor // ignore: cast_nullable_to_non_nullable - as String?, - hoverColor: freezed == hoverColor - ? _value.hoverColor - : hoverColor // ignore: cast_nullable_to_non_nullable - as String?, - indicatorColor: freezed == indicatorColor - ? _value.indicatorColor - : indicatorColor // ignore: cast_nullable_to_non_nullable - as String?, - primaryColor: freezed == primaryColor - ? _value.primaryColor - : primaryColor // ignore: cast_nullable_to_non_nullable - as String?, - primaryColorDark: freezed == primaryColorDark - ? _value.primaryColorDark - : primaryColorDark // ignore: cast_nullable_to_non_nullable - as String?, - primaryColorLight: freezed == primaryColorLight - ? _value.primaryColorLight - : primaryColorLight // ignore: cast_nullable_to_non_nullable - as String?, - primarySwatch: freezed == primarySwatch - ? _value.primarySwatch - : primarySwatch // ignore: cast_nullable_to_non_nullable - as StacMaterialColor?, - scaffoldBackgroundColor: freezed == scaffoldBackgroundColor - ? _value.scaffoldBackgroundColor - : scaffoldBackgroundColor // ignore: cast_nullable_to_non_nullable - as String?, - secondaryHeaderColor: freezed == secondaryHeaderColor - ? _value.secondaryHeaderColor - : secondaryHeaderColor // ignore: cast_nullable_to_non_nullable - as String?, - shadowColor: freezed == shadowColor - ? _value.shadowColor - : shadowColor // ignore: cast_nullable_to_non_nullable - as String?, - splashColor: freezed == splashColor - ? _value.splashColor - : splashColor // ignore: cast_nullable_to_non_nullable - as String?, - unselectedWidgetColor: freezed == unselectedWidgetColor - ? _value.unselectedWidgetColor - : unselectedWidgetColor // ignore: cast_nullable_to_non_nullable - as String?, - fontFamily: freezed == fontFamily - ? _value.fontFamily - : fontFamily // ignore: cast_nullable_to_non_nullable - as String?, - fontFamilyFallback: freezed == fontFamilyFallback - ? _value._fontFamilyFallback - : fontFamilyFallback // ignore: cast_nullable_to_non_nullable - as List?, - appBarTheme: freezed == appBarTheme - ? _value.appBarTheme - : appBarTheme // ignore: cast_nullable_to_non_nullable - as StacAppBarTheme?, - elevatedButtonTheme: freezed == elevatedButtonTheme - ? _value.elevatedButtonTheme - : elevatedButtonTheme // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - outlinedButtonTheme: freezed == outlinedButtonTheme - ? _value.outlinedButtonTheme - : outlinedButtonTheme // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - iconButtonTheme: freezed == iconButtonTheme - ? _value.iconButtonTheme - : iconButtonTheme // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - iconTheme: freezed == iconTheme - ? _value.iconTheme - : iconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - primaryIconTheme: freezed == primaryIconTheme - ? _value.primaryIconTheme - : primaryIconTheme // ignore: cast_nullable_to_non_nullable - as StacIconThemeData?, - dialogTheme: freezed == dialogTheme - ? _value.dialogTheme - : dialogTheme // ignore: cast_nullable_to_non_nullable - as StacDialogTheme?, - floatingActionButtonTheme: freezed == floatingActionButtonTheme - ? _value.floatingActionButtonTheme - : floatingActionButtonTheme // ignore: cast_nullable_to_non_nullable - as StacFloatingActionButtonThemeData?, - textButtonTheme: freezed == textButtonTheme - ? _value.textButtonTheme - : textButtonTheme // ignore: cast_nullable_to_non_nullable - as StacButtonStyle?, - bottomAppBarTheme: freezed == bottomAppBarTheme - ? _value.bottomAppBarTheme - : bottomAppBarTheme // ignore: cast_nullable_to_non_nullable - as StacBottomAppBarTheme?, - bottomNavigationBarTheme: freezed == bottomNavigationBarTheme - ? _value.bottomNavigationBarTheme - : bottomNavigationBarTheme // ignore: cast_nullable_to_non_nullable - as StacBottomNavBarThemeData?, - bottomSheetTheme: freezed == bottomSheetTheme - ? _value.bottomSheetTheme - : bottomSheetTheme // ignore: cast_nullable_to_non_nullable - as StacBottomSheetThemeData?, - cardTheme: freezed == cardTheme - ? _value.cardTheme - : cardTheme // ignore: cast_nullable_to_non_nullable - as StacCardThemeData?, - listTileTheme: freezed == listTileTheme - ? _value.listTileTheme - : listTileTheme // ignore: cast_nullable_to_non_nullable - as StacListTileThemeData?, - navigationBarTheme: freezed == navigationBarTheme - ? _value.navigationBarTheme - : navigationBarTheme // ignore: cast_nullable_to_non_nullable - as StacNavigationBarThemeData?, - tabBarTheme: freezed == tabBarTheme - ? _value.tabBarTheme - : tabBarTheme // ignore: cast_nullable_to_non_nullable - as StacTabBarThemeData?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$StacThemeImpl implements _StacTheme { - const _$StacThemeImpl( - {this.applyElevationOverlayColor, - this.inputDecorationTheme, - this.useMaterial3, - this.brightness, - this.canvasColor, - this.cardColor, - this.colorScheme, - this.colorSchemeSeed, - this.dialogBackgroundColor, - this.disabledColor, - this.dividerColor, - this.focusColor, - this.highlightColor, - this.hintColor, - this.hoverColor, - this.indicatorColor, - this.primaryColor, - this.primaryColorDark, - this.primaryColorLight, - this.primarySwatch, - this.scaffoldBackgroundColor, - this.secondaryHeaderColor, - this.shadowColor, - this.splashColor, - this.unselectedWidgetColor, - this.fontFamily, - final List? fontFamilyFallback, - this.appBarTheme, - this.elevatedButtonTheme, - this.outlinedButtonTheme, - this.iconButtonTheme, - this.iconTheme, - this.primaryIconTheme, - this.dialogTheme, - this.floatingActionButtonTheme, - this.textButtonTheme, - this.bottomAppBarTheme, - this.bottomNavigationBarTheme, - this.bottomSheetTheme, - this.cardTheme, - this.listTileTheme, - this.navigationBarTheme, - this.tabBarTheme}) - : _fontFamilyFallback = fontFamilyFallback; - - factory _$StacThemeImpl.fromJson(Map json) => - _$$StacThemeImplFromJson(json); - - @override - final bool? applyElevationOverlayColor; - @override - final StacInputDecorationTheme? inputDecorationTheme; - @override - final bool? useMaterial3; - @override - final Brightness? brightness; - @override - final String? canvasColor; - @override - final String? cardColor; - @override - final StacColorScheme? colorScheme; - @override - final String? colorSchemeSeed; - @override - final String? dialogBackgroundColor; - @override - final String? disabledColor; - @override - final String? dividerColor; - @override - final String? focusColor; - @override - final String? highlightColor; - @override - final String? hintColor; - @override - final String? hoverColor; - @override - final String? indicatorColor; - @override - final String? primaryColor; - @override - final String? primaryColorDark; - @override - final String? primaryColorLight; - @override - final StacMaterialColor? primarySwatch; - @override - final String? scaffoldBackgroundColor; - @override - final String? secondaryHeaderColor; - @override - final String? shadowColor; - @override - final String? splashColor; - @override - final String? unselectedWidgetColor; - @override - final String? fontFamily; - final List? _fontFamilyFallback; - @override - List? get fontFamilyFallback { - final value = _fontFamilyFallback; - if (value == null) return null; - if (_fontFamilyFallback is EqualUnmodifiableListView) - return _fontFamilyFallback; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final StacAppBarTheme? appBarTheme; - @override - final StacButtonStyle? elevatedButtonTheme; - @override - final StacButtonStyle? outlinedButtonTheme; - @override - final StacButtonStyle? iconButtonTheme; - @override - final StacIconThemeData? iconTheme; - @override - final StacIconThemeData? primaryIconTheme; - @override - final StacDialogTheme? dialogTheme; - @override - final StacFloatingActionButtonThemeData? floatingActionButtonTheme; - @override - final StacButtonStyle? textButtonTheme; - @override - final StacBottomAppBarTheme? bottomAppBarTheme; - @override - final StacBottomNavBarThemeData? bottomNavigationBarTheme; - @override - final StacBottomSheetThemeData? bottomSheetTheme; - @override - final StacCardThemeData? cardTheme; - @override - final StacListTileThemeData? listTileTheme; - @override - final StacNavigationBarThemeData? navigationBarTheme; - @override - final StacTabBarThemeData? tabBarTheme; - - @override - String toString() { - return 'StacTheme(applyElevationOverlayColor: $applyElevationOverlayColor, inputDecorationTheme: $inputDecorationTheme, useMaterial3: $useMaterial3, brightness: $brightness, canvasColor: $canvasColor, cardColor: $cardColor, colorScheme: $colorScheme, colorSchemeSeed: $colorSchemeSeed, dialogBackgroundColor: $dialogBackgroundColor, disabledColor: $disabledColor, dividerColor: $dividerColor, focusColor: $focusColor, highlightColor: $highlightColor, hintColor: $hintColor, hoverColor: $hoverColor, indicatorColor: $indicatorColor, primaryColor: $primaryColor, primaryColorDark: $primaryColorDark, primaryColorLight: $primaryColorLight, primarySwatch: $primarySwatch, scaffoldBackgroundColor: $scaffoldBackgroundColor, secondaryHeaderColor: $secondaryHeaderColor, shadowColor: $shadowColor, splashColor: $splashColor, unselectedWidgetColor: $unselectedWidgetColor, fontFamily: $fontFamily, fontFamilyFallback: $fontFamilyFallback, appBarTheme: $appBarTheme, elevatedButtonTheme: $elevatedButtonTheme, outlinedButtonTheme: $outlinedButtonTheme, iconButtonTheme: $iconButtonTheme, iconTheme: $iconTheme, primaryIconTheme: $primaryIconTheme, dialogTheme: $dialogTheme, floatingActionButtonTheme: $floatingActionButtonTheme, textButtonTheme: $textButtonTheme, bottomAppBarTheme: $bottomAppBarTheme, bottomNavigationBarTheme: $bottomNavigationBarTheme, bottomSheetTheme: $bottomSheetTheme, cardTheme: $cardTheme, listTileTheme: $listTileTheme, navigationBarTheme: $navigationBarTheme, tabBarTheme: $tabBarTheme)'; + Map toJson() { + return _$StacThemeToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacThemeImpl && + other is _StacTheme && (identical(other.applyElevationOverlayColor, applyElevationOverlayColor) || other.applyElevationOverlayColor == applyElevationOverlayColor) && @@ -1277,162 +1079,610 @@ class _$StacThemeImpl implements _StacTheme { tabBarTheme ]); + @override + String toString() { + return 'StacTheme(applyElevationOverlayColor: $applyElevationOverlayColor, inputDecorationTheme: $inputDecorationTheme, useMaterial3: $useMaterial3, brightness: $brightness, canvasColor: $canvasColor, cardColor: $cardColor, colorScheme: $colorScheme, colorSchemeSeed: $colorSchemeSeed, dialogBackgroundColor: $dialogBackgroundColor, disabledColor: $disabledColor, dividerColor: $dividerColor, focusColor: $focusColor, highlightColor: $highlightColor, hintColor: $hintColor, hoverColor: $hoverColor, indicatorColor: $indicatorColor, primaryColor: $primaryColor, primaryColorDark: $primaryColorDark, primaryColorLight: $primaryColorLight, primarySwatch: $primarySwatch, scaffoldBackgroundColor: $scaffoldBackgroundColor, secondaryHeaderColor: $secondaryHeaderColor, shadowColor: $shadowColor, splashColor: $splashColor, unselectedWidgetColor: $unselectedWidgetColor, fontFamily: $fontFamily, fontFamilyFallback: $fontFamilyFallback, appBarTheme: $appBarTheme, elevatedButtonTheme: $elevatedButtonTheme, outlinedButtonTheme: $outlinedButtonTheme, iconButtonTheme: $iconButtonTheme, iconTheme: $iconTheme, primaryIconTheme: $primaryIconTheme, dialogTheme: $dialogTheme, floatingActionButtonTheme: $floatingActionButtonTheme, textButtonTheme: $textButtonTheme, bottomAppBarTheme: $bottomAppBarTheme, bottomNavigationBarTheme: $bottomNavigationBarTheme, bottomSheetTheme: $bottomSheetTheme, cardTheme: $cardTheme, listTileTheme: $listTileTheme, navigationBarTheme: $navigationBarTheme, tabBarTheme: $tabBarTheme)'; + } +} + +/// @nodoc +abstract mixin class _$StacThemeCopyWith<$Res> + implements $StacThemeCopyWith<$Res> { + factory _$StacThemeCopyWith( + _StacTheme value, $Res Function(_StacTheme) _then) = + __$StacThemeCopyWithImpl; + @override + @useResult + $Res call( + {bool? applyElevationOverlayColor, + StacInputDecorationTheme? inputDecorationTheme, + bool? useMaterial3, + Brightness? brightness, + String? canvasColor, + String? cardColor, + StacColorScheme? colorScheme, + String? colorSchemeSeed, + String? dialogBackgroundColor, + String? disabledColor, + String? dividerColor, + String? focusColor, + String? highlightColor, + String? hintColor, + String? hoverColor, + String? indicatorColor, + String? primaryColor, + String? primaryColorDark, + String? primaryColorLight, + StacMaterialColor? primarySwatch, + String? scaffoldBackgroundColor, + String? secondaryHeaderColor, + String? shadowColor, + String? splashColor, + String? unselectedWidgetColor, + String? fontFamily, + List? fontFamilyFallback, + StacAppBarTheme? appBarTheme, + StacButtonStyle? elevatedButtonTheme, + StacButtonStyle? outlinedButtonTheme, + StacButtonStyle? iconButtonTheme, + StacIconThemeData? iconTheme, + StacIconThemeData? primaryIconTheme, + StacDialogTheme? dialogTheme, + StacFloatingActionButtonThemeData? floatingActionButtonTheme, + StacButtonStyle? textButtonTheme, + StacBottomAppBarTheme? bottomAppBarTheme, + StacBottomNavBarThemeData? bottomNavigationBarTheme, + StacBottomSheetThemeData? bottomSheetTheme, + StacCardThemeData? cardTheme, + StacListTileThemeData? listTileTheme, + StacNavigationBarThemeData? navigationBarTheme, + StacTabBarThemeData? tabBarTheme}); + + @override + $StacInputDecorationThemeCopyWith<$Res>? get inputDecorationTheme; + @override + $StacColorSchemeCopyWith<$Res>? get colorScheme; + @override + $StacMaterialColorCopyWith<$Res>? get primarySwatch; + @override + $StacAppBarThemeCopyWith<$Res>? get appBarTheme; + @override + $StacButtonStyleCopyWith<$Res>? get elevatedButtonTheme; + @override + $StacButtonStyleCopyWith<$Res>? get outlinedButtonTheme; + @override + $StacButtonStyleCopyWith<$Res>? get iconButtonTheme; + @override + $StacIconThemeDataCopyWith<$Res>? get iconTheme; + @override + $StacIconThemeDataCopyWith<$Res>? get primaryIconTheme; + @override + $StacDialogThemeCopyWith<$Res>? get dialogTheme; + @override + $StacFloatingActionButtonThemeDataCopyWith<$Res>? + get floatingActionButtonTheme; + @override + $StacButtonStyleCopyWith<$Res>? get textButtonTheme; + @override + $StacBottomAppBarThemeCopyWith<$Res>? get bottomAppBarTheme; + @override + $StacBottomNavBarThemeDataCopyWith<$Res>? get bottomNavigationBarTheme; + @override + $StacBottomSheetThemeDataCopyWith<$Res>? get bottomSheetTheme; + @override + $StacCardThemeDataCopyWith<$Res>? get cardTheme; + @override + $StacListTileThemeDataCopyWith<$Res>? get listTileTheme; + @override + $StacNavigationBarThemeDataCopyWith<$Res>? get navigationBarTheme; + @override + $StacTabBarThemeDataCopyWith<$Res>? get tabBarTheme; +} + +/// @nodoc +class __$StacThemeCopyWithImpl<$Res> implements _$StacThemeCopyWith<$Res> { + __$StacThemeCopyWithImpl(this._self, this._then); + + final _StacTheme _self; + final $Res Function(_StacTheme) _then; + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? applyElevationOverlayColor = freezed, + Object? inputDecorationTheme = freezed, + Object? useMaterial3 = freezed, + Object? brightness = freezed, + Object? canvasColor = freezed, + Object? cardColor = freezed, + Object? colorScheme = freezed, + Object? colorSchemeSeed = freezed, + Object? dialogBackgroundColor = freezed, + Object? disabledColor = freezed, + Object? dividerColor = freezed, + Object? focusColor = freezed, + Object? highlightColor = freezed, + Object? hintColor = freezed, + Object? hoverColor = freezed, + Object? indicatorColor = freezed, + Object? primaryColor = freezed, + Object? primaryColorDark = freezed, + Object? primaryColorLight = freezed, + Object? primarySwatch = freezed, + Object? scaffoldBackgroundColor = freezed, + Object? secondaryHeaderColor = freezed, + Object? shadowColor = freezed, + Object? splashColor = freezed, + Object? unselectedWidgetColor = freezed, + Object? fontFamily = freezed, + Object? fontFamilyFallback = freezed, + Object? appBarTheme = freezed, + Object? elevatedButtonTheme = freezed, + Object? outlinedButtonTheme = freezed, + Object? iconButtonTheme = freezed, + Object? iconTheme = freezed, + Object? primaryIconTheme = freezed, + Object? dialogTheme = freezed, + Object? floatingActionButtonTheme = freezed, + Object? textButtonTheme = freezed, + Object? bottomAppBarTheme = freezed, + Object? bottomNavigationBarTheme = freezed, + Object? bottomSheetTheme = freezed, + Object? cardTheme = freezed, + Object? listTileTheme = freezed, + Object? navigationBarTheme = freezed, + Object? tabBarTheme = freezed, + }) { + return _then(_StacTheme( + applyElevationOverlayColor: freezed == applyElevationOverlayColor + ? _self.applyElevationOverlayColor + : applyElevationOverlayColor // ignore: cast_nullable_to_non_nullable + as bool?, + inputDecorationTheme: freezed == inputDecorationTheme + ? _self.inputDecorationTheme + : inputDecorationTheme // ignore: cast_nullable_to_non_nullable + as StacInputDecorationTheme?, + useMaterial3: freezed == useMaterial3 + ? _self.useMaterial3 + : useMaterial3 // ignore: cast_nullable_to_non_nullable + as bool?, + brightness: freezed == brightness + ? _self.brightness + : brightness // ignore: cast_nullable_to_non_nullable + as Brightness?, + canvasColor: freezed == canvasColor + ? _self.canvasColor + : canvasColor // ignore: cast_nullable_to_non_nullable + as String?, + cardColor: freezed == cardColor + ? _self.cardColor + : cardColor // ignore: cast_nullable_to_non_nullable + as String?, + colorScheme: freezed == colorScheme + ? _self.colorScheme + : colorScheme // ignore: cast_nullable_to_non_nullable + as StacColorScheme?, + colorSchemeSeed: freezed == colorSchemeSeed + ? _self.colorSchemeSeed + : colorSchemeSeed // ignore: cast_nullable_to_non_nullable + as String?, + dialogBackgroundColor: freezed == dialogBackgroundColor + ? _self.dialogBackgroundColor + : dialogBackgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + disabledColor: freezed == disabledColor + ? _self.disabledColor + : disabledColor // ignore: cast_nullable_to_non_nullable + as String?, + dividerColor: freezed == dividerColor + ? _self.dividerColor + : dividerColor // ignore: cast_nullable_to_non_nullable + as String?, + focusColor: freezed == focusColor + ? _self.focusColor + : focusColor // ignore: cast_nullable_to_non_nullable + as String?, + highlightColor: freezed == highlightColor + ? _self.highlightColor + : highlightColor // ignore: cast_nullable_to_non_nullable + as String?, + hintColor: freezed == hintColor + ? _self.hintColor + : hintColor // ignore: cast_nullable_to_non_nullable + as String?, + hoverColor: freezed == hoverColor + ? _self.hoverColor + : hoverColor // ignore: cast_nullable_to_non_nullable + as String?, + indicatorColor: freezed == indicatorColor + ? _self.indicatorColor + : indicatorColor // ignore: cast_nullable_to_non_nullable + as String?, + primaryColor: freezed == primaryColor + ? _self.primaryColor + : primaryColor // ignore: cast_nullable_to_non_nullable + as String?, + primaryColorDark: freezed == primaryColorDark + ? _self.primaryColorDark + : primaryColorDark // ignore: cast_nullable_to_non_nullable + as String?, + primaryColorLight: freezed == primaryColorLight + ? _self.primaryColorLight + : primaryColorLight // ignore: cast_nullable_to_non_nullable + as String?, + primarySwatch: freezed == primarySwatch + ? _self.primarySwatch + : primarySwatch // ignore: cast_nullable_to_non_nullable + as StacMaterialColor?, + scaffoldBackgroundColor: freezed == scaffoldBackgroundColor + ? _self.scaffoldBackgroundColor + : scaffoldBackgroundColor // ignore: cast_nullable_to_non_nullable + as String?, + secondaryHeaderColor: freezed == secondaryHeaderColor + ? _self.secondaryHeaderColor + : secondaryHeaderColor // ignore: cast_nullable_to_non_nullable + as String?, + shadowColor: freezed == shadowColor + ? _self.shadowColor + : shadowColor // ignore: cast_nullable_to_non_nullable + as String?, + splashColor: freezed == splashColor + ? _self.splashColor + : splashColor // ignore: cast_nullable_to_non_nullable + as String?, + unselectedWidgetColor: freezed == unselectedWidgetColor + ? _self.unselectedWidgetColor + : unselectedWidgetColor // ignore: cast_nullable_to_non_nullable + as String?, + fontFamily: freezed == fontFamily + ? _self.fontFamily + : fontFamily // ignore: cast_nullable_to_non_nullable + as String?, + fontFamilyFallback: freezed == fontFamilyFallback + ? _self._fontFamilyFallback + : fontFamilyFallback // ignore: cast_nullable_to_non_nullable + as List?, + appBarTheme: freezed == appBarTheme + ? _self.appBarTheme + : appBarTheme // ignore: cast_nullable_to_non_nullable + as StacAppBarTheme?, + elevatedButtonTheme: freezed == elevatedButtonTheme + ? _self.elevatedButtonTheme + : elevatedButtonTheme // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + outlinedButtonTheme: freezed == outlinedButtonTheme + ? _self.outlinedButtonTheme + : outlinedButtonTheme // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + iconButtonTheme: freezed == iconButtonTheme + ? _self.iconButtonTheme + : iconButtonTheme // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + iconTheme: freezed == iconTheme + ? _self.iconTheme + : iconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + primaryIconTheme: freezed == primaryIconTheme + ? _self.primaryIconTheme + : primaryIconTheme // ignore: cast_nullable_to_non_nullable + as StacIconThemeData?, + dialogTheme: freezed == dialogTheme + ? _self.dialogTheme + : dialogTheme // ignore: cast_nullable_to_non_nullable + as StacDialogTheme?, + floatingActionButtonTheme: freezed == floatingActionButtonTheme + ? _self.floatingActionButtonTheme + : floatingActionButtonTheme // ignore: cast_nullable_to_non_nullable + as StacFloatingActionButtonThemeData?, + textButtonTheme: freezed == textButtonTheme + ? _self.textButtonTheme + : textButtonTheme // ignore: cast_nullable_to_non_nullable + as StacButtonStyle?, + bottomAppBarTheme: freezed == bottomAppBarTheme + ? _self.bottomAppBarTheme + : bottomAppBarTheme // ignore: cast_nullable_to_non_nullable + as StacBottomAppBarTheme?, + bottomNavigationBarTheme: freezed == bottomNavigationBarTheme + ? _self.bottomNavigationBarTheme + : bottomNavigationBarTheme // ignore: cast_nullable_to_non_nullable + as StacBottomNavBarThemeData?, + bottomSheetTheme: freezed == bottomSheetTheme + ? _self.bottomSheetTheme + : bottomSheetTheme // ignore: cast_nullable_to_non_nullable + as StacBottomSheetThemeData?, + cardTheme: freezed == cardTheme + ? _self.cardTheme + : cardTheme // ignore: cast_nullable_to_non_nullable + as StacCardThemeData?, + listTileTheme: freezed == listTileTheme + ? _self.listTileTheme + : listTileTheme // ignore: cast_nullable_to_non_nullable + as StacListTileThemeData?, + navigationBarTheme: freezed == navigationBarTheme + ? _self.navigationBarTheme + : navigationBarTheme // ignore: cast_nullable_to_non_nullable + as StacNavigationBarThemeData?, + tabBarTheme: freezed == tabBarTheme + ? _self.tabBarTheme + : tabBarTheme // ignore: cast_nullable_to_non_nullable + as StacTabBarThemeData?, + )); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $StacInputDecorationThemeCopyWith<$Res>? get inputDecorationTheme { + if (_self.inputDecorationTheme == null) { + return null; + } + + return $StacInputDecorationThemeCopyWith<$Res>(_self.inputDecorationTheme!, + (value) { + return _then(_self.copyWith(inputDecorationTheme: value)); + }); + } + /// Create a copy of StacTheme /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$StacThemeImplCopyWith<_$StacThemeImpl> get copyWith => - __$$StacThemeImplCopyWithImpl<_$StacThemeImpl>(this, _$identity); + $StacColorSchemeCopyWith<$Res>? get colorScheme { + if (_self.colorScheme == null) { + return null; + } - @override - Map toJson() { - return _$$StacThemeImplToJson( - this, - ); + return $StacColorSchemeCopyWith<$Res>(_self.colorScheme!, (value) { + return _then(_self.copyWith(colorScheme: value)); + }); } -} - -abstract class _StacTheme implements StacTheme { - const factory _StacTheme( - {final bool? applyElevationOverlayColor, - final StacInputDecorationTheme? inputDecorationTheme, - final bool? useMaterial3, - final Brightness? brightness, - final String? canvasColor, - final String? cardColor, - final StacColorScheme? colorScheme, - final String? colorSchemeSeed, - final String? dialogBackgroundColor, - final String? disabledColor, - final String? dividerColor, - final String? focusColor, - final String? highlightColor, - final String? hintColor, - final String? hoverColor, - final String? indicatorColor, - final String? primaryColor, - final String? primaryColorDark, - final String? primaryColorLight, - final StacMaterialColor? primarySwatch, - final String? scaffoldBackgroundColor, - final String? secondaryHeaderColor, - final String? shadowColor, - final String? splashColor, - final String? unselectedWidgetColor, - final String? fontFamily, - final List? fontFamilyFallback, - final StacAppBarTheme? appBarTheme, - final StacButtonStyle? elevatedButtonTheme, - final StacButtonStyle? outlinedButtonTheme, - final StacButtonStyle? iconButtonTheme, - final StacIconThemeData? iconTheme, - final StacIconThemeData? primaryIconTheme, - final StacDialogTheme? dialogTheme, - final StacFloatingActionButtonThemeData? floatingActionButtonTheme, - final StacButtonStyle? textButtonTheme, - final StacBottomAppBarTheme? bottomAppBarTheme, - final StacBottomNavBarThemeData? bottomNavigationBarTheme, - final StacBottomSheetThemeData? bottomSheetTheme, - final StacCardThemeData? cardTheme, - final StacListTileThemeData? listTileTheme, - final StacNavigationBarThemeData? navigationBarTheme, - final StacTabBarThemeData? tabBarTheme}) = _$StacThemeImpl; - - factory _StacTheme.fromJson(Map json) = - _$StacThemeImpl.fromJson; + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - bool? get applyElevationOverlayColor; - @override - StacInputDecorationTheme? get inputDecorationTheme; - @override - bool? get useMaterial3; - @override - Brightness? get brightness; - @override - String? get canvasColor; - @override - String? get cardColor; - @override - StacColorScheme? get colorScheme; - @override - String? get colorSchemeSeed; - @override - String? get dialogBackgroundColor; - @override - String? get disabledColor; - @override - String? get dividerColor; - @override - String? get focusColor; - @override - String? get highlightColor; - @override - String? get hintColor; - @override - String? get hoverColor; - @override - String? get indicatorColor; - @override - String? get primaryColor; - @override - String? get primaryColorDark; - @override - String? get primaryColorLight; - @override - StacMaterialColor? get primarySwatch; - @override - String? get scaffoldBackgroundColor; - @override - String? get secondaryHeaderColor; - @override - String? get shadowColor; - @override - String? get splashColor; - @override - String? get unselectedWidgetColor; - @override - String? get fontFamily; - @override - List? get fontFamilyFallback; - @override - StacAppBarTheme? get appBarTheme; + @pragma('vm:prefer-inline') + $StacMaterialColorCopyWith<$Res>? get primarySwatch { + if (_self.primarySwatch == null) { + return null; + } + + return $StacMaterialColorCopyWith<$Res>(_self.primarySwatch!, (value) { + return _then(_self.copyWith(primarySwatch: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacButtonStyle? get elevatedButtonTheme; + @pragma('vm:prefer-inline') + $StacAppBarThemeCopyWith<$Res>? get appBarTheme { + if (_self.appBarTheme == null) { + return null; + } + + return $StacAppBarThemeCopyWith<$Res>(_self.appBarTheme!, (value) { + return _then(_self.copyWith(appBarTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacButtonStyle? get outlinedButtonTheme; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get elevatedButtonTheme { + if (_self.elevatedButtonTheme == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.elevatedButtonTheme!, (value) { + return _then(_self.copyWith(elevatedButtonTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacButtonStyle? get iconButtonTheme; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get outlinedButtonTheme { + if (_self.outlinedButtonTheme == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.outlinedButtonTheme!, (value) { + return _then(_self.copyWith(outlinedButtonTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacIconThemeData? get iconTheme; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get iconButtonTheme { + if (_self.iconButtonTheme == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.iconButtonTheme!, (value) { + return _then(_self.copyWith(iconButtonTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacIconThemeData? get primaryIconTheme; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get iconTheme { + if (_self.iconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.iconTheme!, (value) { + return _then(_self.copyWith(iconTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacDialogTheme? get dialogTheme; + @pragma('vm:prefer-inline') + $StacIconThemeDataCopyWith<$Res>? get primaryIconTheme { + if (_self.primaryIconTheme == null) { + return null; + } + + return $StacIconThemeDataCopyWith<$Res>(_self.primaryIconTheme!, (value) { + return _then(_self.copyWith(primaryIconTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacFloatingActionButtonThemeData? get floatingActionButtonTheme; + @pragma('vm:prefer-inline') + $StacDialogThemeCopyWith<$Res>? get dialogTheme { + if (_self.dialogTheme == null) { + return null; + } + + return $StacDialogThemeCopyWith<$Res>(_self.dialogTheme!, (value) { + return _then(_self.copyWith(dialogTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacButtonStyle? get textButtonTheme; + @pragma('vm:prefer-inline') + $StacFloatingActionButtonThemeDataCopyWith<$Res>? + get floatingActionButtonTheme { + if (_self.floatingActionButtonTheme == null) { + return null; + } + + return $StacFloatingActionButtonThemeDataCopyWith<$Res>( + _self.floatingActionButtonTheme!, (value) { + return _then(_self.copyWith(floatingActionButtonTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacBottomAppBarTheme? get bottomAppBarTheme; + @pragma('vm:prefer-inline') + $StacButtonStyleCopyWith<$Res>? get textButtonTheme { + if (_self.textButtonTheme == null) { + return null; + } + + return $StacButtonStyleCopyWith<$Res>(_self.textButtonTheme!, (value) { + return _then(_self.copyWith(textButtonTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacBottomNavBarThemeData? get bottomNavigationBarTheme; + @pragma('vm:prefer-inline') + $StacBottomAppBarThemeCopyWith<$Res>? get bottomAppBarTheme { + if (_self.bottomAppBarTheme == null) { + return null; + } + + return $StacBottomAppBarThemeCopyWith<$Res>(_self.bottomAppBarTheme!, + (value) { + return _then(_self.copyWith(bottomAppBarTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacBottomSheetThemeData? get bottomSheetTheme; + @pragma('vm:prefer-inline') + $StacBottomNavBarThemeDataCopyWith<$Res>? get bottomNavigationBarTheme { + if (_self.bottomNavigationBarTheme == null) { + return null; + } + + return $StacBottomNavBarThemeDataCopyWith<$Res>( + _self.bottomNavigationBarTheme!, (value) { + return _then(_self.copyWith(bottomNavigationBarTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacCardThemeData? get cardTheme; + @pragma('vm:prefer-inline') + $StacBottomSheetThemeDataCopyWith<$Res>? get bottomSheetTheme { + if (_self.bottomSheetTheme == null) { + return null; + } + + return $StacBottomSheetThemeDataCopyWith<$Res>(_self.bottomSheetTheme!, + (value) { + return _then(_self.copyWith(bottomSheetTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacListTileThemeData? get listTileTheme; + @pragma('vm:prefer-inline') + $StacCardThemeDataCopyWith<$Res>? get cardTheme { + if (_self.cardTheme == null) { + return null; + } + + return $StacCardThemeDataCopyWith<$Res>(_self.cardTheme!, (value) { + return _then(_self.copyWith(cardTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacNavigationBarThemeData? get navigationBarTheme; + @pragma('vm:prefer-inline') + $StacListTileThemeDataCopyWith<$Res>? get listTileTheme { + if (_self.listTileTheme == null) { + return null; + } + + return $StacListTileThemeDataCopyWith<$Res>(_self.listTileTheme!, (value) { + return _then(_self.copyWith(listTileTheme: value)); + }); + } + + /// Create a copy of StacTheme + /// with the given fields replaced by the non-null parameter values. @override - StacTabBarThemeData? get tabBarTheme; + @pragma('vm:prefer-inline') + $StacNavigationBarThemeDataCopyWith<$Res>? get navigationBarTheme { + if (_self.navigationBarTheme == null) { + return null; + } + + return $StacNavigationBarThemeDataCopyWith<$Res>(_self.navigationBarTheme!, + (value) { + return _then(_self.copyWith(navigationBarTheme: value)); + }); + } /// Create a copy of StacTheme /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacThemeImplCopyWith<_$StacThemeImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $StacTabBarThemeDataCopyWith<$Res>? get tabBarTheme { + if (_self.tabBarTheme == null) { + return null; + } + + return $StacTabBarThemeDataCopyWith<$Res>(_self.tabBarTheme!, (value) { + return _then(_self.copyWith(tabBarTheme: value)); + }); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_theme/stac_theme.g.dart b/packages/stac/lib/src/parsers/stac_theme/stac_theme.g.dart index 1f3cbf30..04665992 100644 --- a/packages/stac/lib/src/parsers/stac_theme/stac_theme.g.dart +++ b/packages/stac/lib/src/parsers/stac_theme/stac_theme.g.dart @@ -6,8 +6,7 @@ part of 'stac_theme.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacThemeImpl _$$StacThemeImplFromJson(Map json) => - _$StacThemeImpl( +_StacTheme _$StacThemeFromJson(Map json) => _StacTheme( applyElevationOverlayColor: json['applyElevationOverlayColor'] as bool?, inputDecorationTheme: json['inputDecorationTheme'] == null ? null @@ -112,7 +111,7 @@ _$StacThemeImpl _$$StacThemeImplFromJson(Map json) => json['tabBarTheme'] as Map), ); -Map _$$StacThemeImplToJson(_$StacThemeImpl instance) => +Map _$StacThemeToJson(_StacTheme instance) => { 'applyElevationOverlayColor': instance.applyElevationOverlayColor, 'inputDecorationTheme': instance.inputDecorationTheme, diff --git a/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.dart b/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.dart index 10a4fd7c..770df56e 100644 --- a/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.dart +++ b/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.dart @@ -5,7 +5,7 @@ part 'stac_visual_density.freezed.dart'; part 'stac_visual_density.g.dart'; @freezed -class StacVisualDensity with _$StacVisualDensity { +abstract class StacVisualDensity with _$StacVisualDensity { const factory StacVisualDensity({ required double horizontal, required double vertical, diff --git a/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.freezed.dart b/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.freezed.dart index ed76445f..6cf2328e 100644 --- a/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,88 +10,62 @@ part of 'stac_visual_density.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacVisualDensity _$StacVisualDensityFromJson(Map json) { - return _StacVisualDensity.fromJson(json); -} - /// @nodoc mixin _$StacVisualDensity { - double get horizontal => throw _privateConstructorUsedError; - double get vertical => throw _privateConstructorUsedError; - - /// Serializes this StacVisualDensity to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + double get horizontal; + double get vertical; /// Create a copy of StacVisualDensity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacVisualDensityCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacVisualDensityCopyWithImpl( + this as StacVisualDensity, _$identity); -/// @nodoc -abstract class $StacVisualDensityCopyWith<$Res> { - factory $StacVisualDensityCopyWith( - StacVisualDensity value, $Res Function(StacVisualDensity) then) = - _$StacVisualDensityCopyWithImpl<$Res, StacVisualDensity>; - @useResult - $Res call({double horizontal, double vertical}); -} + /// Serializes this StacVisualDensity to a JSON map. + Map toJson(); -/// @nodoc -class _$StacVisualDensityCopyWithImpl<$Res, $Val extends StacVisualDensity> - implements $StacVisualDensityCopyWith<$Res> { - _$StacVisualDensityCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacVisualDensity && + (identical(other.horizontal, horizontal) || + other.horizontal == horizontal) && + (identical(other.vertical, vertical) || + other.vertical == vertical)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, horizontal, vertical); - /// Create a copy of StacVisualDensity - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? horizontal = null, - Object? vertical = null, - }) { - return _then(_value.copyWith( - horizontal: null == horizontal - ? _value.horizontal - : horizontal // ignore: cast_nullable_to_non_nullable - as double, - vertical: null == vertical - ? _value.vertical - : vertical // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + String toString() { + return 'StacVisualDensity(horizontal: $horizontal, vertical: $vertical)'; } } /// @nodoc -abstract class _$$StacVisualDensityImplCopyWith<$Res> - implements $StacVisualDensityCopyWith<$Res> { - factory _$$StacVisualDensityImplCopyWith(_$StacVisualDensityImpl value, - $Res Function(_$StacVisualDensityImpl) then) = - __$$StacVisualDensityImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacVisualDensityCopyWith<$Res> { + factory $StacVisualDensityCopyWith( + StacVisualDensity value, $Res Function(StacVisualDensity) _then) = + _$StacVisualDensityCopyWithImpl; @useResult $Res call({double horizontal, double vertical}); } /// @nodoc -class __$$StacVisualDensityImplCopyWithImpl<$Res> - extends _$StacVisualDensityCopyWithImpl<$Res, _$StacVisualDensityImpl> - implements _$$StacVisualDensityImplCopyWith<$Res> { - __$$StacVisualDensityImplCopyWithImpl(_$StacVisualDensityImpl _value, - $Res Function(_$StacVisualDensityImpl) _then) - : super(_value, _then); +class _$StacVisualDensityCopyWithImpl<$Res> + implements $StacVisualDensityCopyWith<$Res> { + _$StacVisualDensityCopyWithImpl(this._self, this._then); + + final StacVisualDensity _self; + final $Res Function(StacVisualDensity) _then; /// Create a copy of StacVisualDensity /// with the given fields replaced by the non-null parameter values. @@ -100,13 +75,13 @@ class __$$StacVisualDensityImplCopyWithImpl<$Res> Object? horizontal = null, Object? vertical = null, }) { - return _then(_$StacVisualDensityImpl( + return _then(_self.copyWith( horizontal: null == horizontal - ? _value.horizontal + ? _self.horizontal : horizontal // ignore: cast_nullable_to_non_nullable as double, vertical: null == vertical - ? _value.vertical + ? _self.vertical : vertical // ignore: cast_nullable_to_non_nullable as double, )); @@ -115,28 +90,36 @@ class __$$StacVisualDensityImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacVisualDensityImpl implements _StacVisualDensity { - const _$StacVisualDensityImpl( - {required this.horizontal, required this.vertical}); - - factory _$StacVisualDensityImpl.fromJson(Map json) => - _$$StacVisualDensityImplFromJson(json); +class _StacVisualDensity implements StacVisualDensity { + const _StacVisualDensity({required this.horizontal, required this.vertical}); + factory _StacVisualDensity.fromJson(Map json) => + _$StacVisualDensityFromJson(json); @override final double horizontal; @override final double vertical; + /// Create a copy of StacVisualDensity + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacVisualDensity(horizontal: $horizontal, vertical: $vertical)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacVisualDensityCopyWith<_StacVisualDensity> get copyWith => + __$StacVisualDensityCopyWithImpl<_StacVisualDensity>(this, _$identity); + + @override + Map toJson() { + return _$StacVisualDensityToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacVisualDensityImpl && + other is _StacVisualDensity && (identical(other.horizontal, horizontal) || other.horizontal == horizontal) && (identical(other.vertical, vertical) || @@ -147,40 +130,50 @@ class _$StacVisualDensityImpl implements _StacVisualDensity { @override int get hashCode => Object.hash(runtimeType, horizontal, vertical); - /// Create a copy of StacVisualDensity - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacVisualDensityImplCopyWith<_$StacVisualDensityImpl> get copyWith => - __$$StacVisualDensityImplCopyWithImpl<_$StacVisualDensityImpl>( - this, _$identity); - @override - Map toJson() { - return _$$StacVisualDensityImplToJson( - this, - ); + String toString() { + return 'StacVisualDensity(horizontal: $horizontal, vertical: $vertical)'; } } -abstract class _StacVisualDensity implements StacVisualDensity { - const factory _StacVisualDensity( - {required final double horizontal, - required final double vertical}) = _$StacVisualDensityImpl; +/// @nodoc +abstract mixin class _$StacVisualDensityCopyWith<$Res> + implements $StacVisualDensityCopyWith<$Res> { + factory _$StacVisualDensityCopyWith( + _StacVisualDensity value, $Res Function(_StacVisualDensity) _then) = + __$StacVisualDensityCopyWithImpl; + @override + @useResult + $Res call({double horizontal, double vertical}); +} - factory _StacVisualDensity.fromJson(Map json) = - _$StacVisualDensityImpl.fromJson; +/// @nodoc +class __$StacVisualDensityCopyWithImpl<$Res> + implements _$StacVisualDensityCopyWith<$Res> { + __$StacVisualDensityCopyWithImpl(this._self, this._then); - @override - double get horizontal; - @override - double get vertical; + final _StacVisualDensity _self; + final $Res Function(_StacVisualDensity) _then; /// Create a copy of StacVisualDensity /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacVisualDensityImplCopyWith<_$StacVisualDensityImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? horizontal = null, + Object? vertical = null, + }) { + return _then(_StacVisualDensity( + horizontal: null == horizontal + ? _self.horizontal + : horizontal // ignore: cast_nullable_to_non_nullable + as double, + vertical: null == vertical + ? _self.vertical + : vertical // ignore: cast_nullable_to_non_nullable + as double, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.g.dart b/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.g.dart index 163d5275..84801d99 100644 --- a/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.g.dart +++ b/packages/stac/lib/src/parsers/stac_visual_density/stac_visual_density.g.dart @@ -6,15 +6,13 @@ part of 'stac_visual_density.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacVisualDensityImpl _$$StacVisualDensityImplFromJson( - Map json) => - _$StacVisualDensityImpl( +_StacVisualDensity _$StacVisualDensityFromJson(Map json) => + _StacVisualDensity( horizontal: (json['horizontal'] as num).toDouble(), vertical: (json['vertical'] as num).toDouble(), ); -Map _$$StacVisualDensityImplToJson( - _$StacVisualDensityImpl instance) => +Map _$StacVisualDensityToJson(_StacVisualDensity instance) => { 'horizontal': instance.horizontal, 'vertical': instance.vertical, diff --git a/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.dart b/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.dart index d37542a5..7b6939b2 100644 --- a/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.dart +++ b/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.dart @@ -7,7 +7,7 @@ part 'stac_wrap.freezed.dart'; part 'stac_wrap.g.dart'; @freezed -class StacWrap with _$StacWrap { +abstract class StacWrap with _$StacWrap { const factory StacWrap({ @Default(Axis.horizontal) Axis direction, @Default(WrapAlignment.start) WrapAlignment alignment, diff --git a/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.freezed.dart b/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.freezed.dart index 2503d59e..cfa60eb8 100644 --- a/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.freezed.dart +++ b/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,135 +10,82 @@ part of 'stac_wrap.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacWrap _$StacWrapFromJson(Map json) { - return _StacWrap.fromJson(json); -} - /// @nodoc mixin _$StacWrap { - Axis get direction => throw _privateConstructorUsedError; - WrapAlignment get alignment => throw _privateConstructorUsedError; - double get spacing => throw _privateConstructorUsedError; - WrapAlignment get runAlignment => throw _privateConstructorUsedError; - double get runSpacing => throw _privateConstructorUsedError; - WrapCrossAlignment get crossAxisAlignment => - throw _privateConstructorUsedError; - TextDirection? get textDirection => throw _privateConstructorUsedError; - VerticalDirection get verticalDirection => throw _privateConstructorUsedError; - Clip get clipBehavior => throw _privateConstructorUsedError; - List> get children => throw _privateConstructorUsedError; - - /// Serializes this StacWrap to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Axis get direction; + WrapAlignment get alignment; + double get spacing; + WrapAlignment get runAlignment; + double get runSpacing; + WrapCrossAlignment get crossAxisAlignment; + TextDirection? get textDirection; + VerticalDirection get verticalDirection; + Clip get clipBehavior; + List> get children; /// Create a copy of StacWrap /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacWrapCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacWrapCopyWithImpl(this as StacWrap, _$identity); -/// @nodoc -abstract class $StacWrapCopyWith<$Res> { - factory $StacWrapCopyWith(StacWrap value, $Res Function(StacWrap) then) = - _$StacWrapCopyWithImpl<$Res, StacWrap>; - @useResult - $Res call( - {Axis direction, - WrapAlignment alignment, - double spacing, - WrapAlignment runAlignment, - double runSpacing, - WrapCrossAlignment crossAxisAlignment, - TextDirection? textDirection, - VerticalDirection verticalDirection, - Clip clipBehavior, - List> children}); -} + /// Serializes this StacWrap to a JSON map. + Map toJson(); -/// @nodoc -class _$StacWrapCopyWithImpl<$Res, $Val extends StacWrap> - implements $StacWrapCopyWith<$Res> { - _$StacWrapCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacWrap && + (identical(other.direction, direction) || + other.direction == direction) && + (identical(other.alignment, alignment) || + other.alignment == alignment) && + (identical(other.spacing, spacing) || other.spacing == spacing) && + (identical(other.runAlignment, runAlignment) || + other.runAlignment == runAlignment) && + (identical(other.runSpacing, runSpacing) || + other.runSpacing == runSpacing) && + (identical(other.crossAxisAlignment, crossAxisAlignment) || + other.crossAxisAlignment == crossAxisAlignment) && + (identical(other.textDirection, textDirection) || + other.textDirection == textDirection) && + (identical(other.verticalDirection, verticalDirection) || + other.verticalDirection == verticalDirection) && + (identical(other.clipBehavior, clipBehavior) || + other.clipBehavior == clipBehavior) && + const DeepCollectionEquality().equals(other.children, children)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + direction, + alignment, + spacing, + runAlignment, + runSpacing, + crossAxisAlignment, + textDirection, + verticalDirection, + clipBehavior, + const DeepCollectionEquality().hash(children)); - /// Create a copy of StacWrap - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? direction = null, - Object? alignment = null, - Object? spacing = null, - Object? runAlignment = null, - Object? runSpacing = null, - Object? crossAxisAlignment = null, - Object? textDirection = freezed, - Object? verticalDirection = null, - Object? clipBehavior = null, - Object? children = null, - }) { - return _then(_value.copyWith( - direction: null == direction - ? _value.direction - : direction // ignore: cast_nullable_to_non_nullable - as Axis, - alignment: null == alignment - ? _value.alignment - : alignment // ignore: cast_nullable_to_non_nullable - as WrapAlignment, - spacing: null == spacing - ? _value.spacing - : spacing // ignore: cast_nullable_to_non_nullable - as double, - runAlignment: null == runAlignment - ? _value.runAlignment - : runAlignment // ignore: cast_nullable_to_non_nullable - as WrapAlignment, - runSpacing: null == runSpacing - ? _value.runSpacing - : runSpacing // ignore: cast_nullable_to_non_nullable - as double, - crossAxisAlignment: null == crossAxisAlignment - ? _value.crossAxisAlignment - : crossAxisAlignment // ignore: cast_nullable_to_non_nullable - as WrapCrossAlignment, - textDirection: freezed == textDirection - ? _value.textDirection - : textDirection // ignore: cast_nullable_to_non_nullable - as TextDirection?, - verticalDirection: null == verticalDirection - ? _value.verticalDirection - : verticalDirection // ignore: cast_nullable_to_non_nullable - as VerticalDirection, - clipBehavior: null == clipBehavior - ? _value.clipBehavior - : clipBehavior // ignore: cast_nullable_to_non_nullable - as Clip, - children: null == children - ? _value.children - : children // ignore: cast_nullable_to_non_nullable - as List>, - ) as $Val); + String toString() { + return 'StacWrap(direction: $direction, alignment: $alignment, spacing: $spacing, runAlignment: $runAlignment, runSpacing: $runSpacing, crossAxisAlignment: $crossAxisAlignment, textDirection: $textDirection, verticalDirection: $verticalDirection, clipBehavior: $clipBehavior, children: $children)'; } } /// @nodoc -abstract class _$$StacWrapImplCopyWith<$Res> - implements $StacWrapCopyWith<$Res> { - factory _$$StacWrapImplCopyWith( - _$StacWrapImpl value, $Res Function(_$StacWrapImpl) then) = - __$$StacWrapImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacWrapCopyWith<$Res> { + factory $StacWrapCopyWith(StacWrap value, $Res Function(StacWrap) _then) = + _$StacWrapCopyWithImpl; @useResult $Res call( {Axis direction, @@ -153,12 +101,11 @@ abstract class _$$StacWrapImplCopyWith<$Res> } /// @nodoc -class __$$StacWrapImplCopyWithImpl<$Res> - extends _$StacWrapCopyWithImpl<$Res, _$StacWrapImpl> - implements _$$StacWrapImplCopyWith<$Res> { - __$$StacWrapImplCopyWithImpl( - _$StacWrapImpl _value, $Res Function(_$StacWrapImpl) _then) - : super(_value, _then); +class _$StacWrapCopyWithImpl<$Res> implements $StacWrapCopyWith<$Res> { + _$StacWrapCopyWithImpl(this._self, this._then); + + final StacWrap _self; + final $Res Function(StacWrap) _then; /// Create a copy of StacWrap /// with the given fields replaced by the non-null parameter values. @@ -176,45 +123,45 @@ class __$$StacWrapImplCopyWithImpl<$Res> Object? clipBehavior = null, Object? children = null, }) { - return _then(_$StacWrapImpl( + return _then(_self.copyWith( direction: null == direction - ? _value.direction + ? _self.direction : direction // ignore: cast_nullable_to_non_nullable as Axis, alignment: null == alignment - ? _value.alignment + ? _self.alignment : alignment // ignore: cast_nullable_to_non_nullable as WrapAlignment, spacing: null == spacing - ? _value.spacing + ? _self.spacing : spacing // ignore: cast_nullable_to_non_nullable as double, runAlignment: null == runAlignment - ? _value.runAlignment + ? _self.runAlignment : runAlignment // ignore: cast_nullable_to_non_nullable as WrapAlignment, runSpacing: null == runSpacing - ? _value.runSpacing + ? _self.runSpacing : runSpacing // ignore: cast_nullable_to_non_nullable as double, crossAxisAlignment: null == crossAxisAlignment - ? _value.crossAxisAlignment + ? _self.crossAxisAlignment : crossAxisAlignment // ignore: cast_nullable_to_non_nullable as WrapCrossAlignment, textDirection: freezed == textDirection - ? _value.textDirection + ? _self.textDirection : textDirection // ignore: cast_nullable_to_non_nullable as TextDirection?, verticalDirection: null == verticalDirection - ? _value.verticalDirection + ? _self.verticalDirection : verticalDirection // ignore: cast_nullable_to_non_nullable as VerticalDirection, clipBehavior: null == clipBehavior - ? _value.clipBehavior + ? _self.clipBehavior : clipBehavior // ignore: cast_nullable_to_non_nullable as Clip, children: null == children - ? _value._children + ? _self.children : children // ignore: cast_nullable_to_non_nullable as List>, )); @@ -223,8 +170,8 @@ class __$$StacWrapImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacWrapImpl implements _StacWrap { - const _$StacWrapImpl( +class _StacWrap implements StacWrap { + const _StacWrap( {this.direction = Axis.horizontal, this.alignment = WrapAlignment.start, this.spacing = 0.0, @@ -236,9 +183,8 @@ class _$StacWrapImpl implements _StacWrap { this.clipBehavior = Clip.none, final List> children = const []}) : _children = children; - - factory _$StacWrapImpl.fromJson(Map json) => - _$$StacWrapImplFromJson(json); + factory _StacWrap.fromJson(Map json) => + _$StacWrapFromJson(json); @override @JsonKey() @@ -275,16 +221,26 @@ class _$StacWrapImpl implements _StacWrap { return EqualUnmodifiableListView(_children); } + /// Create a copy of StacWrap + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacWrap(direction: $direction, alignment: $alignment, spacing: $spacing, runAlignment: $runAlignment, runSpacing: $runSpacing, crossAxisAlignment: $crossAxisAlignment, textDirection: $textDirection, verticalDirection: $verticalDirection, clipBehavior: $clipBehavior, children: $children)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacWrapCopyWith<_StacWrap> get copyWith => + __$StacWrapCopyWithImpl<_StacWrap>(this, _$identity); + + @override + Map toJson() { + return _$StacWrapToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacWrapImpl && + other is _StacWrap && (identical(other.direction, direction) || other.direction == direction) && (identical(other.alignment, alignment) || @@ -320,63 +276,98 @@ class _$StacWrapImpl implements _StacWrap { clipBehavior, const DeepCollectionEquality().hash(_children)); - /// Create a copy of StacWrap - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$StacWrapImplCopyWith<_$StacWrapImpl> get copyWith => - __$$StacWrapImplCopyWithImpl<_$StacWrapImpl>(this, _$identity); + String toString() { + return 'StacWrap(direction: $direction, alignment: $alignment, spacing: $spacing, runAlignment: $runAlignment, runSpacing: $runSpacing, crossAxisAlignment: $crossAxisAlignment, textDirection: $textDirection, verticalDirection: $verticalDirection, clipBehavior: $clipBehavior, children: $children)'; + } +} +/// @nodoc +abstract mixin class _$StacWrapCopyWith<$Res> + implements $StacWrapCopyWith<$Res> { + factory _$StacWrapCopyWith(_StacWrap value, $Res Function(_StacWrap) _then) = + __$StacWrapCopyWithImpl; @override - Map toJson() { - return _$$StacWrapImplToJson( - this, - ); - } + @useResult + $Res call( + {Axis direction, + WrapAlignment alignment, + double spacing, + WrapAlignment runAlignment, + double runSpacing, + WrapCrossAlignment crossAxisAlignment, + TextDirection? textDirection, + VerticalDirection verticalDirection, + Clip clipBehavior, + List> children}); } -abstract class _StacWrap implements StacWrap { - const factory _StacWrap( - {final Axis direction, - final WrapAlignment alignment, - final double spacing, - final WrapAlignment runAlignment, - final double runSpacing, - final WrapCrossAlignment crossAxisAlignment, - final TextDirection? textDirection, - final VerticalDirection verticalDirection, - final Clip clipBehavior, - final List> children}) = _$StacWrapImpl; +/// @nodoc +class __$StacWrapCopyWithImpl<$Res> implements _$StacWrapCopyWith<$Res> { + __$StacWrapCopyWithImpl(this._self, this._then); - factory _StacWrap.fromJson(Map json) = - _$StacWrapImpl.fromJson; - - @override - Axis get direction; - @override - WrapAlignment get alignment; - @override - double get spacing; - @override - WrapAlignment get runAlignment; - @override - double get runSpacing; - @override - WrapCrossAlignment get crossAxisAlignment; - @override - TextDirection? get textDirection; - @override - VerticalDirection get verticalDirection; - @override - Clip get clipBehavior; - @override - List> get children; + final _StacWrap _self; + final $Res Function(_StacWrap) _then; /// Create a copy of StacWrap /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacWrapImplCopyWith<_$StacWrapImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? direction = null, + Object? alignment = null, + Object? spacing = null, + Object? runAlignment = null, + Object? runSpacing = null, + Object? crossAxisAlignment = null, + Object? textDirection = freezed, + Object? verticalDirection = null, + Object? clipBehavior = null, + Object? children = null, + }) { + return _then(_StacWrap( + direction: null == direction + ? _self.direction + : direction // ignore: cast_nullable_to_non_nullable + as Axis, + alignment: null == alignment + ? _self.alignment + : alignment // ignore: cast_nullable_to_non_nullable + as WrapAlignment, + spacing: null == spacing + ? _self.spacing + : spacing // ignore: cast_nullable_to_non_nullable + as double, + runAlignment: null == runAlignment + ? _self.runAlignment + : runAlignment // ignore: cast_nullable_to_non_nullable + as WrapAlignment, + runSpacing: null == runSpacing + ? _self.runSpacing + : runSpacing // ignore: cast_nullable_to_non_nullable + as double, + crossAxisAlignment: null == crossAxisAlignment + ? _self.crossAxisAlignment + : crossAxisAlignment // ignore: cast_nullable_to_non_nullable + as WrapCrossAlignment, + textDirection: freezed == textDirection + ? _self.textDirection + : textDirection // ignore: cast_nullable_to_non_nullable + as TextDirection?, + verticalDirection: null == verticalDirection + ? _self.verticalDirection + : verticalDirection // ignore: cast_nullable_to_non_nullable + as VerticalDirection, + clipBehavior: null == clipBehavior + ? _self.clipBehavior + : clipBehavior // ignore: cast_nullable_to_non_nullable + as Clip, + children: null == children + ? _self._children + : children // ignore: cast_nullable_to_non_nullable + as List>, + )); + } } + +// dart format on diff --git a/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.g.dart b/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.g.dart index ff4ac24b..b6e8c180 100644 --- a/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.g.dart +++ b/packages/stac/lib/src/parsers/stac_wrap/stac_wrap.g.dart @@ -6,8 +6,7 @@ part of 'stac_wrap.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacWrapImpl _$$StacWrapImplFromJson(Map json) => - _$StacWrapImpl( +_StacWrap _$StacWrapFromJson(Map json) => _StacWrap( direction: $enumDecodeNullable(_$AxisEnumMap, json['direction']) ?? Axis.horizontal, alignment: @@ -34,8 +33,7 @@ _$StacWrapImpl _$$StacWrapImplFromJson(Map json) => const [], ); -Map _$$StacWrapImplToJson(_$StacWrapImpl instance) => - { +Map _$StacWrapToJson(_StacWrap instance) => { 'direction': _$AxisEnumMap[instance.direction]!, 'alignment': _$WrapAlignmentEnumMap[instance.alignment]!, 'spacing': instance.spacing, diff --git a/packages/stac_webview/lib/parsers/stac_webview/stac_webview.dart b/packages/stac_webview/lib/parsers/stac_webview/stac_webview.dart index 5965dc45..b4d34c2a 100644 --- a/packages/stac_webview/lib/parsers/stac_webview/stac_webview.dart +++ b/packages/stac_webview/lib/parsers/stac_webview/stac_webview.dart @@ -9,7 +9,7 @@ part 'stac_webview.g.dart'; /// `StacWebView` is a widget that renders a web page within a flutter application. @freezed -class StacWebView with _$StacWebView { +abstract class StacWebView with _$StacWebView { /// `StacWebView` constructor. const factory StacWebView({ /// The URL to load in the `WebView`. diff --git a/packages/stac_webview/lib/parsers/stac_webview/stac_webview.freezed.dart b/packages/stac_webview/lib/parsers/stac_webview/stac_webview.freezed.dart index ceeef45c..374f5224 100644 --- a/packages/stac_webview/lib/parsers/stac_webview/stac_webview.freezed.dart +++ b/packages/stac_webview/lib/parsers/stac_webview/stac_webview.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,126 +10,81 @@ part of 'stac_webview.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -StacWebView _$StacWebViewFromJson(Map json) { - return _StacWebView.fromJson(json); -} - /// @nodoc mixin _$StacWebView { /// The URL to load in the `WebView`. - String get url => throw _privateConstructorUsedError; + String get url; /// Sets whether JavaScript execution is enabled. /// /// Default value is `JavaScriptMode.unrestricted`. - JavaScriptMode get javaScriptMode => throw _privateConstructorUsedError; + JavaScriptMode get javaScriptMode; /// Background color of the `WebView`. /// /// Default value is `#FFFFFF`. - String get backgroundColor => throw _privateConstructorUsedError; + String get backgroundColor; /// The user agent for the `WebView`. - String? get userAgent => throw _privateConstructorUsedError; + String? get userAgent; /// Sets whether zoom is enabled for the `WebView`. /// /// Default value is `false`. - bool get enableZoom => throw _privateConstructorUsedError; + bool get enableZoom; /// The layout direction for the `WebView`. /// /// Default value is `TextDirection.ltr`. - TextDirection get layoutDirection => throw _privateConstructorUsedError; - - /// Serializes this StacWebView to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + TextDirection get layoutDirection; /// Create a copy of StacWebView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $StacWebViewCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$StacWebViewCopyWithImpl(this as StacWebView, _$identity); -/// @nodoc -abstract class $StacWebViewCopyWith<$Res> { - factory $StacWebViewCopyWith( - StacWebView value, $Res Function(StacWebView) then) = - _$StacWebViewCopyWithImpl<$Res, StacWebView>; - @useResult - $Res call( - {String url, - JavaScriptMode javaScriptMode, - String backgroundColor, - String? userAgent, - bool enableZoom, - TextDirection layoutDirection}); -} + /// Serializes this StacWebView to a JSON map. + Map toJson(); -/// @nodoc -class _$StacWebViewCopyWithImpl<$Res, $Val extends StacWebView> - implements $StacWebViewCopyWith<$Res> { - _$StacWebViewCopyWithImpl(this._value, this._then); + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is StacWebView && + (identical(other.url, url) || other.url == url) && + (identical(other.javaScriptMode, javaScriptMode) || + other.javaScriptMode == javaScriptMode) && + (identical(other.backgroundColor, backgroundColor) || + other.backgroundColor == backgroundColor) && + (identical(other.userAgent, userAgent) || + other.userAgent == userAgent) && + (identical(other.enableZoom, enableZoom) || + other.enableZoom == enableZoom) && + (identical(other.layoutDirection, layoutDirection) || + other.layoutDirection == layoutDirection)); + } - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, url, javaScriptMode, + backgroundColor, userAgent, enableZoom, layoutDirection); - /// Create a copy of StacWebView - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? url = null, - Object? javaScriptMode = null, - Object? backgroundColor = null, - Object? userAgent = freezed, - Object? enableZoom = null, - Object? layoutDirection = null, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - javaScriptMode: null == javaScriptMode - ? _value.javaScriptMode - : javaScriptMode // ignore: cast_nullable_to_non_nullable - as JavaScriptMode, - backgroundColor: null == backgroundColor - ? _value.backgroundColor - : backgroundColor // ignore: cast_nullable_to_non_nullable - as String, - userAgent: freezed == userAgent - ? _value.userAgent - : userAgent // ignore: cast_nullable_to_non_nullable - as String?, - enableZoom: null == enableZoom - ? _value.enableZoom - : enableZoom // ignore: cast_nullable_to_non_nullable - as bool, - layoutDirection: null == layoutDirection - ? _value.layoutDirection - : layoutDirection // ignore: cast_nullable_to_non_nullable - as TextDirection, - ) as $Val); + String toString() { + return 'StacWebView(url: $url, javaScriptMode: $javaScriptMode, backgroundColor: $backgroundColor, userAgent: $userAgent, enableZoom: $enableZoom, layoutDirection: $layoutDirection)'; } } /// @nodoc -abstract class _$$StacWebViewImplCopyWith<$Res> - implements $StacWebViewCopyWith<$Res> { - factory _$$StacWebViewImplCopyWith( - _$StacWebViewImpl value, $Res Function(_$StacWebViewImpl) then) = - __$$StacWebViewImplCopyWithImpl<$Res>; - @override +abstract mixin class $StacWebViewCopyWith<$Res> { + factory $StacWebViewCopyWith( + StacWebView value, $Res Function(StacWebView) _then) = + _$StacWebViewCopyWithImpl; @useResult $Res call( {String url, @@ -140,12 +96,11 @@ abstract class _$$StacWebViewImplCopyWith<$Res> } /// @nodoc -class __$$StacWebViewImplCopyWithImpl<$Res> - extends _$StacWebViewCopyWithImpl<$Res, _$StacWebViewImpl> - implements _$$StacWebViewImplCopyWith<$Res> { - __$$StacWebViewImplCopyWithImpl( - _$StacWebViewImpl _value, $Res Function(_$StacWebViewImpl) _then) - : super(_value, _then); +class _$StacWebViewCopyWithImpl<$Res> implements $StacWebViewCopyWith<$Res> { + _$StacWebViewCopyWithImpl(this._self, this._then); + + final StacWebView _self; + final $Res Function(StacWebView) _then; /// Create a copy of StacWebView /// with the given fields replaced by the non-null parameter values. @@ -159,29 +114,29 @@ class __$$StacWebViewImplCopyWithImpl<$Res> Object? enableZoom = null, Object? layoutDirection = null, }) { - return _then(_$StacWebViewImpl( + return _then(_self.copyWith( url: null == url - ? _value.url + ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, javaScriptMode: null == javaScriptMode - ? _value.javaScriptMode + ? _self.javaScriptMode : javaScriptMode // ignore: cast_nullable_to_non_nullable as JavaScriptMode, backgroundColor: null == backgroundColor - ? _value.backgroundColor + ? _self.backgroundColor : backgroundColor // ignore: cast_nullable_to_non_nullable as String, userAgent: freezed == userAgent - ? _value.userAgent + ? _self.userAgent : userAgent // ignore: cast_nullable_to_non_nullable as String?, enableZoom: null == enableZoom - ? _value.enableZoom + ? _self.enableZoom : enableZoom // ignore: cast_nullable_to_non_nullable as bool, layoutDirection: null == layoutDirection - ? _value.layoutDirection + ? _self.layoutDirection : layoutDirection // ignore: cast_nullable_to_non_nullable as TextDirection, )); @@ -190,17 +145,16 @@ class __$$StacWebViewImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$StacWebViewImpl implements _StacWebView { - const _$StacWebViewImpl( +class _StacWebView implements StacWebView { + const _StacWebView( {required this.url, this.javaScriptMode = JavaScriptMode.unrestricted, this.backgroundColor = "#FFFFFF", this.userAgent, this.enableZoom = false, this.layoutDirection = TextDirection.ltr}); - - factory _$StacWebViewImpl.fromJson(Map json) => - _$$StacWebViewImplFromJson(json); + factory _StacWebView.fromJson(Map json) => + _$StacWebViewFromJson(json); /// The URL to load in the `WebView`. @override @@ -238,16 +192,26 @@ class _$StacWebViewImpl implements _StacWebView { @JsonKey() final TextDirection layoutDirection; + /// Create a copy of StacWebView + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'StacWebView(url: $url, javaScriptMode: $javaScriptMode, backgroundColor: $backgroundColor, userAgent: $userAgent, enableZoom: $enableZoom, layoutDirection: $layoutDirection)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$StacWebViewCopyWith<_StacWebView> get copyWith => + __$StacWebViewCopyWithImpl<_StacWebView>(this, _$identity); + + @override + Map toJson() { + return _$StacWebViewToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StacWebViewImpl && + other is _StacWebView && (identical(other.url, url) || other.url == url) && (identical(other.javaScriptMode, javaScriptMode) || other.javaScriptMode == javaScriptMode) && @@ -266,70 +230,75 @@ class _$StacWebViewImpl implements _StacWebView { int get hashCode => Object.hash(runtimeType, url, javaScriptMode, backgroundColor, userAgent, enableZoom, layoutDirection); - /// Create a copy of StacWebView - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$StacWebViewImplCopyWith<_$StacWebViewImpl> get copyWith => - __$$StacWebViewImplCopyWithImpl<_$StacWebViewImpl>(this, _$identity); - @override - Map toJson() { - return _$$StacWebViewImplToJson( - this, - ); + String toString() { + return 'StacWebView(url: $url, javaScriptMode: $javaScriptMode, backgroundColor: $backgroundColor, userAgent: $userAgent, enableZoom: $enableZoom, layoutDirection: $layoutDirection)'; } } -abstract class _StacWebView implements StacWebView { - const factory _StacWebView( - {required final String url, - final JavaScriptMode javaScriptMode, - final String backgroundColor, - final String? userAgent, - final bool enableZoom, - final TextDirection layoutDirection}) = _$StacWebViewImpl; - - factory _StacWebView.fromJson(Map json) = - _$StacWebViewImpl.fromJson; - - /// The URL to load in the `WebView`. - @override - String get url; - - /// Sets whether JavaScript execution is enabled. - /// - /// Default value is `JavaScriptMode.unrestricted`. - @override - JavaScriptMode get javaScriptMode; - - /// Background color of the `WebView`. - /// - /// Default value is `#FFFFFF`. - @override - String get backgroundColor; - - /// The user agent for the `WebView`. +/// @nodoc +abstract mixin class _$StacWebViewCopyWith<$Res> + implements $StacWebViewCopyWith<$Res> { + factory _$StacWebViewCopyWith( + _StacWebView value, $Res Function(_StacWebView) _then) = + __$StacWebViewCopyWithImpl; @override - String? get userAgent; + @useResult + $Res call( + {String url, + JavaScriptMode javaScriptMode, + String backgroundColor, + String? userAgent, + bool enableZoom, + TextDirection layoutDirection}); +} - /// Sets whether zoom is enabled for the `WebView`. - /// - /// Default value is `false`. - @override - bool get enableZoom; +/// @nodoc +class __$StacWebViewCopyWithImpl<$Res> implements _$StacWebViewCopyWith<$Res> { + __$StacWebViewCopyWithImpl(this._self, this._then); - /// The layout direction for the `WebView`. - /// - /// Default value is `TextDirection.ltr`. - @override - TextDirection get layoutDirection; + final _StacWebView _self; + final $Res Function(_StacWebView) _then; /// Create a copy of StacWebView /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$StacWebViewImplCopyWith<_$StacWebViewImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? url = null, + Object? javaScriptMode = null, + Object? backgroundColor = null, + Object? userAgent = freezed, + Object? enableZoom = null, + Object? layoutDirection = null, + }) { + return _then(_StacWebView( + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + javaScriptMode: null == javaScriptMode + ? _self.javaScriptMode + : javaScriptMode // ignore: cast_nullable_to_non_nullable + as JavaScriptMode, + backgroundColor: null == backgroundColor + ? _self.backgroundColor + : backgroundColor // ignore: cast_nullable_to_non_nullable + as String, + userAgent: freezed == userAgent + ? _self.userAgent + : userAgent // ignore: cast_nullable_to_non_nullable + as String?, + enableZoom: null == enableZoom + ? _self.enableZoom + : enableZoom // ignore: cast_nullable_to_non_nullable + as bool, + layoutDirection: null == layoutDirection + ? _self.layoutDirection + : layoutDirection // ignore: cast_nullable_to_non_nullable + as TextDirection, + )); + } } + +// dart format on diff --git a/packages/stac_webview/lib/parsers/stac_webview/stac_webview.g.dart b/packages/stac_webview/lib/parsers/stac_webview/stac_webview.g.dart index 7484a64e..91a26f18 100644 --- a/packages/stac_webview/lib/parsers/stac_webview/stac_webview.g.dart +++ b/packages/stac_webview/lib/parsers/stac_webview/stac_webview.g.dart @@ -6,8 +6,7 @@ part of 'stac_webview.dart'; // JsonSerializableGenerator // ************************************************************************** -_$StacWebViewImpl _$$StacWebViewImplFromJson(Map json) => - _$StacWebViewImpl( +_StacWebView _$StacWebViewFromJson(Map json) => _StacWebView( url: json['url'] as String, javaScriptMode: $enumDecodeNullable( _$JavaScriptModeEnumMap, json['javaScriptMode']) ?? @@ -20,7 +19,7 @@ _$StacWebViewImpl _$$StacWebViewImplFromJson(Map json) => TextDirection.ltr, ); -Map _$$StacWebViewImplToJson(_$StacWebViewImpl instance) => +Map _$StacWebViewToJson(_StacWebView instance) => { 'url': instance.url, 'javaScriptMode': _$JavaScriptModeEnumMap[instance.javaScriptMode]!, diff --git a/packages/stac_webview/lib/stac_webview.dart b/packages/stac_webview/lib/stac_webview.dart index d29b05aa..0a1d87d7 100644 --- a/packages/stac_webview/lib/stac_webview.dart +++ b/packages/stac_webview/lib/stac_webview.dart @@ -1,3 +1,3 @@ -library stac_webview; +library; export 'package:stac_webview/parsers/stac_webview/stac_webview.dart';