소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 3일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill flutter-coreflutter-state-management명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | flutter-coreflutter-state-management |
| description | > Use when this capability is needed. |
A comprehensive guide to managing state in Flutter applications, from simple built-in solutions to sophisticated state management patterns. This skill helps you understand the state management landscape, choose the right solution for your needs, and implement it effectively.
Flutter's official philosophy advocates for a pragmatic approach to state management: start with the simplest solution that works, and graduate to more complex patterns only when your application's complexity demands it. This "simple-first" approach prevents over-engineering while ensuring your codebase can scale gracefully.
The key insight is that there is no single "best" state management solution—the right choice depends on your specific requirements, team size, application complexity, and architectural preferences.
Before choosing a state management solution, it's crucial to understand the fundamental distinction between two types of state in Flutter applications.
Ephemeral state (also called UI state or local state) is state that is scoped to a single widget and doesn't need to be shared across the app. This includes:
For ephemeral state, setState() is the recommended solution. It's simple, performant, and keeps your code straightforward. Don't reach for complex state management solutions when setState() will suffice.
App state (also called shared state or application state) is state that needs to be shared across multiple widgets or persisted beyond a single screen. This includes:
App state requires a dedicated state management approach to ensure data flows correctly through your widget tree and updates are propagated efficiently.
Flutter offers a spectrum of state management solutions, from built-in lightweight options to full-featured architectural patterns:
Use this decision tree to select the appropriate state management approach:
If ephemeral (widget-scoped):
→ Use setState() or ValueNotifier
→ No additional packages needed
→ Stop here—you're done!
If app state (shared across widgets): → Continue to Question 2
Simple app (1-3 screens, minimal shared state):
→ Use InheritedWidget or ValueNotifier with InheritedNotifier
→ Consider Provider if you want a cleaner API
→ References: Built-in State, Provider Patterns
Medium complexity (5-10 screens, moderate shared state): → Use Provider for simplicity and community support → Use Riverpod for type safety and modern features → References: Provider Patterns, Riverpod Guide
Large/Enterprise app (10+ screens, complex state flows): → Use Riverpod for flexibility and compile-time safety → Use BLoC for strict architecture and enterprise requirements → References: BLoC Architecture, State Comparison
Need event-driven architecture with audit trails? → Use BLoC (excellent for regulated industries) → Reference: BLoC Architecture
Want compile-time safety and no BuildContext dependency? → Use Riverpod (catches errors at compile time) → Reference: Riverpod Guide
Working with streams extensively? → Use BLoC or StreamBuilder with built-in solutions → Reference: Built-in State
Team prefers simple, familiar patterns? → Use Provider (gentle learning curve) → Reference: Provider Patterns
Regardless of which solution you choose, follow these principles:
Flutter uses a declarative paradigm where UI = f(state). Your UI should be a pure function of your state. Instead of imperatively updating widgets, change the state and let Flutter rebuild the affected widgets.
// Imperative (wrong approach)
void updateCounter() {
counterText.text = count.toString();
}
// Declarative (Flutter way)
void updateCounter() {
setState(() {
count++;
});
// UI automatically reflects the new state
}
Keep your business logic separate from your UI code. State management solutions should handle:
Your widgets should be thin presentation layers that react to state changes, not contain business logic.
Only rebuild widgets that actually depend on changed state. Use:
ValueListenableBuilder for single valuesConsumer or Selector in Providerref.watch() in Riverpod with granular dependenciesBlocBuilder in BLoCAvoid rebuilding entire screens when only a small portion needs to update.
State changes should be:
Async state (loading, error, data) is common in real applications. Use:
FutureBuilder and StreamBuilder for simple casesFutureProvider or Riverpod's AsyncValueThe classic Flutter counter demonstrates basic state management concepts. See how the same app can be implemented with different solutions: → Example: Simple State Examples
Form inputs, validation, and temporary UI state should generally stay local:
TextEditingController for text inputssetState() for validation stateUser login status is shared across the entire app:
Shopping carts demonstrate complex state with multiple operations:
Chat apps, live dashboards, and real-time updates:
StreamBuilder with built-in solutionsStreamProvider in Provider/RiverpodState management solutions can coexist in the same app, enabling gradual migration:
ChangeNotifier classes for that stateChangeNotifierProviderConsumer or Provider.of() to access stateProviderScope (can coexist with MultiProvider)@riverpod generators for new codeIf your current solution:
Then focus on new features rather than migration. Only migrate if you have clear pain points.
State management is closely tied to your app architecture:
ChangeNotifier or StateNotifier holding stateAll state management solutions should be thoroughly testable:
Test business logic independently of Flutter:
test('counter increments', () {
final counter = CounterNotifier();
counter.increment();
expect(counter.value, 1);
});
Test widgets with mocked state:
ProviderScope overridesProviderContainer with overridesBlocProvider.value() with test blocsTest complete features with real state management:
autoDispose in Riverpodconst constructors where possibleselect() or Selector for granular dependenciesshared_preferences for simple key-value datahive or sqflite for structured dataNow that you understand the state management landscape, explore specific solutions:
Start with Built-in State Solutions: → Built-in State → Simple State Examples
Choose between Provider and Riverpod: → Provider Patterns → Riverpod Guide → State Comparison
Consider BLoC for strict architecture: → BLoC Architecture → Complex State Examples
Compare all solutions: → State Comparison
State management is not about choosing the "best" solution—it's about choosing the right solution for your specific needs. Start simple with built-in solutions, and evolve your approach as your application grows in complexity. Focus on principles (declarative UI, separation of concerns, testability) rather than dogma about specific packages.
Source: aaronbassett/agent-foundry — distributed by TomeVault.