ReactiveCustomAppbar constructor

const ReactiveCustomAppbar({
  1. Key? key,
  2. required PreferredSizeWidget builder(
    1. BuildContext context
    ),
  3. required Stream<void> stream,
  4. Size? appbarSize,
})

Creates an instance of ReactiveCustomAppbar.

The constructor initializes the app bar with a builder function and a stream. The app bar size can be customized using the appbarSize parameter, defaulting to the standard toolbar height.

Example:

ReactiveCustomAppbar(
  builder: (context) => AppBar(title: Text('Reactive App Bar')),
  stream: myUpdateStream,
  appbarSize: Size.fromHeight(60.0),
)

Implementation

const ReactiveCustomAppbar({
  super.key,
  required this.builder,
  required this.stream,
  Size? appbarSize,
}) : preferredSize = appbarSize ?? const Size.fromHeight(kToolbarHeight);