【问题标题】:Customize the container shape自定义容器形状
【发布时间】:2021-11-01 12:05:41
【问题描述】:

如何在不使用插件的情况下在 Flutter 中实现以下形状?我想使用剪辑路径实现自定义容器。我正在尝试使用 lineTo() 方法。我没有得到这个。

【问题讨论】:

  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: flutter containers scrollview customization clip-path


【解决方案1】:

试试这个包,clippy_flutter,使用 Point:

            Point(
              triangleHeight: 30.0,
              edge: Edge.LEFT,
              child: Container(
                color: Colors.pink,
                width: 100.0,
                height: 100.0,
                child: Center(child: Text('Point')),
              ),
            ),

然后将它们堆叠起来并在 egde 处稍微重叠。

【讨论】:

    猜你喜欢
    • 2020-11-10
    • 2019-10-03
    • 2017-03-05
    • 2015-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多