defaultMessageFilter function Null safety

bool Function(Message) defaultMessageFilter(
  1. String currentUserId
)

Default filter for the message list

Implementation

bool Function(Message) defaultMessageFilter(String currentUserId) =>
    (Message m) {
      final isMyMessage = m.user?.id == currentUserId;
      if (m.shadowed && !isMyMessage) return false;
      return true;
    };