-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Could not run project successfully due to void onDoubleTapDown(TapDownDetails details) method argument type #124
Comments
Hey @tariqali786, could you share the output of the |
Flutter 3.8.0-9.0.pre.1 • channel master • https://github.com/flutter/flutter.git |
Is is possible to switch to the stable channel? |
same issue. i think i need to downgrade |
Switching to Flutter's stable channel will solve the issue, meanwhile I'll align my code to Flutter's master branch and let you know |
I have a simple solution to made it work on both stable and master channel solution was by changing "TapDownDetails" and "TapUpDetails" to "dynamic" |
BTW guys why do you use the master channel? |
I am working in big project and we are using this amazing package .. we build and test for both channels |
To test out dart 3.0 features |
Pushed the update |
Thanks and much appericated |
Thanks for the quick fix |
Thank you! |
/C:/Users/User/AppData/Local/Pub/Cache/hosted/pub.dev/pinput-2.2.23/lib/src/widgets/_pinput_selection_gesture_detector_builder.dart:20:39: Error: The parameter 'details' of the method '_PinputSelectionGestureDetectorBuilder.onDoubleTapDown' has type 'TapDownDetails', which does not match the corresponding type, 'TapDragDownDetails', in the overridden method, 'TextSelectionGestureDetectorBuilder.onDoubleTapDown'.
Change to a supertype of 'TapDragDownDetails', or, for a covariant parameter, a subtype.
void onDoubleTapDown(TapDownDetails details) {
^
/C:/Users/User/flutter/packages/flutter/lib/src/widgets/text_selection.dart:2431:8: Context: This is the overridden method ('onDoubleTapDown').
void onDoubleTapDown(TapDragDownDetails details) {
^
/C:/Users/User/AppData/Local/Pub/Cache/hosted/pub.dev/pinput-2.2.23/lib/src/widgets/_pinput_selection_gesture_detector_builder.dart:27:35: Error: The parameter 'details' of the method '_PinputSelectionGestureDetectorBuilder.onSingleTapUp' has type 'TapUpDetails', which does not match the corresponding type, 'TapDragUpDetails', in the overridden method, 'TextSelectionGestureDetectorBuilder.onSingleTapUp'.
Change to a supertype of 'TapDragUpDetails', or, for a covariant parameter, a subtype.
void onSingleTapUp(TapUpDetails details) {
^
/C:/Users/User/flutter/packages/flutter/lib/src/widgets/text_selection.dart:2144:8: Context: This is the overridden method ('onSingleTapUp').
void onSingleTapUp(TapDragUpDetails details) {
^
/C:/Users/User/AppData/Local/Pub/Cache/hosted/pub.dev/pinput-2.2.23/lib/src/widgets/_pinput_selection_gesture_detector_builder.dart:28:25: Error: The argument type 'TapUpDetails' can't be assigned to the parameter type 'TapDragUpDetails'.
super.onSingleTapUp(details);
^
After changing the method arguments in package class
From
@OverRide
void onDoubleTapDown(TapDownDetails details) {
if (shouldShowSelectionToolbar) {
editableText.showToolbar();
}
}
@OverRide
void onSingleTapUp(TapUpDetails details) {
super.onSingleTapUp(details);
editableText.hideToolbar();
_state._requestKeyboard();
_state.widget.onTap?.call();
}
To
@OverRide
void onDoubleTapDown(TapDragDownDetails details) {
if (shouldShowSelectionToolbar) {
editableText.showToolbar();
}
}
@OverRide
void onSingleTapUp(TapDragUpDetails details) {
super.onSingleTapUp(details);
editableText.hideToolbar();
_state._requestKeyboard();
_state.widget.onTap?.call();
}
after that I successfully run the project . Please solve this in package or guide me what I am missing.
The text was updated successfully, but these errors were encountered: