Flutter的FlexibleSpaceBar
Flutter的FlexibleSpaceBar
- FlexibleSpaceBar
// FlexibleSpaceBar
class FlexibleSpaceBarDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return NestedScrollView(
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
// 展開高度
expandedHeight: 250.0,
// 是否隨著滑動隱藏標題
floating: true,
// 是否固定在頂部
pinned: true,
// 可摺疊的應用欄目
flexibleSpace: FlexibleSpaceBar(
centerTitle: true,
title: Text('可摺疊的標題', style: TextStyle(color: Colors.white),),
background: Image.network('https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2288748976,1582581638&fm=26&gp=0.jpg', fit: BoxFit.cover,),
),
)
];
},
body: Center(
child: Text('向上提拉,檢視效果'),
)
);
}
}
- 圖片展示
相關文章
- [Flutter翻譯]Flutter中的剪下Flutter
- flutter 入門 - flutter的誕生Flutter
- 【老孟Flutter】Flutter 2的新功能Flutter
- [Flutter翻譯]Flutter without FlutterFlutter
- Flutter基礎:Flutter中的div——ContainerFlutterAI
- Flutter(八)之Flutter的基礎WidgetFlutter
- Flutter(十)之Flutter的滾動WidgetFlutter
- Flutter框架分析(四)-- Flutter框架的執行Flutter框架
- [Flutter必備]-Flutter中的網路訪問Flutter
- Flutter 學習 02 - macOS 下 flutter 的安裝FlutterMac
- flutter系列之:flutter中listview的高階用法FlutterView
- flutter系列之:flutter中的變形金剛TransformFlutterORM
- Flutter的apk打包FlutterAPK
- Flutter動畫的使用Flutter動畫
- Flutter 中的動畫Flutter動畫
- Flutter中的路由Flutter路由
- Flutter 圖表繪製解密(charts_flutter 的使用)Flutter解密
- Flutter深入淺出--(二)Flutter 的發展歷程Flutter
- flutter開發系列(搭建基礎的flutter環境)Flutter
- [Flutter翻譯]每個專案都有獨立的Flutter版本 - Flutter版本管理器Flutter
- [Flutter翻譯]釋出您的Flutter桌面應用程式Flutter
- Flutter Interact 的 Flutter 1.12 大進化和回顧Flutter
- Flutter基礎(十三)Flutter與Android的相互通訊FlutterAndroid
- Flutter 基礎(十三)Flutter 與 Android 的相互通訊FlutterAndroid
- Flutter實戰(三)檢驗Flutter的跨平臺能力Flutter
- Flutter中的Key(一)Flutter
- Flutter中的Key(二)Flutter
- Flutter的效能優化Flutter優化
- flutter的代理問題Flutter
- [譯]Flutter - Dart的MixinFlutterDart
- Flutter 是如何渲染的?Flutter
- ⚠️Flutter的 狀態管理⚠️Flutter
- Flutter Tools的除錯Flutter除錯
- Flutter——OKToast的使用FlutterAST
- Flutter中的WidgetFlutter
- Flutter的一生Flutter
- Flutter 的生命週期Flutter
- Flutter 的路由導航Flutter路由