Skip to content

Commit

Permalink
fix: adjust conversion type
Browse files Browse the repository at this point in the history
  • Loading branch information
LinXunFeng committed Aug 28, 2023
1 parent a6d0290 commit 3423429
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/common/observer_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ mixin ObserverControllerForInfo on ObserverController {

/// Getting [maxScrollExtent] of viewport
double viewportMaxScrollExtent(RenderViewportBase viewport) {
return (viewport.offset as ScrollPositionWithSingleContext).maxScrollExtent;
final offset = viewport.offset;
if (offset is! ScrollPosition) {
return 0;
}
return offset.maxScrollExtent;
}
}

Expand Down

0 comments on commit 3423429

Please sign in to comment.