I am having an InputDecoration which has the border property, If a certain condition is true i apply OutlineInputBorder or else i set it to null which is working correctly. I also want to apply borderRadius if a certain condition is true but i am getting the error The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadius' if i apply the borderRadius without the if statement its just working correctly what might be the issue. Below is my code
decoration: InputDecoration(
labelText:
enableDropDownFormFieldLabelText
? "Select Car"
: null,
border:
enableCustomizableDropDownFormFieldOutlineInputBorder
? OutlineInputBorder(
borderRadius: enableCustomizableDropDownFormFieldOutlineInputBorderBorderRadius
? BorderRadius.circular(15): null)
: null,
contentPadding: const EdgeInsets.only(
left: 10, right: 5))
BorderRadius can not be null. Use BorderRadius.circular(0) istead.
decoration: InputDecoration(
labelText:
enableDropDownFormFieldLabelText
? "Select Car"
: null,
border:
enableCustomizableDropDownFormFieldOutlineInputBorder
? OutlineInputBorder(
borderRadius: enableCustomizableDropDownFormFieldOutlineInputBorderBorderRadius
? BorderRadius.circular(15): BorderRadius.circular(0))
: null,
contentPadding: const EdgeInsets.only(
left: 10, right: 5))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With