recordMessageEvent method

  1. @override
Future<void> recordMessageEvent(
  1. String topic,
  2. String message
)
override

Implementation

@override
Future<void> recordMessageEvent(String topic, String message) async {
  final String hash = hashMessage(message);

  onCreate.broadcast(
    StoreCreateEvent(
      topic,
      {hash: message},
    ),
  );

  if (!data.containsKey(topic)) {
    data[topic] = {};
  }
  data[topic]![hash] = message;
  await persist();
}