chatInput method

dynamic chatInput(
  1. dynamic context,
  2. dynamic ref
)

Implementation

Widget chatInput(BuildContext context, WidgetRef ref) {
  final sendTypingNotice = ref.watch(
    userAppSettingsProvider.select(
      (settings) => settings.valueOrNull?.typingNotice() ?? false,
    ),
  );
  return CustomChatInput(
    key: Key('chat-input-$roomId'),
    roomId: roomId,
    onTyping: sendTypingNotice
        ? (typing) async {
            final chat = await ref.read(chatProvider(roomId).future);
            chat?.typingNotice(typing);
          }
        : null,
  );
}