easy_mock_local_notifications 0.1.0 copy "easy_mock_local_notifications: ^0.1.0" to clipboard
easy_mock_local_notifications: ^0.1.0 copied to clipboard

Makes flutter_local_notifications work under `flutter test`. mockLocalNotifications.init() registers the real Android platform impl (the native registrant that normally does this doesn't run in tests, [...]

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add easy_mock_local_notifications

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

dependencies:
  easy_mock_local_notifications: ^0.1.0

Alternatively, 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_local_notifications/easy_mock_local_notifications.dart';
0
likes
130
points
163
downloads

Documentation

API reference

Publisher

verified publisherahmedomar.com.ly

Weekly Downloads

Makes flutter_local_notifications work under `flutter test`. mockLocalNotifications.init() registers the real Android platform impl (the native registrant that normally does this doesn't run in tests, so the plugin throws a LateInitializationError) and stubs its `dexterous.com/flutter/ local_notifications` MethodChannel via easy_mock_channel — real Dart, no native.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

easy_mock_channel, flutter, flutter_local_notifications

More

Packages that depend on easy_mock_local_notifications