// GENERATED CODE - DO NOT MODIFY BY HAND part of 'simple_test_state.dart'; // ************************************************************************** // CopyWithGenerator // ************************************************************************** abstract class _$SimpleTestStateCWProxy { SimpleTestState seed(int seed); SimpleTestState answer(String answer); SimpleTestState isCorrect(bool isCorrect); SimpleTestState isAnswered(bool isAnswered); SimpleTestState testType(TestQuestionType testType); /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `SimpleTestState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// SimpleTestState(...).copyWith(id: 12, name: "My name") /// ```` SimpleTestState call({ int? seed, String? answer, bool? isCorrect, bool? isAnswered, TestQuestionType? testType, }); } /// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfSimpleTestState.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfSimpleTestState.copyWith.fieldName(...)` class _$SimpleTestStateCWProxyImpl implements _$SimpleTestStateCWProxy { const _$SimpleTestStateCWProxyImpl(this._value); final SimpleTestState _value; @override SimpleTestState seed(int seed) => this(seed: seed); @override SimpleTestState answer(String answer) => this(answer: answer); @override SimpleTestState isCorrect(bool isCorrect) => this(isCorrect: isCorrect); @override SimpleTestState isAnswered(bool isAnswered) => this(isAnswered: isAnswered); @override SimpleTestState testType(TestQuestionType testType) => this(testType: testType); @override /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `SimpleTestState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// SimpleTestState(...).copyWith(id: 12, name: "My name") /// ```` SimpleTestState call({ Object? seed = const $CopyWithPlaceholder(), Object? answer = const $CopyWithPlaceholder(), Object? isCorrect = const $CopyWithPlaceholder(), Object? isAnswered = const $CopyWithPlaceholder(), Object? testType = const $CopyWithPlaceholder(), }) { return SimpleTestState( seed: seed == const $CopyWithPlaceholder() || seed == null ? _value.seed // ignore: cast_nullable_to_non_nullable : seed as int, answer: answer == const $CopyWithPlaceholder() || answer == null ? _value.answer // ignore: cast_nullable_to_non_nullable : answer as String, isCorrect: isCorrect == const $CopyWithPlaceholder() || isCorrect == null ? _value.isCorrect // ignore: cast_nullable_to_non_nullable : isCorrect as bool, isAnswered: isAnswered == const $CopyWithPlaceholder() || isAnswered == null ? _value.isAnswered // ignore: cast_nullable_to_non_nullable : isAnswered as bool, testType: testType == const $CopyWithPlaceholder() || testType == null ? _value.testType // ignore: cast_nullable_to_non_nullable : testType as TestQuestionType, ); } } extension $SimpleTestStateCopyWith on SimpleTestState { /// Returns a callable class that can be used as follows: `instanceOfSimpleTestState.copyWith(...)` or like so:`instanceOfSimpleTestState.copyWith.fieldName(...)`. // ignore: library_private_types_in_public_api _$SimpleTestStateCWProxy get copyWith => _$SimpleTestStateCWProxyImpl(this); } // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** SimpleTestState _$SimpleTestStateFromJson(Map json) => SimpleTestState( seed: (json['seed'] as num).toInt(), answer: json['answer'] as String? ?? '', isCorrect: json['isCorrect'] as bool? ?? false, isAnswered: json['isAnswered'] as bool? ?? false, testType: $enumDecodeNullable(_$TestQuestionTypeEnumMap, json['testType']) ?? TestQuestionType.simple, ); Map _$SimpleTestStateToJson(SimpleTestState instance) => { 'testType': _$TestQuestionTypeEnumMap[instance.testType]!, 'answer': instance.answer, 'isCorrect': instance.isCorrect, 'isAnswered': instance.isAnswered, 'seed': instance.seed, }; const _$TestQuestionTypeEnumMap = { TestQuestionType.simple: 'simple', TestQuestionType.input_buttons: 'input_buttons', TestQuestionType.matrix: 'matrix', TestQuestionType.match: 'match', TestQuestionType.undefined: 'undefined', };