easy_mock_package_info 0.1.0
easy_mock_package_info: ^0.1.0 copied to clipboard
Readable test mock for package_info_plus. Sets PackageInfo through the package's own setMockInitialValues seam (it caches the result, so a raw channel mock would be unreliable).
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add easy_mock_package_infoThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
easy_mock_package_info: ^0.1.0Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:easy_mock_package_info/easy_mock_package_info.dart';