mockable_gen 0.2.2
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_genWith Flutter:
$ flutter pub add mockable_genThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
mockable_gen: ^0.2.2Alternatively, 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';