Commit 36f64051 authored by Adam Barth's avatar Adam Barth Committed by GitHub

Remove OverscrollIndicator (#8134)

This feature is wired in differently in the new scrolling world.
parent 7f0b908d
......@@ -57,7 +57,6 @@ export 'src/material/list.dart';
export 'src/material/list_item.dart';
export 'src/material/material.dart';
export 'src/material/mergeable_material.dart';
export 'src/material/overscroll_indicator.dart';
export 'src/material/page.dart';
export 'src/material/paginated_data_table.dart';
export 'src/material/popup_menu.dart';
......
......@@ -8,7 +8,6 @@ import 'package:flutter/widgets.dart';
import 'arc.dart';
import 'colors.dart';
import 'overscroll_indicator.dart';
import 'page.dart';
import 'theme.dart';
......@@ -190,30 +189,6 @@ class _ScrollLikeMountainViewDelegate extends ScrollConfigurationDelegate {
@override
ExtentScrollBehavior createScrollBehavior() => new OverscrollWhenScrollableBehavior(platform: TargetPlatform.android);
ScrollableEdge _overscrollIndicatorEdge(ScrollableEdge edge) {
switch (edge) {
case ScrollableEdge.leading:
return ScrollableEdge.trailing;
case ScrollableEdge.trailing:
return ScrollableEdge.leading;
case ScrollableEdge.both:
return ScrollableEdge.none;
case ScrollableEdge.none:
return ScrollableEdge.both;
}
return ScrollableEdge.both;
}
@override
Widget wrapScrollWidget(BuildContext context, Widget scrollWidget) {
// Only introduce an overscroll indicator for the edges of the scrollable
// that aren't already clamped.
return new OverscrollIndicator(
edge: _overscrollIndicatorEdge(ClampOverscrolls.of(context)?.edge),
child: scrollWidget
);
}
@override
bool updateShouldNotify(ScrollConfigurationDelegate old) => false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment