messaging 0.3.0 copy "messaging: ^0.3.0" to clipboard
messaging: ^0.3.0 copied to clipboard

Messaging service to connect your components and services through publisher/subscriber pattern.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'messaging.dart';
import 'src/app.dart';
import 'src/pages/todo/logic/create_todo_message.dart';
import 'src/pages/todo/logic/todo_local_repository.dart';
import 'src/pages/todo/logic/todo_notifier.dart';
import 'src/pages/todo/logic/todo_remote_repository.dart';

void main() async {
  _addSubscribers();
  await messaging.start();
  runApp(const MyApp());
}

void _addSubscribers() {
  messaging.subscribe(TodoLocalRepository(), to: CreateTodoMessage);
  messaging.subscribe(TodoRemoteRepository(), to: CreateTodoMessage);
  messaging.subscribe(TodoNotifier(), to: CreateTodoMessage);
}
6
likes
150
points
126
downloads

Publisher

verified publishermcssym.me

Weekly Downloads

Messaging service to connect your components and services through publisher/subscriber pattern.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection, logger, meta, uuid

More

Packages that depend on messaging