ReactiveCustomWidget<T extends Widget> constructor
const
ReactiveCustomWidget<T extends Widget> ({
- Key? key,
- required T builder(
- BuildContext context
- required Stream<
void> stream,
Creates an instance of ReactiveCustomWidget.
The constructor initializes the widget with a builder function and a stream. The builder function is used to create the widget's content, which is updated in response to changes in the stream.
Example:
ReactiveCustomWidget<Text>(
builder: (context) => Text('Reactive Content'),
stream: myUpdateStream,
)
Implementation
const ReactiveCustomWidget({
super.key,
required this.builder,
required this.stream,
});