When I use CupertinoTimerPicker in AlertDialog I'm Getting LayoutBuilder Error. How can I use CupertinoTimerPicker in AlertDialog?
This is my code:
showDialog(
context: context,
builder: (context) {
return AlertDialog(
content: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
height: 300,
child: CupertinoTimerPicker(
onTimerDurationChanged: (value) {}
),
)
],
));
},
);
Error Message
throw FlutterError(
'LayoutBuilder does not support returning intrinsic dimensions.\n'
'Calculating the intrinsic dimensions would require running the layout '
'callback speculatively, which might mutate the live render object tree.',
);