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的基礎WidgetFlutter
- Flutter(十)之Flutter的滾動WidgetFlutter
- Flutter基礎:Flutter中的div——ContainerFlutterAI
- 【老孟Flutter】Flutter 2的新功能Flutter
- Flutter框架分析(四)-- Flutter框架的執行Flutter框架
- [Flutter翻譯]Flutter without FlutterFlutter
- flutter系列之:flutter中listview的高階用法FlutterView
- [Flutter必備]-Flutter中的網路訪問Flutter
- Flutter 學習 02 - macOS 下 flutter 的安裝FlutterMac
- Flutter中的WidgetFlutter
- Flutter——OKToast的使用FlutterAST
- flutter MaterialApp 的ThemeDataFlutterAPP
- Flutter的apk打包FlutterAPK
- Flutter中的LoggerFlutter
- flutter Container的decorationFlutterAI
- Flutter中的BuildContextFlutterUIContext
- Flutter的 Image WidgetFlutter
- Flutter中的路由Flutter路由
- flutter系列之:flutter中的變形金剛TransformFlutterORM
- Flutter 基礎(十三)Flutter 與 Android 的相互通訊FlutterAndroid
- Flutter基礎(十三)Flutter與Android的相互通訊FlutterAndroid
- Flutter深入淺出--(二)Flutter 的發展歷程Flutter
- Flutter Interact 的 Flutter 1.12 大進化和回顧Flutter
- Flutter 圖表繪製解密(charts_flutter 的使用)Flutter解密
- flutter開發系列(搭建基礎的flutter環境)Flutter
- [Flutter翻譯]每個專案都有獨立的Flutter版本 - Flutter版本管理器Flutter
- Flutter 的快取策略Flutter快取
- Flutter中InheritedWidget的原理Flutter
- Flutter中的Key(一)Flutter
- Flutter中的Key(二)Flutter
- Flutter Tools的除錯Flutter除錯
- ⚠️Flutter的 狀態管理⚠️Flutter
- Flutter 是如何渲染的?Flutter
- [譯]Flutter - Dart的MixinFlutterDart
- Flutter的效能優化Flutter優化
- flutter的代理問題Flutter