Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example error #80

Open
kadirkos opened this issue Dec 11, 2021 · 4 comments
Open

example error #80

kadirkos opened this issue Dec 11, 2021 · 4 comments

Comments

@kadirkos
Copy link

════════ Exception caught by gesture ═══════════════════════════════════════════
The following _TypeError was thrown while handling a gesture:
type 'List<Animal?>' is not a subtype of type 'List?' of 'value'

When the exception was thrown, this was the stack
#0 FormFieldState.didChange (package:flutter/src/widgets/form.dart)
#1 __MultiSelectDialogFieldViewState._showDialog..
#2 MultiSelectActions.onConfirmTap
#3 _MultiSelectDialogState.build.
#4 _InkResponseState._handleTap
#5 GestureRecognizer.invokeCallback
#6 TapGestureRecognizer.handleTapUp
#7 BaseTapGestureRecognizer._checkUp
#8 BaseTapGestureRecognizer.handlePrimaryPointer
#9 PrimaryPointerGestureRecognizer.handleEvent
#10 PointerRouter._dispatch
#11 PointerRouter._dispatchEventToRoutes.
#12 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:539:8)
#13 PointerRouter._dispatchEventToRoutes
#14 PointerRouter.route
#15 GestureBinding.handleEvent
#16 GestureBinding.dispatchEvent
#17 RendererBinding.dispatchEvent
#18 GestureBinding._handlePointerEventImmediately
#19 GestureBinding.handlePointerEvent
#20 GestureBinding._flushPointerEventQueue
#21 GestureBinding._handlePointerDataPacket
#25 _invoke1 (dart:ui/hooks.dart:169:10)
#26 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:293:7)
#27 _dispatchPointerDataPacket (dart:ui/hooks.dart:88:31)
(elided 3 frames from dart:async)
Handler: "onTap"
Recognizer: TapGestureRecognizer#d01fa
debugOwner: GestureDetector
state: possible
won arena
finalPosition: Offset(317.3, 638.4)
finalLocalPosition: Offset(35.5, 29.0)
button: 1
sent tap down
════════════════════════════════════════════════════════════════════════════════

@anglesen1120
Copy link

final _items = _animals
.map((animal) => MultiSelectItem<Animal?>(animal, animal.name))
.toList(); will be fix your issue

@GabrielLana
Copy link

GabrielLana commented Jan 6, 2022

I'm having the same issue, already tried this approach, but still getting the same error:
Screenshot_1
Screenshot_2

@GabrielLana
Copy link

Well now I solved my problem, I just did a cast to "values", and now its working.
image

@shinriyo
Copy link

final _items = _animals
    .map((animal) => MultiSelectItem<Animal?>(animal, animal.name))
    .toList();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants