GpSnackBar class

Clase utilitaria para mostrar SnackBars usando GpText Uso:

GpSnackBar.show(context, 'Tu mensaje aquí');
GpSnackBar.showSuccess(context, 'Operación exitosa');
GpSnackBar.showError(context, 'Error en la operación');
GpSnackBar.showInfo(context, 'Información importante');

Constructors

GpSnackBar()

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(String message, {String? title, GpSemanticTone tone = GpSemanticTone.neutral, Duration duration = const Duration(seconds: 4), Color? backgroundColor, Color? textColor, BuildContext? context}) → void
Muestra un SnackBar simple con texto personalizado.
showError(String message, {String? title, Duration duration = const Duration(seconds: 4), BuildContext? context}) → void
Muestra un SnackBar de error (rojo)
showInfo(String message, {String? title, Duration duration = const Duration(seconds: 4), BuildContext? context}) → void
Muestra un SnackBar informativo (azul)
showSuccess(String message, {String? title, Duration duration = const Duration(seconds: 4), BuildContext? context}) → void
Muestra un SnackBar de éxito (verde)
showWarning(String message, {String? title, Duration duration = const Duration(seconds: 4), BuildContext? context}) → void
Muestra un SnackBar de advertencia (naranja)