FlutterSwitch
FlutterSwitch copied to clipboard
The image not fill all toggle space
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- create the switch with active icon = Image.asset.
- change toggleColor: Colors.red (to make it more visible)
- See error
Expected behavior The image should be filled and have a fixed height and width (no red color).
Screenshots

Smartphone (please complete the following information):
- Device: iPhone Xr
- OS: iOS15
Additional context Source code:
return FlutterSwitch(
value: _currentValue,
onToggle: (newValue) {
setState(() {
_currentValue = newValue;
});
},
height: 30,
activeIcon: Image.asset(
'slider-thumb'.pngAssetsPath,
height: 30,
),
inactiveIcon: Image.asset(
'slider-thumb'.pngAssetsPath,
height: 30,
),
toggleColor: Colors.red,
activeColor: CustomColors.greenIndicator,
inactiveColor: CustomColors.pinkIndicator,
);
Thanks