@@ -41,7 +41,7 @@ latest version: [](https
41
41
42
42
``` yaml
43
43
dependencies :
44
- oktoast : ^2.2.1 # such as version, you need use the latest version of pub.
44
+ oktoast : ^2.3.0 # such as version, you need use the latest version of pub.
45
45
` ` `
46
46
47
47
### 2. Import library in dart file
@@ -82,59 +82,70 @@ There are two reasons why you need to wrap MaterialApp
82
82
83
83
oktoast have default style, and you also can custom style or other behavior.
84
84
85
- | name | type | need | desc |
86
- | :------------------: | :----------------: | :------: | :-----------------------------------------------------------: |
87
- | child | Widget | required | Usually Material App |
88
- | textStyle | TextStyle | optional | |
89
- | radius | double | optional | |
90
- | backgroundColor | Color | optional | backroundColor |
91
- | position | ToastPosition | optional | |
92
- | dismissOtherOnShow | bool | optional | If true, other toasts will be dismissed. Default false. |
93
- | movingOnWindowChange | bool | optional | If true, when the size changes, toast is moved. Default true. |
94
- | textDirection | TextDirection | optional | |
95
- | textPadding | EdgeInsetsGeometry | optional | Outer margin of text |
96
- | textAlign | TextAlign | optional | When the text wraps, the align of the text. |
97
- | handleTouch | bool | optional | Default is false, if it's true, can responed use touch event. |
85
+ | name | type | need | desc |
86
+ | :------------------: | :---------------------: | :------: | :-----------------------------------------------------------: |
87
+ | child | Widget | required | Usually Material App |
88
+ | textStyle | TextStyle | optional | |
89
+ | radius | double | optional | |
90
+ | backgroundColor | Color | optional | backroundColor |
91
+ | position | ToastPosition | optional | |
92
+ | dismissOtherOnShow | bool | optional | If true, other toasts will be dismissed. Default false. |
93
+ | movingOnWindowChange | bool | optional | If true, when the size changes, toast is moved. Default true. |
94
+ | textDirection | TextDirection | optional | |
95
+ | textPadding | EdgeInsetsGeometry | optional | Outer margin of text |
96
+ | textAlign | TextAlign | optional | When the text wraps, the align of the text. |
97
+ | handleTouch | bool | optional | Default is false, if it's true, can responed use touch event. |
98
+ | animationBuilder | OKToastAnimationBuilder | optional | Add animation to show / hide toast. |
99
+ | animationDuration | Duration | optional | The duration of animation. |
100
+ | animationCurve | Curve | optional | Curve of animation. |
98
101
99
102
### Method ` showToast `
100
103
101
- Display text on toast
102
-
103
- | name | type | need | desc |
104
- | :---------------: | :----------------: | :------: | :--: |
105
- | msg | String | required | |
106
- | context | BuildContext | optional | |
107
- | duration | Duration | optional | |
108
- | position | ToastPosition | optional | |
109
- | textStyle | TextStyle | optional | |
110
- | textPadding | EdgeInsetsGeometry | optional | |
111
- | backgroundColor | Color | optional | |
112
- | radius | double | optional | |
113
- | onDismiss | Function | optional | |
114
- | textDirection | TextDirection | optional | |
115
- | dismissOtherToast | bool | optional | |
116
- | textAlign | TextAlign | optional | |
104
+ Display text on toast.
105
+
106
+ Description of params see ` OKToast ` .
107
+
108
+ | name | type | need | desc |
109
+ | :---------------: | :---------------------: | :------: | :------------: |
110
+ | msg | String | required | Text of toast. |
111
+ | context | BuildContext | optional | |
112
+ | duration | Duration | optional | |
113
+ | position | ToastPosition | optional | |
114
+ | textStyle | TextStyle | optional | |
115
+ | textPadding | EdgeInsetsGeometry | optional | |
116
+ | backgroundColor | Color | optional | |
117
+ | radius | double | optional | |
118
+ | onDismiss | Function | optional | |
119
+ | textDirection | TextDirection | optional | |
120
+ | dismissOtherToast | bool | optional | |
121
+ | textAlign | TextAlign | optional | |
122
+ | animationBuilder | OKToastAnimationBuilder | optional | |
123
+ | animationDuration | Duration | optional | |
124
+ | animationCurve | Curve | optional | |
117
125
118
126
### Method ` showToastWidget `
119
127
120
128
Display custom widgets on toast
121
129
122
- param see showToast
123
-
124
- | name | type | need | desc |
125
- | :---------------: | :-----------: | :------: | :-----------------------------------------------------------: |
126
- | widget | Widget | required | The widget you want to display. |
127
- | context | BuildContext | optional | |
128
- | duration | Duration | optional | |
129
- | position | ToastPosition | optional | |
130
- | onDismiss | Function | optional | |
131
- | dismissOtherToast | bool | optional | |
132
- | textDirection | TextDirection | optional | |
133
- | handleTouch | bool | optional | Default is false, if it's true, can responed use touch event. |
130
+ Description of params see ` showToast ` .
131
+
132
+ | name | type | need | desc |
133
+ | :---------------: | :---------------------: | :------: | :-----------------------------: |
134
+ | widget | Widget | required | The widget you want to display. |
135
+ | context | BuildContext | optional | |
136
+ | duration | Duration | optional | |
137
+ | position | ToastPosition | optional | |
138
+ | onDismiss | Function | optional | |
139
+ | dismissOtherToast | bool | optional | |
140
+ | textDirection | TextDirection | optional | |
141
+ | handleTouch | bool | optional | |
142
+ | animationBuilder | OKToastAnimationBuilder | optional | |
143
+ | animationDuration | Duration | optional | |
144
+ | animationCurve | Curve | optional | |
134
145
135
146
### Method ` dismissAllToast `
136
147
137
- dismiss all toast
148
+ Dismiss all toast.
138
149
139
150
### Return value of ` showToast ` and ` showToastWidget `
140
151
@@ -284,3 +295,11 @@ class _MyHomePageState extends State<MyHomePage> {
284
295
285
296
286
297
```
298
+
299
+ ## CHANGELOG
300
+
301
+ [ Link] ( https://github.com/OpenFlutter/flutter_oktoast/blob/master/CHANGELOG.md )
302
+
303
+ ## LICENSE
304
+
305
+ [ Apache-2.0] ( https://github.com/OpenFlutter/flutter_oktoast/blob/master/LICENSE )
0 commit comments