Skip to content

feat/state-management#555

Merged
AbhishekDoshi26 merged 6 commits into
mainfrom
feat/flutter_concepts
Jun 19, 2026
Merged

feat/state-management#555
AbhishekDoshi26 merged 6 commits into
mainfrom
feat/flutter_concepts

Conversation

@AbhishekDoshi26

Copy link
Copy Markdown
Member

Description

This PR restructures the State Management section under the Flutter Concepts category. It splits the content into two distinct guides (Beginner and Advanced) and refactors both guides to standardize on the Single State + Enum Pattern as the recommended industry best practice.

Changes Made

📁 Reorganization & Sidebar Styling

  • Nested Subcategory: Created the src/content/docs/flutter-concepts/state-management/ directory and added a _meta.yml configuration to define the sidebar group.
  • Custom CSS Overrides: Modified src/styles/custom.css to make nested sidebar group headers normal font-weight and match the style/color of regular article links.
  • Clean up: Deleted the old flat file state-management-with-flutter.mdx.

📄 Beginner Guide: State Management in Flutter

  • Created beginner.mdx based on the Medium article on BLoC Single State concepts.
  • Explains BLoC philosophy, highlights the multi-class state anti-pattern, and demonstrates the Single State + Enum pattern.
  • Relocated the BLoC Event Diagram to this guide (where BLoC is introduced).

📄 Advanced Guide: Advanced State Management (BLoC)

  • Created advanced.mdx by adapting the weather app BLoC tutorial.
  • Intro Streamlining: Simplified the introduction to reference the beginner guide, removing duplicate paragraphs about BLoC background and diagrams.
  • Code Refactoring: Rewrote the weather tutorial code snippets to use the Single State + Enum pattern instead of multi-class states:
    • Implemented WeatherStatus enum and a single WeatherState class.
    • Updated WeatherBloc event handlers to emit copied states.
    • Updated WeatherView UI widget wiring to retain weather data in memory during background refreshes.

Verification

  • Verified that all MDX paths and file configuration headers are structurally sound.
  • Validated hot reloading and page layouts on the local Astro dev server.

@AbhishekDoshi26 AbhishekDoshi26 changed the title Feat/flutter concepts feat/state-management Jun 12, 2026
Comment thread src/content/docs/flutter-concepts/state-management/beginner.mdx Outdated
Comment thread src/content/docs/flutter-concepts/state-management/beginner.mdx Outdated
Comment thread src/content/docs/flutter-concepts/state-management/beginner.mdx Outdated
Comment thread src/content/docs/flutter-concepts/state-management/beginner.mdx Outdated
@tomarra

tomarra commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

This reads a bit more as a medium article then a doc page. Need to rework the tone a bit here. I left some comments on that but take another pass at it and then I can re-review.

@AbhishekDoshi26 AbhishekDoshi26 requested a review from tomarra June 18, 2026 08:31
@AbhishekDoshi26 AbhishekDoshi26 force-pushed the feat/flutter_concepts branch from a05bd55 to 430e6e4 Compare June 18, 2026 08:34

@tomarra tomarra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good with this for now. Same comment applies from other reviews, feels like there is a lot of code in here that probably needs to live in an example repo/app to point to which also forces us to keep it up to date with latest version of Flutter/Dart instead of static code that gets stale in docs.

@AbhishekDoshi26 AbhishekDoshi26 merged commit 9d543d0 into main Jun 19, 2026
3 checks passed
@AbhishekDoshi26 AbhishekDoshi26 deleted the feat/flutter_concepts branch June 19, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants