mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 13:51:20 +08:00
Add User Notification SnackBar
This commit is contained in:
17
lib/widgets/snackbars.dart
Normal file
17
lib/widgets/snackbars.dart
Normal 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,
|
||||||
|
);
|
||||||
|
}
|
@ -14,3 +14,4 @@ export 'cards.dart';
|
|||||||
export 'intro_message.dart';
|
export 'intro_message.dart';
|
||||||
export 'request_widgets.dart';
|
export 'request_widgets.dart';
|
||||||
export 'response_widgets.dart';
|
export 'response_widgets.dart';
|
||||||
|
export 'snackbars.dart';
|
||||||
|
Reference in New Issue
Block a user