doc: update manual

This commit is contained in:
Sergey Penkovsky
2025-07-29 08:10:08 +03:00
parent e609c44f90
commit 2c1f9d5969
3 changed files with 3 additions and 3 deletions

View File

@@ -99,7 +99,7 @@ final scope = CherryPick.openRootScope()
..installModules([$MyModule()]);
final repo = scope.resolve<DataRepository>();
final greeting = scope.resolveWithParams<String>('John'); // 'Hello, John!'
final greeting = scope.resolve<String>(params: 'John'); // 'Hello, John!'
```
_For Flutter, wrap your app with `CherryPickProvider` for DI scopes in the widget tree:_

View File

@@ -75,7 +75,7 @@ Allows you to create dependencies with runtime parameters, e.g., a service for a
bind<UserService>().toProvideWithParams((userId) => UserService(userId));
// Resolve:
final userService = scope.resolveWithParams<UserService>(params: '123');
final userService = scope.resolve<UserService>(params: '123');
```
---

View File

@@ -76,7 +76,7 @@ final api = scope.resolve<ApiClient>(named: 'mock');
bind<UserService>().toProvideWithParams((userId) => UserService(userId));
// Получение
final userService = scope.resolveWithParams<UserService>(params: '123');
final userService = scope.resolve<UserService>(params: '123');
```
---