【发布时间】:2020-06-09 18:40:26
【问题描述】:
我有一个页面,我想在我的脚手架上的轮子周围设置这个金色边框。 这是我的代码:
Widget spinningWheel(context) {
double realWidth = MediaQuery.of(context).size.width;
return Container(
decoration: BoxDecoration(color: Colors.transparent),
//color: Theme.of(context).primaryColor.withAlpha(180),
child: Align(
alignment: Alignment.topCenter,
child: Spinwheel(
shouldDrawCenterPiece: true,
wheelPaint: Paint()..color = Colors.red,
sectorDividerPaint: Paint()..color = Colors.black,
centerPiecePaint: Paint()..color = Colors.black,
items: items,
size: realWidth * 0.9,
onChanged: (val) {
if (this.mounted) setState(() {});
},
select: select,
shouldDrawDividers: true,
wheelOrientation: pi / 8,
autoPlay: false,
hideOthers: false,
shouldDrawBorder: false,
shouldHighlight: false,
),
),
);
}
这是我正在使用的依赖项:https://pub.dev/packages/flutter_spinwheel
【问题讨论】:
-
尝试使用堆栈小部件
-
下面的答案能解决你的问题吗?
标签: user-interface flutter dart