flutter - Flutter 自定义形状按钮小部件
解决方案
您可以使用BeveledRectangleBorder
来获得此形状:-
Material(
clipBehavior: Clip.antiAlias,
color: Colors.black,
shape: BeveledRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
),
child: Container(
alignment:Alignment.center,
height: 80,
width: 180,
color:Colors.black,
child: Text("Apply now",style:TextStyle(color:Colors.white)),
),
),
推荐阅读
- java - ArchUnit - 有没有办法使用通用占位符检查包访问?
- c++ - 如何使用英特尔 AVX 计算 256 位变量的范数
- xamarin - Xamarin Forms 在一段时间后导航到登录页面而不做任何事情
- google-chrome - 1366x768 屏幕分辨率的 Chrom 视口大小?
- vue.js - TypeError:不支持合并未定义
- c++ - 当我尝试测试存储在结构中的字符串的相等性时,即使两个字符串相同,它也会给出 false
- nginx - Nginx 重写建议
- bash - sed 删除子字符串 | 我可以制作一个灵活的模式来删除制表符之前的数字吗?
- python - 当我使用 Genius API 时,它没有给我完整的歌词
- c++ - 为什么没有可变模板模板参数?