Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ backgroundColor | Flushbar background color. Will be ignored if [backgroundGradi
leftBarIndicatorColor | If not null, shows a left vertical bar to better indicate the humor of the notification. It is not possible to use it with a [Form] and I do not recommend using it with [LinearProgressIndicator].
boxShadows | The shadows generated by Flushbar. Leave it null if you don't want a shadow. You can use more than one if you feel the need. Check [this example](https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/material/shadows.dart)
backgroundGradient | Flushbar background gradient. Makes [backgroundColor] be ignored.
mainButton | Use if you need an action from the user. [FlatButton] is recommended here.
mainButton | Use if you need an action from the user. [TextButton] is recommended here.
onTap | A callback that registers the user's click anywhere. An alternative to [mainButton]
duration | How long until Flushbar will hide itself (be dismissed). To make it indefinite, leave it null.
isDismissible | Determines if the user can swipe or click the overlay (if [routeBlur] > 0) to dismiss. It is recommended that you set [duration] != null if this is false. If the user swipes to dismiss or clicks the overlay, no value will be returned.
Expand Down Expand Up @@ -132,7 +132,7 @@ Flushbar(
Icons.check,
color: Colors.greenAccent,
),
mainButton: FlatButton(
mainButton: TextButton(
onPressed: () {},
child: Text(
"CLAP",
Expand Down Expand Up @@ -277,23 +277,22 @@ bool _wasButtonClicked;
flush = Flushbar<bool>(
title: "Hey Ninja",
message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
icon: Icon(
Icons.info_outline,
color: Colors.blue,),
mainButton: FlatButton(
onPressed: () {
flush.dismiss(true); // result = true
},
child: Text(
"ADD",
style: TextStyle(color: Colors.amber),
),
),) // <bool> is the type of the result passed to dismiss() and collected by show().then((result){})
..show(context).then((result) {
setState(() { // setState() is optional here
_wasButtonClicked = result;
});
icon: Icon(Icons.info_outline, color: Colors.blue),
mainButton: TextButton(
onPressed: () {
flush.dismiss(true); // result = true
},
child: Text(
"ADD",
style: TextStyle(color: Colors.amber),
)
)
) // <bool> is the type of the result passed to dismiss() and collected by show().then((result){})
..show(context).then((result) {
setState(() { // setState() is optional here
_wasButtonClicked = result;
});
});
},
),
),
Expand Down