Commit 4fdb9982 authored by Hans Muller's avatar Hans Muller

Workaround for Drawer.initState() fails

parent 58296881
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:async';
import 'dart:sky' as sky; import 'dart:sky' as sky;
import 'package:sky/animation/animated_value.dart'; import 'package:sky/animation/animated_value.dart';
...@@ -68,7 +69,9 @@ class Drawer extends StatefulComponent { ...@@ -68,7 +69,9 @@ class Drawer extends StatefulComponent {
_performance.attachedForce = kDefaultSpringForce; _performance.attachedForce = kDefaultSpringForce;
if (navigator != null) { if (navigator != null) {
navigator.pushState(this, (_) => _performance.reverse()); scheduleMicrotask(() {
navigator.pushState(this, (_) => _performance.reverse());
});
} }
} }
......
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