代码之家  ›  专栏  ›  技术社区  ›  Daibaku

颤振-有没有办法设置所有AppBars的高度

  •  3
  • Daibaku  · 技术社区  · 7 年前

    我想设置所有页面 AppBar elevation

    2 回复  |  直到 6 年前
        1
  •  7
  •   CopsOnRoad    6 年前

    MaterialApp(
      theme: ThemeData(
        appBarTheme: AppBarTheme(elevation: 0)
      ),
    ) 
    
        2
  •  7
  •   diegoveloper    7 年前

    创建自己的 AppBar

      import 'package:flutter/material.dart';
    
      class MyAppBar extends AppBar {
        MyAppBar(
            {Key key,
           Widget title,
            Color backgroundColor,
            List<Widget> actions,
            PreferredSizeWidget bottom})
            : super(
                backgroundColor: backgroundColor,
                title: title,
                actions: actions,
                bottom: bottom,
                elevation:
                    0.0,
              );
      }
    
        3
  •  0
  •   Jaswant Singh    7 年前

    正如我在应用程序中看到的_棒形飞镖文件中,应用程序栏的默认高程为4.0,

    推荐文章