errorWidget method
Implementation
Widget errorWidget(
BuildContext context,
Object error,
StackTrace? stackTrace,
) {
return ClipRRect(
borderRadius: BorderRadius.circular(8),
child: ColoredBox(
color: Colors.red.shade50,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
child: Row(
children: [
VIcon(
VIcons.alert_circle_outlined,
color: Colors.red,
),
const SizedBox(width: 8),
Flexible(
child: Text(
(error is FlutterError) ? error.message : error.toString(),
style: const TextStyle(color: Colors.red),
),
),
],
),
),
),
);
}