Merge pull request #838 from abarth/cleanup_global_scope

Cleanup the global scope a bit:
This commit is contained in:
Adam Barth
2015-12-09 12:44:27 -08:00
8 changed files with 68 additions and 80 deletions

View File

@@ -85,7 +85,7 @@ class EnsureVisibleAppState extends State<EnsureVisibleApp> {
cardModel: cardModels[index],
selected: index == selectedCardIndex,
onTap: (BuildContext context) {
ensureWidgetIsVisible(context, duration: const Duration(milliseconds: 200))
Scrollable.ensureVisible(context, duration: const Duration(milliseconds: 200))
.then((_) {
setState(() { selectedCardIndex = index; });
});

View File

@@ -129,7 +129,7 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> {
markers[MarkerType.topLeft] = box.localToGlobal(new Point(0.0, 0.0));
final Size size = box.size;
markers[MarkerType.bottomRight] = box.localToGlobal(new Point(size.width, size.height));
final ScrollableState scrollable = findScrollableAncestor(target.currentContext);
final ScrollableState scrollable = Scrollable.of(target.currentContext);
markersScrollOffset = scrollable.scrollOffset;
});
}