buildRow method
Build UI either image is selected or not
Implementation
buildRow(int index) {
return Stack(
fit: StackFit.expand,
children: <Widget>[
Positioned.fill(
bottom: 0.0,
child: Container(
child: _imageList[index].imageUrl != null
? Image.file(
_imageList[index].imageUrl ?? File(''),
fit: BoxFit.cover,
)
: const Padding(
padding: EdgeInsets.all(3),
child: Material(
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Color(0xFFD3D3D3),
child: Icon(Icons.add),
),
),
),
),
Positioned.fill(
child: Material(
borderRadius: const BorderRadius.all(Radius.circular(5)),
color: Colors.transparent,
child: InkWell(
highlightColor: Colors.transparent,
onTap: () => showDialogImage(index),
))),
],
);
}