Questions tagged [freezed]
148 questions
0
votes
1 answer
BLoC with freezed - yield does not emit state change to widget
With a state change observer I can see that my bloc changes its states to LoadInProgress and back to PmLoadSuccess. However, the widget is not called with the change to LoadInProgress. I have a breakpoint in the BlocBuilder, however, the code stops…

w461
- 2,168
- 4
- 14
- 40
0
votes
0 answers
When I generate the archives using Freezed package I received this message: [SEVERE] freezed:freezed on [my archive directory]: Stack Overflow
I'm using different packages what uses the freezed generator, including modular with modular_codegen, when I generate the file's running the archives generator command, I receive this message
[SEVERE] freezed:freezed on [my archives…

Alencar Moreira
- 1
- 1
0
votes
1 answer
dart freezed @Default doesn't apply defaultValue on JsonKey
I have a class called Player (player.dart) that has a field called isCaptain:
@JsonKey(name: "is_captain") @Default(false) bool isCaptain,
The line above produces the following in player.g.dart:
isCaptain: json['is_captain'] as bool,
When I create…

Rohan Taneja
- 9,687
- 3
- 36
- 48
0
votes
1 answer
dart freezed convert to another data type
@JsonKey(name: "favourite") @Default("") String favourite
In my json favourite is rather Y and N , which mean true or false, possible to convert directly in freezed? So I can directly use boolean, instead of String

FeelRightz
- 2,777
- 2
- 38
- 73
0
votes
1 answer
The constructor being called isn't a const constructor. Try removing 'const' from the constructor invocation. Flutter How to solve?
I'm getting this error when I tried to build Object using Freezzed Package in Flutter
If I tried to use some other datatypes instead of DateTime I'm not getting any errors
How to solve this? Thank you
pubspec.yaml
build_runner: ^2.0.4
freezed:…

Agnel Selvan
- 109
- 2
- 8
0
votes
1 answer
Flutter Freezed Expected to find ')'
After upgrading my Flutter, Freezed appears to generate files that have errors in them for my Bloc/Cubit files.
Pubspec.yaml has all the latest versions for the packages.
part of 'test_cubit.dart';
@freezed
abstract class TestState with _$TestState…

Pieter
- 2,188
- 20
- 27
0
votes
1 answer
Flutter freezed data conflict with model data
I'm new to Flutter and following various guides to learn and, actually, after trying doing something simple by myself I found a weird issue and I don't know how to get rid of it...
These are my dependencies:
dependencies:
flutter:
sdk:…

Ayeye Brazo
- 3,316
- 7
- 34
- 67
0
votes
0 answers
OnPropertyChange causes Deadlock on Xamarin.Forms Android
in my Xamarin.Forms application I have an ObservableCollection to present different Views in a ContentPresenter. It is kind of interview when the user pushes a new view with new controls by pressing a button to answer some questions.
That's my…

Marco
- 31
- 4
0
votes
2 answers
Domain Driven Design: dart package freezed gives "Failed Assertion boolean expression must not be null"
I am trying to build email model with authentication using this tutorial https://www.youtube.com/watch?v=fdUwW0GgcS8&list=PLB6lc7nQ1n4iS5p-IezFFgqP6YvAJy84U&index=2
The code is:
import 'package:flutter/cupertino.dart';
import…

learyjk
- 599
- 1
- 5
- 14
0
votes
2 answers
json = null in fromJSON method in custom JsonConverter " freezed class with multiple constructors "
I have this class
@freezed
abstract class CartEntity with _$CartEntity {
const factory CartEntity.empty(String status, String message) = _Empty;
const factory CartEntity.notEmpty(int x) = _NotEmpty;
factory CartEntity.fromJson(Map

Mohamed Gaber
- 1,625
- 1
- 10
- 22
0
votes
1 answer
Freezed - the getter 'x' isn't defined for x
I'm trying to get started with Freezed, and I define this class below, and the rest of my app doesn't seem to pick up that it has an id property:
import 'package:firebase_auth/firebase_auth.dart';
import…

BeniaminoBaggins
- 11,202
- 41
- 152
- 287
-1
votes
1 answer
How to use freezed with floor database in flutter?
Freezed uses const factory contructor that doesn't work along with floor library.

Mahmud Basunia
- 57
- 9
-3
votes
0 answers
Cubit, Bloc, Flutter, Freezed
How can I improve this code semantics, I don't like doing this concatenation.
I'm having a little difficulty with the semantics of the code for dart, map [ ] these things.
.…

geovane
- 1
- 1