MockLibraryGeneratorParams class

Configuration parameters for creating a MockLibraryGenerator.

This bundles all required dependencies and configuration needed to instantiate a mock library generator.

{@template params_example} Example:

final params = MockLibraryGeneratorParams(
  mirrorSystem: currentMirrorSystem(),
  forceLoadedMirrors: myLibraries,
  onInfo: print,
  onError: print,
  configuration: config,
  packages: [Package(name: 'test', version: '1.0.0')],
);

{@endtemplate}

Constructors

MockLibraryGeneratorParams({required MirrorSystem mirrorSystem, required List<LibraryMirror> forceLoadedMirrors, required void onInfo(String), required void onWarning(String), required void onError(String), required RuntimeScannerConfiguration configuration, required List<Package> packages})
Configuration parameters for creating a MockLibraryGenerator.

Properties

configuration RuntimeScannerConfiguration
Configuration controlling the scanning behavior.
final
forceLoadedMirrors List<LibraryMirror>
Additional libraries to include in scanning beyond current isolate.
final
hashCode int
The hash code for this object.
no setterinherited
mirrorSystem MirrorSystem
The mirror system to use for reflection operations.
final
onError → void Function(String)
Callback for error messages during generation.
final
onInfo → void Function(String)
Callback for informational messages during generation.
final
onWarning → void Function(String)
Callback for warning messages during generation.
final
packages List<Package>
Known package metadata for resolution.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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