Row's children must not contain any null values, but a null value was found at index 1 code example
Example: Row's children must not contain any null values, but a null value was found at index 1
You need to return Container() if buttonImage is null
Row widget do not know how to render null
you must tell Row widget to render empty content if it's null
children: <Widget>[buttonImage == null ? Container() : buttonImage,]