简体   繁体   中英

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. 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:

按钮

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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