mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 05:32:26 +08:00
Move snackbar to design system
This commit is contained in:
17
packages/apidash_design_system/lib/widgets/snackbar.dart
Normal file
17
packages/apidash_design_system/lib/widgets/snackbar.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,
|
||||
);
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
export 'button_icon.dart';
|
||||
export 'checkbox.dart';
|
||||
export 'dropdown.dart';
|
||||
export 'snackbar.dart';
|
||||
export 'textfield_outlined.dart';
|
||||
export 'textfield_raw.dart';
|
||||
|
Reference in New Issue
Block a user