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