0

Please help with the error in Flutter. I am new in Flutter but unable to resolve

E/flutter ( 6713): [ERROR:flutter/shell/common/shell.cc(103)] Dart Error: error: import of dart:mirrors is not supported in the current Dart runtime
E/flutter ( 6713): [ERROR:flutter/runtime/dart_isolate.cc(171)] Could not prepare isolate.
E/flutter ( 6713): [ERROR:flutter/runtime/runtime_controller.cc(415)] Could not create root isolate.
E/flutter ( 6713): [ERROR:flutter/shell/common/shell.cc(588)] Could not launch engine with configuration.

I have gone through but could not resolve

Link2 link2 link3

Below is pubsec.yml

version: 1.0.0+1

environment:
  sdk: '>=2.12.0 <3.0.0'

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  provider: ^5.0.0
  fluro: ^2.0.3
  dio: ^4.0.0
  pretty_dio_logger: ^1.2.0-beta
  retrofit: any
  logger: any
  json_annotation: ^4.0.1
  injectable: ^1.2.0
  get_it: 6.0.0
  flutter_bloc: ^7.0.0
  hydrated_bloc: ^7.0.0
  bloc: ^7.0.0
  freezed: ^0.14.1
  path_provider: ^2.0.1
  google_fonts: ^2.0.0
  package_info: ^2.0.0
  lottie: ^1.0.1
  flutter_jailbreak_detection: ^1.5.0


dev_dependencies:
  flutter_test:
    sdk: flutter

  retrofit_generator: 2.0.0-beta3
  build_runner: any
  injectable_generator: 1.2.2
  json_serializable: ^4.0.2

Please guide me what am I doing wrong here.

Gagan_iOS
  • 3,638
  • 3
  • 32
  • 51

1 Answers1

0

dart:mirrors is not available in Flutter, in order to allow optimum tree-shaking.

For more information, consult the Flutter FAQ.

Either you are importing dart:mirrors directly, or a package is doing so. You must remove the import or package.

hacker1024
  • 3,186
  • 1
  • 11
  • 31