error static method
void
error({})
Implementation
static void error({
required final String title,
required final String message,
final String description = "",
final List<Widget>? actions,
}) {
Pen.error("title: $title, message: $message, description: $description");
Toast.modal(
title: title,
content: Column(mainAxisSize: MainAxisSize.min, children: [
const Icon(
Icons.error_outline,
color: Colors.red,
size: 48,
),
const SizedBox(height: 10),
if (title.isNotEmpty && title != "null") ...[
Text(message, style: const TextStyle(fontWeight: FontWeight.bold)),
const SizedBox(height: 10),
],
if (description.isNotEmpty && description != "null") ...[
SizedBox(
height: 200,
child: SingleChildScrollView(
child: Text(
description,
textAlign: TextAlign.left,
)))
]
]),
);
}