DecoderCallBack 不是类型

问题描述 投票:0回答:1

当我尝试在手机中运行我的 flutter 代码时,它显示此错误:

    Error: 'DecoderCallback' isn't a type.
  ImageStreamCompleter load(AdvancedNetworkImage key, DecoderCallback decode) {

这是我的 pubspec.yaml 文件:

    name: 
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 12.0.0+1

environment:
  sdk: ">=2.16.2 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.4
  dartz: ^0.10.1
  animated_text_kit: ^4.2.1
  font_awesome_flutter: ^10.1.0
  intl: ^0.18.1
  pinput: ^3.0.1
  # flutter_svg: ^2.0.4
  flutter_svg: ^1.1.6
  json_serializable: ^6.2.0
  json_annotation: ^4.5.0
  freezed_annotation: ^2.2.0
  uuid: ^4.0.0
  get_it: ^7.2.0
  provider: ^6.0.2
  # camera: ^0.9.7+1
  permission_handler: ^11.0.0
  encrypt: ^5.0.1
  http: ^0.13.6
  equatable: ^2.0.3
  # mysql1: ^0.20.0
  shared_preferences: ^2.0.15
  image_picker: ^1.0.4
  timeago: ^3.3.0
  jiffy: ^6.2.1
  google_fonts: ^4.0.4
  from_css_color: ^2.0.0
  simple_gradient_text: ^1.2.4
  dynamic_height_grid_view: ^0.0.3
  get: ^4.6.5
  flutter_rating_bar: ^4.0.1
  multiselect: ^0.1.0
  multiselect_formfield: ^0.1.7
  getwidget: ^4.0.0
  dropdown_button2: ^2.0.0
  custom_rating_bar: ^2.0.4
  flutter_rating_native: ^0.0.2
  flutter_launcher_icons: ^0.13.1
  tuple: ^2.0.1
  change_app_package_name: ^1.1.0
  animated_splash_screen: ^1.3.0
  custom_refresh_indicator: ^2.0.1
  flutter_gif: ^0.0.4
  url_launcher: ^6.1.10
  firebase_dynamic_links: ^5.3.1
  is_first_run: ^1.0.0
  extended_nested_scroll_view: ^6.0.0
  path: ^1.8.2
  image_cropper: ^4.0.1
  crop_image: ^1.0.5
  # sqlite3: ^1.11.0
  hive: ^2.2.3
  hive_flutter: ^1.1.0
  multi_select_flutter: ^4.1.3
  crop: ^0.5.5
  flutter_advanced_networkimage_2: ^2.0.1
  # firebase_storage: ^11.2.0
  # cloud_firestore: ^4.7.0
  sqflite: ^2.2.8+3
  path_provider: ^2.0.15

  # google sign-in using firebase
  firebase_auth: ^4.6.1
  google_sign_in: ^6.1.1
  # video_viewer: ^1.2.7
  # video_player: ^2.6.1








dev_dependencies:
  flutter_test:
    sdk: flutter
  freezed: ^2.3.2
  flutter_lints: ^2.0.1
  build_runner: ^2.1.10


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


# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
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/app_logo.svg
    - assets/images/app_logo.png
    - assets/images/mail.svg
    - assets/images/padlock.svg
    - assets/images/hide_1.svg
    - assets/images/google.svg
    - assets/images/facebook.svg
    - assets/images/Edit.svg
    - assets/images/Settings.svg
    - assets/images/Profile.svg
    - assets/images/Camera.svg
    - assets/images/back.svg
    - assets/images/Multiply.svg
    - assets/images/FourSquares.svg
    - assets/images/Bookmark.svg
    - assets/images/user.svg
    - assets/images/phone.svg
    - assets/images/dob.svg
    - assets/images/gender.svg
    - assets/images/left-arrow.svg
    - assets/images/Forward.svg
    - assets/images/delete.svg
    - assets/images/Cancel.svg
    - assets/images/newDelete.svg
    - assets/images/Ok.svg
    - assets/images/Right.svg
    - assets/images/Close.svg
    - assets/images/Home.svg
    - assets/images/addPost.svg
    - assets/images/Search.svg
    - assets/images/Profile_Icon.svg
    - assets/images/loader/logo.webp
    - assets/images/loader/indicators.webp
    - assets/images/hashtags.svg
    - assets/images/Customer.svg
    - assets/images/Rate.svg
    - assets/images/Like.svg
    - assets/images/Share.svg
    - assets/images/Comment.svg
    - assets/images/Eye.svg
    - assets/images/Heart.svg
    - assets/images/bell.svg
    - assets/images/new.svg
    - assets/images/support.svg
    - assets/images/Plus.svg
    - assets/images/Pen.svg
    - assets/images/trans_app_logo.png
    - assets/gif/splash_screen.gif
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
    - family: Recoleta Alt
      fonts:
        - asset: fonts/Recoleta Alt.ttf
          weight: 400
    - family: AbhayaLibre-ExtraBold
      fonts:
        - asset: fonts/AbhayaLibre-ExtraBold.ttf
          weight: 800
    - family: NotoEmoji
      fonts:
        - asset: fonts/NotoColorEmoji-Regular.ttf
          weight: 400
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

显示依赖项“flutter_advanced_networkimage_2:^2.0.1”的错误 我尝试检查它是否与颤振兼容,但没问题。 我尝试将依赖项更新为较新的依赖项,但它表明很少有依赖项不兼容。 我尝试将频道从主频道更改为稳定频道,但这也不起作用。

flutter decoder networkimageview
1个回答
0
投票

我也有同样的错误。

您可以简单地升级依赖项,如下所示:

$ flutter 酒吧升级

© www.soinside.com 2019 - 2024. All rights reserved.