【Flutter 编写一个左边圆形右边矩形的shape样式】
Flutter 编写一个左边圆形右边矩形的shape样式
- 这里使用到了ClipRRect的组件
这里使用到了ClipRRect的组件
ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(100),
bottomLeft: Radius.circular(100)),
clipBehavior: Clip.hardEdge,
child: RaisedButton(
onPressed: () {
Scaffold.of(context).showSnackBar(SnackBar(
content: Text("adsasd"),
));
},
child: Text("这是内容"),
),
效果图
文章图片
推荐阅读
- 回顾 Flutter 2021 重要时刻,奉上虎年红包封面喜迎新年!
- Flutter实现左侧边栏导航
- 如何在 Flutter 创建一个后台任务
- Flutter Convex Bottom 底部导航
- Flutter动态化框架Thresh
- 基于 Riverpod 的 Flutter 状态管理
- Flutter 2022 产品路线图发布
- Flutter 插件库
- Windows Running “flutter pub get“ in XXX卡死
- Flutter之下拉刷新,上拉加载更多