Is there any way we can add custom margin around ‘CupertinoSwitch’ thumb? Below is how I am using ‘CupertinoSwitch’, I don’t find any property for the same available for this widget.
`CupertinoSwitch(
onChanged: onChanged,
value: value,
activeColor:
MyColors.primaryColor.platformBrightnessColor(context),
trackColor:
MyColors.greyColor.platformBrightnessColor(context),
),`
And below is how it is looking–
Bydefault the (white-circular thumb) margin is 1px, I want to make it custom as per the business needs. Please suggest if there is any workaround available for this, also let me know if more details required on the same. Thanks in advance!
2
Answers
this is flutter source code form thumb_painter.dart && geometry.dart.
you can edit @param delta for you need.