简体   繁体   English

Flutter 如何创建自定义按钮边框

[英]Flutter how to create custom button border

I want to create a button like this.我想创建一个这样的按钮。 I think I can do this with clippath but I have no idea about it.我想我可以用 clippath 做到这一点,但我不知道。 I would be glad if you help如果你能帮忙我会很高兴

在此处输入图像描述

You can try something like this:你可以尝试这样的事情:

return Align(
      alignment: Alignment.bottomRight,
      child: Padding(
        padding: EdgeInsets.only(bottom: 90),
        child: Container(
          height: 50,
          width: 150,
          decoration: BoxDecoration(
            color: Colors.greenAccent,
            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(15),
            ),
          ),
          child: Align(
            alignment: Alignment.center,
            child: Text(
              '24.00 ₴',
              style: TextStyle(
                color: Colors.white,
                fontSize: 24,
              ),
            ),
          ),
        ),
      ),
    );

And it will look this way:它看起来是这样的:

按钮

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM