mockable_gen 0.2.2 copy "mockable_gen: ^0.2.2" to clipboard
mockable_gen: ^0.2.2 copied to clipboard

Build_runner generator that emits .mock.g.dart files with realistic XxxMock.mock() / XxxMock.mockList(n) factories for classes annotated with @Mockable() from package:mockable.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add mockable_gen

With Flutter:

 $ flutter pub add mockable_gen

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  mockable_gen: ^0.2.2

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:mockable_gen/mockable_gen.dart';
0
likes
160
points
28
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Build_runner generator that emits .mock.g.dart files with realistic XxxMock.mock() / XxxMock.mockList(n) factories for classes annotated with @Mockable() from package:mockable.

Repository (GitHub)
View/report issues

Topics

#code-generation #mock #testing #skeletonizer

License

MIT (license)

Dependencies

analyzer, build, dart_style, meta, mockable, source_gen

More

Packages that depend on mockable_gen