I am getting error while compiling flutter app
Anyone can help?
Here is full error :
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/carousel_slider-4.2.0/lib/carousel_slider.dart:311:29: Error: Member not found: 'trackpad'.
PointerDeviceKind.trackpad
Here are dependencies from yaml file
`
version: 1.0.0+1
environment:
sdk: ">=2.16.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
carousel_slider: ^4.2.0
video_player:
`
3
Answers
Clean
pub
cache folder by command bellowAnd download all dependencies by following command in your project directory
IMPORTANT
All libraries will be downloaded from the internet from the scratch and this will take some time depends how many libraries are you using
Welcome Rohan!
This issue is because of the introduction of the new trackpad gestures in version 3.3.0-0.0.pre of flutter as documented here: https://docs.flutter.dev/release/breaking-changes/trackpad-gestures looks like carousel_slider has been update to use it.
You have two options:
you should declare
carousel_slider: 4.1.1
in pubspec.yamlinstead of
carousel_slider: ^4.1.1
because with^
sign flutter will try to use latest version in pub.dev