How to add a TextField inside the Cupertino dialog. I try this code below, but didn't work :
showDialog<bool>(
context: _scaffoldKey.currentContext,
builder: (context) {
return CupertinoAlertDialog(
title: Text('Tambah baru'),
content: Column(
children: <Widget>[
TextField(
decoration: InputDecoration(labelText: "Nama"),
),
],
),
);
},
);
The error said : "TextField widgets require a Material widget ancestor."