Skip to content

Commit ca626c5

Browse files
committed
Revert "Add emoji variation selectors to all ✅ and ❌ across documentation"
This reverts commit 7bb73cc.
1 parent 7bb73cc commit ca626c5

31 files changed

+450
-450
lines changed

docs/documentation/get_it/advanced.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ Pop DetailPage(item1) → Release, refCount = 0 (service disposed)
130130

131131
<strong>Benefits:</strong>
132132
<ul style="list-style: none; padding-left: 0;">
133-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Service created synchronously (no async factory needed)</li>
134-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Async loading triggered in constructor</li>
135-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ No duplicate loading for same item (checked before loading)</li>
136-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Automatic memory management via reference counting</li>
137-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Reactive UI updates via `watch_it` (rebuilds on state changes)</li>
138-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ ChangeNotifier automatically disposed when refCount reaches 0</li>
139-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Each itemId uniquely identified via `instanceName`</li>
133+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Service created synchronously (no async factory needed)</li>
134+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Async loading triggered in constructor</li>
135+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ No duplicate loading for same item (checked before loading)</li>
136+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Automatic memory management via reference counting</li>
137+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Reactive UI updates via `watch_it` (rebuilds on state changes)</li>
138+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ ChangeNotifier automatically disposed when refCount reaches 0</li>
139+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Each itemId uniquely identified via `instanceName`</li>
140140
</ul>
141141

142142
<strong>Key Integration:</strong>
@@ -157,12 +157,12 @@ Only use `ignoreReferenceCount: true` when you're certain no other code is using
157157

158158
### When to Use Reference Counting
159159

160-
<strong>Good use cases:</strong>
160+
✅ <strong>Good use cases:</strong>
161161
- Recursive navigation (same page pushed multiple times)
162162
- Services needed by multiple simultaneously active features
163163
- Complex hierarchical component structures
164164

165-
<strong>Don't use when:</strong>
165+
❌ <strong>Don't use when:</strong>
166166
- Simple singleton that lives for app lifetime (use regular `registerSingleton`)
167167
- One-to-one widget-service relationship (use scopes)
168168
- Testing (use scopes to shadow instead)
@@ -192,15 +192,15 @@ Returns `null` instead of throwing an exception if the type is not registered. U
192192

193193
<strong>When to use:</strong>
194194
<ul style="list-style: none; padding-left: 0;">
195-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Optional features that may or may not be registered</li>
196-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Feature flags (service registered only when feature enabled)</li>
197-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Platform-specific services (might not exist on all platforms)</li>
198-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Graceful degradation scenarios</li>
195+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Optional features that may or may not be registered</li>
196+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Feature flags (service registered only when feature enabled)</li>
197+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Platform-specific services (might not exist on all platforms)</li>
198+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Graceful degradation scenarios</li>
199199
</ul>
200200

201201
<strong>Don't use when:</strong>
202-
- The dependency is required - use `get<T>()` to fail fast
203-
- Missing registration indicates a bug - exception is helpful
202+
- ❌ The dependency is required - use `get<T>()` to fail fast
203+
- ❌ Missing registration indicates a bug - exception is helpful
204204

205205
---
206206

docs/documentation/get_it/async_objects.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ GetIt provides comprehensive support for asynchronous object creation and initia
1616

1717
<strong>Key capabilities:</strong>
1818
<ul style="list-style: none; padding-left: 0;">
19-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#async-factories">Async Factories</a></strong> - Create new instances asynchronously on each access</li>
20-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#async-singletons">Async Singletons</a></strong> - Create singletons with async initialization</li>
21-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#dependency-management">Dependency Management</a></strong> - Automatically wait for dependencies before initialization</li>
22-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#startup-orchestration">Startup Orchestration</a></strong> - Coordinate complex initialization sequences</li>
23-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#manual-ready-signaling">Manual Signaling</a></strong> - Fine-grained control over ready state</li>
19+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#async-factories">Async Factories</a></strong> - Create new instances asynchronously on each access</li>
20+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#async-singletons">Async Singletons</a></strong> - Create singletons with async initialization</li>
21+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#dependency-management">Dependency Management</a></strong> - Automatically wait for dependencies before initialization</li>
22+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#startup-orchestration">Startup Orchestration</a></strong> - Coordinate complex initialization sequences</li>
23+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong><a href="#manual-ready-signaling">Manual Signaling</a></strong> - Fine-grained control over ready state</li>
2424
</ul>
2525

2626
## Quick Reference

