crawlinknetworks / dropdown_plus

Simple and easy to use Dropdown in forms with search, keyboard navigation, offiline data source, remote data source and easy customization.
MIT License
12 stars 43 forks source link

How to use the onChanged function? #3

Open ShamanSharif opened 3 years ago

ShamanSharif commented 3 years ago

onChanged: (hi) => print("Hello"),

this code gives a type error. error log:

======== Exception caught by gesture =============================================================== The following _TypeError was thrown while handling a gesture: type '(String) => void' is not a subtype of type '((dynamic) => void)?'

When the exception was thrown, this was the stack:

0 DropdownFormFieldState._setValue (package:dropdown_plus/src/dropdown.dart:419:16)

1 DropdownFormFieldState._createOverlayEntry.... (package:dropdown_plus/src/dropdown.dart:263:39)

2 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:989:21)

3 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)

4 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:607:11)

... Handler: "onTap" Recognizer: TapGestureRecognizer#d43b3 debugOwner: GestureDetector state: ready won arena finalPosition: Offset(172.3, 353.3) finalLocalPosition: Offset(162.3, 12.7) button: 1 sent tap down

luca-colazzo commented 2 years ago

Imagine being able to use one of the most important methods

luca-colazzo commented 2 years ago

fixed, PR sent

luca-colazzo commented 2 years ago

Bruh, you closed this but didn't accept the PR?

ShamanSharif commented 2 years ago

Wait brah, let me reopen this. I am sorry. I closed it by mistake

Shaman Sharif


From: Luca @.> Sent: Monday, March 21, 2022 1:59:08 AM To: crawlinknetworks/dropdown_plus @.> Cc: Shaman Sharif @.>; State change @.> Subject: Re: [crawlinknetworks/dropdown_plus] How to use the onChanged function? (#3)

Bruh, you closed this but didn't accept the PR?

— Reply to this email directly, view it on GitHubhttps://github.com/crawlinknetworks/dropdown_plus/issues/3#issuecomment-1073338504, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIBXFAOZEUBANNUFSZ3C32LVA57QZANCNFSM5A6FLQCA. You are receiving this because you modified the open/close state.Message ID: @.***>