AlertDialogWidget class
AlertDialogWidget is a helper class to display customizable alert dialogs.
It shows a dialog with a title, message, and an OK button. The appearance (colors, icon, duration) is controlled by the MessageConfig parameter.
Usage example:
AlertDialogWidget.show(
context,
'Warning',
'This is an alert message',
MessageConfig(
backgroundColor: Colors.orange,
textColor: Colors.white,
icon: Icons.warning,
duration: Duration(seconds: 3),
),
);
AlertDialogWidget é uma classe auxiliar para exibir diálogos de alerta customizáveis.
Exibe um diálogo com título, mensagem e um botão OK. A aparência (cores, ícone, duração) é controlada pelo parâmetro MessageConfig.
Exemplo de uso:
AlertDialogWidget.show(
context,
'Aviso',
'Esta é uma mensagem de alerta',
MessageConfig(
backgroundColor: Colors.orange,
textColor: Colors.white,
icon: Icons.warning,
duration: Duration(seconds: 3),
),
);
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
show(
BuildContext context, String title, String message, MessageConfig config) → void