Merge pull request #838 from abarth/cleanup_global_scope
Cleanup the global scope a bit:
This commit is contained in:
@@ -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; });
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user