ReactiveCustomAppbar constructor
const
ReactiveCustomAppbar({
- Key? key,
- required PreferredSizeWidget builder(
- BuildContext context
- required Stream<
void> stream, - 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);