mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-23 20:10:12 +08:00
@@ -9,8 +9,7 @@ import 'dart:io' show Platform;
|
||||
|
||||
import 'package:PiliPlus/common/widgets/scroll_behavior.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart'
|
||||
show RefreshScrollPhysics;
|
||||
import 'package:extended_nested_scroll_view/src/refresh.dart';
|
||||
import 'package:flutter/foundation.dart' show clampDouble;
|
||||
import 'package:flutter/material.dart' hide RefreshIndicator;
|
||||
|
||||
@@ -618,10 +617,26 @@ class RefreshScrollBehavior extends CustomScrollBehavior {
|
||||
required this.scrollPhysics,
|
||||
});
|
||||
|
||||
final RefreshScrollPhysics scrollPhysics;
|
||||
final RefreshScrollPhysicsMixin scrollPhysics;
|
||||
|
||||
@override
|
||||
ScrollPhysics getScrollPhysics(BuildContext context) {
|
||||
return scrollPhysics;
|
||||
}
|
||||
}
|
||||
|
||||
class RefreshScrollPhysics extends ClampingScrollPhysics
|
||||
with RefreshScrollPhysicsMixin {
|
||||
const RefreshScrollPhysics({
|
||||
super.parent,
|
||||
required this.onDrag,
|
||||
});
|
||||
|
||||
@override
|
||||
final OnDrag onDrag;
|
||||
|
||||
@override
|
||||
RefreshScrollPhysics applyTo(ScrollPhysics? ancestor) {
|
||||
return RefreshScrollPhysics(parent: buildParent(ancestor), onDrag: onDrag);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user