globalRef<T> function

DeactNode globalRef<T>({
  1. Object? key,
  2. required String name,
  3. T? initialValue,
  4. required Iterable<DeactNode> children,
})

Creates a GlobalRefProvider.

See also Ref for more details.

The reference can be accessed using ComponentContext.globalRef with the according name and type T.

Implementation

DeactNode globalRef<T>({Object? key, required String name, T? initialValue, required Iterable<DeactNode> children}) {
  return GlobalRefProviderComponent<T>._(key, name, initialValue, children);
}