·get-it-expert
</>

get-it-expert

有关 Flutter/Dart 的 get_it 服务定位器和依赖项注入的专家指导。涵盖注册(单例、工厂、惰性、异步)、带有阴影的作用域、带有 init() 模式的异步初始化、检索、带有基于作用域的模拟的测试以及生产模式。在使用 get_it、依赖项注入、服务注册、作用域或异步初始化时使用。

7安装·1热度·@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