Arnaud Phommasone is a talented mobile developer that is a valuable member of our WebRTC.ventures team. He recently wrote a tutorial to create a Flutter app using an unofficial Flutter package for interfacing with Twilio Video, that will allow users to host a call and be joined by multiple other users. Flutter is Google’s free, open-source UI toolkit for building applications for mobile, web, and desktop from one single codebase.
The tutorial focuses on creating a serverless endpoint to get access tokens for users to connect and enter the same chat room, represented as a grid of video streams. The app is implemented with the Business Logic Components pattern, known as BLoC. BLoC is a design pattern created by Google to help separate business logic from the presentation layer and enable a developer to reuse code more efficiently.
The tutorial assumes a basic knowledge of Dart, an open-source, general-purpose, object-oriented programming language with C-style syntax developed by Google.
The tutorial covers:
- Setting up the local dev environment, using Flutter SDK 2.2.3, An iOS mobile device to test with, Xcode downloaded on your machine and Visual Studio Code v1.60.1 (or your favorite code editor/IDE)
- Creating the backend service, using Twilio Service to generate an access token we can use in our chatroom.
- Starting the client-side app project
- Simple BLoC architecture with Cubit
- Writing your Twilio API service
- Creating your Cubit object to retrieve the access token from the Join Room page
- Creating the listener and joining a room
- Writing your Cubit object to handle joining a Twilio room and creating participants
- Connecting and disconnecting from the Conference Room
Read the full post on the Twilio blog: “Create a Chat Room App with Twilio Video and Flutter / BLoC“.