docs/documentation/get_it/faq.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ This error means you're trying to register the same type twice. Common causes:
105105
<strong>2. Registering inside build methods (hot reload issue)</strong>
106106
If you register services inside `build()` or `initState()`, hot reload will call it again.
107107

108-
<strong>Wrong:</strong>
108+
❌ <strong>Wrong:</strong>
109109

110110
<<< @/../code_samples/lib/get_it/my_app_example.dart#example
111111

112-
<strong>Fix:</strong> Move registration to `main()` before `runApp()`:
112+
✅ <strong>Fix:</strong> Move registration to `main()` before `runApp()`:
113113

114114
<<< @/../code_samples/lib/get_it/main_example_9.dart#example
115115

@@ -199,9 +199,9 @@ Circular dependencies often mean:
199199
- Logic should be in a third service that coordinates both
200200

201201
<strong>What NOT to do:</strong>
202-
Using `late` without proper initialization
203-
Using global variables to break the cycle
204-
Passing getIt instance around
202+
❌ Using `late` without proper initialization
203+
❌ Using global variables to break the cycle
204+
❌ Passing getIt instance around
205205
:::
206206

207207
## Why do I get "This instance is not available in GetIt" when calling signalReady?
@@ -271,17 +271,17 @@ Split registrations into separate functions that encapsulate scope management:
271271

272272
<strong>Why functions matter:</strong>
273273
<ul style="list-style: none; padding-left: 0;">
274-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Reusable</strong> - Call the same function when pushing scopes to reinitialize features</li>
275-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Testable</strong> - Call specific registration functions in test setup</li>
276-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Organized</strong> - Clear separation of concerns by feature/layer</li>
277-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Centralized</strong> - All registration logic in one place, not scattered</li>
274+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Reusable</strong> - Call the same function when pushing scopes to reinitialize features</li>
275+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Testable</strong> - Call specific registration functions in test setup</li>
276+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Organized</strong> - Clear separation of concerns by feature/layer</li>
277+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Centralized</strong> - All registration logic in one place, not scattered</li>
278278
</ul>
279279

280280
<strong>Don't:</strong>
281-
Scatter registration calls throughout your app
282-
Call registration methods from widget code
283-
Mix registration with business logic
284-
Duplicate registration code for different scopes
281+
❌ Scatter registration calls throughout your app
282+
❌ Call registration methods from widget code
283+
❌ Mix registration with business logic
284+
❌ Duplicate registration code for different scopes
285285

286286
See [Scopes documentation](/documentation/get_it/scopes) for more on scope-based architecture.
287287
:::
@@ -292,21 +292,21 @@ See [Scopes documentation](/documentation/get_it/scopes) for more on scope-based
292292

293293
Use <strong>scopes</strong> - they're designed for this exact use case:
294294

295-
<strong>With Scopes (Recommended ✅):</strong>
295+
<strong>With Scopes (Recommended ✅):</strong>
296296

297297
<<< @/../code_samples/lib/get_it/on_login_example.dart#example
298298

299-
<strong>Without Scopes (Not recommended ❌):</strong>
299+
<strong>Without Scopes (Not recommended ❌):</strong>
300300

301301
<<< @/../code_samples/lib/get_it/on_login.dart#example
302302

303303
<strong>Why scopes are better:</strong>
304304
<ul style="list-style: none; padding-left: 0;">
305-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Automatic cleanup and restoration</li>
306-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Can't forget to re-register original services</li>
307-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Dispose functions called automatically</li>
308-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Cleaner, less error-prone code</li>
309-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Can push multiple nested scopes</li>
305+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Automatic cleanup and restoration</li>
306+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Can't forget to re-register original services</li>
307+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Dispose functions called automatically</li>
308+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Cleaner, less error-prone code</li>
309+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Can push multiple nested scopes</li>
310310
</ul>
311311

312312
<strong>Use unregister when:</strong>
@@ -332,16 +332,16 @@ See [Scopes documentation](/documentation/get_it/scopes) for more patterns.
332332

333333
<strong>When to use injectable:</strong>
334334
<ul style="list-style: none; padding-left: 0;">
335-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Large apps with many services (50+)</li>
336-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ You prefer declarative over imperative code</li>
337-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ You want dependency injection to be more automatic</li>
335+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Large apps with many services (50+)</li>
336+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ You prefer declarative over imperative code</li>
337+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ You want dependency injection to be more automatic</li>
338338
</ul>
339339

