[英]create dotted circle border in dart flutter
Need to create dotted circle border.需要创建虚线圆边框。 Tried dotted border with radius property but still it not filling up like complete dotted circle with the text.
尝试了带有半径属性的虚线边框,但它仍然没有像带有文本的完整虚线圆一样填充。 Please help to create dotted border like the image.
请帮助创建像图像一样的虚线边框。 Thanks
谢谢
Center(
child: Text('Received'),
),
SizedBox(height: 30),
Center(
child: Text('Shipped'),
),
SizedBox(height: 30),
Center(
child: DottedBorder(
dashPattern: const [8, 4],
strokeWidth: 1,
color: mainColor,
radius: Radius.circular(20),
child: SizedBox(),
),
),
SizedBox(height: 30),
Center(
child: Text('Delivered'),
)
You can use dotted_border package您可以使用 dotted_border package
return DottedBorder(
borderType: BorderType.RRect,
radius: Radius.circular(12),
padding: EdgeInsets.all(6),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(12)),
child: Container(
height: 200,
width: 120,
color: Colors.amber,
),
),
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.