Reputation: 592
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
Upvotes: 11
Views: 6759
Reputation: 1
Instead of using alternate package you can directly add flutter_math_fork into your pubspec.yaml and it works fine :)
Following are steps to add package.
add following code in pubspec.yaml
dependencies:
flutter:
sdk: flutter
flutter_html: any
flutter_math_fork: ^0.7.2
run command
flutter pub get
Upvotes: 0
Reputation: 201
Had this error after upgrading to Flutter 3.10.0. Fixed it by removing flutter_html and adding it again through flutter pub add flutter_html.
After upgrading to Flutter 3.10.0, there is a new version of flutter_html created especially for this version. At this moment it's flutter_html: ^3.0.0-beta.1
Upvotes: 7
Reputation: 21
I equally a flutter pub get pinput to get the preferred version of that package cause I realized it was part of the things making the build to crash
flutter pub add pinput
Upvotes: 1
Reputation: 221
Updating flutter_html to prerelease worked for me:
flutter_html: ^3.0.0-alpha.6
Upvotes: 22
Reputation: 592
Since the flutter_math_fork
is not a package that I use directly.
I had to find the issue by running flutter pub deps
to see the dependancy graph and find the usage of the package. Then I realised that It is a dependancy of flutter_html
then I tried to update the version of flutter_math_fork
as well as flutter_html
but it wasn't success. So I removed that package and used the following package flutter_widget_from_html
as an alternative to the flutter_html
then the problem solved.
Upvotes: 6