File tree Expand file tree Collapse file tree 5 files changed +25
-19
lines changed Expand file tree Collapse file tree 5 files changed +25
-19
lines changed Original file line number Diff line number Diff line change
1
+ ## [ 4.0.0+1]
2
+ * docs: Update CHANGELOG.md
3
+
4
+ ## [ 4.0.0]
5
+ * refactor: Migrate to sound null safety
6
+
1
7
## [ 3.0.5]
2
8
* fix: cancel the use of ` nullOk ` attribute
3
9
Original file line number Diff line number Diff line change @@ -49,9 +49,10 @@ Loading|Text|CustomWidget
49
49
### 🐮Getting started
50
50
51
51
#### 1. add dependencies into you project pubspec.yaml file
52
- ``` dart
52
+ ``` yaml
53
53
dependencies :
54
- bot_toast: ^3.0.5
54
+ bot_toast : ^3.0.5
55
+ # bot_toast: ^4.0.0 #null safety
55
56
```
56
57
57
58
#### 2. import BotToast lib
Original file line number Diff line number Diff line change @@ -53,9 +53,10 @@ Loading|Text|CustomWidget
53
53
### 🐮快速使用
54
54
55
55
#### 1. pubspec.yaml文件里添加依赖
56
- ``` dart
56
+ ``` yaml
57
57
dependencies :
58
- bot_toast: ^3.0.5
58
+ bot_toast : ^3.0.5
59
+ # bot_toast: ^4.0.0 #null safety
59
60
```
60
61
61
62
#### 2. 导入BotToast库
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ description: A really easy to use flutter toast library.Easy to use and feature
3
3
homepage : https://github.com/MMMzq/bot_toast
4
4
email : vivask770@163.com
5
5
6
- version : 3 .0.5
6
+ version : 4 .0.0+1
7
7
8
8
environment :
9
9
sdk : ' >=2.12.0-0 <3.0.0'
Original file line number Diff line number Diff line change @@ -370,9 +370,9 @@ void main() {
370
370
371
371
// ignore: must_be_immutable
372
372
class TestApp extends StatelessWidget {
373
- final VoidCallback callback;
374
- final void Function (BuildContext ctx) contextCallback;
375
- final Widget child;
373
+ final VoidCallback ? callback;
374
+ final void Function (BuildContext ctx)? contextCallback;
375
+ final Widget ? child;
376
376
377
377
TestApp ({this .callback, this .child, this .contextCallback});
378
378
@@ -391,17 +391,15 @@ class TestApp extends StatelessWidget {
391
391
mainAxisSize: MainAxisSize .min,
392
392
children: < Widget > [
393
393
Builder (
394
- builder: (ctx) =>
395
- FlatButton (
396
- key: ValueKey ('main' ),
397
- onPressed: () async {
398
- callback? .call ();
399
- contextCallback? .call (ctx);
400
- },
401
- child: Text ('' ))),
402
- child
403
- ]
404
- ..removeWhere ((test) => test == null ),
394
+ builder: (ctx) => FlatButton (
395
+ key: ValueKey ('main' ),
396
+ onPressed: () async {
397
+ callback? .call ();
398
+ contextCallback? .call (ctx);
399
+ },
400
+ child: Text ('' ))),
401
+ if (child != null ) child!
402
+ ],
405
403
),
406
404
),
407
405
);
You can’t perform that action at this time.
0 commit comments