【问题标题】:how to change position of bottomappbar notch in flutter?如何在颤动中改变bottomappbar缺口的位置?
【发布时间】:2021-01-23 07:57:15
【问题描述】:

我尝试使用notch FloatingActionButton的默认位置,但FloatingActionButton只有三个位置(startDocked,endDocked和centerDocked),但我需要在中心和左侧或中心和右侧之间添加缺口,如下图所示。

flutter FloatingActionButton notch position

我该怎么做?

【问题讨论】:

    标签: flutter flutter-dependencies


    【解决方案1】:

    尝试用 Padding 包裹 FloatingActionButton 以移动位置:

    floatingActionButton: Padding(
            padding: const EdgeInsets.only(left: 50.0),
            child: FloatingActionButton(
              child: Icon(Icons.remove),
              onPressed: () => null,
            ),
          ), 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-04
      • 1970-01-01
      • 2021-07-19
      • 1970-01-01
      • 2019-01-24
      • 2019-08-11
      • 2020-09-22
      相关资源
      最近更新 更多