mentioned in the previous question, but did not get your reply
@immutable
class UserState extends Equatable {
final String nickname;
final String address;
const UserState({@required this.nickname,@required this.address});
@override
List<Object> get props => [nickname,address];
@override
String toString() => 'UserState { nickname: $nickname ,address: $address }';
}
only updating the address does not affect nickname
_updateAddress(UpdateAddress event) {
return UserState(address: event.address);
}
whether it can only be used
return UserState(address: event.address, nickname: this.state.nickname);
Hi, @lihaotian0607
maybe you can use some extensions/snippets generate copyWith function
Hi, @lihaotian0607
maybe you can use some extensions/snippets generate copyWith function
thanks!! Do you have good suggestions?
Hi, @lihaotian0607
if you use Android studio, it have generate function, default hot key is command + N?
Hi, @lihaotian0607
if you use Android studio, it have generate function, default hot key is command + N?
ok, thank you very much for your answer!
its ok, if the problem is solved, then @felangel
will close this issue.
Most helpful comment
ok, thank you very much for your answer!