File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313``` yaml
1414dependencies :
15- flutter_easyloading : ^1.1.2
15+ flutter_easyloading : ^1.1.3
1616` ` `
1717
1818## 导入
@@ -128,9 +128,17 @@ Widget infoWidget;
128128
129129❗️** 注意:**
130130
131- * ` textColor ` 、` indicatorColor ` 、` progressColor ` 、` backgroundColor ` 仅对 ` EasyLoadingStyle.custom ` 有效。*
131+ - ** ` textColor ` 、` indicatorColor ` 、` progressColor ` 、` backgroundColor ` 仅对 ` EasyLoadingStyle.custom ` 有效。* *
132132
133- * ` maskColor ` 仅对 ` EasyLoadingMaskType.custom ` 有效。*
133+ - ** ` maskColor ` 仅对 ` EasyLoadingMaskType.custom ` 有效。**
134+
135+ - ** 如果你想在 ` initState ` 方法里面使用 ` EasyLoading ` , 你应该这样做:**
136+ ``` dart
137+ /// 帧绘制完成回调通知
138+ WidgetsBinding.instance.addPostFrameCallback((_) {
139+ EasyLoading.showSuccess('Great Success!');
140+ });
141+ ```
134142
135143因为 ` EasyLoading ` 是一个全局单例, 所以你可以在任意一个地方自定义它的样式:
136144
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Add this to your package's `pubspec.yaml` file:
1212
1313``` yaml
1414dependencies :
15- flutter_easyloading : ^1.1.2
15+ flutter_easyloading : ^1.1.3
1616` ` `
1717
1818## Import
@@ -128,9 +128,17 @@ Widget infoWidget;
128128
129129❗️** Note:**
130130
131- * ` textColor ` 、` indicatorColor ` 、` progressColor ` 、` backgroundColor ` only used for ` EasyLoadingStyle.custom ` .*
131+ - ** ` textColor ` 、` indicatorColor ` 、` progressColor ` 、` backgroundColor ` only used for ` EasyLoadingStyle.custom ` .* *
132132
133- * ` maskColor ` only used for ` EasyLoadingMaskType.custom ` .*
133+ - ** ` maskColor ` only used for ` EasyLoadingMaskType.custom ` .**
134+
135+ - ** if you want use ` EasyLoading ` in ` initState ` method, you should do like this:**
136+ ``` dart
137+ /// Schedule a callback for the end of this frame
138+ WidgetsBinding.instance.addPostFrameCallback((_) {
139+ EasyLoading.showSuccess('Great Success!');
140+ });
141+ ```
134142
135143because ` EasyLoading ` is a singleton, so you can custom loading style any where like this:
136144
You can’t perform that action at this time.
0 commit comments