openimsdk / open-im-flutter-demo

Demo developed based on flutter open IM SDK.
https://openim.io
Apache License 2.0
279 stars 195 forks source link

Bug: Fluuter demo dependencies error from flutter_openim_widget and flutter_openim_demo #81

Closed labike closed 1 year ago

labike commented 1 year ago

What happened?

running flutter run, i get this error:

/C:/Users/Administrator/AppData/Local/Pub/Cache/git/flutter_openim_widget-d31f998ca3649c3a272c864b6aa73bd6a9419208/lib/src/chat_emoji_view.dart:262:11: Error: No named parameter with the name 'showRecentsTab'.
          showRecentsTab: true,
          ^^^^^^^^^^^^^^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/emoji_picker_flutter-1.6.1/lib/src/config.dart:19:9: Context: Found this candidate, but the arguments don't match.
  const Config({
        ^^^^^^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_library-10.0.0/lib/src/selection/extended_text_selection.dart:364:18: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
 - 'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/tap.dart').
 - 'TapDragDownDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('/G:/flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onTapDown: onTapDown,
                 ^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_library-10.0.0/lib/src/selection/extended_text_selection.dart:369:22: Error: The argument type 'void Function(TapUpDetails)' can't be assigned to the parameter type 'void Function(TapDragUpDetails)?'.
 - 'TapUpDetails' is from 'package:flutter/src/gestures/tap.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/tap.dart').
 - 'TapDragUpDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('/G:/flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onSingleTapUp: onSingleTapUp,
                     ^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_library-10.0.0/lib/src/selection/extended_text_selection.dart:374:24: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
 - 'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/tap.dart').
 - 'TapDragDownDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('/G:/flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onDoubleTapDown: onDoubleTapDown,
                       ^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_library-10.0.0/lib/src/selection/extended_text_selection.dart:375:29: Error: The argument type 'void Function(DragStartDetails)' can't be assigned to the parameter type 
'void Function(TapDragStartDetails)?'.
 - 'DragStartDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
 - 'TapDragStartDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('/G:/flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onDragSelectionStart: onDragSelectionStart,
                            ^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_library-10.0.0/lib/src/selection/extended_text_selection.dart:376:30: Error: The argument type 'void Function(DragStartDetails, DragUpdateDetails)' can't be assigned to 
the parameter type 'void Function(TapDragUpdateDetails)?'.
 - 'DragStartDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
 - 'DragUpdateDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
 - 'TapDragUpdateDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('/G:/flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onDragSelectionUpdate: onDragSelectionUpdate,
                             ^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_library-10.0.0/lib/src/selection/extended_text_selection.dart:377:27: Error: The argument type 'void Function(DragEndDetails)' can't be assigned to the parameter type 'void Function(TapDragEndDetails)?'.
 - 'DragEndDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
 - 'TapDragEndDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('/G:/flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onDragSelectionEnd: onDragSelectionEnd,
                          ^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_field-11.0.1/lib/src/extended_editable_text.dart:1253:7: Error: The non-abstract class 'ExtendedEditableTextState' is missing implementations for these members:
 - TextInputClient.insertContent
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class ExtendedEditableTextState extends State<ExtendedEditableText>
      ^^^^^^^^^^^^^^^^^^^^^^^^^
/G:/flutter/packages/flutter/lib/src/services/text_input.dart:1117:8: Context: 'TextInputClient.insertContent' is defined here.
  void insertContent(KeyboardInsertedContent content) {}
       ^^^^^^^^^^^^^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_field-11.0.1/lib/src/extended_render_editable.dart:82:40: Error: Type 'BidirectionalIterator' not found.
class VerticalCaretMovementRun extends BidirectionalIterator<TextPosition> {
                                       ^^^^^^^^^^^^^^^^^^^^^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text-10.0.1/lib/src/selection/extended_text_selection.dart:151:7: Error: The non-abstract class 'ExtendedTextSelectionState' is missing implementations for these members:    
 - TextInputClient.insertContent
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class ExtendedTextSelectionState extends State<ExtendedTextSelection>
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
/G:/flutter/packages/flutter/lib/src/services/text_input.dart:1117:8: Context: 'TextInputClient.insertContent' is defined here.
  void insertContent(KeyboardInsertedContent content) {}
       ^^^^^^^^^^^^^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/r_scan-0.1.6+1/lib/src/r_scan_view.dart:38:18: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'.
    SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]);
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* Where:
Script 'G:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1201

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'G:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 24s
Running Gradle task 'assembleDebug'...                             25.3s
Exception: Gradle task assembleDebug failed with exit code 1

What did you expect to happen?

some error from flutter_openim_widget and other error from pub.dev/lib or flutter/package dependencies, i don't know how fixed error.

How can we reproduce it (as minimally and precisely as possible)?

my dependencies:

