Toolverse
All skills

get-it-expert

by flutter-it

Expert guidance on get_it service locator and dependency injection for Flutter/Dart. Covers registration (singleton, factory, lazy, async), scopes with shadowing, async initialization with init() pattern, retrieval, testing with scope-based mocking, and production patterns. Use

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Mobile
Views
2

About this skill

Expert guidance on get_it service locator and dependency injection for Flutter/Dart. Covers registration (singleton, factory, lazy, async), scopes with shadowing, async initialization with init() pattern, retrieval, testing with scope-based mocking, and production patterns. Use when working with get_it, dependency injection, service registration, scopes, or async initialization.

How to use

  1. Zainstaluj umiejętność get-it-expert w swoim środowisku agenta lub IDE obsługującym MCP skills. Umiejętność będzie dostępna jako asystent ekspertowy do pytań o get_it.

  2. Przed rozpoczęciem pracy zarejestruj wszystkie usługi w funkcji configureDependencies() i wywołaj ją PRZED runApp(). Użyj registerSingleton() dla obiektów tworzonych od razu, registerLazySingleton() dla leniwego ładowania, registerFactory() dla nowych instancji przy każdym dostępie.

  3. Gdy potrzebujesz asynchronicznej inicjalizacji, użyj pushNewScopeAsync() zamiast synchronicznego pushNewScope(). Pamiętaj, że popScope() zwraca Future i wymaga await.

  4. Po zarejestrowaniu async singletonów czekaj na allReady() (zwraca Future), aby upewnić się, że wszystkie usługi są gotowe. Po tym dostęp do nich odbywa się normalnym getIt() bez getAsync().

  5. Podczas testowania wykorzystaj scope-based mocking – pushNewScope() pozwala na tymczasowe przesłonięcie usług bez wpływu na globalny stan. Pamiętaj, że dispose callbacki są parametrem metod rejestracji, nie osobnymi metodami.

  6. Pytaj umiejętność o konkretne scenariusze: rejestrację z parametrami, obsługę StreamControllera z dispose, wzorce produkcyjne lub rozwiązywanie problemów z zakresami i asynchroniczną inicjalizacją.

Related skills

vercel-react-native-skills

by vercel-labs

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or

Mobile
1745

slidev

by XIYO

Comprehensive guide for Slidev - a web-based presentation framework for developers. Covers Markdown syntax, layouts, components, animations, theming, and exporting. Use this skill when creating or working with developer presentations using Slidev.

Mobile
223353

claude-mobile-ios-testing

by krzemienski

Use when testing iOS apps on simulator, capturing screenshots for validation gates, automating UI testing with expo-mcp and xc-mcp, or verifying visual correctness - combines expo-mcp autonomous testing (React Native level) with xc-mcp simulator management (iOS level)

Mobile
15111

android-kotlin-development

by aj-geddes

Develop native Android apps with Kotlin. Covers MVVM with Jetpack, Compose for modern UI, Retrofit for API calls, Room for local storage, and navigation architecture.

Mobile
152396

interactive-portfolio

by davila7

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities. Use when: portfolio,

Mobile
1823

swift-best-practices

by sammcj

This skill should be used when writing or reviewing Swift code for iOS or macOS projects. Apply modern Swift 6+ best practices, concurrency patterns, API design guidelines, and migration strategies. Covers async/await, actors, MainActor, Sendable, typed throws, and Swift 6

Mobile
36140