Chat App Messages Screen UI in Flutter

A modern chat list screen built in Flutter, with a green header, story-style avatars, tabs, unread badges and swipe-to-reveal actions on messages.

  • #Chat
  • #Messaging
  • #Chat List
  • #Swipe Actions
  • #Social App
  • #Green UI

Free for everyone. Sign in with Google, no password needed.

Chat App Messages Screen UI in Flutter preview

Overview

This project is a messages screen for chat and social apps, built in Flutter with smooth scrolling effects and swipe actions. It uses a deep green header, a white rounded conversation list and warm orange accents, with the Urbanist font loaded through the google_fonts package.

The most interesting part of this screen is the collapsing header. It is built with a NestedScrollView and a pinned SliverPersistentHeader that uses a custom delegate. When the list is at the top, the header shows a large two-line “Chat with friends” title and a horizontal row of story avatars. As you scroll, the delegate calculates how far the header has shrunk and uses that value to fade and slide the large title and stories out. At the same time, a compact toolbar with a smaller “Chat with friends” title and a search button fades in. The category tabs and the rounded top edge of the white sheet stay pinned, so the screen always keeps its shape. SliverOverlapAbsorber and SliverOverlapInjector make sure the list scrolls correctly under the header.

The story row starts with a round search button, followed by circular avatars. The first story has a white ring to show it is new. Under it are the tabs Messages, Calls and Groups. The selected tab becomes bold and white, and a small orange dot grows in front of it using an AnimatedContainer, while AnimatedDefaultTextStyle animates the text change. A frosted “CREATE” pill sits on the right.

Each conversation row shows an avatar, the contact name, the time and a two-line message preview that is cut off with an ellipsis. Unread chats get a small orange counter badge on the corner of the avatar. When the screen opens, the rows animate in one after another: each tile uses a TweenAnimationBuilder whose duration grows with its index, so the list fades and slides up in a staggered wave.

Rows can also be swiped to the left. A horizontal drag moves an AnimationController directly, so the row follows your finger. When you let go, the code checks the fling velocity and how far the row was dragged, and then snaps it open or closed. As the row opens, the content slides left, the avatar fades out, and two action buttons scale and fade in: a light “more” button and an orange delete button. Only one row can be open at a time, because the screen keeps track of the open index and closes the previous row when a new one opens. Tapping delete removes the chat from the list.

The sample data is kept in a small Chat model with name, message, time, avatar, unread count and a muted flag, and the avatars are loaded from randomuser.me, so the demo needs an internet connection to show photos.

This layout works well for messaging apps, community and dating apps, customer support inboxes, team chat tools and any app that needs a list of conversations. To connect it to a real backend, replace the dummy list with a stream from Cloud Firestore, Supabase or a WebSocket and build the rows with a StreamBuilder. You can change the brand color in AppColors.primary and the accent in AppColors.accent to match your app.

To run the project, clone the repository, run flutter pub get and then flutter run. If you are learning Flutter, this project is a clear example of slivers, SliverPersistentHeaderDelegate, staggered list animations and building your own swipe-to-reveal actions with an AnimationController instead of a package.

Watch the build

Keep exploring

  • Reaction Picker Animation in Flutter preview
    Social & Chat UISource Club

    Reaction Picker Animation in Flutter

    A community feed with a long-press reaction picker in Flutter: an arc of reactions, slide to choose, and the reaction flies into the pill with a rolling count.

    • #Animation
    • #Reactions
    • #Long Press
  • Social Media Profile Screen UI in Flutter preview
    Social & Chat UI

    Social Media Profile Screen UI in Flutter

    A bright social media profile screen built in Flutter, with a profile header, post and friend counts, Photos/Videos/Saved tabs, a photo grid and a custom bottom nav bar.

    • #Profile
    • #Social Media
    • #Photo Grid
  • Facebook Redesign UI in Flutter preview
    Social & Chat UI

    Facebook Redesign UI in Flutter

    A modern Facebook-inspired social media UI redesign built with Flutter, featuring a clean layout, interactive screens, and a polished mobile experience.

    • #Flutter
    • #Facebook UI
    • #Social Media UI