将对面的按钮与浮动操作按钮对齐

时间:2021-06-01 11:27:41

标签: flutter dart

有没有办法在颤动中将自定义按钮与 FAB 对齐?我无法创建第二个 FAB,因为自定义按钮在 sliding_up_panel
到目前为止,我已经尝试过这个。但输出不是我想要的。如果我将填充设为静态,则它不会像不同设备上的 FAB 那样移动,如果我使填充动态如此处所示,它也不会像 FAB 那样移动。另一个问题出现在iOS上,我认为是因为SafeArea不同。

Expanded(
  child: Padding(
    padding: EdgeInsets.only(bottom: height*0.025),
    child: Align(
      alignment: FractionalOffset.bottomLeft,
      child: CustomMaterialButton();
        },
        color: Colors.red,
        textColor: Colors.white,
        child: Icon(
          Icons.delete_forever_outlined,
          size: 28,
        ),
        padding: EdgeInsets.all(16),
        shape: CircleBorder(),
      ),
    ),
  ),
),

Example

0 个答案:

没有答案