flutter-service

Generate Flutter service classes with ChangeNotifier and GetIt registration.

22|3|Updated Apr 20, 2025
One-click install
npx skills add https://github.com/CloudToLocalLLM-online/CloudToLocalLLM --skill flutter-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-service
Source: https://github.com/CloudToLocalLLM-online/CloudToLocalLLM/tree/main/.claude/skills/flutter-service
Command: npx skills add https://github.com/CloudToLocalLLM-online/CloudToLocalLLM --skill flutter-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of boilerplate code for Flutter services, ensuring consistency and adherence to best practices for dependency injection and initialization.

Core Features & Use Cases

  • Boilerplate Generation: Creates a new Flutter service class with a ChangeNotifier base.
  • Dependency Injection: Automatically registers the service with GetIt in lib/di/locator.dart.
  • Initialization Logic: Includes a two-phase initialization pattern with timeout and error handling.
  • Use Case: When developing a new feature that requires a data service, use this Skill to quickly scaffold the service, including its registration and initialization, saving development time and reducing errors.

Quick Start

Generate a new Flutter service for managing user profiles, including authentication service dependency.

Frequently Asked Questions about flutter-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Flutter service with GetIt dependency injection?

To generate a Flutter service with GetIt dependency injection, use this Skill to scaffold a ChangeNotifier class and automatically register it in lib/di/locator.dart, ensuring proper boilerplate creation and initialization.

What is the two-phase initialization pattern for Flutter services?

The two-phase initialization pattern for Flutter services separates object construction from setup logic. This Skill generates it with built-in timeout and error handling, including debug logging to track initialization failures.

Does this service generator support constructor dependency injection for authenticated services?

Yes, this service generator supports constructor dependency injection for authenticated services. It scaffolds the necessary class structure to pass authentication dependencies directly into the new Flutter service.

How to register a Flutter ChangeNotifier service with GetIt automatically?

To register a Flutter ChangeNotifier service with GetIt automatically, this Skill updates your lib/di/locator.dart file during generation, injecting the required boilerplate to wire up the new service class.

Can I use this to scaffold a Flutter data service with error handling and debug logging?

Yes, you can use this to scaffold a Flutter data service with error handling and debug logging. It generates a service class that includes these mechanisms within its two-phase initialization pattern by default.

Why does my Flutter service boilerplate need a ChangeNotifier base class?

Your Flutter service boilerplate needs a ChangeNotifier base class to enable reactive UI updates. This Skill uses ChangeNotifier to ensure the generated service integrates properly with provider-based state management.