read method

  1. @override
StateT read(
  1. Node node
)
override

Obtains the result of this provider expression without adding listener.

Implementation

@override
StateT read(Node node) {
  final element = node.readProviderElement(this);

  element.flush();

  // In case `read` was called on a provider that has no listener
  element.mayNeedDispose();

  return element.requireState;
}