340340
<strong>When manual registration is fine:</strong>
341341
<ul style="list-style: none; padding-left: 0;">
342-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Small to medium apps (< 50 services)</li>
343-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ You prefer explicit, straightforward code</li>
344-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ You want to avoid code generation build step</li>
342+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Small to medium apps (< 50 services)</li>
343+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ You prefer explicit, straightforward code</li>
344+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ You want to avoid code generation build step</li>
345345
</ul>
346346

347347
<strong>Important:</strong> injectable is <strong>optional</strong>. get_it works great without it! The documentation here focuses on manual registration, which is simpler to learn and works for most apps.

docs/documentation/get_it/getting_started.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ next:
1717

1818
<strong>Key benefits:</strong>
1919
<ul style="list-style: none; padding-left: 0;">
20-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Extremely fast</strong> - O(1) lookup using Dart's Map</li>
21-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Easy to test</strong> - Switch implementations for mocks in tests</li>
22-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>No BuildContext needed</strong> - Access from anywhere in your app (UI, business logic, anywhere)</li>
23-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Type safe</strong> - Compile-time type checking</li>
24-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>No code generation</strong> - Works without build_runner</li>
20+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Extremely fast</strong> - O(1) lookup using Dart's Map</li>
21+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Easy to test</strong> - Switch implementations for mocks in tests</li>
22+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>No BuildContext needed</strong> - Access from anywhere in your app (UI, business logic, anywhere)</li>
23+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>Type safe</strong> - Compile-time type checking</li>
24+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ <strong>No code generation</strong> - Works without build_runner</li>
2525
</ul>
2626

2727
<strong>Common use cases:</strong>
@@ -106,11 +106,11 @@ This is simpler and makes IDE navigation to implementation easier.
106106

107107
<strong>When to use interfaces:</strong>
108108
<ul style="list-style: none; padding-left: 0;">
109-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Multiple implementations (production vs test, different providers)</li>
110-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Platform-specific implementations (mobile vs web)</li>
111-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Feature flags to switch implementations</li>
109+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Multiple implementations (production vs test, different providers)</li>
110+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Platform-specific implementations (mobile vs web)</li>
111+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Feature flags to switch implementations</li>
112112
</ul>
113-
- Don't use "just because" - creates navigation friction in your IDE
113+
- ❌ Don't use "just because" - creates navigation friction in your IDE
114114

115115
---
116116

@@ -168,28 +168,28 @@ As your app grows, you need to separate business logic from UI code. This makes
168168
<strong>Traditional approaches and their limitations:</strong>
169169

170170
<strong>InheritedWidget / Provider:</strong>
171-
- Requires `BuildContext` (not available in business layer)
172-
- Adds complexity to widget tree
173-
- Hard to access from background tasks, isolates
171+
- ❌ Requires `BuildContext` (not available in business layer)
172+
- ❌ Adds complexity to widget tree
173+
- ❌ Hard to access from background tasks, isolates
174174

175175
<strong>Plain Singletons:</strong>
176-
- Can't swap implementation for tests
177-
- Tight coupling to concrete classes
178-
- No lifecycle management
176+
- ❌ Can't swap implementation for tests
177+
- ❌ Tight coupling to concrete classes
178+
- ❌ No lifecycle management
179179

180180
<strong>IoC/DI Containers:</strong>
181-
- Slow startup (reflection-based)
182-
- "Magic" - hard to understand where objects come from
183-
- Most don't work with Flutter (no reflection)
181+
- ❌ Slow startup (reflection-based)
182+
- ❌ "Magic" - hard to understand where objects come from
183+
- ❌ Most don't work with Flutter (no reflection)
184184

185185
<strong>get_it solves these problems:</strong>
186186
<ul style="list-style: none; padding-left: 0;">
187-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Access from anywhere without BuildContext</li>
188-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Easy to mock for tests (register interface, swap implementation)</li>
189-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Extremely fast (no reflection, just Map lookup)</li>
190-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Clear and explicit (you see exactly what's registered)</li>
191-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Lifecycle management (scopes, disposal)</li>
192-
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Works in pure Dart and Flutter</li>
187+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Access from anywhere without BuildContext</li>
188+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Easy to mock for tests (register interface, swap implementation)</li>
189+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Extremely fast (no reflection, just Map lookup)</li>
190+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Clear and explicit (you see exactly what's registered)</li>
191+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Lifecycle management (scopes, disposal)</li>
192+
<li style="padding-left: 1.5em; text-indent: -1.5em;">✅ Works in pure Dart and Flutter</li>
193193
</ul>
194194

195195
<strong>Service Locator pattern:</strong>

0 commit comments

Comments
 (0)