Skip to content

Commit 6136790

Browse files
authored
Merge pull request #46 from MMMzq/dev
2.4.0
2 parents 7c1e291 + 720bcfe commit 6136790

24 files changed

+435
-345
lines changed

API.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ clickClose | 是否在点击屏幕触发事件时自动关闭该Toast
3232
ignoreContentClick | 是否忽视ToastContext区域如果为true时,用户点击该ToastContext区域时,用户可以的点击事件可以正常到达到Page上,换一句话说就是透明的(即便是Toast背景颜色不是透明),如果为false,则情况反之
3333
onlyOne | 表示是否该分组内是否在同一时间里只存在一个Toast,区分是哪一个组是按照[groupKey]来区分的
3434
backgroundColor | MainContent区域的背景颜色
35+
backButtonBehavior | 点击物理返回键的行为(在android上等同于物理的返回键),注意不是导航条上的返回按钮,如果为[BackButtonBehavior.ignore]则拦截返回事件,如果为[BackButtonBehavior.close]则关闭该toast,并且拦截事件停止冒泡,如果为null or [BackButtonBehavior.none]则不拦截事件
3536

3637
<br>
3738

@@ -56,7 +57,7 @@ hideCloseButton | 否 | false| 是否隐藏关闭按钮
5657
duration | 否 | ```Duration(seconds: 2)```| [duration说明](#通用参数说明)
5758
crossPage | 否 | true| [crossPage说明](#通用参数说明)
5859
onlyOne | 否 | true| [onlyOne说明](#通用参数说明)
59-
60+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
6061
<br>
6162

6263
#### 2.BotToast.showNotification
@@ -81,6 +82,7 @@ duration | 否 | ```Duration(seconds: 2)```| [duration说明](#通用参数说
8182
crossPage | 否 | true| [crossPage说明](#通用参数说明)
8283
onlyOne | 否 | true| [onlyOne说明](#通用参数说明)
8384
enableSlideOff | 否 | true| 是否能滑动删除
85+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
8486

8587
<br>
8688

@@ -100,6 +102,7 @@ enableSlideOff | 否 | true| 是否能滑动删除
100102
duration | 否 | ```Duration(seconds: 2)```| [duration说明](#通用参数说明)
101103
crossPage | 否 | true| [crossPage说明](#通用参数说明)
102104
onlyOne | 否 | true| [onlyOne说明](#通用参数说明)
105+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
103106

104107
<br>
105108

@@ -149,6 +152,7 @@ duration | 否 | ```Duration(seconds: 2)```| [duration说明](#通用参数说
149152
onlyOne | 否 | true| [onlyOne说明](#通用参数说明)
150153
crossPage | 否 | true| [crossPage说明](#通用参数说明)
151154
clickClose | 否 | false| [clickClose说明](#通用参数说明)
155+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
152156

153157
<br>
154158

@@ -169,6 +173,7 @@ onlyOne | 否 | false| [onlyOne说明](#通用参数说明)
169173
clickClose | 否 | false| [clickClose说明](#通用参数说明)
170174
ignoreContentClick | 否 | false| [ignoreContentClick说明](#通用参数说明)
171175
backgroundColor | 否 | ```Colors.transparent```| [backgroundColor说明](#通用参数说明)
176+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
172177

173178
<br>
174179

@@ -187,6 +192,7 @@ crossPage | 否 | true| [crossPage说明](#通用参数说明)
187192
clickClose | 否 | false| [clickClose说明](#通用参数说明)
188193
allowClick | 否 | false| [allowClick说明](#通用参数说明)
189194
backgroundColor | 否 | ```Colors.black26```| [backgroundColor说明](#通用参数说明)
195+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
190196

191197
<br>
192198

@@ -208,6 +214,7 @@ allowClick | 否 | false| [allowClick说明](#通用参数说明)
208214
crossPage | 否 | false| [crossPage说明](#通用参数说明)
209215
duration | 否 | 无| [duration说明](#通用参数说明)
210216
backgroundColor | 否 | ```Colors.black26```| [backgroundColor说明](#通用参数说明)
217+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
211218

212219
<br>
213220

@@ -232,6 +239,7 @@ closeFunc | 否 | 无 | [说明请看showEnhancedWidget.closeFunc](#10bottoastsh
232239
warpWidget | 否 | 无 | [warpWidget说明](#10bottoastshowenhancedwidget)
233240
duration | 否 | 无| [duration说明](#通用参数说明)
234241
backgroundColor | 否 | ```Colors.transparent```| [backgroundColor说明](#通用参数说明)
242+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
235243

236244
<br>
237245

@@ -252,6 +260,7 @@ closeFunc | 否 | 无 | 该函数参数主要目的使Toast关闭之做一些处
252260
warpWidget | 否 | 无 | 一个wrap函数,可以用来warp MainContent区域,例如[showCustomLoading]就包裹了一个动画让MainContent区域也具有动画
253261
duration | 否 | 无| [duration说明](#通用参数说明)
254262
backgroundColor | 否 | ```Colors.transparent```| [backgroundColor说明](#通用参数说明)
263+
backButtonBehavior | 否 | 无 | [backButtonBehavior说明](#通用参数说明)
255264

256265
<br>
257266

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [2.4.0]
2+
* feat: Support to intercept click back button event
3+
14
## [2.3.1]
25
* fix: bug [#43](https://github.com/MMMzq/bot_toast/issues/43)
36

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ BotToast 🤖
22
=========
33
A really easy to use flutter toast library!
44

5-
[![](https://img.shields.io/pub/v/bot_toast.svg?label=bot_toast&logo=https%3A%2F%2Fpub.flutter-io.cn%2Fpackages%2Fbot_toast)](https://pub.flutter-io.cn/packages/bot_toast)
5+
[![](https://img.shields.io/pub/v/bot_toast.svg?label=bot_toast&logo=https%3A%2F%2Fpub.flutter-io.cn%2Fpackages%2Fbot_toast)](https://pub.dev/packages/bot_toast)
66
[![Build Status](https://github.com/MMMzq/bot_toast/workflows/CI/badge.svg)](https://github.com/MMMzq/bot_toast/actions)
77
[![codecov](https://codecov.io/gh/MMMzq/bot_toast/branch/master/graph/badge.svg)](https://codecov.io/gh/MMMzq/bot_toast)
88

@@ -51,7 +51,7 @@ Loading|Text|CustomWidget
5151
#### 1. add dependencies into you project pubspec.yaml file
5252
``` dart
5353
dependencies:
54-
bot_toast: ^2.3.1
54+
bot_toast: ^2.4.0
5555
```
5656

5757
#### 2. import BotToast lib

README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Loading|Text|CustomWidget
5555
#### 1. pubspec.yaml文件里添加依赖
5656
``` dart
5757
dependencies:
58-
bot_toast: ^2.3.1
58+
bot_toast: ^2.4.0
5959
```
6060

6161
#### 2. 导入BotToast库

doc/gif/attached.gif

38.8 KB
Loading

doc/gif/custom_animation.gif

318 KB
Loading

doc/gif/custom_widget.gif

896 KB
Loading

doc/gif/loading.gif

336 KB
Loading

doc/gif/notification.gif

410 KB
Loading

doc/gif/text.gif

644 KB
Loading

0 commit comments

Comments
 (0)