Flutter Multiplayer

I am creating a multiplayer game app using Flutter and Firebase. I have allowed users to create a private game that generates a room_id.

I need to allow other users/friends to enter the room_id in a dialog then it should connect them to the game board. Once all four players are in the game will start. How should I implement this feature?