Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Flutter v2.5.0 #69

Closed
ndahlquist opened this issue Sep 10, 2021 · 3 comments
Closed

Incompatible with Flutter v2.5.0 #69

ndahlquist opened this issue Sep 10, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@ndahlquist
Copy link
Contributor

ndahlquist commented Sep 10, 2021

Describe the bug

Flutter v2.5.0 was recently released to the stable channel. This library has some compatibility issues (looks like largely from transitive dependencies).

To Reproduce

When importing this library:

Launching lib/main.dart on Pixel 4a in debug mode...
Running Gradle task 'assembleDebug'...
../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/photo_view-0.11.1/lib/src/core/photo_view_gesture_detector.dart:106:29: Error: The argument type 'PointerEvent' can't be assigned to the parameter type 'PointerDownEvent'.
 - 'PointerEvent' is from 'package:flutter/src/gestures/events.dart' ('../../sdks/flutter/packages/flutter/lib/src/gestures/events.dart').
 - 'PointerDownEvent' is from 'package:flutter/src/gestures/events.dart' ('../../sdks/flutter/packages/flutter/lib/src/gestures/events.dart').
    super.addAllowedPointer(event);

When attempting to build the example app:

Running "flutter pub get" in example...
Launching lib/main.dart on Pixel 4a in debug mode...
Running Gradle task 'assembleDebug'...
../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/photo_view-0.11.1/lib/src/core/photo_view_gesture_detector.dart:106:29: Error: The argument type 'PointerEvent' can't be assigned to the parameter type 'PointerDownEvent'.
 - 'PointerEvent' is from 'package:flutter/src/gestures/events.dart' ('../../../sdks/flutter/packages/flutter/lib/src/gestures/events.dart').
 - 'PointerDownEvent' is from 'package:flutter/src/gestures/events.dart' ('../../../sdks/flutter/packages/flutter/lib/src/gestures/events.dart').
    super.addAllowedPointer(event);
                            ^
../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/wakelock_platform_interface-0.2.0/lib/messages.dart:100:17: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel<dynamic>'.
 - 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('../../../sdks/flutter/packages/flutter/lib/src/services/platform_channel.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
        channel.setMockMessageHandler(null);
                ^^^^^^^^^^^^^^^^^^^^^
../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/wakelock_platform_interface-0.2.0/lib/messages.dart:102:17: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel<dynamic>'.
 - 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('../../../sdks/flutter/packages/flutter/lib/src/services/platform_channel.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
        channel.setMockMessageHandler((dynamic message) async {
                ^^^^^^^^^^^^^^^^^^^^^
../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/wakelock_platform_interface-0.2.0/lib/messages.dart:114:17: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel<dynamic>'.
 - 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('../../../sdks/flutter/packages/flutter/lib/src/services/platform_channel.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
        channel.setMockMessageHandler(null);
                ^^^^^^^^^^^^^^^^^^^^^
../../../sdks/flutter/.pub-cache/hosted/pub.dartlang.org/wakelock_platform_interface-0.2.0/lib/messages.dart:116:17: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel<dynamic>'.
 - 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('../../../sdks/flutter/packages/flutter/lib/src/services/platform_channel.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
        channel.setMockMessageHandler((dynamic message) async {
                ^^^^^^^^^^^^^^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script '/Users/nic/sdks/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1005

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/nic/sdks/flutter/bin/flutter'' 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 46s
Exception: Gradle task assembleDebug failed with exit code 1

Expected behavior
The library should be compatible with the latest stable channel.

Additional context
I will try to update the transitive dependencies and see if that resolves the issues (if so, will make a PR).

@ndahlquist ndahlquist added the bug Something isn't working label Sep 10, 2021
ndahlquist added a commit to SwarmMedia/tweet_ui that referenced this issue Sep 10, 2021
ndahlquist added a commit to SwarmMedia/tweet_ui that referenced this issue Sep 10, 2021
@prilepskiy
Copy link

I'm sorry, when do you want to release this?

@ndahlquist
Copy link
Contributor Author

The PR (#71) should be ready to merge and release now. I'd suggest releasing soon, since currently, this library is not compatible with the latest stable Flutter tools. (We're using our fork, so no rush for us in particular)

@ndahlquist
Copy link
Contributor Author

@prilepskiy , until this fix is officially released, you are welcome to use our fork:

  tweet_ui:
    git:
      url: https://github.com/SwarmMedia/tweet_ui.git
      ref: ce0c926aa44ed43f6eb2976f8445199d5f9a49b2

(works properly for us with Flutter 2.5.0)

@kawa89 kawa89 closed this as completed in 664c368 Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants