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
I would love to have the ability to disable the toggle switch. My workaround looks something like this: indicatorColor: isIndicatorDisabled ? Colors.transparent : theme.colorScheme.primary,
Which works for my use case, but does not truly disable the toggle. I would love to be able to pass in a disabled argument to the constructor to prevent interaction. Additionally, I think it would be nice for current to be nullable, and when current is null the indicator is not shown.
The text was updated successfully, but these errors were encountered:
I'm sorry for the late reply 😅
A disabled parameter is a good idea. Until I implement such a feature, you can disable the switch by wrapping IgnorePointer and Opacity around AnimatedToggleSwitch.
I'd still have to figure out how to pass that no value is set. Simply setting current to null is currently difficult, as null can also be in values. I could disallow nullable types for the switch but this would be a breaking change.
Currently I don't have much time to implement such features, but I'll get to it as soon as possible.
I would love to have the ability to disable the toggle switch. My workaround looks something like this:
indicatorColor: isIndicatorDisabled ? Colors.transparent : theme.colorScheme.primary,
Which works for my use case, but does not truly disable the toggle. I would love to be able to pass in a
disabled
argument to the constructor to prevent interaction. Additionally, I think it would be nice forcurrent
to be nullable, and when current is null theindicator
is not shown.The text was updated successfully, but these errors were encountered: