Snackbar properties and description
There are 38 properties in total,
field | attribute | describe |
---|---|---|
title | String | Pop-up title text |
message | String | Pop-up message text |
colorText | Color | Title and Message text colors |
duration | Duration | Duration of pop-up (default 3 seconds) |
instantInit | bool | Snackbar can be placed in initState when false, which defaults to true |
snackPosition | SnackPosition | When the pop-up position, there are two options [TOP, BOTTOM] default TOP |
titleText | Widget | Pops up the title component. Setting this property invalidates the title property |
messageText | Widget | Component of a pop-up message. Setting this property invalidates the messageText property |
icon | Widget | Pop-up icon, displayed to the left of title and message |
shouldIconPulse | bool | Whether the icon blinks when it is displayed. Default value: False |
maxWidth | double | Maximum width |
margin | EdgeInsets | Margin, zero by default |
padding | EdgeInsets | Inner margin, default EdgeInsets. All (16) |
borderRadius | double | Border rounded corner size, default 15 |
borderColor | Color | The color of the border must be set to borderWidth otherwise it has no effect |
borderWidth | double | The line width of the border |
backgroundColor | Color | Background color, default color.grey.withopacity (0.2) |
leftBarIndicatorColor | Color | The color of the left indicator |
boxShadows | List | Shadow color |
backgroundGradient | Gradient | The linear color of the background |
mainButton | TextButton | Main button, usually display send and confirm buttons |
onTap | OnTap | Click the event callback |
isDismissible | bool | Allows you to dismissDirection or not; use this with dismissDirection |
showProgressIndicator | bool | Whether to display a progress bar indicator. Default is false |
dismissDirection | SnackDismissDirection | Closing direction |
progressIndicatorController | AnimationController | Animation controller for progress bar indicator |
progressIndicatorBackgroundColor | Color | Background color of the progress bar indicator |
progressIndicatorValueColor | Animation | Background color for progress bar indicator, Animation |
snackStyle | SnackStyle | Whether it will attach to the edge of the screen |
forwardAnimationCurve | Curve | Popup animation, default Curves. EaseOutCirc |
reverseAnimationCurve | Curve | Disappear animation, default Curves. EaseOutCirc |
animationDuration | Duration | Pop-up and hours of animation duration, default 1 second |
barBlur | double | The blur of the background |
overlayBlur | double | Frosted glass effect value when pop-up, default 0 |
snackbarStatus | SnackbarStatusCallback | Event callbacks when pop-up or disappear (About to open, Opened, About to close, Closed) |
overlayColor | Color | Background color of frosted glass when pop-up |
userInputForm | Form | User input form |
Dialog properties and description
There are 25 attributes in total
field | attribute | describe |
---|---|---|
title | String | Popup title, default (Alert) |
titlePadding | EdgeInsetsGeometry | Inner margin of title, default (edgeinsets.all (8)) |
titleStyle | TextStyle | Heading style |
middleText | String | The text displayed in the middle content area |
middleTextStyle | TextStyle | The text style displayed in the middle content area |
content | Widget | Popup content, the value set after middleText will be invalid |
contentPadding | EdgeInsetsGeometry | Inner margin of content, default (edgeinsets.all (8)) |
onConfirm | VoidCallback | Confirm button callback |
onCancel | VoidCallback | Cancel button callback |
onCustom | VoidCallback | Custom button callback |
cancelTextColor | Color | Uncolor the button text |
confirmTextColor | Color | Confirm the color of the button text |
textConfirm | String | Confirm the text of the button |
textCancel | String | Cancel button text |
textCustom | String | Custom button text |
confirm | Widget | Identify the components of the button |
cancel | Widget | Cancel button component |
custom | Widget | Components for customizing buttons |
backgroundColor | Color | The background color of the pop-up box |
barrierDismissible | bool | Can I close the popover by clicking on the background |
buttonColor | Color | Button text color, depending on the button type to set different positions |
radius | double | The size of the rounded corner of the pop-up box. The default value is 20 |
actions | List | Add additional subcomponents |
onWillPop | WillPopCallback | Do a few things before intercepting is turned off |
navigatorKey | GlobalKey | The key used to open the dialog box |
BottomSheet properties and description
There are 15 properties in total,
field | attribute | describe |
---|---|---|
bottomsheet | Widget | Widget component that pops up |
backgroundColor | Color | The background color |
elevation | double | B the shadow |
persistent | bool | Whether to add it to a route |
shape | ShapeBorder | Border shape, generally used for rounded corner effect |
clipBehavior | Clip | Way of tailoring |
barrierColor | Color | The background color of the pop-up layer |
ignoreSafeArea | bool | Whether to ignore security adaptation |
isScrollControlled | bool | Whether full screen pop-up is supported. The default value is false |
useRootNavigator | bool | Whether to use root navigation |
isDismissible | bool | Click background to see if it can be turned off, default true |
enableDrag | bool | Whether you can drag to close. Default: true |
settings | RouteSettings | Routing setting |
enterBottomSheetDuration | Duration | Animation time when entering |
exitBottomSheetDuration | Duration | The animation time of exit |