sticky_footer_scrollview
一個可滾動的 Flutter 小部件,其黏性頁腳會固定在螢幕底部或滾動內容的結尾。
一個可滾動的 Flutter 小部件,其黏性頁腳會固定在螢幕底部或滾動內容的結尾。
以下為英文專案原文快照,最新內容請造訪 GitHub。
A Flutter Widget that is scrollable with a sticky footer either stick to the bottom of screen of the end of the scroll body.
This package using SingleScrollView and CustomMultiChildLayout to acheive a scrollable widget with a sticky footer. This allow a dynamic height of child widgets in scroll body.
At the same time, because of the SingleScrollView with Column approach, this is not recommended to use with lots of child widgets for performance reason. You may simiply test with the example to see whether it is fit for your case.
This shows Widget's full customizations:
StickyFooterScrollView({
this.footer,
@required this.itemBuilder,
@required this.itemCount,
this.scrollController,
})
when scrollbody is shorter than the avialble widget height
when scrollbody is longer than the avialble widget height
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: StickyFooterScrollView(
itemCount: 50,
itemBuilder: (context, index) {
return Card(
child: ListTile(
title: Text('content $index'),
),
color: Colors.pinkAccent,
);
},
footer: AppBar(
title: Text('i stick at bottom'),
),
),
),
);
}
MIT
依賴清單 2 項
{"sdk":"flutter"}{"sdk":"flutter"}先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