因为 flutter_paystack 1.0.2+1 依赖于 intl ^0.16.0

时间:2021-01-22 05:40:03

标签: flutter

当我点击运行按钮时,我收到错误

<块引用>

因为 flutter_paystack 1.0.2+1 依赖于 intl ^0.16.0 并且来自 sdk 的每个版本的 flutter_localizations 都依赖于 intl 0.17.0-nullsafety.2, flutter_paystack 1.0.2+1 与 sdk 中的 flutter_localizations 不兼容。

这是我的 pubspec.yml 文件 code

name: my app
description: A new Flutter application.

publish_to: 'none'

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter

  cupertino_icons: ^0.1.2
  scoped_model: ^1.0.1
  rxdart: ^0.24.0
  http: ^0.12.0+2
  json_annotation: ^2.0.0
  flutter_html: ^1.0.2
  flutter_swiper: ^1.1.6
  cached_network_image: ^2.3.3
  shared_preferences: ^0.5.7+3
  country_code_picker: ^1.1.7
  url_launcher: ^5.4.11
  timeago: ^2.0.26
  flutter_rating_bar: ^3.2.0
  webview_flutter: ^0.3.18+1
  font_awesome_flutter: ^8.5.0
  share: ^0.6.5+4
  place_picker: ^0.9.17
  location: 2.3.5
  fluttertoast: ^3.1.3
  flutter_paystack: 1.0.2+1
  sign_in_with_apple: ^2.5.2
  image_picker: ^0.6.6+4
  flutter_webview_plugin: 0.3.10+1
  smooth_star_rating: ^1.1.1
  flutter_icons: ^1.1.0
  firebase_auth: ^0.18.0+1
  google_sign_in: ^4.5.1
  flutter_facebook_login: ^3.0.0
  fab_circular_menu: ^0.1.4
  google_fonts: ^0.3.5
  stripe_payment: ^1.0.7
  network_to_file_image: ^2.3.1
  geocoder: ^0.2.1
  firebase_core: 0.5.0
  firebase_analytics: 6.0.0
  firebase_storage: 4.0.0
  cloud_firestore: 0.14.0+2
  photo_view: ^0.10.2
  intro_slider: ^2.3.1
  #onesignal_flutter: ^2.6.1
  firebase_messaging: 7.0.0
  rounded_loading_button: ^1.0.14
  pin_code_fields: ^5.2.0
  gradient_input_border: ^1.0.0
  devicelocale: ^0.3.3
  lottie: ^0.7.0+1
  webview_cookie_manager: ^1.0.4

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_native_splash: ^0.1.9
  change_app_package_name: ^0.1.2
  flutter_launcher_icons: ^0.8.0

flutter_native_splash:
  image: lib/assets/images/splash.jpg
  color: "ffffff"

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

flutter:

  uses-material-design: true

  assets:
    - lib/assets/images/
    - lib/assets/images/intro/

  fonts:
    - family: MStoreIcons
      fonts:
        - asset: lib/assets/fonts/Icons/MStoreIcons.ttf
    - family: Lexend_Deca
      fonts:
        - asset: lib/assets/fonts/Lexend_Deca/Lexend_Deca-Regular.ttf

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

这是flutter_localizations package的问题,解决办法是降级flutter或将这些行放在dev_dependencies块之后的pubspec.yaml中。

dependency_overrides:
   intl: ^0.17.0-nullsafety.2

问候。