getStarItemView method

Widget getStarItemView(
  1. dynamic path,
  2. Color color
)

Implementation

Widget getStarItemView(dynamic path, Color color) {
  if (path is IconData) {
    return Icon(
      path,
      size: widget.size,
      color: color,
    );
  } else if (path is String) {
    return Image.asset(
      path,
      height: widget.size,
      width: widget.size,
      color: color,
    );
  }
  return Icon(
    Icons.star,
    size: widget.size,
    color: color,
  );
}