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

[BUG] code error #1296

Closed
rengui-hs opened this issue May 29, 2023 · 9 comments
Closed

[BUG] code error #1296

rengui-hs opened this issue May 29, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@rengui-hs
Copy link

Describe the bug:

code error

HTML to reproduce the issue:

Html widget configuration:

flutter html demo

Expected behavior:

code works fine

Screenshots:

image

Device details and Flutter/Dart/flutter_html versions:

3.10.1/2.23.1/^3.0.0-beta.1

Stacktrace/Logcat

: 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_sdks/3.10.1/packages/flutter/lib/src/gestures/tap.dart').

  • 'TapDragUpDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter_sdks/3.10.1/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
    onSingleTapUp: onSingleTapUp,

                     ^
    

: 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_sdks/3.10.1/packages/flutter/lib/src/gestures/tap.dart').
  • 'TapDragDownDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter_sdks/3.10.1/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
    onDoubleTapDown: onDoubleTapDown,
    ^
    : 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_sdks/3.10.1/packages/flutter/lib/src/gestures/drag_details.dart').
  • 'TapDragStartDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter_sdks/3.10.1/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
    onDragSelectionStart: onDragSelectionStart,
    ^
    : 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_sdks/3.10.1/packages/flutter/lib/src/gestures/drag_details.dart').
  • 'DragUpdateDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('../../flutter_sdks/3.10.1/packages/flutter/lib/src/gestures/drag_details.dart').
  • 'TapDragUpdateDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter_sdks/3.10.1/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
    onDragSelectionUpdate: onDragSelectionUpdate,
    ^
    : 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_sdks/3.10.1/packages/flutter/lib/src/gestures/drag_details.dart').
  • 'TapDragEndDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../flutter_sdks/3.10.1/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
    onDragSelectionEnd: onDragSelectionEnd,
    ^

Restarted application in 3,396ms.

@rengui-hs rengui-hs added the bug Something isn't working label May 29, 2023
@rengui-hs rengui-hs reopened this May 29, 2023
@rengui-hs rengui-hs changed the title code error [BUG] code error May 29, 2023
@rengui-hs
Copy link
Author

Please release the latest code. This error is due to the version of flutter_math_fork being 0.6.3+1.

@alihaider78222
Copy link

alihaider78222 commented May 29, 2023

Facing same issue after updating flutter to 3.10.0 and dart to 3.0.0.

@lmshek
Copy link

lmshek commented May 29, 2023

Same here after upgrading the flutter to 3.10.2.

@alihaider78222
Copy link

The issue is actually in flutter_math_fork used by flutter_html, I have created a Pull request with the required fixes, hopefully it will be approved and then afterward flutter_html team can update flutter_math_fork dependency and it will be resolved :)

@rengui-hs
Copy link
Author

The issue is actually in flutter_math_fork used by flutter_html, I have created a Pull request with the required fixes, hopefully it will be approved and then afterward flutter_html team can update flutter_math_fork dependency and it will be resolved :)

The latest code has updated the flutter_math_fork version but it has not been released yet

@Sub6Resources
Copy link
Owner

Sub6Resources commented May 31, 2023

The latest version has been released. The issue was with the flutter_math_fork library not having support for Dart 3. Try out 3.0.0-beta.2 which references the latest version of flutter_math_fork which should resolve this issue. If it doesn't resolve, check your pubspec.lock to make sure the latest version of flutter_math_fork is being used.

@rengui-hs
Copy link
Author

@Sub6Resources
image
The 3.0.0-beta.2 version of flutter_html still does not solve this problem

@zhourengui
Copy link
Contributor

I fixed this issue in pr.
#1304

@Sub6Resources
Copy link
Owner

@zhourengui Good catch. I forgot this was a pre-1.0.0 version, so caret syntax only includes up to the next minor version.

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
Status: Done
Development

No branches or pull requests

5 participants