Simple and powerful reactive state management using GetX.
Reactive and lightweight state management separating business logic from UI using GetX.
lib/app/modules/home/
├── controllers/
│ └── home_controller.dart
├── bindings/
│ └── home_binding.dart
└── views/
└── home_view.dart
GetxController. Store logic and state variables here..obs for observable variables (e.g., final count = 0.obs;).Obx(() => ...) to listen for changes.update() in controller and GetBuilder in UI.Bindings class to decouple DI from UI.Get.lazyPut(() => Controller()) in Bindings.permanent: true.onInit(), onReady(), onClose() instead of initState/dispose.get_cli for modular MVVM (data, models, modules).BuildContext to controllers.Get.put() in widgets; use Bindings + Get.find.class UserController extends GetxController {
final name = "User".obs;
void updateName(String val) => name.value = val;
}
class UserView extends GetView<UserController> {
@override
Widget build(ctx) => Scaffold(
body: Obx(() => Text(controller.name.value)),
floatingActionButton: FloatingActionButton(
onPressed: () => controller.updateName("New"),
),
);
}
For DI Bindings and Reactive patterns: See references/binding-example.md and references/reactive-vs-simple.md.
getx-navigation | feature-based-clean-architecture | dependency-injection
npx skills add ngxtm/Flutter GetX State Management下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer