我有两个CupertinoPicker和一个我需要消除之间的差距,谁有一个想法?

Center(
child: Row(
children: [
SizedBox(
height: 200,
width: 100,
child: CupertinoPicker(
itemExtent: 20,
onSelectedItemChanged: (index) => setState(() {
this.index == index;
}),
children: definingHoursList())),
SizedBox(
height: 200,
width: 100,
child: CupertinoPicker(
itemExtent: 20,
onSelectedItemChanged: (index) => setState(() {
this.index == index;
}),
children: definingHoursList()))
],
),
),发布于 2022-06-04 21:07:45
看看CupertinoPickerDefaultSelectionOverlay文档类。
通过将其传递给CupertinoPicker,您可以禁用边距,但它也会丢失圆角。
CupertinoPicker(
selectionOverlay: const CupertinoPickerDefaultSelectionOverlay(
capStartEdge: false,
capEndEdge: false,
),
// other parameters,
)https://stackoverflow.com/questions/72502541
复制相似问题