Library class Null safety

A Library provides information about a Dart language library.

See setLibraryDebuggable.

Implemented types


Library({required String? name, required String? uri, required bool? debuggable, required List<LibraryDependency>? dependencies, required List<ScriptRef>? scripts, required List<FieldRef>? variables, required List<FuncRef>? functions, required List<ClassRef>? classes, required String id})


classes List<ClassRef>?
A list of all classes in this library.
read / write
classRef ClassRef?
If an object is allocated in the Dart heap, it will have a corresponding class object.
@optional, read / write, inherited
debuggable bool?
Is this library debuggable? Default true.
read / write
dependencies List<LibraryDependency>?
A list of the imports for this library.
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 the top-level functions in this library.
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
json Map<String, dynamic>?
read / write, inherited
name String?
The name of this library.
read / write, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scripts List<ScriptRef>?
A list of the scripts which constitute this library.
read / write
size int?
The size of this object in the heap.
@optional, read / write, inherited
type String
read-only, override
uri String?
The uri of this library.
read / write, override
variables List<FieldRef>?
A list of the top-level variables in this library.
read / write


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) Library?