emptyWidget function
dynamic
emptyWidget({})
empty widget
Implementation
emptyWidget(
{Color? imageBackgroundColor,
Widget? emptyImageWidget,
Widget? emptyTextWidget}) {
return Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBox(height: 32),
emptyImageWidget != null
? emptyImageWidget
: CircleAvatar(
backgroundColor: imageBackgroundColor ?? Colors.orange[300],
radius: 50,
child: Icon(Icons.error, size: 64, color: Colors.white),
),
SizedBox(height: 16),
emptyTextWidget != null
? emptyTextWidget
: Text(
StringResources.emptyCollection,
textAlign: TextAlign.center,
),
SizedBox(height: 32),
],
);
}