File tree 3 files changed +7
-2
lines changed
example/lib/ui/example/customindicator
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import 'package:flutter/material.dart' ;
10
10
import 'package:flutter/widgets.dart' ;
11
+ import 'package:flutter_gifimage/flutter_gifimage.dart' ;
11
12
import 'package:pull_to_refresh/pull_to_refresh.dart' ;
12
13
13
14
import '../../Item.dart' ;
Original file line number Diff line number Diff line change @@ -384,6 +384,9 @@ abstract class LoadIndicatorState<T extends LoadIndicator> extends State<T>
384
384
return ;
385
385
}
386
386
387
+ // this line for patch bug temporary:indicator disappears fastly when load more complete
388
+ if (mounted)
389
+ Scrollable .of (context).position.correctBy (0.00001 );
387
390
WidgetsBinding .instance.addPostFrameCallback ((_) {
388
391
if (mounted && _position? .outOfRange == true ) {
389
392
activity.delegate.goBallistic (0 );
Original file line number Diff line number Diff line change @@ -737,17 +737,18 @@ class RefreshController {
737
737
}
738
738
739
739
/// end twoLeveling,will return back first floor
740
- void twoLevelComplete (
740
+ Future < void > twoLevelComplete (
741
741
{Duration duration: const Duration (milliseconds: 500 ),
742
742
Curve curve: Curves .linear}) {
743
743
headerMode? .value = RefreshStatus .twoLevelClosing;
744
744
WidgetsBinding .instance.addPostFrameCallback ((_) {
745
- position
745
+ return position
746
746
.animateTo (0.0 , duration: duration, curve: curve)
747
747
.whenComplete (() {
748
748
headerMode.value = RefreshStatus .idle;
749
749
});
750
750
});
751
+ return null ;
751
752
}
752
753
753
754
/// request failed,the header display failed state
You can’t perform that action at this time.
0 commit comments