v0.1.0
appbar_elevation
一个 Flutter 小部件,用于初始时与主体对齐的 AppBar,滚动时会升高。
17喜欢 43近 30 天下载40Pub 分数
平台暂无数据
一个 Flutter 小部件,用于 AppBar,初始时与主体对齐,滚动时升高
{"sdk":"flutter"}{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
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
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.
@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.
BSD