FLUTTER ECOSYSTEM

amitkot/appbar_elevation

Ein Flutter-Widget für eine AppBar, die anfänglich mit dem Body ausgerichtet ist und beim Scrollen hervortritt

Projektcover von appbar_elevation
Stars
9
Forks
3
Letzter Push (UTC)
15.10.2021
Projektstatus
Aktiv
Amit Kotlovski GitHub avatar
GITHUB User

Amit Kotlovski ↗

SprachenDartSwiftKotlinObjective-C

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 2 Einträge
  • flutter{"sdk":"flutter"}
  • flutter_testEntwicklung{"sdk":"flutter"}

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

Projekt-README ein-/ausklappen

appbar_elevation

pub package

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

https://raw.githubusercontent.com/amitkot/appbar_elevation/HEAD/appbar_elevation.gif

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