I have tried to add row. I need the code for deleting the row. If there is any other method share sample code or logic.
void addRow() {
setState(() {
rowList.add(DataRow(
cells: <DataCell>[
DataCell(Text('$rowCount')),
DataCell(TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
// hintText: 'field1',
))),
DataCell(TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
// hintText: 'field1',
))),
DataCell(TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
// hintText: 'field1',
))),
DataCell(TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
// hintText: 'field1',
))),
],
));
});
}
Aucun commentaire:
Enregistrer un commentaire