【问题标题】:flutter/pub-cache/hosted/pub.dartlang.org/icons_helper-1.2.0-nullsafety.1/lib/icons_helper.dart:726:31: Error: Member not found: 'pie_chart_outlined'颤振/pub-cache/hosted/pub.dartlang.org/icons_helper-1.2.0-nullsafety.1/lib/icons_helper.dart:726:31:错误:找不到成员:\'pie_chart_outlined\'
【发布时间】:2022-08-17 21:34:17
【问题描述】:

在颤振显示此错误时,我不知道为什么会这样,我将所有插件更新为最新版本

/D:/flutter_sdk/flutter/.pub-cache/hosted/pub.dartlang.org/icons_helper-1.2.0-nullsafety.1/lib/icons_helper.dart:726:31: Error: Member not found: \'pie_chart_outlined\'. \'pie_chart_outlined\': Icons.pie_chart_outlined,

这是我的 pubspec.yaml 文件

 dev_dependencies:
  flutter_test:
    sdk: flutter

  fluttertoast: ^8.0.8
  dio: ^4.0.0
  retrofit: ^2.0.1
  shared_preferences: ^2.0.8
  flutter_spinkit: ^4.1.2
  icons_helper: ^1.0.4
  flutter_launcher_icons: ^0.9.2
  rflutter_alert: ^1.0.3
  flutter_easyloading: ^2.0.0
  page_transition: ^1.1.6
  permission_handler: ^8.2.5
  geolocator: ^7.7.0
  url_launcher: ^6.0.12
  multi_select_flutter: ^4.0.0
  flutter_countdown_timer: ^4.1.0
  audioplayers: ^0.20.1
  flutter_switch: ^0.3.2
  file_picker: ^4.1.6
  cached_network_image: ^3.1.0
  mime: ^1.0.1
  call_log: ^3.2.1
  firebase_messaging: ^11.1.0
  firebase_core: ^1.10.0
  overlay_support: ^1.2.1
  system_alert_window: ^1.0.0
  cloud_firestore: ^1.0.5
  flutter_local_notifications: ^5.0.0

flutter_native_splash:
  color : \"fffff\"
  image : assets/rsoft_logo.png
  android: true;
  ios: true;
  android12: true;

flutter_icons:
    android: \"launcher_icon\"
    ios: true
    image_path: \"assets/launcher_icon.png\"

flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/
  #   - images/a_dot_ham.jpeg
  • 试试Universal Fix: (use both)flutter cleanflutter pub cache repair
  • 尝试了两个赞扬仍然导致错误..
  • 也许您可以通过删除实际错误信息之前的内容来使问题的标题更清晰,以帮助其他人更好地理解您的问题

标签: flutter runtime-error pie-chart


【解决方案1】:
  1. 转到此路径 /D:/flutter_sdk/flutter/.pub-cache/hosted/pub.dartlang.org/icons_helper-1.2.0-nullsafety.1/lib/icons_helper.dart 并找到此文件 icons_helper.dart
  2. 查找 Icons.pie_chart_outlined 3)将“Icons.pie_chart_outlined”替换为“Icons.pie_chart_outline_outlined”,然后保存文件。 4)运行flutter pub upgrade(在android studio终端中) 5)然后颤振运行

    我在 material.dart 中遇到了同样的错误,只需按照步骤操作,我希望这可行。

【讨论】:

  • 感谢您的帮助,是的,它有效,但是一旦我运行flutter clean,我每次都需要
  • 有没有其他方法
【解决方案2】:

去这条路/D:/flutter/.pub-cache/hosted/pub.dartlang.org/icons_helper-1.2.0-nullsafety.1/lib/icons_helper.dart and find this file icons_helper.dart

并找到并删除行Icons.pie_chart_outlined 或替换为Icons.pie_chart_outline_outlined

【讨论】:

    猜你喜欢
    • 2022-10-02
    • 2022-12-16
    • 2020-10-10
    • 2022-11-10
    • 2022-01-10
    • 2021-06-15
    • 1970-01-01
    • 2021-05-27
    • 2022-01-22
    相关资源
    最近更新 更多