// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of 'create_food_units_state.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
    'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');

/// @nodoc
mixin _$CreateFoodUnitsState {
  bool get isLoading => throw _privateConstructorUsedError;
  List<Unit> get units => throw _privateConstructorUsedError;
  int get activeIndex => throw _privateConstructorUsedError;
  TextEditingController? get unitController =>
      throw _privateConstructorUsedError;

  @JsonKey(ignore: true)
  $CreateFoodUnitsStateCopyWith<CreateFoodUnitsState> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $CreateFoodUnitsStateCopyWith<$Res> {
  factory $CreateFoodUnitsStateCopyWith(CreateFoodUnitsState value,
          $Res Function(CreateFoodUnitsState) then) =
      _$CreateFoodUnitsStateCopyWithImpl<$Res, CreateFoodUnitsState>;
  @useResult
  $Res call(
      {bool isLoading,
      List<Unit> units,
      int activeIndex,
      TextEditingController? unitController});
}

/// @nodoc
class _$CreateFoodUnitsStateCopyWithImpl<$Res,
        $Val extends CreateFoodUnitsState>
    implements $CreateFoodUnitsStateCopyWith<$Res> {
  _$CreateFoodUnitsStateCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? isLoading = null,
    Object? units = null,
    Object? activeIndex = null,
    Object? unitController = freezed,
  }) {
    return _then(_value.copyWith(
      isLoading: null == isLoading
          ? _value.isLoading
          : isLoading // ignore: cast_nullable_to_non_nullable
              as bool,
      units: null == units
          ? _value.units
          : units // ignore: cast_nullable_to_non_nullable
              as List<Unit>,
      activeIndex: null == activeIndex
          ? _value.activeIndex
          : activeIndex // ignore: cast_nullable_to_non_nullable
              as int,
      unitController: freezed == unitController
          ? _value.unitController
          : unitController // ignore: cast_nullable_to_non_nullable
              as TextEditingController?,
    ) as $Val);
  }
}

/// @nodoc
abstract class _$$_CreateFoodUnitsStateCopyWith<$Res>
    implements $CreateFoodUnitsStateCopyWith<$Res> {
  factory _$$_CreateFoodUnitsStateCopyWith(_$_CreateFoodUnitsState value,
          $Res Function(_$_CreateFoodUnitsState) then) =
      __$$_CreateFoodUnitsStateCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call(
      {bool isLoading,
      List<Unit> units,
      int activeIndex,
      TextEditingController? unitController});
}

/// @nodoc
class __$$_CreateFoodUnitsStateCopyWithImpl<$Res>
    extends _$CreateFoodUnitsStateCopyWithImpl<$Res, _$_CreateFoodUnitsState>
    implements _$$_CreateFoodUnitsStateCopyWith<$Res> {
  __$$_CreateFoodUnitsStateCopyWithImpl(_$_CreateFoodUnitsState _value,
      $Res Function(_$_CreateFoodUnitsState) _then)
      : super(_value, _then);

  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? isLoading = null,
    Object? units = null,
    Object? activeIndex = null,
    Object? unitController = freezed,
  }) {
    return _then(_$_CreateFoodUnitsState(
      isLoading: null == isLoading
          ? _value.isLoading
          : isLoading // ignore: cast_nullable_to_non_nullable
              as bool,
      units: null == units
          ? _value._units
          : units // ignore: cast_nullable_to_non_nullable
              as List<Unit>,
      activeIndex: null == activeIndex
          ? _value.activeIndex
          : activeIndex // ignore: cast_nullable_to_non_nullable
              as int,
      unitController: freezed == unitController
          ? _value.unitController
          : unitController // ignore: cast_nullable_to_non_nullable
              as TextEditingController?,
    ));
  }
}

/// @nodoc

class _$_CreateFoodUnitsState extends _CreateFoodUnitsState {
  const _$_CreateFoodUnitsState(
      {this.isLoading = false,
      final List<Unit> units = const [],
      this.activeIndex = 0,
      this.unitController})
      : _units = units,
        super._();

  @override
  @JsonKey()
  final bool isLoading;
  final List<Unit> _units;
  @override
  @JsonKey()
  List<Unit> get units {
    if (_units is EqualUnmodifiableListView) return _units;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_units);
  }

  @override
  @JsonKey()
  final int activeIndex;
  @override
  final TextEditingController? unitController;

  @override
  String toString() {
    return 'CreateFoodUnitsState(isLoading: $isLoading, units: $units, activeIndex: $activeIndex, unitController: $unitController)';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$_CreateFoodUnitsState &&
            (identical(other.isLoading, isLoading) ||
                other.isLoading == isLoading) &&
            const DeepCollectionEquality().equals(other._units, _units) &&
            (identical(other.activeIndex, activeIndex) ||
                other.activeIndex == activeIndex) &&
            (identical(other.unitController, unitController) ||
                other.unitController == unitController));
  }

  @override
  int get hashCode => Object.hash(runtimeType, isLoading,
      const DeepCollectionEquality().hash(_units), activeIndex, unitController);

  @JsonKey(ignore: true)
  @override
  @pragma('vm:prefer-inline')
  _$$_CreateFoodUnitsStateCopyWith<_$_CreateFoodUnitsState> get copyWith =>
      __$$_CreateFoodUnitsStateCopyWithImpl<_$_CreateFoodUnitsState>(
          this, _$identity);
}

abstract class _CreateFoodUnitsState extends CreateFoodUnitsState {
  const factory _CreateFoodUnitsState(
      {final bool isLoading,
      final List<Unit> units,
      final int activeIndex,
      final TextEditingController? unitController}) = _$_CreateFoodUnitsState;
  const _CreateFoodUnitsState._() : super._();

  @override
  bool get isLoading;
  @override
  List<Unit> get units;
  @override
  int get activeIndex;
  @override
  TextEditingController? get unitController;
  @override
  @JsonKey(ignore: true)
  _$$_CreateFoodUnitsStateCopyWith<_$_CreateFoodUnitsState> get copyWith =>
      throw _privateConstructorUsedError;
}
