flutter_slidable icon indicating copy to clipboard operation
flutter_slidable copied to clipboard

Error: The method 'hashValues' isn't defined for the class

Open mark8044 opened this issue 1 year ago • 9 comments

It looks like latest master branch PR has dropped hashList support https://github.com/flutter/flutter/pull/151677. This is breaking for this repo with the following errors:

../../../.pub-cache/hosted/pub.dev/flutter_slidable-3.1.1/lib/src/notifications_old.dart:88:23: Error: The method 'hashValues' isn't defined for the class 'SlidableRatioNotification'.
 - 'SlidableRatioNotification' is from 'package:flutter_slidable/src/notifications_old.dart' ('../../../.pub-cache/hosted/pub.dev/flutter_slidable-3.1.1/lib/src/notifications_old.dart').
Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
  int get hashCode => hashValues(tag, ratio);
                      ^^^^^^^^^^

mark8044 avatar Jul 20 '24 03:07 mark8044

Yes, this PR has been merged to fixes this issue. For the moment it's only available on the master branch.

letsar avatar Jul 21 '24 09:07 letsar

I'am also getting the same issue, when would you release?

Yogesh-Dubey-Ayesavi avatar Jul 23 '24 08:07 Yogesh-Dubey-Ayesavi

@letsar Thanks much. I left a comment in the PR, but can it be pushed to pub.dev so we can install it?

mark8044 avatar Jul 23 '24 19:07 mark8044

Waiting the update

PradeepChoran avatar Aug 03 '24 13:08 PradeepChoran

Also ran into this, you can point to master until the new version is published:

  flutter_slidable:
    git:
      url: https://github.com/letsar/flutter_slidable.git
      ref: master

igorilin13 avatar Aug 10 '24 02:08 igorilin13

Thanks for your advice

PradeepChoran avatar Aug 16 '24 11:08 PradeepChoran

git:
      url: https://github.com/letsar/flutter_slidable.git
      ref: master

Hi there. I am a flutter noob. Where to put those lines? As far as I understand .lock file is generated...

Shakenbeer avatar Aug 28 '24 08:08 Shakenbeer

dev_dependencies: flutter_test: sdk: flutter flutter_slidable: git: url: https://github.com/letsar/flutter_slidable.git ref: master

PradeepChoran avatar Aug 28 '24 09:08 PradeepChoran

Thank you good sir

Shakenbeer avatar Aug 28 '24 13:08 Shakenbeer

When this fix will be on pub.dev?

Shunt22 avatar Nov 12 '24 17:11 Shunt22

Also ran into this, you can point to master until the new version is published:

  flutter_slidable:
    git:
      url: https://github.com/letsar/flutter_slidable.git
      ref: master

Just updated to 3.27 and got this error, this solution works

yigtkaya avatar Dec 11 '24 21:12 yigtkaya

Also ran into this, you can point to master until the new version is published:

  flutter_slidable:
    git:
      url: https://github.com/letsar/flutter_slidable.git
      ref: master

Just updated to 3.27 and got this error, this solution works

I'm guessing you would have to remove it from being the direct dependency section right?

oti-adjei avatar Dec 12 '24 14:12 oti-adjei

Sorry for the inconvenience. For some reason I didn't push the changes on pub when I merged this commit. This is done now in the 3.1.2

letsar avatar Dec 12 '24 16:12 letsar