provide method

BloomNode provide(
  1. T value,
  2. BloomNode child
)

Provides value to all children in the child subtree.

Wraps child in a ContextProviderNode that scopes value in the execution Zone for both SSR rendering and DOM mounting.

final userContext = createContext<String>('Guest');

BloomNode profileSection() => userContext.provide(
  'Alice',
  Div(children: [Text('Profile content')]),
);

Implementation

BloomNode provide(T value, BloomNode child) =>
    ContextProviderNode<T>(this, value, child);