Add User Notification SnackBar

This commit is contained in:
Ankit Mahato
2023-04-25 07:01:59 +05:30
parent 585854d7f6
commit 556065d67a
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
SnackBar getSnackBar(
String text, {
bool small = true,
}) {
return SnackBar(
width: small ? 300 : 500,
behavior: SnackBarBehavior.floating,
content: Text(
text,
softWrap: true,
textAlign: TextAlign.center,
),
showCloseIcon: true,
);
}

View File

@ -14,3 +14,4 @@ export 'cards.dart';
export 'intro_message.dart';
export 'request_widgets.dart';
export 'response_widgets.dart';
export 'snackbars.dart';