Container(
decoration: BoxDecoration(shape: BoxShape.circle),
child: Material(
color: Colors.orange,
child: InkWell(
splashColor: Colors.black,
onTap: () {},
child: Ink(
decoration: BoxDecoration(shape: BoxShape.circle),
height: Get.height * 0.0425,
width: Get.height * 0.0425,
child: Icon(Icons.holiday_village),
),
),
),
),
Run Code Online (Sandbox Code Playgroud)
我想把这个InkWell东西做成圆形。似乎没有什么可以使它循环。如果我取出Material(),则它不会显示背景颜色,也splash color不会出现。如何重塑此 Contaner - InkWell 圆形,以确保按钮是带有splashColor 的圆形?
Md.*_*ikh 18
customBorder: CircleBorder(),持续使用InkWell
shape: const CircleBorder(), Material
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: Material(
color: Colors.orange,
shape: const CircleBorder(),
child: InkWell(
splashColor: Colors.black,
onTap: () {},
customBorder: const CircleBorder(),
child: Ink(
decoration: const BoxDecoration(shape: BoxShape.circle),
height: 425,
width: 425,
child: const Icon(Icons.holiday_village),
),
),
),
),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5356 次 |
| 最近记录: |