MockLibraryGeneratorFactory typedef

MockLibraryGeneratorFactory = LibraryGenerator Function(MockLibraryGeneratorParams)

Signature for creating custom mock library generators.

Used to provide alternative generator implementations to MockRuntimeScan while maintaining the same mock behavior pattern.

{@template factory_example} Example:

LibraryGenerator createGenerator(MockLibraryGeneratorParams params) {
  return CustomMockGenerator(
    mirrorSystem: params.mirrorSystem,
    // ... other custom initialization
  );
}

final scan = MockRuntimeScan(
  createLibraryGenerator: createGenerator,
);

{@endtemplate}

Implementation

typedef MockLibraryGeneratorFactory = LibraryGenerator Function(MockLibraryGeneratorParams);