Skip to content

Latest commit

 

History

History
59 lines (48 loc) · 1.64 KB

README.md

File metadata and controls

59 lines (48 loc) · 1.64 KB

Description

fast_snackbar: Simplifies snack bar presentation in Flutter. The FastSnackbar extension on BuildContext enables displaying snack bars without explicit BuildContext. Key features include displaying snack bars in varied colors like green (success), red (error), yellow (warning), as well as support for customizable hexadecimal color codes and Colors widget to match user preferences.

Features

In your pubspec.yaml

dependencies:
  fast_snackbar: ^latest-version

Usage

ElevatedButton(
 child: Text('succes snackbar'),
 onPressed: () {
   // You can use TypeFastSnackbar.success | TypeFastSnackbar.error | TypeFastSnackbar.warning  
   context.showFastSnackbar("sukses", color: TypeFastSnackbar.success);
 },
),

Or

ElevatedButton(
 child: Text('show snackbar'),
 onPressed: () {
    // You can use Colors widget
   context.showFastSnackbar("sukses", color: Colors.red);
 },
),

Or

ElevatedButton(
 child: Text('show snackbar'),
 onPressed: () {
    // You can use Colors hexadesimal
   context.showFastSnackbar("sukses", color: "#000");
 },
),