fast_snackbar 0.0.1 fast_snackbar: ^0.0.1 copied to clipboard
A package fast simple Snackabar
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:
firebase_utilitas: ^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");
},
),