Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
30b22e3
feat(repo): flutter 3.38.1 (#2495)
xsahil03x Jan 29, 2026
d6c8cab
refactor(ui)!: redesign Avatar components (#2502)
xsahil03x Feb 4, 2026
b5a43c3
Merge remote-tracking branch 'origin/v10.0.0' into feat/design-refresh
xsahil03x Feb 4, 2026
4f37a1d
update project files for latest flutter version (#2507)
renefloor Feb 6, 2026
9cc9526
add internal testflight builds (#2508)
renefloor Feb 6, 2026
850ff72
feat(ui): message composer design update (#2505)
renefloor Feb 10, 2026
8848ad6
chore(ui): update goldens (#2515)
renefloor Feb 19, 2026
d347eb1
refactor(ui)!: update design for context menu and message action (#2517)
xsahil03x Feb 24, 2026
b733301
feat(UI): composer attachments (#2514)
renefloor Feb 24, 2026
a49c791
add initial claude file (#2523)
renefloor Mar 3, 2026
b4a328c
feat(ui): audio attachments in composer (#2518)
renefloor Mar 3, 2026
be8648b
feat(ui)!: redesign reaction components and introduce `ReactionIconRe…
xsahil03x Mar 3, 2026
e9e41e9
feat(ui): update icons (#2519)
renefloor Mar 4, 2026
2e69324
don't use source files in tests (#2524)
renefloor Mar 4, 2026
ce639db
Migrate message composer factories (#2525)
renefloor Mar 4, 2026
026f826
feat(ui): channel list item (#2522)
renefloor Mar 5, 2026
0959f65
feat(ui): edit message (#2526)
renefloor Mar 6, 2026
e124584
feat(ui): inline attachment picker (#2527)
renefloor Mar 6, 2026
6b4e3b7
feat(ui): minor ui updates (#2528)
renefloor Mar 6, 2026
7b681da
feat(ui): redesign image CDN handling and thumbnail resizing (#2531)
xsahil03x Mar 7, 2026
9b7242e
feat(llc, ui, core): introduce `StreamReactionListController` and `St…
xsahil03x Mar 8, 2026
c4ea35a
multiple message list improvements (#2530)
renefloor Mar 12, 2026
8262772
feat(ui): composer also send to channel (#2537)
renefloor Mar 13, 2026
f3a9780
fix autocomplete tap actions (#2540)
renefloor Mar 13, 2026
ec41292
fix(ui): fix keystroke reporting (#2545)
Brazol Mar 17, 2026
ae2f42c
search bar design (#2539)
Brazol Mar 17, 2026
5a9cc18
feat(ui): preview formatter redesigned (#2542)
Brazol Mar 18, 2026
2df946e
fix(ui): updated unread indicator to use core badge widget (#2546)
Brazol Mar 18, 2026
51cd2ca
refactor(ui)!: stream message widget and reactions (#2547)
xsahil03x Mar 18, 2026
1acb695
feat(UI): show command chip (#2541)
renefloor Mar 18, 2026
a3a9518
fix crossSmall to medium (#2551)
renefloor Mar 19, 2026
64253d7
improvements on attachment in quote (#2538)
renefloor Mar 19, 2026
a0e886b
refactor(ui): unread indicator redesign (#2548)
Brazol Mar 19, 2026
8000c79
Add inline add more tile for gallery permissions (#2553)
renefloor Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ updates:
# All packages grouped into a single configuration using multi-directory support
- package-ecosystem: "pub"
directories:
- "/sample_app"
- "/packages/stream_chat"
- "/packages/stream_chat_flutter_core"
- "/packages/stream_chat_flutter"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/distribute_external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ jobs:
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: Setup Ruby
Expand Down Expand Up @@ -109,7 +108,6 @@ jobs:
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: Setup Ruby
Expand Down
45 changes: 43 additions & 2 deletions .github/workflows/distribute_internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: "Install Tools"
Expand Down Expand Up @@ -119,7 +118,6 @@ jobs:
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: "Install Tools"
Expand All @@ -144,3 +142,46 @@ jobs:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
run: bundle exec fastlane distribute_to_firebase

# TODO: Remove once feat/design-refresh is merged to master
ios_testflight:
needs: determine_platforms
if: ${{ needs.determine_platforms.outputs.run_ios == 'true' }}
runs-on: macos-15 # Requires xcode 15 or later
timeout-minutes: 30
steps:
- name: Connect Bot
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}

- name: "Git Checkout"
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: "Install Flutter"
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: "Install Tools"
run: flutter pub global activate melos

- name: "Bootstrap Workspace"
run: melos bootstrap

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: sample_app/ios

- name: Distribute to TestFlight Internal
working-directory: sample_app/ios
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
run: bundle exec fastlane distribute_to_testflight_internal
3 changes: 1 addition & 2 deletions .github/workflows/legacy_version_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: legacy_version_analyze
env:
# Note: The versions below should be manually updated after a new stable
# version comes out.
flutter_version: "3.27.4"
flutter_version: "3.38.1"

on:
push:
Expand Down Expand Up @@ -44,7 +44,6 @@ jobs:
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: 📊 Analyze and test packages
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/stream_flutter_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: "Install Tools"
run: |
Expand Down Expand Up @@ -67,7 +66,6 @@ jobs:
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: "Install Tools"
run: |
Expand All @@ -94,7 +92,6 @@ jobs:
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
# This step is needed due to https://github.com/actions/runner-images/issues/11279
- name: Install SQLite3
Expand Down Expand Up @@ -168,7 +165,6 @@ jobs:
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: "Install Tools"
run: flutter pub global activate melos
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/update_goldens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
with:
flutter-version: "3.x"
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: 📦 Install Tools
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ GeneratedPluginRegistrant.*
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/ephemeral
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
Expand Down
148 changes: 148 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Overview

This is a Dart/Flutter monorepo for Stream Chat's official Flutter SDK, managed with [Melos](https://pub.dev/packages/melos). All packages live under `packages/`.

## Common Commands

### Setup
```bash
melos bootstrap # Fetch and link all dependencies (equivalent to pub get for all packages)
```

### Testing
```bash
melos run test:all # Run all Dart & Flutter tests
melos run test:dart # Run Dart-only tests
melos run test:flutter # Run Flutter tests
# Run tests in a specific package:
cd packages/stream_chat_flutter && flutter test
cd packages/stream_chat_flutter && flutter test test/src/path/to/test_file.dart
```

### Golden Tests
```bash
melos run update:goldens # Regenerate all golden image files
# In CI, CI goldens are used; locally, platform goldens are used (configured via alchemist)
```

### Linting & Formatting
```bash
melos run lint:all # Run analyze + format
melos run analyze # Run dart analyze --fatal-infos on all packages
melos run format # Check formatting (page width: 120)
```

### Code Generation
```bash
melos run generate:all # Run build_runner for all packages
melos run generate:flutter # Run build_runner for Flutter packages only
melos run generate:dart # Run build_runner for Dart packages only
```

### Versioning
```bash
melos run version:update # Regenerate version.dart from pubspec.yaml (runs automatically after bootstrap)
```

## Package Architecture

The SDK is layered — each package builds on top of the previous:

```
stream_chat # Pure Dart, no Flutter dependency
└── stream_chat_persistence # Local disk cache using Drift (optional)
└── stream_chat_flutter_core # Flutter business logic, no UI
└── stream_chat_flutter # Full UI component library
└── stream_chat_localizations # i18n for UI components
```

### `stream_chat`
Low-level Dart client. Key types:
- `StreamChatClient` — central API client, manages WebSocket, REST, and state
- `Channel` — represents a chat channel, has its own state and streaming APIs
- Models in `lib/src/core/models/`: `Message`, `User`, `Member`, `Reaction`, `Poll`, `Event`, `Attachment`, `Draft`, etc.
- Generated code (`.g.dart`, `.freezed.dart`) for JSON serialization/immutable models — do not edit manually

### `stream_chat_flutter_core`
Business logic layer. Key types:
- `StreamChatCore` — root widget, manages app lifecycle, WebSocket reconnection, and connectivity
- `StreamChannel` — provides a `Channel` to the widget tree via `StreamChannel.of(context)`
- `PagedValueNotifier<Key, Value>` — base class for all list controllers
- Controllers: `StreamChannelListController`, `StreamMessageListController` (via `MessageListCore`), `StreamUserListController`, `StreamMemberListController`, `StreamThreadListController`, `StreamDraftListController`, `StreamMessageReminderListController`, `StreamPollController`
- `BetterStreamBuilder<T>` — efficient StreamBuilder that only rebuilds when data changes

### `stream_chat_flutter`
Full UI package. Key architectural points:

**Root widget hierarchy:**
`StreamChat` → `StreamChatTheme` → `StreamChatConfiguration` → `StreamChatCore` → app content

**Theming:** `StreamChatThemeData` (accessed via `StreamChatTheme.of(context)`) contains per-component theme data objects. Components read their theme from context. `StreamChatConfigurationData` holds non-theme UI config.

**Widget tree integration pattern:**
- `StreamChat.of(context)` — get the chat state (current user, client)
- `StreamChannel.of(context)` — get the current channel state
- `StreamChatTheme.of(context)` — get current theme data

**Key UI components:**
- `StreamChannelListView` + `StreamChannelListTile` — channel list using `StreamChannelListController`
- `StreamMessageListView` — message list with floating date dividers, unread indicators, thread separators
- `StreamMessageInput` (legacy) / `StreamChatMessageComposer` (new design system) — message composition
- `StreamMessageWidget` — renders individual messages with attachments, reactions, threads
- Scroll views in `lib/src/scroll_view/` — generic paged scroll views for channels, threads, members, users, drafts, polls

**New design system components** (`lib/src/components/`):
- `StreamUserAvatar`, `StreamChannelAvatar`, `StreamUserAvatarGroup` — avatar components; these are chat-domain wrappers around the base components in `stream_core_flutter`
- `StreamChatMessageComposer` — new composer using `MessageComposerFactory` for custom layouts

**Golden tests:** Use `alchemist` package. Platform goldens used locally, CI goldens used in CI (detected via `CI`/`GITHUB_ACTIONS` env vars). Goldens stored alongside tests in `goldens/` subdirectories.

### `stream_chat_localizations`
Provides `StreamChatLocalizations` — Flutter localizations delegate with translations for all UI strings.

### `stream_chat_persistence`
Optional local persistence using Drift (SQLite). Implements `ChatPersistenceClient` from `stream_chat`.

## Code Style

- Line length: **120 characters** (configured in `analysis_options.yaml`)
- Imports: always use package imports (`always_use_package_imports`), not relative imports
- All public APIs **must** have doc comments (`public_member_api_docs`)
- Sort constructors first, unnamed constructors before named
- Prefer `const` constructors, `final` locals, single quotes
- Trailing commas: `preserve` (formatter setting)
- Generated files (`.g.dart`, `.freezed.dart`) are excluded from analysis

## PR & Commit Conventions

PR titles follow [Conventional Commits](https://www.conventionalcommits.org/):
- `fix(scope): description` — bug fix
- `feat(scope): description` — new feature
- `refactor(scope)!: description` — breaking change
- `chore(scope): description`, `docs:`, `test:`, etc.

After modifying any package, update its `CHANGELOG.md`.

## Figma Designs

UI designs for this SDK are in the **Chat SDK Design system** Figma project. Use the Figma MCP server to look up designs when implementing or updating UI components.

## `stream_core_flutter` (external sibling repo)

Basic UI components that can be shared across Stream products live in the `stream_core_flutter` package in the **stream-core-flutter** repository (a sibling repo, not inside this monorepo). These components:
- Never depend on chat domain models (`Channel`, `Message`, `User`, etc.)
- Provide primitive building blocks: avatars, layout primitives, theming tokens, etc.

Components in this repo can be wrappers around those base components, adding chat domain models and extra logic on top. For example, `StreamChannelAvatar` wraps the base `StreamAvatarGroup` from `stream_core_flutter` and adds channel-specific member resolution logic.

`stream_core_flutter` types used here are re-exported via a `show` allowlist in `lib/stream_chat_flutter.dart`. When adding a new type from `stream_core_flutter`, add it to that allowlist.

## Dependency Management

Dependencies are centrally managed in `melos.yaml` under `command.bootstrap.dependencies`. Do **not** edit version constraints directly in individual `pubspec.yaml` files — update `melos.yaml` and run `melos bootstrap`.

> Note: `stream_chat_flutter` uses a local path dependency to `stream_core_flutter` (pointing to the sibling repo) when making changes to both repos together. Use a git dependency when no local changes to `stream_core_flutter` are needed.
11 changes: 7 additions & 4 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ analyzer:
- packages/*/lib/scrollable_positioned_list/**
- packages/*/lib/**/*.freezed.dart

formatter:
page_width: 120
trailing_commas: preserve

linter:
rules:
# these rules are documented on and in the same order as
Expand All @@ -19,7 +23,6 @@ linter:
- control_flow_in_finally
- empty_statements
- hash_and_equals
- invariant_booleans
- literal_only_boolean_expressions
- no_adjacent_strings_in_list
- no_duplicate_case_values
Expand All @@ -40,7 +43,9 @@ linter:
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_private_typedef_functions
- avoid_redundant_argument_values
# Does not always make sense to remove them; it also makes it hard
# to notice future breaking changes.
# - avoid_redundant_argument_values
- avoid_return_types_on_setters
- avoid_returning_null_for_void
- avoid_shadowing_type_parameters
Expand All @@ -64,7 +69,6 @@ linter:
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- lines_longer_than_80_chars
- missing_whitespace_between_adjacent_strings
- non_constant_identifier_names
- null_closures
Expand All @@ -81,7 +85,6 @@ linter:
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_contains
- prefer_equal_for_default_values
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
Expand Down
16 changes: 11 additions & 5 deletions melos.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: stream_chat_flutter
name: stream_chat_flutter_workspace
repository: https://github.com/GetStream/stream-chat-flutter

packages:
Expand All @@ -18,9 +18,9 @@ command:
bootstrap:
# Dart and Flutter environment used in the project.
environment:
sdk: ^3.6.2
sdk: ^3.10.0
# We are not using carat '^' syntax here because flutter don't follow semantic versioning.
flutter: ">=3.27.4"
flutter: ">=3.38.1"

# List of all the dependencies used in the project.
dependencies:
Expand Down Expand Up @@ -73,7 +73,7 @@ command:
package_info_plus: ">=8.3.0 <10.0.0"
path: ^1.8.3
path_provider: ^2.1.3
photo_manager: ^3.2.0
photo_manager: ^3.8.3
photo_view: ^0.15.0
provider: ^6.0.5
rate_limiter: ^1.0.0
Expand All @@ -91,6 +91,12 @@ command:
stream_chat_persistence: ^10.0.0-beta.12
streaming_shared_preferences: ^2.0.0
svg_icon_widget: ^0.0.1
# TODO: Replace with hosted version before merging PR
stream_core_flutter:
git:
url: https://github.com/GetStream/stream-core-flutter.git
ref: 8057a775c2ed764dbd5cbabd2dd60d3cd68d2f08
path: packages/stream_core_flutter
synchronized: ^3.1.0+1
thumblr: ^0.0.4
url_launcher: ^6.3.0
Expand All @@ -100,7 +106,7 @@ command:

# List of all the dev_dependencies used in the project.
dev_dependencies:
alchemist: ">=0.11.0 <0.14.0"
alchemist: ^0.13.0
build_runner: ^2.4.9
connectivity_plus_platform_interface: ^2.0.0
drift_dev: ^2.28.0
Expand Down
Loading
Loading