updateByKey abstract method

F updateByKey(
  1. E key,
  2. dynamic value
)

Updates the field identified by key and returns a new instance.

Implement using an immutable update pattern such as copyWith:

@override
LoginForm updateByKey(LoginField key, dynamic value) => switch (key) {
  LoginField.email    => copyWith(email: value),
  LoginField.password => copyWith(password: value),
};

Implementation

F updateByKey(E key, dynamic value);