Issue I would like to get todos from API, set them to state and show them on screen. On initState method I am starting request. After recieving it in my BLoC, I set it in state. But todos don’t visible
Continue readingTag: flutter-freezed
Deserialising using Freezed with Generic Type Class
Issue Feature for deserializing Generic Classes was introduced to freeze a few months back. I am trying to follow the documentation, but I am facing a compile time error: The argument type ‘NameOfClass Function(Map<String, dynamic>)’ can’t be assigned to the
Continue readingDepending on a non-published plugin with freezed generated files
Issue In my project, I am using the flutter_google_places_sdk but I needed to modify certain things in its interface, so I forked the repository in Github, and I added a dependency override in my pubspec.yaml to point to my own
Continue readingHow to fetch two json Value via one field in freezed?
Issue Suppose I have a model class in freezed, @freezed abstract class Dto implements _$Dto { const factory Dto({ String? name, String? url, }) = _Dto; factory Dto.fromJson(Map<String, dynamic> json) => _$DtoFromJson(json); } Now, the json responses are, 1. {
Continue readingFlutter freezed – what is @JsonValue for
Issue I see you can do, for example factory User({ @JsonKey(name: ‘home_address’) String? homeAddress, @JsonKey(name: ‘first_name’) String firstName, }) and the keys home_address and first_name from a json will be the properties homeAddress and firstName respectively. But what is @JsonValue
Continue readingDoes the "equal" property in flutter freezed replace the need of Equatable?
Issue The documentation: Whether to generate a ==/hashcode or not If null, picks up the default values from the project’s build.yaml. If that value is null too, generates a ==/hashcode only if the class does not have a custom ==
Continue readingFreezed: Could not resolve annotation for `int get hashCode`: @JSONKey(ignore: true)
Issue When I try to generate freezed files on this classes, it gives me this error. I tried to rewrite hashCode getter on MappedLesson class but it didn’t change anything. line 1, column 4214 of package:derstakip_2/models/lat_models.freezed.dart: Could not resolve annotation
Continue readingHow to conect entity(domain layer) and model(data layer) using BloC+Freezed
Issue I’m trying to learn how to follow a clean feature-first architecture using Bloc and Freezed. From what I’ve seen, I should have inside the Domain layer, an entity class declaring only its properties for the presentation layer to use,
Continue readingRiverpod trigger rebuild when update state with freezed copywith even if nothing changed
Issue I thought Riverpod will only trigger rebuild if the state value is different but turn out it rebuild every time when state is set although the value is the same. Is that true? The case is as below @Freezed(genericArgumentFactories:
Continue readingMerge different states with Riverpod and Freezed
Issue I have a page that needs two different API calls. I am applying the clean architecture to write the code and Riverpod as State Management. Then I am using the Freezed package to map the different states. How can
Continue reading