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+
17## [ 3.0.5]
28* fix: cancel the use of ` nullOk ` attribute
39
Original file line number Diff line number Diff line change @@ -49,9 +49,10 @@ Loading|Text|CustomWidget
4949### 🐮Getting started
5050
5151#### 1. add dependencies into you project pubspec.yaml file
52- ``` dart
52+ ``` yaml
5353dependencies :
54- bot_toast: ^3.0.5
54+ bot_toast : ^3.0.5
55+ # bot_toast: ^4.0.0 #null safety
5556```
5657
5758#### 2. import BotToast lib
Original file line number Diff line number Diff line change @@ -53,9 +53,10 @@ Loading|Text|CustomWidget
5353### 🐮快速使用
5454
5555#### 1. pubspec.yaml文件里添加依赖
56- ``` dart
56+ ``` yaml
5757dependencies :
58- bot_toast: ^3.0.5
58+ bot_toast : ^3.0.5
59+ # bot_toast: ^4.0.0 #null safety
5960```
6061
6162#### 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
33homepage : https://github.com/MMMzq/bot_toast
44email : vivask770@163.com
55
6- version : 3 .0.5
6+ version : 4 .0.0+1
77
88environment :
99 sdk : ' >=2.12.0-0 <3.0.0'
Original file line number Diff line number Diff line change @@ -370,9 +370,9 @@ void main() {
370370
371371// ignore: must_be_immutable
372372class 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;
376376
377377 TestApp ({this .callback, this .child, this .contextCallback});
378378
@@ -391,17 +391,15 @@ class TestApp extends StatelessWidget {
391391 mainAxisSize: MainAxisSize .min,
392392 children: < Widget > [
393393 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+ ],
405403 ),
406404 ),
407405 );
You can’t perform that action at this time.
0 commit comments