File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,6 +123,9 @@ Color maskColor;
123123/// 当loading展示的时候,是否允许用户操作.
124124bool userInteractions;
125125
126+ /// 指示器自定义组件
127+ Widget indicatorWidget;
128+
126129/// 展示成功状态的自定义组件
127130Widget successWidget;
128131
Original file line number Diff line number Diff line change @@ -123,6 +123,9 @@ Color maskColor;
123123/// should allow user interactions while loading is displayed.
124124bool userInteractions;
125125
126+ /// indicator widget of loading
127+ Widget indicatorWidget;
128+
126129/// success widget of loading
127130Widget successWidget;
128131
Original file line number Diff line number Diff line change @@ -110,6 +110,9 @@ class EasyLoading {
110110 /// should allow user interactions while loading is displayed.
111111 bool userInteractions;
112112
113+ /// indicator widget of loading
114+ Widget indicatorWidget;
115+
113116 /// success widget of loading
114117 Widget successWidget;
115118
@@ -168,7 +171,8 @@ class EasyLoading {
168171 String status,
169172 Widget indicator,
170173 }) {
171- Widget w = indicator ?? LoadingIndicator ();
174+ Widget w =
175+ indicator ?? (_getInstance ().indicatorWidget ?? LoadingIndicator ());
172176 _getInstance ()._show (
173177 status: status,
174178 w: w,
Original file line number Diff line number Diff line change @@ -180,6 +180,11 @@ class _LoadingIndicatorState extends State<LoadingIndicator> {
180180 );
181181 break ;
182182 default :
183+ _indicator = SpinKitFadingCircle (
184+ color: _indicatorColor,
185+ size: _size,
186+ );
187+ break ;
183188 }
184189
185190 return Container (
You can’t perform that action at this time.
0 commit comments