Skip to content

Commit 3857a57

Browse files
authored
Merge pull request #29 from ziqq/feat/add_post_frame_call_back
feat: add post frame call back
2 parents 1971812 + 9e47389 commit 3857a57

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ packages:
4949
path: ".."
5050
relative: true
5151
source: path
52-
version: "1.1.0"
52+
version: "1.1.1"
5353
fake_async:
5454
dependency: transitive
5555
description:

lib/src/custom_refresh_indicator.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ class CustomRefreshIndicatorState extends State<CustomRefreshIndicator>
206206

207207
if (_canStart) setIndicatorState(IndicatorState.dragging);
208208

209-
controller.setAxisDirection(notification.metrics.axisDirection);
209+
WidgetsBinding.instance!.addPostFrameCallback((_) {
210+
controller.setAxisDirection(notification.metrics.axisDirection);
211+
});
212+
210213
return false;
211214
}
212215

0 commit comments

Comments
 (0)