You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a ChipsChoice.multiple widget with multiple choice items using C2Choice.listFrom.
Define a style function to dynamically set the style properties of each chip based on its selected state.
Update the selected state of a chip by changing the value of the value property.
Observe that the style properties specified in the style function do not update unless an avatarText function is provided.
Expected Behavior:
When changing the selected state of a chip, the style properties specified in the style function should update accordingly, regardless of whether an avatarText function is provided.
Actual Behavior:
The style properties specified in the style function do not update unless an avatarText function is provided. Without an avatarText function, the style of the chips remains unchanged, even though the selected state changes.
Impact:
This issue affects applications that use the ChipsChoice widget and rely on dynamically updating the style of chips based on their selected state. It can lead to inconsistencies in the UI and hinder the ability to provide a consistent user experience.
Workaround:
A workaround for this issue is to provide an empty avatarText function even if it's not needed for the specific use case. This forces the ChipsChoice widget to update the style properties specified in the style function.
Reproduction Steps:
ChipsChoice.multiple
widget with multiple choice items usingC2Choice.listFrom
.style
function to dynamically set the style properties of each chip based on its selected state.value
property.style
properties specified in the style function do not update unless anavatarText
function is provided.Expected Behavior:
When changing the selected state of a chip, the style properties specified in the
style
function should update accordingly, regardless of whether anavatarText
function is provided.Actual Behavior:
The style properties specified in the
style
function do not update unless anavatarText
function is provided. Without an avatarText function, the style of the chips remains unchanged, even though the selected state changes.Impact:
This issue affects applications that use the
ChipsChoice
widget and rely on dynamically updating thestyle
of chips based on their selected state. It can lead to inconsistencies in the UI and hinder the ability to provide a consistent user experience.Workaround:
A workaround for this issue is to provide an empty avatarText function even if it's not needed for the specific use case. This forces the
ChipsChoice
widget to update the style properties specified in thestyle
function.Environment:
Flutter version: 3.16.9 • channel stable
chips_choice package version: 3.0.1
Platform: All
Code Snippet:
The text was updated successfully, but these errors were encountered: