Skip to content

Commit 4579010

Browse files
renefloorxsahil03xcursoragentBrazolclaude
authored
feat(repo): merge design system (#97)
* feat(repo): add poc of button and gallery (#28) * poc of button and gallery * chore: fix analysis issues * chore: format * chore: format * add temporary branch for PR title --------- Co-authored-by: Sahil Kumar <sahil@getstream.io> * chore(repo): Upgrade Flutter to `>=3.38.1` and enable new lints (#29) * feat(ui): Introduce Stream Design System foundations and gallery app (#31) * feat: Introduce Stream Design System foundations and gallery app This commit introduces the foundational elements of the new Stream Design System and a comprehensive gallery application (Widgetbook) for showcasing and customizing components. **Core Package (`stream_core_flutter`):** * **Design Tokens**: Added foundational design tokens for colors, spacing, radius, typography, and box shadows. These tokens are organized into primitive and semantic layers. * `StreamColors`: Defines the primitive color palette. * `StreamColorScheme`: Provides semantic color roles (e.g., `accentPrimary`, `textSecondary`). * `StreamTypography`, `StreamTextTheme`: Defines font primitives and semantic text styles. * `StreamSpacing`, `StreamRadius`, `StreamBoxShadow`: Adds tokens for layout and elevation. * **`StreamTheme`**: Implemented a new `ThemeExtension` to aggregate all design tokens and component themes, enabling centralized theming. * **New Components**: Added `StreamAvatar`, `StreamAvatarStack`, and `StreamOnlineIndicator`. * **Theming Infrastructure**: Added `theme_extensions_builder` to auto-generate `copyWith`, `lerp`, and `==`/`hashCode` for theme classes. **Design System Gallery (`design_system_gallery`):** * **Gallery App**: Replaced the basic Widgetbook setup with a new, fully-featured gallery application (`StreamDesignSystemGallery`). * **Theme Studio**: Added a "Theme Studio" panel for real-time customization of all `StreamColorScheme` properties. * **Enhanced Previews**: * Added a toolbar with controls for device selection (`DeviceFrame`), text scaling, and light/dark mode toggles. * Created a `PreviewWrapper` to apply theme, device frame, and text scale to all use cases. * **New Use Cases**: * Added comprehensive use cases for new components (`StreamAvatar`, `StreamAvatarStack`, `StreamOnlineIndicator`). * Added showcases for semantic tokens (`Typography`, `Elevations`). * Improved `StreamButton` use cases with more variants and real-world examples. * **Agent Guide**: Added `AGENTS.md`, a guide for AI agents on contributing to the gallery. * chore: format code * refactor: Remove StreamButtonTheme The `StreamButtonTheme` and its related data classes have been removed from the core theme structure. This simplifies the theme by removing the button-specific theming. Additionally, the `lerp` function for `StreamBrandColor` has been adjusted, and `StreamAvatarColorPair` is now generated using `themeGen`. * refactor: Remove StreamButtonTheme The `StreamButtonTheme` and its related data classes have been removed from the core theme structure. This simplifies the theme by removing the button-specific theming. Additionally, the `lerp` function for `StreamBrandColor` has been adjusted, and `StreamAvatarColorPair` is now generated using `themeGen`. * chore: update code to use Dart 3 shorthand syntax * feat(repo): Add design system primitives showcase to gallery (#33) * chore(repo): Add workflow to publish design system gallery (#34) * chore(repo): Add workflow to publish design system gallery (#32) * Add workflow to publish design system gallery * remove specific flutter version * don't fetch remote branch * add swatch from single color (#36) * add swatch from single color * remove print statement * remove unused import * fix scrollbar issue (#40) * feat(ui): button component (#37) * improvements on old button component * add todo * add colors for disabled button * use tokens for border * format * update button theme with more layering * add snapshot tests enabled lfs for snapshots * update git checkout for workflow * improve CI param * add workflow to update goldens (#39) * chore: Update Goldens * disable CI snapshots for local tests --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * feat(ui): Added themeable stream icons (#35) Co-authored-by: Sahil Kumar <sahil@getstream.io> * feat(ui): filetype icons (#41) Co-authored-by: Sahil Kumar <sahil@getstream.io> * feat(ui): add StreamAvatarGroup and StreamBadgeCount (#43) * chore(repo): Remove Git LFS for golden images (#45) * feat(ui): gallery on mobile (#38) * make gallery more usable on mobile * add const * feat: animate theme panel and fix layout overflows - Refactor `GalleryShell` to use `AnimatedSlide` for the theme panel and `AnimatedPadding` for the content. - Fix text overflow issues in `GalleryHomePage` and color swatches. - Set minimum window size for macOS. * feat: integrate Marionette --------- Co-authored-by: Sahil Kumar <sahil@getstream.io> * feat(ui): update tokens (#46) * update design system tokens source: GetStream/design-system-tokens@ee59239 * updating border colors in gallery * chore: Update Goldens * missing border colors * feat: add headingXs to StreamTextTheme * feat(gallery): enhance theme config and add backgroundDisabled - Add `backgroundDisabled` to `ThemeConfiguration` and customization panel - Refactor color derivation logic for brand, accents, and borders in `_rebuildTheme` - Update Material theme mappings for borders, dividers, and inputs - Add `headingXs` to typography showcase - Replace `Colors` with `StreamColors` for consistency --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> Co-authored-by: Sahil Kumar <sahil@getstream.io> * refactor(ui): decouple StreamComponentFactory from StreamTheme (#47) * refactor(ui): decouple StreamComponentFactory from StreamTheme - Convert `StreamComponentFactory` to `InheritedWidget` for subtree overrides. - Remove `componentFactory` from `StreamTheme`. - Introduce `StreamComponentBuilders` for component customization. - Update `StreamButton` and `StreamFileTypeIcon` to use the new factory lookup. * feat(ui): add factory support for avatars, badges, and indicators Refactors StreamAvatar, StreamAvatarGroup, StreamAvatarStack, StreamBadgeCount, and StreamOnlineIndicator to use StreamComponentFactory. * refactor(ui): update imports in stream_file_type_icon.dart for component factory and theme extensions * feat(ui): message composer structure (#42) * Add basic message composer structure * Add textinputcontroller * Add option for floating * improve bottom padding in message composer * Started with attachments * fix some factory properties * simplified design system composer * fix icon button * Added focusNode for input field * update gallery * chore: Update Goldens --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * feat(UI): composer attachment reply (#48) * Add attachment - reply * Add component for reply * Add GestureDetector on RemoveControl * chore: Update Goldens * formatting * rename chat theme to message theme * rename chat_theme file --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * feat(ui): composer attachment link preview (#49) * Add link preview component * Update max height of composer input field * chore: Update Goldens * Fix chat rename * remove old todo --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * remove expands on inputfield (#50) * remove expands on inputfield * align inputfields on bottom * feat(ui): add StreamReactionPickerSheet (#51) Co-authored-by: xsahil03x <25670178+xsahil03x@users.noreply.github.com> * feat(ui): refactor message theme (#52) * refactor message theme to separate incoming and outgoing * chore: Update Goldens * rename message style * remove unused import * chore: Update Goldens --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * feat(ui): add StreamContextMenu and StreamContextMenuItem (#53) * refactor(ui): centralize button defaults and add iconSize property * feat: add target platform override to preview toolbar - Add `PlatformSelector` component to switch between target platforms (Android, iOS, etc.). - Update `PreviewConfiguration` to store and notify platform changes. - Apply platform override in `PreviewWrapper` to ensure `StreamTheme` and `Theme` reflect the selected platform. - Add the selector to the main `Toolbar`. * chore: flutter format * feat: add StreamContextMenu and StreamContextMenuItem components with playground examples * feat: add applyPlatform to StreamTheme and update gallery platform override * feat(ui): add StreamProgressBar and StreamCheckBox (#54) * feat(ui): add StreamProgressBar component and theme - Add `StreamProgressBar` component with determinate and indeterminate states. - Add `StreamProgressBarTheme` and integrate into `StreamTheme`. - Update `backgroundCoreSurfaceStrong` and `accentNeutral` color tokens. - Add playground examples to the gallery. * feat(ui): enhance StreamButton and StreamButtonTheme with interpolation methods * feat(ui): add StreamProgressBar component with playground and showcase examples * refactor: move StreamProgressBar to common * feat(ui): add StreamCheckbox component and theme - Added `StreamCheckbox` component with support for standard and circular shapes. - Implemented `StreamCheckboxTheme` and `StreamCheckboxStyle` for customization. - Updated `StreamComponentFactory` to support custom checkbox builders. - Exposed checkbox theme via `StreamTheme` and extensions. - Added playground and showcase examples to the design system gallery. * feat(ui): add custom builder support for StreamProgressBar * feat(ui): composer attachments (#55) * Improved media and file attachments * Allow override of input body * simplify StreamBaseMessageComposerInputTrailing * cleanup unnecessary fields * formatting * publicly export StreamRemoveControl * attachment and composer renaming * formatting * refactor(ui): rename StreamContextMenuItem to StreamContextMenuAction (#56) * Update and add icons (#57) * feat(ui): add StreamEmojiChip, StreamEmojiChipBar and StreamListTile (#58) * feat(ui): audio attachments in composer (#59) Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * add icon data file to export (#62) * feat(ui): enhance StreamComponentBuilders with extension support (#60) Co-authored-by: Cursor <cursoragent@cursor.com> * return empty factory when no factory is found (#63) * return empty factory when no factory is found * update docs * replaced all maybeOffs * feat(ui): channel list item (#61) * add channel list item * update avatar sizes * Add badge notification and snapshot tests * Improve channel list item for implementation * chore: Update Goldens * remove unused imports * Merge channel list item with list tile * fix gallery * chore: Update Goldens * Fix background color theming * fix avatar size * Added claude code file * remove channel list item from core * cleanup channel list item * update generated files --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * Edit and disabled state for trailing button (#65) * feat(ui): add `StreamReactions` component and overflow emoji chip (#67) * remove default padding in message composer (#66) * refactor(ui): update MessageComposerReplyAttachment to use Widget for title and subtitle (#68) Co-authored-by: xsahil03x <25670178+xsahil03x@users.noreply.github.com> * refactor(ui): remove background color from message composer (#69) * feat(ui): composer also send to channel (#72) * improve checkbox and expose StreamMessageComposerInputField * Add docs * fixed the avatar sizes to match figma design (#71) * fixed the avatar sizes to match figma design * format fixes * updated badge color * feat(UI): update tokens (#74) Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * feat(ui): implement commands (#75) * make command chip * chore: Update Goldens * Add option without dismiss * chore: Update Goldens * Minor PR improvements * update gallery labels * add missing theme properties --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * read text color in message theme (#76) * feat(ui): add StreamMessage related components (#70) * make trailing in reply more flexible (#73) * feat(ui): loading spinner component (#77) * loading spinner component * fix * fix * skeleton colors (#78) * feat(ui): Add time formatting options to media badge (#80) * Add time formatting options to media badge * chore: Update Goldens * ignore redundant arguments rule --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * feat(ui): add StreamSkeletonLoading and StreamSkeletonBox components (#79) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(ui): stream network image and retry badge (#81) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(ui): bubbles icon (#82) * bubbles icon * font recreated * new icon * exportable icon used * regen correct icons * add missing inputfield properties (#83) * fix(ui): adds composer input state and color updates (#87) * This adds composer input state and color updates * chore: Update Goldens * formatting --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * feat: stream app bar (#84) * stream app bar * preffered height added * Revert "preffered height added" This reverts commit 86bf82a. * feat(ui): add StreamMessageAttachment and other fixes (#86) * feat(ui): add StreamMessageAttachmentContainer and styling options * feat(ui): add StreamMessageAttachmentContainer with styling options * feat(ui): add support for collapsed children in StreamFlex layout * feat(ui): remove unused ABCD widget and its state implementation * feat(ui): refactor message layout components and add SVG icon support * feat(ui): add StreamPlaybackSpeedToggle component and theme - Introduce `StreamPlaybackSpeedToggle` to cycle through playback speeds (x1, x2, x0.5). - Add `StreamPlaybackSpeedToggleTheme` and supporting theme data for customization. - Implement `StreamMessageComposerAttachmentContainer` to unify attachment styling in the composer. - Update `StreamAudioWaveform` with improved thumb styling, including active/idle border colors and elevation. - Refactor composer attachment components (`File`, `Media`, `LinkPreview`, `Reply`) to use the new shared container. - Enhance `StreamNetworkImage` error handling with an optional retry callback and fallback icons. - Update `StreamButton` to use `RoundedSuperellipseBorder` for labeled buttons. - Add Gallery showcase and playground for the new playback speed toggle. * feat(ui): update retry logic to handle nullable callback in StreamNetworkImage * chore: Update Goldens * chore: Update Goldens * feat(ui): update StreamImageSourceBadge to require leading and label widgets * feat(ui): update SVG icons for Giphy and Imgur with new designs * feat(ui): remove contentKind from StreamMessageLayoutData and update stackPosition defaults * feat(ui): spacing and padding improvements * chore: Update Goldens --------- Co-authored-by: xsahil03x <25670178+xsahil03x@users.noreply.github.com> * fix(ui): set border color to transparent for message composer reply and link preview (#88) Co-authored-by: xsahil03x <25670178+xsahil03x@users.noreply.github.com> * fix(ui): color tokens (#89) * fix color tokens * remove outdated colors * improved color fixes * chore: Update Goldens * remove outdated comment * chore: Update Goldens * remove badge count border * rename state colors to background colors --------- Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> * feat(ui): update text theme values and typography styles (#90) * feat(ui): introduce `StreamEmojiContent` for Unicode and image-based emojis (#92) * feat(ui): update icon set (#91) * update icon set * update icon usage * fix download and clock * update wrong and missing icons * Add support for rtl icons (#93) * feat(ui): add message replies visibility and other improvements (#94) * feat(ui): add StreamErrorBadge and errorBadgeVisibility to message theme (#95) * chore(ui): prepare 0.1 release of flutter sdk (#96) * prepare 0.1 release of flutter sdk * update versioning with melos * update version in legacy analyze * add ui in changelog check --------- Co-authored-by: Sahil Kumar <sahil@getstream.io> Co-authored-by: Sahil Kumar <xdsahil@gmail.com> Co-authored-by: renefloor <15101411+renefloor@users.noreply.github.com> Co-authored-by: xsahil03x <25670178+xsahil03x@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Maciej Brażewicz <brazol@gmail.com> Co-authored-by: Maciej Brażewicz <maciej.brazewicz@getstream.io> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 22699dd commit 4579010

740 files changed

Lines changed: 75317 additions & 613 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/legacy_version_analyze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: legacy_version_analyze
33
env:
44
# Note: The versions below should be manually updated after a new stable
55
# version comes out.
6-
flutter_version: "3.27.4"
6+
flutter_version: "3.38.10"
77

88
on:
99
push:

.github/workflows/pr_title.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,22 @@ jobs:
2020
with:
2121
scopes: |
2222
llc
23+
ui
2324
repo
2425
requireScope: true
2526
env:
2627
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2728

2829
semantic_changelog_update:
29-
if: ${{ false }} # TODO: Enable after the first release
3030
needs: conventional_pr_title # Trigger after the [conventional_pr_title] completes
3131
runs-on: ubuntu-latest
3232
steps:
3333
- uses: GetStream/verify-semantic-changelog-update@main
3434
with:
3535
scopes: |
3636
{
37-
"llc": "packages/stream_core"
37+
"llc": "packages/stream_core",
38+
"ui": "packages/stream_core_flutter"
3839
}
3940
env:
4041
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish_gallery.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
run: |
2626
git config --global user.email "$(git log --format='%ae' HEAD^!)"
2727
git config --global user.name "$(git log --format='%an' HEAD^!)"
28-
git fetch origin gh-pages:gh-pages
2928
3029
- name: Setup Flutter
3130
uses: subosito/flutter-action@v2

.github/workflows/stream_core_flutter_workflow.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ jobs:
2323
analyze:
2424
timeout-minutes: 15
2525
runs-on: ubuntu-latest
26+
env:
27+
IS_CI: 'true'
2628
steps:
2729
- name: Git Checkout
28-
uses: actions/checkout@v3
30+
uses: actions/checkout@v6
2931
with:
3032
fetch-depth: 0
3133

CLAUDE.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
A Flutter monorepo managed with **Melos** containing:
8+
- `packages/stream_core` — Pure Dart SDK (WebSocket, HTTP, models, utilities)
9+
- `packages/stream_core_flutter` — Flutter UI component library with a full design system
10+
- `apps/design_system_gallery` — Widgetbook-based interactive component showcase
11+
12+
## Common Commands
13+
14+
All commands use Melos and should be run from the repo root.
15+
16+
```bash
17+
# Setup
18+
melos bootstrap
19+
20+
# Linting & formatting
21+
melos run lint:all # analyze + format check
22+
melos run analyze
23+
melos run format
24+
melos run format:verify # check only, no changes
25+
26+
# Testing
27+
melos run test:all # all tests with coverage
28+
melos run test:dart # stream_core only
29+
melos run test:flutter # stream_core_flutter only
30+
31+
# Golden tests
32+
melos run update:goldens # regenerate golden images
33+
34+
# Code generation (run after model/theme changes)
35+
melos run generate:all
36+
melos run generate:icons # regenerate icon font from SVGs
37+
melos run gen-l10n # regenerate localizations
38+
```
39+
40+
### Icons
41+
42+
Source SVGs in `packages/stream_core_flutter/assets_source/icons/` come from the [design-system-tokens](https://github.com/GetStream/design-system-tokens/tree/main/assets/icons) repository. When adding or updating icons, pull the latest SVGs from that repo first, then run `melos run generate:icons` to regenerate the icon font and Dart classes.
43+
44+
**Line width:** 120 characters (set in `analysis_options.yaml`).
45+
46+
## Design
47+
48+
UI components are designed in **Figma**. When implementing or modifying components, use the **Figma MCP** to inspect designs directly — check spacing, colors, typography, and component structure from the source rather than guessing.
49+
50+
## Architecture
51+
52+
### Theme System (`stream_core_flutter/lib/src/theme/`)
53+
54+
Uses `theme_extensions_builder` to generate Material 3 theme extensions. The hierarchy is:
55+
56+
1. **Primitives** — raw design tokens: colors, typography, spacing, radius, icons
57+
2. **Semantics** — semantic mappings (e.g., `primaryColor`, `bodyText`)
58+
3. **Component themes** — per-widget theme classes (50+ components), defined in `theme/components/`
59+
4. **Tokens** — light/dark concrete values in `theme/tokens/`
60+
61+
Generated files have `.g.theme.dart` extension. After modifying `.theme.dart` files, run `melos run generate:flutter`.
62+
63+
### Component Structure (`stream_core_flutter/lib/src/components/`)
64+
65+
Components are organized by category: `avatar/`, `buttons/`, `badge/`, `list/`, `message_composer/`, `emoji/`, `context_menu/`, `controls/`, `common/`, `accessories/`.
66+
67+
Each component typically has:
68+
- A widget file
69+
- A theme file in `theme/components/`
70+
- A golden test in `test/components/<name>/`
71+
- A Widgetbook use-case in `apps/design_system_gallery/`
72+
73+
### stream_core Package
74+
75+
Pure Dart. Key modules:
76+
- `src/ws/` — WebSocket client with reconnect/backoff logic (RxDart-based)
77+
- `src/api/` — Dio HTTP client with interceptors
78+
- `src/attachment/` — File upload and CDN client
79+
- `src/query/` — Query builders and filter models
80+
- `src/logger/` — Structured logging
81+
- `src/user/` — User models and token management
82+
83+
### Golden Testing
84+
85+
Golden tests use **Alchemist** (`^0.13.0`). Goldens are stored under:
86+
- `test/components/<name>/goldens/ci/` — for CI
87+
- `test/components/<name>/goldens/macos/` — for local macOS development
88+
89+
Golden tests are tagged with `golden` in `dart_test.yaml`. Run `melos run update:goldens` to regenerate after visual changes.
90+
91+
### Code Generation
92+
93+
- **json_serializable** — model serialization (`.g.dart` files)
94+
- **build_runner** — orchestrates all generation
95+
- **theme_extensions_builder** — generates theme extension classes (`.g.theme.dart`)
96+
- **widgetbook_generator** — auto-generates Widgetbook entries
97+
98+
After any model or theme annotation changes, run the appropriate generate command before running tests.

all_lint_rules.yaml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ linter:
33
- always_declare_return_types
44
- always_put_control_body_on_new_line
55
- always_put_required_named_parameters_first
6-
- always_require_non_null_named_parameters
76
- always_specify_types
87
- always_use_package_imports
98
- annotate_overrides
9+
- annotate_redeclares
1010
- avoid_annotating_with_dynamic
1111
- avoid_bool_literals_in_conditional_expressions
1212
- avoid_catches_without_on_clauses
@@ -20,6 +20,7 @@ linter:
2020
- avoid_field_initializers_in_const_classes
2121
- avoid_final_parameters
2222
- avoid_function_literals_in_foreach_calls
23+
- avoid_futureor_void
2324
- avoid_implementing_value_types
2425
- avoid_init_to_null
2526
- avoid_js_rounded_ints
@@ -32,8 +33,6 @@ linter:
3233
- avoid_relative_lib_imports
3334
- avoid_renaming_method_parameters
3435
- avoid_return_types_on_setters
35-
- avoid_returning_null
36-
- avoid_returning_null_for_future
3736
- avoid_returning_null_for_void
3837
- avoid_returning_this
3938
- avoid_setters_without_getters
@@ -61,12 +60,15 @@ linter:
6160
- constant_identifier_names
6261
- control_flow_in_finally
6362
- curly_braces_in_flow_control_structures
63+
- dangling_library_doc_comments
6464
- depend_on_referenced_packages
6565
- deprecated_consistency
66+
- deprecated_member_use_from_same_package
6667
- diagnostic_describe_all_properties
6768
- directives_ordering
6869
- discarded_futures
6970
- do_not_use_environment
71+
- document_ignores
7072
- empty_catches
7173
- empty_constructor_bodies
7274
- empty_statements
@@ -76,32 +78,41 @@ linter:
7678
- flutter_style_todos
7779
- hash_and_equals
7880
- implementation_imports
79-
- iterable_contains_unrelated_type
81+
- implicit_call_tearoffs
82+
- implicit_reopen
83+
- invalid_case_patterns
84+
- invalid_runtime_check_with_js_interop_types
8085
- join_return_with_assignment
8186
- leading_newlines_in_multiline_strings
87+
- library_annotations
8288
- library_names
8389
- library_prefixes
8490
- library_private_types_in_public_api
8591
- lines_longer_than_80_chars
86-
- list_remove_unrelated_type
8792
- literal_only_boolean_expressions
93+
- matching_super_parameters
94+
- missing_code_block_language_in_doc_comment
8895
- missing_whitespace_between_adjacent_strings
8996
- no_adjacent_strings_in_list
9097
- no_default_cases
9198
- no_duplicate_case_values
9299
- no_leading_underscores_for_library_prefixes
93100
- no_leading_underscores_for_local_identifiers
101+
- no_literal_bool_comparisons
94102
- no_logic_in_create_state
95103
- no_runtimeType_toString
104+
- no_self_assignments
105+
- no_wildcard_variable_uses
96106
- non_constant_identifier_names
97107
- noop_primitive_operations
98108
- null_check_on_nullable_type_parameter
99109
- null_closures
100110
- omit_local_variable_types
111+
- omit_obvious_local_variable_types
112+
- omit_obvious_property_types
101113
- one_member_abstracts
102114
- only_throw_errors
103115
- overridden_fields
104-
- package_api_docs
105116
- package_names
106117
- package_prefixed_library_names
107118
- parameter_assignments
@@ -117,7 +128,6 @@ linter:
117128
- prefer_constructors_over_static_methods
118129
- prefer_contains
119130
- prefer_double_quotes
120-
- prefer_equal_for_default_values
121131
- prefer_expression_function_bodies
122132
- prefer_final_fields
123133
- prefer_final_in_for_each
@@ -148,29 +158,42 @@ linter:
148158
- provide_deprecation_message
149159
- public_member_api_docs
150160
- recursive_getters
161+
- remove_deprecations_in_breaking_versions
151162
- require_trailing_commas
152163
- secure_pubspec_urls
164+
- simplify_variable_pattern
153165
- sized_box_for_whitespace
154166
- sized_box_shrink_expand
155167
- slash_for_doc_comments
156168
- sort_child_properties_last
157169
- sort_constructors_first
158170
- sort_pub_dependencies
159171
- sort_unnamed_constructors_first
172+
- specify_nonobvious_local_variable_types
173+
- specify_nonobvious_property_types
174+
- strict_top_level_inference
175+
- switch_on_type
160176
- test_types_in_equals
161177
- throw_in_finally
162178
- tighten_type_of_initializing_formals
163179
- type_annotate_public_apis
164180
- type_init_formals
181+
- type_literal_in_constant_pattern
165182
- unawaited_futures
183+
- unintended_html_in_doc_comment
184+
- unnecessary_async
166185
- unnecessary_await_in_return
167186
- unnecessary_brace_in_string_interps
187+
- unnecessary_breaks
168188
- unnecessary_const
169189
- unnecessary_constructor_name
170190
- unnecessary_final
171191
- unnecessary_getters_setters
192+
- unnecessary_ignore
172193
- unnecessary_lambdas
173194
- unnecessary_late
195+
- unnecessary_library_directive
196+
- unnecessary_library_name
174197
- unnecessary_new
175198
- unnecessary_null_aware_assignments
176199
- unnecessary_null_aware_operator_on_extension_on_nullable
@@ -185,9 +208,11 @@ linter:
185208
- unnecessary_string_interpolations
186209
- unnecessary_this
187210
- unnecessary_to_list_in_spreads
211+
- unnecessary_unawaited
212+
- unnecessary_underscores
188213
- unreachable_from_main
189214
- unrelated_type_equality_checks
190-
- unsafe_html
215+
- unsafe_variance
191216
- use_build_context_synchronously
192217
- use_colored_box
193218
- use_decorated_box
@@ -199,6 +224,7 @@ linter:
199224
- use_key_in_widget_constructors
200225
- use_late_for_private_fields_and_variables
201226
- use_named_constants
227+
- use_null_aware_elements
202228
- use_raw_strings
203229
- use_rethrow_when_possible
204230
- use_setters_to_change_properties
@@ -207,5 +233,6 @@ linter:
207233
- use_super_parameters
208234
- use_test_throws_matchers
209235
- use_to_and_as_if_applicable
236+
- use_truncating_division
210237
- valid_regexps
211-
- void_checks
238+
- void_checks

analysis_options.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@ analyzer:
1010
# We explicitly enabled even conflicting rules and are fixing the conflict
1111
# in this file.
1212
included_file_warning: ignore
13-
14-
todo: ignore
1513
exclude:
1614
# exclude all the generated files
1715
- packages/*/lib/**/*.*.dart
1816

17+
formatter:
18+
page_width: 120
19+
trailing_commas: preserve
20+
1921
linter:
2022
rules:
2123
## Disabled rules because the repository doesn't respect them (yet)
2224
avoid_setters_without_getters: false
2325
discarded_futures: false
26+
comment_references: false
2427

2528
#############
2629

@@ -93,6 +96,19 @@ linter:
9396
# There are situations where we use default in enums on purpose
9497
no_default_cases: false
9598

99+
# Sometimes static methods are more readable
100+
prefer_constructors_over_static_methods: false
101+
102+
# Conflicts with `omit_local_variable_types`
103+
specify_nonobvious_local_variable_types: false
104+
specify_nonobvious_property_types: false
105+
106+
# Makes the code more verbose without adding much value
107+
document_ignores: false
108+
109+
# False positives
110+
unsafe_variance: false
111+
96112
# Temporarily disabled to find more important issues
97113
public_member_api_docs: false
98114
avoid_print: false

0 commit comments

Comments
 (0)