defaultSelectionIndicatorBuilder static method
Widget Function(bool multiple, bool isSelected, bool isDisabled)
defaultSelectionIndicatorBuilder(
- ColorScheme colors
Implementation
static Widget Function(bool multiple, bool isSelected, bool isDisabled) defaultSelectionIndicatorBuilder(ColorScheme colors) {
return (multiple, isSelected, isDisabled) {
final color = isDisabled
? colors.onSurface.o(0.38)
: isSelected
? colors.onPrimaryContainer
: colors.onSurfaceVariant;
if (multiple) {
return Padding(
padding: const EdgeInsets.only(right: 8.0),
child: TIcon.raw(isSelected ? HugeIcons.strokeRoundedCheckmarkSquare03 : HugeIcons.strokeRoundedSquare, size: 18, color: color),
);
}
if (isSelected) {
return Padding(
padding: const EdgeInsets.only(right: 8.0),
child: TIcon.raw(HugeIcons.strokeRoundedTick01, size: 18, color: color),
);
}
return const SizedBox.shrink();
};
}