mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Workaround for Drawer.initState() fails
This commit is contained in:
parent
af433c5552
commit
2ac2653da8
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
@ -68,7 +69,9 @@ class Drawer extends StatefulComponent {
|
||||
_performance.attachedForce = kDefaultSpringForce;
|
||||
|
||||
if (navigator != null) {
|
||||
navigator.pushState(this, (_) => _performance.reverse());
|
||||
scheduleMicrotask(() {
|
||||
navigator.pushState(this, (_) => _performance.reverse());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user