getModelValue method

ValueNotifier<T> getModelValue(
  1. Atom<T> atomOptions
)

Implementation

ValueNotifier<T> getModelValue(Atom<T> atomOptions) {
  if (states.containsKey(atomOptions.key)) {
    return states[atomOptions.key];
  }

  final modelValue = atomOptions.defaultValueNotifier;
  states[atomOptions.key] = modelValue;

  return modelValue;
}