isValidGenericType property
bool
isValidGenericType
Returns true
if genericType matches type.
Implementation
bool get isValidGenericType {
var genericType = this.genericType;
var type = this.type;
if (genericType == type) {
return true;
}
if (this.isIterable && hasArguments) {
var arg = arguments[0];
var valid = arg.isValidGenericType;
if (valid) {
var genericType2 = arg.toListType().genericType;
if (genericType2 == genericType) {
return true;
}
}
}
return false;
}