·get-it-expert
</>

get-it-expert

有關 Flutter/Dart 的 get_it 服務定位器和相依性注入的專家指導。涵蓋註冊(單例、工廠、惰性、非同步)、帶有陰影的作用域、帶有 init() 模式的非同步初始化、檢索、基於作用域的模擬的測試以及生產模式。使用 get_it、依賴項注入、服務註冊、作用域或非同步初始化時使用。

7安裝·2熱度·@flutter-it

安裝

$npx skills add https://github.com/flutter-it/get_it --skill get-it-expert

如何安裝 get-it-expert

透過命令列快速安裝 get-it-expert AI 技能到你的開發環境

  1. 開啟終端機: 開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 執行安裝指令: 複製並執行以下指令:npx skills add https://github.com/flutter-it/get_it --skill get-it-expert
  3. 驗證安裝: 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

來源:flutter-it/get_it。

SKILL.md

查看原文

What: Type-safe service locator with O(1) lookup. Register services globally, retrieve anywhere without BuildContext. Pure Dart, no code generation.

Preferred pattern: Give services a Future init() method that returns this. This keeps initialization logic inside the class and allows concise registration:

Scope shadowing: Scopes are a stack of registration layers. When you register a type in a new scope that already exists in a lower scope, the new registration shadows (hides) the original. getIt () always searches top-down, returning the first match. Popping a scope removes its registrations and restores access to the shadowed ones below. This is what makes scopes useful for testing (push a scope with mocks, pop i...

有關 Flutter/Dart 的 get_it 服務定位器和相依性注入的專家指導。涵蓋註冊(單例、工廠、惰性、非同步)、帶有陰影的作用域、帶有 init() 模式的非同步初始化、檢索、基於作用域的模擬的測試以及生產模式。使用 get_it、依賴項注入、服務註冊、作用域或非同步初始化時使用。 來源:flutter-it/get_it。

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/flutter-it/get_it --skill get-it-expert
分類
</>開發工具
認證
收錄時間
2026-02-26
更新時間
2026-03-10

Browse more skills from flutter-it/get_it

快速解答

什麼是 get-it-expert?

有關 Flutter/Dart 的 get_it 服務定位器和相依性注入的專家指導。涵蓋註冊(單例、工廠、惰性、非同步)、帶有陰影的作用域、帶有 init() 模式的非同步初始化、檢索、基於作用域的模擬的測試以及生產模式。使用 get_it、依賴項注入、服務註冊、作用域或非同步初始化時使用。 來源:flutter-it/get_it。

如何安裝 get-it-expert?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/flutter-it/get_it --skill get-it-expert 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

這個 Skill 的原始碼在哪?

https://github.com/flutter-it/get_it

詳情

分類
</>開發工具
來源
skills.sh
收錄時間
2026-02-26