openimsdk / open-im-flutter-demo

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

Bug: Failed to run #85

Closed LetItGoSS closed 1 year ago

LetItGoSS commented 1 year ago

What happened?

After running "flutter pub get", I found some error about QRImage and fixed it by replacing "QRImage" with "QrImageView" image

Then I ran "flutter run", and there are a lot of error messages as below;


Launching lib/main.dart on sdk gphone x86 64 in debug mode...
../../.pub-cache/hosted/pub.dev/extended_image-7.0.2/lib/src/gesture/page_view/gesture_page_view.dart:21:49: Error: Required named parameter 'devicePixelRatio' must be provided.
final PageMetrics _testPageMetrics = PageMetrics(
                                                ^
../../flutter/packages/flutter/lib/src/widgets/page_view.dart:266:3: Context: Found this candidate, but the arguments don't match.
  PageMetrics({
  ^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/extended_image-7.0.2/lib/src/gesture/page_view/widgets/scroll_position.dart:214:15: Error: The method 'ExtendedPagePosition.copyWith' doesn't have the named parameter 'devicePixelRatio' of overridden method 'ViewportOffset with ScrollMetrics.copyWith'.
  PageMetrics copyWith({
              ^
../../flutter/packages/flutter/lib/src/widgets/scroll_position.dart:92:16: Context: This is the overridden method ('copyWith').
abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
               ^
../../.pub-cache/hosted/pub.dev/extended_image-7.0.2/lib/src/gesture/page_view/widgets/scroll_position.dart:214:15: Error: The method 'ExtendedPagePosition.copyWith' has fewer named arguments than those of overridden method 'PageMetrics.copyWith'.
  PageMetrics copyWith({
              ^
../../flutter/packages/flutter/lib/src/widgets/page_view.dart:277:15: Context: This is the overridden method ('copyWith').
  PageMetrics copyWith({
              ^
../../.pub-cache/hosted/pub.dev/extended_image-7.0.2/lib/src/gesture/page_view/widgets/scroll_position.dart:214:15: Error: The method 'ExtendedPagePosition.copyWith' doesn't have the named parameter 'devicePixelRatio' of overridden method 'PageMetrics.copyWith'.
  PageMetrics copyWith({
              ^
../../flutter/packages/flutter/lib/src/widgets/page_view.dart:277:15: Context: This is the overridden method ('copyWith').
  PageMetrics copyWith({
              ^
../../.pub-cache/hosted/pub.dev/extended_image-7.0.2/lib/src/gesture/page_view/widgets/scroll_position.dart:222:23: Error: Required named parameter 'devicePixelRatio' must be provided.
    return PageMetrics(
                      ^
../../flutter/packages/flutter/lib/src/widgets/page_view.dart:266:3: Context: Found this candidate, but the arguments don't match.
  PageMetrics({
  ^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/extended_image-7.0.2/lib/src/gesture_detector/drag.dart:145:3: Error: The superclass, 'OneSequenceGestureRecognizer with DragGestureRecognizerMixin', has no unnamed constructor that takes no arguments.
  ExtendedDragGestureRecognizer({
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../.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]);
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
../../.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' ('../../flutter/packages/flutter/lib/src/gestures/tap.dart').
 - 'TapDragDownDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onTapDown: onTapDown,
                 ^
../../.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' ('../../flutter/packages/flutter/lib/src/gestures/tap.dart').
 - 'TapDragUpDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onSingleTapUp: onSingleTapUp,
                     ^
../../.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' ('../../flutter/packages/flutter/lib/src/gestures/tap.dart').
 - 'TapDragDownDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onDoubleTapDown: onDoubleTapDown,
                       ^
../../.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' ('../../flutter/packages/flutter/lib/src/gestures/drag_details.dart').
 - 'TapDragStartDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onDragSelectionStart: onDragSelectionStart,
                            ^
../../.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' ('../../flutter/packages/flutter/lib/src/gestures/drag_details.dart').
 - 'DragUpdateDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('../../flutter/packages/flutter/lib/src/gestures/drag_details.dart').
 - 'TapDragUpdateDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onDragSelectionUpdate: onDragSelectionUpdate,
                             ^
../../.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' ('../../flutter/packages/flutter/lib/src/gestures/drag_details.dart').
 - 'TapDragEndDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
      onDragSelectionEnd: onDragSelectionEnd,
                          ^
../../.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>
      ^^^^^^^^^^^^^^^^^^^^^^^^^
../../flutter/packages/flutter/lib/src/services/text_input.dart:1117:8: Context: 'TextInputClient.insertContent' is defined here.
  void insertContent(KeyboardInsertedContent content) {}
       ^^^^^^^^^^^^^
../../.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> {
                                       ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:6:1: Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'.
import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart';
^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:199:31: Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'.
        this.theme = theme ?? DatePickerTheme(),
                              ^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception 

What did you expect to happen?

successfully run the program

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

git clone

flutter pub get

flutter run

Anything else we need to know?

No response

version

```console $ {name} version # paste output here ```

Cloud provider

OS version

```console # On Linux: $ cat /etc/os-release # paste output here $ uname -a # paste output here # On Windows: C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture # paste output here ```

Install tools

std-s commented 1 year ago

Hello, these are the version issues of the three-party package, please update the latest code, the version of the package has been fixed. Use real machine compilation.

std-s commented 1 year ago

There has been no response for a long time, so I will close this question first.