Home > other >  Getting error in flutter compilation like : carousel_slider-4.2.0/lib/carousel_slider.dart:311:29: E
Getting error in flutter compilation like : carousel_slider-4.2.0/lib/carousel_slider.dart:311:29: E

Time:12-11

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:

`

CodePudding user response:

Clean pub cache folder by command bellow

flutter pub cache repair 

And download all dependencies by following command in your project directory

flutter pub cache repair 

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

CodePudding user response:

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:

  1. Upgrade your flutter SDK to 3.3.0-0.0.pre or greater
  2. Or downgrade carousel_slider: 4.1.0
  • Related