AppBar.builder constructor
AppBar.builder({
- Key? key,
- required AppBarBehavior behavior,
- required AppBarBuilder builder,
- AppBarAlignment alignment = AppBarAlignment.scroll,
- AppBarAlignment bouncingAlignment = AppBarAlignment.scroll,
- double initialOffset = 0,
Implementation
AppBar.builder({
super.key,
required this.behavior,
required AppBarBuilder builder,
this.alignment = AppBarAlignment.scroll,
this.bouncingAlignment = AppBarAlignment.scroll,
this.initialOffset = 0,
}) : builder = ((_, position) {
/// When position is updated, the widget state is also updated.
return ListenableBuilder(
listenable: position,
builder: (context, _) => builder(context, position),
);
});