getValueByKey method

  1. @override
dynamic getValueByKey(
  1. BlocxTestFormField key
)
override

Returns the stored value for key.

Used by the debug-mode consistency check in updateByKeySafe, cross-field validation, and UI display via getFormattedValueIfNotNullOtherwiseValue.

@override
dynamic getValueByKey(LoginField key) => switch (key) {
  LoginField.email    => email,
  LoginField.password => password,
};

Implementation

@override
dynamic getValueByKey(BlocxTestFormField key) => switch (key) {
  BlocxTestFormField.field1 => field1,
  BlocxTestFormField.field2 => field2,
};