name: openim_demo
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `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: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.10.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    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.5
  flutter_screenutil: 5.8.4
  get: 4.6.5
  shared_preferences: 2.1.2
  path_provider: 2.0.15
  sprintf: 7.0.0
  rxdart: 0.27.7
  pin_code_fields: 7.4.0
  image_picker: 0.8.9
  dio: 4.0.6
  azlistview: 2.0.0
  lpinyin: 2.0.3
#  country_code_picker: 2.0.2
  country_picker: 2.0.20
  image_gallery_saver: 2.0.2
  flutter_easyloading: 3.0.5
  wechat_assets_picker: 8.5.0
  wechat_camera_picker: 3.8.0
  file_picker: 4.4.0
  open_file: 3.3.2
  permission_handler: 10.3.0
  mime_type: 1.0.0
  uuid: 3.0.7
  cached_network_image: 3.2.3
  flutter_cache_manager: 3.3.0
  lottie: 1.4.3
  qr_flutter: 4.0.0
  image_cropper: 2.0.3
  dotted_decoration: 2.0.0
  package_info_plus: 1.4.0
  search_keyword_text: ^0.0.2
  qr_code_scanner: 1.0.0
  pretty_dio_logger: 1.2.0-beta-1
  logger: 1.4.0
  animated_text_kit: 4.2.2
  flutter_local_notifications: 9.3.2
  flutter_app_badger: 1.5.0
  crypto: 3.0.3
  pull_to_refresh: 2.0.0
  url_launcher: 6.1.11
  sp_util: 2.0.3
  common_utils: 2.1.0
  uri_to_file: 0.2.0
  map_launcher: 2.2.1+1
  flutter_map: 1.1.1
  intl: 0.18.0
  flutter_spinkit: 5.2.0
  percent_indicator: 4.2.3
  flutter_image_compress: 1.1.3
  app_installer: 1.1.0
  r_scan: 0.1.6+1
  collection: 1.17.1
  flutter_bugly: 0.4.4
  tencent_cos: 1.0.8
  flutter_cupertino_datetime_picker: 3.0.0
  device_info_plus: 6.0.0
  dart_date: 1.2.2
  getuiflut: 0.2.14
#  flutter_openim_widget: 2.3.0
  flutter_openim_widget:
    git:
      url: https://github.com/hrxiang/flutter_openim_widget.git
      ref: 2.3.5+3
  # flutter_openim_sdk:
  #   git:
  #     url: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter.git
  #     ref: 2.3.5+3
#    path: ../flutter_openim_widget

dev_dependencies:
  flutter_test:
    sdk: flutter

dependency_overrides:
  scrollable_positioned_list: 0.3.2
  #  visibility_detector: ^0.3.3
  xml: 6.0.1
  camera_android: 0.9.7+1
  camera_avfoundation: 0.9.7+1
  ffi: 2.0.1
  pull_to_refresh:
    git:
      url: https://github.com/miquelbeltran/flutter_pulltorefresh
      ref: master
  # cached_network_image: 
  #   git:
  #     url: https://github.com/lucasmiranda5/flutter_cached_network_image.git
  #     ref: dart3
  #     path: cached_network_image

# 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.
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/
    - assets/anim/

  # 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: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Anything else we need to know?

No response

version

Flutter 2.12.0-4.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5c931b769b (1 year, 3 months ago) • 2022-03-29 10:49:29 -0500
Engine • revision 486f4a749e
Tools • Dart 2.17.0 (build 2.17.0-182.2.beta) • DevTools 2.11.1

Cloud provider

Flutter 2.12.0-4.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5c931b769b (1 year, 3 months ago) • 2022-03-29 10:49:29 -0500
Engine • revision 486f4a749e
Tools • Dart 2.17.0 (build 2.17.0-182.2.beta) • DevTools 2.11.1

OS version

win10

Install tools

hrxiang commented 1 year ago

flutter3.7+ . pls see readme

labike commented 1 year ago

@hrxiang i change flutter version:

Flutter 3.7.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9944297138 (4 months ago) • 2023-02-08 15:46:04 -0800
Engine • revision 248290d6d5
Tools • Dart 2.19.2 • DevTools 2.20.1

and delete .AppData/Local/Cache/Pub/ cache files, then flutter run, get above error, eg:

/C:/Users/Administrator/AppData/Local/Pub/Cache/git/flutter_openim_widget-d31f998ca3649c3a272c864b6aa73bd6a9419208/lib/src/chat_emoji_view.dart:262:11: Error: No named parameter with the name 'showRecentsTab'.
          showRecentsTab: true,
          ^^^^^^^^^^^^^^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/emoji_picker_flutter-1.6.1/lib/src/config.dart:19:9: Context: Found this candidate, but the arguments don't match.
  const Config({
        ^^^^^^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_library-10.0.0/lib/src/selection/extended_text_selection.dart:364:18: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
 - 'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/tap.dart').
 - 'TapDragDownDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('/G:/flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onTapDown: onTapDown,
                 ^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text_library-10.0.0/lib/src/selection/extended_text_selection.dart:369:22: Error: The argument type 'void Function(TapUpDetails)' can't be assigned to the parameter type 'void Function(TapDragUpDetails)?'.
 - 'TapUpDetails' is from 'package:flutter/src/gestures/tap.dart' ('/G:/flutter/packages/flutter/lib/src/gestures/tap.dart').
 - 'TapDragUpDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('/G:/flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onSingleTapUp: onSingleTapUp,

etc.