appbar_elevation 0.1.0 copy "appbar_elevation: ^0.1.0" to clipboard
appbar_elevation: ^0.1.0 copied to clipboard

A Flutter Widget for an AppBar that is initially flush with the body and elevated when scrolled.

appbar_elevation #

pub package

A Flutter Widget for an AppBar that is initially flush with the body and elevated when scrolled.

Usage #

Use the ScrollActivatedAppBarElevation widget to wrap a Scaffold that contains a Scrollable view (e.g. ListView, CustomScrollView). The widget uses a NotificationListener to detect the scroll position and provides an appBarElevation value to be used.

Example #

@override
Widget build(BuildContext context) {
  return ScrollActivatedAppBarElevation(
    builder: (BuildContext context, double appBarElevation) {
      return Scaffold(
        appBar: AppBar(
          elevation: appBarElevation,
        ),
        body: ListView(
          children: [
            // ...
          ],
        ),
      );
    },
  );
}

See example for full code.

License #

BSD

18
likes
40
pub points
0%
popularity

Publisher

verified publisheramitkot.com

A Flutter Widget for an AppBar that is initially flush with the body and elevated when scrolled.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on appbar_elevation