| Index: samples/ui_lib/view/SliderMenu.dart
|
| diff --git a/samples/ui_lib/view/SliderMenu.dart b/samples/ui_lib/view/SliderMenu.dart
|
| index 16a5b1aca556a3c6562dffba67c5cb2fe0f46e59..db7a1f052674862cbb86f3f425450265da95d211 100644
|
| --- a/samples/ui_lib/view/SliderMenu.dart
|
| +++ b/samples/ui_lib/view/SliderMenu.dart
|
| @@ -155,9 +155,9 @@ class SliderMenu extends View {
|
| void updateIndicator(bool animate) {
|
| if (selectedItem != null) {
|
| // calculate where we want to put the triangle
|
| - selectedItem.rect.then((ElementRect rect) {
|
| - num x = rect.offset.left +
|
| - rect.offset.width / 2 - TRIANGLE_WIDTH / 2;
|
| + window.requestLayoutFrame(() {
|
| + num x = selectedItem.offsetLeft +
|
| + selectedItem.offsetWidth / 2 - TRIANGLE_WIDTH / 2;
|
| _moveIndicator(x, animate);
|
| });
|
| } else {
|
|
|