fetchConversation method

  1. @override
Future<Conversation> fetchConversation(
  1. String id
)
override

Loads the full Conversation snapshot at startup.

Implementation

@override
Future<Conversation> fetchConversation(String id) async {
  await _delay();
  final msgs = List<Message>.from(_store)
    ..sort((a, b) => a.createdAt.compareTo(b.createdAt));
  return seed.copyWith(messages: msgs);
}