codegrue / flutter_material_pickers

A flutter package for displaying common picker dialogs.
https://pub.dev/packages/flutter_material_pickers
MIT License
98 stars 61 forks source link

Flutter 2.5.0 - Error: The argument type 'PointerEvent' can't be assigned to the parameter type 'PointerDownEvent' #36

Closed NikolaGrujic91 closed 2 years ago

NikolaGrujic91 commented 2 years ago

After updating to Flutter 2.5.0 error started showing up.

Launching lib/main.dart on macOS in debug mode... Building macOS application... ../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_colorpicker-0.4.0/lib/src/hsv_picker.dart:731:29: Error: The argument type 'PointerEvent' can't be assigned to the parameter type 'PointerDownEvent'.

Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Building targets in parallel note: Planning build note: Analyzing workspace note: Constructing build description note: Build preparation complete BUILD FAILED

Exception: Build process failed

flutter --version Flutter 2.5.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision 4cc385b4b8 (13 hours ago) • 2021-09-07 23:01:49 -0700 Engine • revision f0826da7ef Tools • Dart 2.14.0

elhe26 commented 2 years ago

I'm having the same problem. I had to downgrade to v2.2.2

eae1212 commented 2 years ago

I also have the same problem. After downgrade to 2.2.3 build is ok

bobatsar commented 2 years ago

Flutter colorpicker has released an updated version with a fix. See https://github.com/mchome/flutter_colorpicker/issues/56

Can you please update the dependency to use flutter_colorpicker 0.6.0?

Current workaround in pubspec.yaml

dependency_overrides:
  flutter_colorpicker: ^0.6.0 
NikolaGrujic91 commented 2 years ago

Workaround suggested by @bobatsar solved the error in my case. Thanks!