// GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: non_constant_identifier_names, require_trailing_commas part of 'question.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** _QuestionsResponse _$QuestionsResponseFromJson(Map json) => _QuestionsResponse( items: (json['items'] as List) .map((e) => Question.fromJson(e as Map)) .toList(), total: (json['total'] as num).toInt(), ); Map _$QuestionsResponseToJson(_QuestionsResponse instance) => { 'items': instance.items, 'total': instance.total, }; _Question _$QuestionFromJson(Map json) => _Question( tags: (json['tags'] as List).map((e) => e as String).toList(), viewCount: (json['view_count'] as num).toInt(), score: (json['score'] as num).toInt(), bountyAmount: (json['bounty_amount'] as num?)?.toInt(), acceptedAnswerId: (json['accepted_answer_id'] as num?)?.toInt(), owner: User.fromJson((json['owner'] as Map).map( (k, e) => MapEntry(k, e as Object), )), answerCount: (json['answer_count'] as num).toInt(), creationDate: const TimestampParser() .fromJson((json['creation_date'] as num).toInt()), questionId: (json['question_id'] as num).toInt(), link: json['link'] as String, title: json['title'] as String, body: json['body'] as String, ); Map _$QuestionToJson(_Question instance) => { 'tags': instance.tags, 'view_count': instance.viewCount, 'score': instance.score, 'bounty_amount': instance.bountyAmount, 'accepted_answer_id': instance.acceptedAnswerId, 'owner': instance.owner, 'answer_count': instance.answerCount, 'creation_date': const TimestampParser().toJson(instance.creationDate), 'question_id': instance.questionId, 'link': instance.link, 'title': instance.title, 'body': instance.body, }; // ************************************************************************** // RiverpodGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint, type=warning @ProviderFor(questionTheme) const questionThemeProvider = QuestionThemeProvider._(); final class QuestionThemeProvider extends $FunctionalProvider with $Provider { const QuestionThemeProvider._() : super( from: null, argument: null, retry: null, name: r'questionThemeProvider', isAutoDispose: true, dependencies: null, $allTransitiveDependencies: null, ); @override String debugGetCreateSourceHash() => _$questionThemeHash(); @$internal @override $ProviderElement $createElement($ProviderPointer pointer) => $ProviderElement(pointer); @override QuestionTheme create(Ref ref) { return questionTheme(ref); } /// {@macro riverpod.override_with_value} Override overrideWithValue(QuestionTheme value) { return $ProviderOverride( origin: this, providerOverride: $SyncValueProvider(value), ); } } String _$questionThemeHash() => r'c66658995d65c988e6db012ab7f9f754eaa0e5ce'; /// A scoped provider, exposing the current question used by [QuestionItem]. /// /// This is used as a performance optimization to pass a [Question] to /// [QuestionItem], while still instantiating [QuestionItem] using the `const` /// keyword. /// /// This allows [QuestionItem] to rebuild less often. /// By doing so, even when using [QuestionItem] in a [ListView], even if new /// questions are obtained, previously rendered [QuestionItem]s won't rebuild. /// /// This is an optional step. Since scoping is a fairly advanced mechanism, /// it's entirely fine to simply pass the [Question] to [QuestionItem] directly. @ProviderFor(currentQuestion) const currentQuestionProvider = CurrentQuestionProvider._(); /// A scoped provider, exposing the current question used by [QuestionItem]. /// /// This is used as a performance optimization to pass a [Question] to /// [QuestionItem], while still instantiating [QuestionItem] using the `const` /// keyword. /// /// This allows [QuestionItem] to rebuild less often. /// By doing so, even when using [QuestionItem] in a [ListView], even if new /// questions are obtained, previously rendered [QuestionItem]s won't rebuild. /// /// This is an optional step. Since scoping is a fairly advanced mechanism, /// it's entirely fine to simply pass the [Question] to [QuestionItem] directly. final class CurrentQuestionProvider extends $FunctionalProvider< AsyncValue, AsyncValue, AsyncValue> with $Provider> { /// A scoped provider, exposing the current question used by [QuestionItem]. /// /// This is used as a performance optimization to pass a [Question] to /// [QuestionItem], while still instantiating [QuestionItem] using the `const` /// keyword. /// /// This allows [QuestionItem] to rebuild less often. /// By doing so, even when using [QuestionItem] in a [ListView], even if new /// questions are obtained, previously rendered [QuestionItem]s won't rebuild. /// /// This is an optional step. Since scoping is a fairly advanced mechanism, /// it's entirely fine to simply pass the [Question] to [QuestionItem] directly. const CurrentQuestionProvider._() : super( from: null, argument: null, retry: null, name: r'currentQuestionProvider', isAutoDispose: true, dependencies: const [], $allTransitiveDependencies: const [], ); @override String debugGetCreateSourceHash() => _$currentQuestionHash(); @$internal @override $ProviderElement> $createElement( $ProviderPointer pointer) => $ProviderElement(pointer); @override AsyncValue create(Ref ref) { return currentQuestion(ref); } /// {@macro riverpod.override_with_value} Override overrideWithValue(AsyncValue value) { return $ProviderOverride( origin: this, providerOverride: $SyncValueProvider>(value), ); } } String _$currentQuestionHash() => r'e9359841a5b980cd7b8c79a0b56cb98878190861';