I’m getting the following error when I try to run the flutter app on my iPhone simulator.
Error (Xcode):
../../../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:186:20: Error: The argument type ‘void Function(TapDownDetails)’ can’t be
assigned to the parameter type ‘void Function(TapDragDownDetails)?’.
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.“`
here is my dependancies
cupertino_icons: ^1.0.2
flutter_redux: ^0.10.0
dio: ^4.0.3
redux_thunk: ^0.4.0
url_launcher: ^6.1.5
modal_bottom_sheet: ^2.0.0
dropdown_search: ^5.0.5
flutter_html: ^2.1.5
linkable: ^3.0.1
lottie: ^2.2.0
flutter_rating_bar: ^4.0.0
shared_preferences: ^2.0.7
device_info_plus: ^8.0.0
percent_indicator: ^4.2.2
animated_widgets: ^1.1.0
skeletons: ^0.0.3
google_mobile_ads:
firebase_core:
firebase_analytics: ^10.1.0
webview_flutter_plus:
gsheets: ^0.4.2
get_it: ^7.2.0
woocommerce_api: ^0.1.0
skeleton_loader: ^2.0.0+4
I’ve tried the following.
am using the flutter stable channel.
flutter clean
flutter upgrade
- by removing xCode derived data.
- also I tried to fix the error showing by changing the parameter type even it’s a package, but then I’ve to change the code on flutter sdk too. I tried to do that too but still not luck.
2
Answers
Since the
flutter_math_fork
is not a package that I use directly. I had to find the issue by runningflutter pub deps
to see the dependancy graph and find the usage of the package. Then I realised that It is a dependancy offlutter_html
then I tried to update the version offlutter_math_fork
as well asflutter_html
but it wasn't success. So I removed that package and used the following packageflutter_widget_from_html
as an alternative to theflutter_html
then the problem solved.Updating flutter_html to prerelease worked for me: