Я пытаюсь преобразовать свое приложение FLutter во Flutter Web, поэтому я преобразую void main => runApp(Myapp());
в
void main() async {
WidgetsFlutterBinding.ensureInitialized();
runApp(MyApp());
}
Но я запускаю flutter run -d chrome, у меня есть белая страница и эта ошибка :
Uncaught (in promise) Error: Exception: webOnlyScheduleFrameCallback must be initialized first.
at Object.throw_ [as throw] (errors.dart:196)
at engine.EngineWindow.new.scheduleFrame (window.dart:724)
at binding$3.WidgetsFlutterBinding.new.scheduleFrame (binding.dart:709)
at binding$3.WidgetsFlutterBinding.new.ensureVisualUpdate (binding.dart:665)
at object$.PipelineOwner.new.requestVisualUpdate (object.dart:880)
at view.RenderView.new.scheduleInitialFrame (view.dart:126)
at binding$3.WidgetsFlutterBinding.new.initRenderView (binding.dart:140)
Флаттер доктор:
[√] Flutter (Channel beta, v1.14.6, on Microsoft Windows [version 10.0.18362.720], locale fr-FR)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Chrome - develop for the web
[!] Android Studio (version 3.5)
X Unable to determine bundled Java version.
[√] VS Code (version 1.43.2)
[√] Connected device (2 available)