feat(example): rebuild example as a working single-file Flutter chat app#2377
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2377 +/- ##
=======================================
Coverage 59.49% 59.49%
=======================================
Files 161 161
Lines 20127 20127
=======================================
Hits 11974 11974
Misses 8153 8153 Continue to review full report in Codecov by Harness.
|
344ad9b to
23a0c2f
Compare
yash-garg
approved these changes
Jun 19, 2026
23a0c2f to
8153483
Compare
8153483 to
b2fcdef
Compare
The previous example/main.dart was broken (undefined variables in the database setup) and not buildable. Replace it with a small, readable Flutter app whose Dart code lives in a single file (example/lib/main.dart): - async main() instantiates a Client with a persistent database (sqflite on native, IndexedDB fallback on web) - root widget holds the Client and passes it down via provider, showing the login page or chat list depending on the login state - login, chat list and chat pages, with small focused widgets - FAB on the chat list to start a direct chat, join a room by ID/alias or create a new room - logout and leave-room actions via three-dot menus Add the surrounding Flutter project (pubspec, web/, analysis_options, README) and example_analyze + example_build_web jobs in integrate.yml that run flutter analyze and build a reviewable web app on every PR. Because pub auto-resolves the example/ folder, the plain-dart CI jobs use 'dart pub get --no-example'; the example is excluded from the root dart analyze and linted separately.
b2fcdef to
58c62db
Compare
Member
|
@cla-assistant recheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The previous
example/main.dartwas broken (undefinedc.name/directoryvariables in the database setup) and not buildable. This replaces it with a small, readable Flutter chat app whose Dart code lives in a single file (example/lib/main.dart), and wires up CI for it.App
async main()instantiates aClientwith a persistent database (sqflite on native, IndexedDB fallback on web).Clientand passes it down viaprovider, showing the login page or the chat list depending on the login state.@user:server), join a room (#alias:server/!id:server) or create a new room (any other text).CI (
.github/workflows/integrate.yml)example_analyze: runsdart format --set-exit-if-changed+flutter analyzeon the example, so breaking SDK changes enforce an example update.example_build_web: builds the example as a web app on every PR and uploads it as an artifact for review.Because pub auto-resolves the
example/folder, the plain-dart jobs usedart pub get --no-example; the example is excluded from the rootdart analyzeand linted separately.Verification
flutter analyze→ no issues;dart format --set-exit-if-changedclean;flutter build websucceeds.dart analyzeanddart pub publish --dry-run(0 warnings) pass; REUSE compliant.Closes FM-579.
To show artifacts inline, enable in settings.