buildIcon property

List<Widget> get buildIcon

Implementation

List<Widget> get buildIcon {
  final List<Widget> list = [];
  if (icon != null) {
    list.add(Icon(icon,
        color: color,
        size: size,
        textDirection: textDirection,
        semanticLabel: semanticLabel));
  }
  if (image != null) list.add(image!);
  if (imageProvider != null) {
    list.add(Image(
        image: imageProvider!,
        width: size,
        height: size,
        color: color,
        fit: BoxFit.scaleDown,
        alignment: Alignment.center,
        excludeFromSemantics: true,
        semanticLabel: semanticLabel));
  }
  if (widget != null) list.add(widget!);
  return list;
}