FLUTTER ECOSYSTEM

amitkot/appbar_elevation

Um widget Flutter para um AppBar que está inicialmente alinhado com o corpo e elevado ao rolar

Capa do projeto appbar_elevation
Stars
9
Forks
3
Último push (UTC)
15 de out. de 2021
Status do projeto
Ativo
Amit Kotlovski GitHub avatar
GITHUB User

Amit Kotlovski ↗

LinguagensDartSwiftKotlinObjective-C

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 2 itens
  • flutter{"sdk":"flutter"}
  • flutter_testDesenvolvimento{"sdk":"flutter"}

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher README

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