Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat/state-management#555

Open
AbhishekDoshi26 wants to merge 6 commits into
main from
feat/flutter_concepts
Open

feat/state-management #555
AbhishekDoshi26 wants to merge 6 commits into
main from
feat/flutter_concepts

Conversation

@AbhishekDoshi26

@AbhishekDoshi26 AbhishekDoshi26 commented Jun 12, 2026

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 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.

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tomarra tomarra tomarra approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /