Closed giantss closed 1 year ago
Can the above forbidden state be achieved? @ketanchoyal
expected:
When clicking an option, if it is intercepted, the clicked option does not change anything。
reality: When the option is clicked, it is intercepted in the
radioButtonValue
callback method, and the clicked option still changes color, which has the same effect as before the interception.May I ask how to achieve the desired effect?
Can you explain it a bit, I don't quite get the idea what you're trying to say
Can the above forbidden state be achieved? @ketanchoyal
Disabling a Button?
yes! thank you very much.
@ketanchoyal hi,
I updated the local plug-in to v2.1.3, and I can already see the two attributes disabledValues
and disabledColor
, but after using it, I found that there is no difference from before, as if these two attributes have no effect.
Here is an example:
CustomRadioButton(
elevation: 0,
width: 115,
height: 40,
absoluteZeroSpacing: true,
enableShape: true,
defaultSelected: "0",
unSelectedColor:Colors.transparent,
unSelectedBorderColor: Colors.transparent,
selectedBorderColor: Colors.transparent,
selectedColor: Colors.red,
buttonTextStyle: const ButtonTextStyle(
selectedColor: Colors.white,
unSelectedColor:Colors.black,
textStyle: TextStyle(fontSize: 16)
),
buttonLables: const [
'考试模式',
'课本模式',
'敬请期待',
],
disabledValues: const ["考试模式"],
disabledColor: Colors.grey,
buttonValues: const [
"0",
"1",
"2",
],
radioButtonValue: (value){
},
)
it says disable values not disable label
Is it possible to disable clicking? And the click has no effect.
@ketanchoyal hello,
Is this need likely to be met?
It's already available, if you pass the values in disabled values I'll disable the button click action
@ketanchoyal oh, i found a bug。
When the horizontal
property is set to false
, the disabledValues
configuration item is invalid.
expected:
When clicking an option, if it is intercepted, the clicked option does not change anything。
reality: When the option is clicked, it is intercepted in the
radioButtonValue
callback method, and the clicked option still changes color, which has the same effect as before the interception.May I ask how to achieve the desired effect?