Open namlxcntt opened 1 year ago
I have the same issue...
Ok here is a fix, try adding a constructor:
class UserResponse with $UserResponse { **const UserResponse.\();**
const factory UserResponse( {@jsonkey(name: 'id') String? id, @jsonkey(name: 'name') String? name, @jsonkey(name: 'phone') String? phone, @jsonkey(name: 'email') String? email, @jsonkey(name: 'birthday') String? birthday, @jsonkey(name: 'avata') String? avatar, @jsonkey(name: 'status') String? status, @jsonkey(name: 'gender') String? gender}) = _UserResponse;
If you do this it should work.
@moloti Oh. Wow .I think it`s work but if handle normal then using freezed does not mean anything
Hi. I`m using Smartstruct create mapper from UserResponse -> UserModel
UserResponse class
UserModel class
Finally class Mapper
Build error ->
Bad state: No element
I'm looking for help, is there anyone who can help me?