Index: samples/swarm/swarm_ui_lib/view/SliderMenu.dart |
diff --git a/samples/swarm/swarm_ui_lib/view/SliderMenu.dart b/samples/swarm/swarm_ui_lib/view/SliderMenu.dart |
index a059a0c566575d8812a12c34e4991d1a08cbe53d..1db3914804ffab8d94c13cb8a74e9497b2451ccd 100644 |
--- a/samples/swarm/swarm_ui_lib/view/SliderMenu.dart |
+++ b/samples/swarm/swarm_ui_lib/view/SliderMenu.dart |
@@ -157,7 +157,7 @@ class SliderMenu extends View { |
void updateIndicator(bool animate) { |
if (selectedItem != null) { |
// calculate where we want to put the triangle |
- window.setImmediate(() { |
+ scheduleMicrotask(() { |
num x = selectedItem.offset.left + |
selectedItem.offset.width / 2 - TRIANGLE_WIDTH / 2; |
_moveIndicator(x, animate); |