createButton method
Button for creating a new empty row
Implementation
Widget createButton() {
return Visibility(
visible: widget.showCreateButton,
child: Padding(
padding: EdgeInsets.only(left: 4.0, bottom: 4),
child: InkWell(
onTap: () {
rows = addOneRow(columns, rows);
rowCount = rowCount! + 1;
setState(() {});
},
child: Container(
padding: EdgeInsets.all(2),
decoration: BoxDecoration(
color: widget.createButtonColor ?? Colors.white,
boxShadow: [
BoxShadow(blurRadius: 2, color: Colors.grey.shade400)
],
borderRadius: BorderRadius.circular(10),
shape: BoxShape.rectangle,
),
child: widget.createButtonIcon ?? Icon(Icons.add),
),
),
),
);
}