getIconUsingPrefix function

IconData getIconUsingPrefix ({String name })

Implementation

IconData getIconUsingPrefix({String name}) {
  List<String> split = name.split(".");

  if (split.length > 1) {
    name = split[1];
    if (split[0].toLowerCase() == "fa" ||
        split[0].toLowerCase() == "fontawesome") {
      return getFontAwesomeIcon(name: name);
    }
  } else {
    return getIconGuessFavorMaterial(name: name);
  }

  return getMaterialIcon(name: name);
}