TypeDefinition constructor

TypeDefinition(
  1. String name, {
  2. String? subtype,
  3. bool isAmbiguous = false,
  4. Node? astNode,
})

Implementation

TypeDefinition(this.name,
    {this.subtype, this.isAmbiguous = false, Node? astNode}) {
  if (subtype == null) {
    _isPrimitive = isPrimitiveType(this.name);
    if (this.name == 'int' && isASTLiteralDouble(astNode)) {
      this.name = 'double';
    }
  } else {
    _isPrimitive = isPrimitiveType('$name<$subtype>');
  }
}