AppBar.builder constructor

AppBar.builder({
  1. Key? key,
  2. required AppBarBehavior behavior,
  3. required AppBarBuilder builder,
  4. AppBarAlignment alignment = AppBarAlignment.scroll,
  5. AppBarAlignment bouncingAlignment = AppBarAlignment.scroll,
  6. 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),
        );
      });