SnackbarWidget class

SnackbarWidget is a helper class to display customizable snack bars.

It shows a snack bar with an icon, title, and message. The appearance (colors, icon, duration) is controlled by the MessageConfig parameter.

Usage example:

SnackbarWidget.show(
  context,
  'Success',
  'Operation completed successfully.',
  MessageConfig(
    backgroundColor: Colors.green,
    textColor: Colors.white,
    icon: Icons.check_circle,
    duration: Duration(seconds: 3),
  ),
);

SnackbarWidget é uma classe auxiliar para exibir snack bars customizáveis.

Exibe uma snack bar com ícone, título e mensagem. A aparência (cores, ícone, duração) é controlada pelo parâmetro MessageConfig.

Exemplo de uso:

SnackbarWidget.show(
  context,
  'Sucesso',
  'Operação concluída com sucesso.',
  MessageConfig(
    backgroundColor: Colors.green,
    textColor: Colors.white,
    icon: Icons.check_circle,
    duration: Duration(seconds: 3),
  ),
);

Constructors

SnackbarWidget.new()

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