Class class Null safety

A Class provides information about a Dart language class.

Implemented types


Class({required String? name, required LibraryRef? library, required bool? isAbstract, required bool? isConst, required bool? traceAllocations, required List<InstanceRef>? interfaces, required List<FieldRef>? fields, required List<FuncRef>? functions, required List<ClassRef>? subclasses, required String id, SourceLocation? location, List<InstanceRef>? typeParameters, ErrorRef? error, ClassRef? superClass, InstanceRef? superType, InstanceRef? mixin})


classRef ClassRef?
If an object is allocated in the Dart heap, it will have a corresponding class object.
@optional, read / write, inherited
error ErrorRef?
The error which occurred during class finalization, if it exists.
@optional, read / write
fields List<FieldRef>?
A list of fields in this class. Does not include fields from superclasses.
read / write
fixedId bool?
Provided and set to true if the id of an Object is fixed. If true, the id of an Object is guaranteed not to change or expire. The object may, however, still be Collected.
@optional, read / write, inherited
functions List<FuncRef>?
A list of functions in this class. Does not include functions from superclasses.
read / write
hashCode int
The hash code for this object.
read-only, override
id String?
A unique identifier for an Object. Passed to the getObject RPC to reload this Object.
read / write, inherited
interfaces List<InstanceRef>?
A list of interface types for this class.
read / write
isAbstract bool?
Is this an abstract class?
read / write
isConst bool?
Is this a const class?
read / write
json Map<String, dynamic>?
read / write, inherited
library LibraryRef?
The library which contains this class.
read / write, override
location SourceLocation?
The location of this class in the source code.
@optional, read / write, override
mixin InstanceRef?
The mixin type for this class, if any.
@optional, read / write
name String?
The name of this class.
read / write, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size int?
The size of this object in the heap.
@optional, read / write, inherited
subclasses List<ClassRef>?
A list of subclasses of this class.
read / write
superClass ClassRef?
The superclass of this class, if any.
@optional, read / write
superType InstanceRef?
The supertype for this class, if any.
@optional, read / write
traceAllocations bool?
Are allocations of this class being traced?
read / write
type String
read-only, override
typeParameters List<InstanceRef>?
The type parameters for the class.
@optional, read / write, override


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.

Static Methods

parse(Map<String, dynamic>? json) Class?