getIsSingleType function

bool getIsSingleType(
  1. List types
)

Implementation

bool getIsSingleType(List<dynamic> types) {
  bool isSingleType = true;
  var lastType = null;
  for (final type in types) {
    if (type != lastType && lastType != null) {
      isSingleType = false;
      break;
    }
    lastType = type;
  }
  return isSingleType;
}