build method
Builds the empty state widget with icon and text.
Implementation
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final defaultTextStyle = _baseTextStyle.copyWith(
color: theme.textTheme.bodyMedium?.color,
);
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (icon != null) ...[
Icon(
icon,
size: iconSize,
color: iconColor ?? theme.primaryColor,
),
SizedBox(height: spacing),
],
Text(
text,
style: textStyle ?? defaultTextStyle,
textAlign: TextAlign.center,
),
],
),
);
}