Build a Flutter Social Chat with Stream: Bloc and Domain Driven Design
Blog post from Stream
This comprehensive guide provides a detailed walkthrough on building a chat application using Flutter, focusing on leveraging high-quality packages and tools such as Firebase, Stream, and the BLoC pattern for state management. It outlines the use of Domain Driven Design (DDD) architecture with a clear folder structure comprising Application, Domain, Infrastructure, and Presentation layers, and emphasizes the importance of understanding communication aspects when using patterns like BLoC or services like WebSockets. The guide also explains the setup and use of various packages for dependency injection, internet connection checking, and localization, while highlighting the implementation of features like channel creation, user connection management, and sending images in a chat context. Additionally, it provides insights into handling state management for chat features using HydratedBloc and Freezed for local storage and state serialization, along with a focus on the presentation aspect via StreamChat's integration into the UI. The guide assumes a basic understanding of Flutter and Dart and encourages readers to explore the complete application on GitHub for further insights.