-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
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).
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
steveyu2
Metadata
Metadata
Assignees
Labels
No labels