Flutter SliverAppBar属性详解

本文详细探讨了Flutter中的SliverAppBar组件及其属性,同时深入解析了FlexibleSpaceBar的相关设置,对于移动端开发者,尤其是关注前端、Flutter、Android和iOS平台的开发者,提供了SliverAppBar在实际应用中的关键信息。
摘要由CSDN通过智能技术生成

 SliverAppBar属性

 

   const SliverAppBar({
    Key key,
    this.leading,  //左侧控件 通常是个返回按钮

        // 如果没有leading,automaticallyImplyLeading为true,就会默认返回箭头
        // 如果 没有leading 且为false,空间留给title
        // 如果有leading,这个参数就无效了 默认为 true
    this.automaticallyImplyLeading = false,

        //标题 接收 widget 一般为 text
    this.title,

        //右侧控件组
    this.actions,
    this.bottom,//底部控件 例如通常是个 tabBar

    this.flexibleSpace, //展开折叠的区域 通常使用 FlexibleSpaceBar

    this.expandedHeight,//展开的高度

    this.elevation,//阴影
    this.shadowColor,//阴影颜色
    this.forceElevated = false, //是否显示阴影
    this.backgroundColor,//背景颜色

    this.brightness,// 应用栏材质的亮度

    this.iconTheme,//icon样式
    this.actionsIconTheme,//actionsIcon样式
    this.textTheme, //字体样式

    //appbar是否浸入状态栏,为false是为浸入,为true就显示在状态栏的下面
    this.primary = true,

    this.centerTitle,//标题是否居中

    this.excludeHeaderSemantics = fal
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值