event_bus_basics 1.0.0 copy "event_bus_basics: ^1.0.0" to clipboard
event_bus_basics: ^1.0.0 copied to clipboard

A Dart package for logging events once and writing them to multiple services.

example/main.dart

import 'package:event_bus_basics/event_bus_basics.dart';

Future<void> main() async {
  final eventBus = EventBus();

  eventBus.events.listen((event) {
    print('event: $event');
  });

  eventBus.app(EventBusAppEvent.coldStart);
  eventBus.tap('signin_button', screen: 'SignInScreen');
  eventBus.network('SignInBloc: start signing');
  eventBus.trace('SignInScreen.build: started', params: {'name': 'foobar'});
  eventBus.event('sign_in', params: {'username': 'foobar'});
  eventBus.error('SignInScreen._signIn: failed');
  eventBus.send(EventBusGroup.trace, name: 'SignInScreen._signIn: completed');
}
2
likes
160
pub points
2%
popularity

Publisher

verified publisherlarryaasen.com

A Dart package for logging events once and writing them to multiple services.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

equatable, logger, stack_trace

More

Packages that depend on event_bus_basics