Compare commits

...

8 Commits

Author SHA1 Message Date
Sergey Penkovsky
e2562d22bb chore(release): publish packages
- cherrypick@2.0.2
 - cherrypick_flutter@1.1.1
2025-05-16 12:46:16 +03:00
Sergey Penkovsky
1a6e3d0b97 Merge pull request #6 from pese-git/fix/resolve_with_params
fix: support passing params when resolving dependency recursively in …
2025-05-16 12:43:42 +03:00
yarashevich_kv
ea8ff1da83 fix: support passing params when resolving dependency recursively in parent scope. 2025-05-16 10:13:59 +03:00
Sergey Penkovsky
ff55ddb491 chore(release): publish packages
- cherrypick_flutter@1.1.0
2025-05-03 17:02:38 +03:00
Sergey Penkovsky
3d3130914a feat: modify api in CherryPickProvider 2025-05-03 17:02:13 +03:00
Sergey Penkovsky
35f7c27360 fix: update description 2025-05-02 12:13:28 +03:00
Sergey Penkovsky
36e42171b7 hotfix 2025-05-02 12:10:30 +03:00
Sergey Penkovsky
1a1fe9c4e4 fix: update gitignore 2025-05-02 12:09:25 +03:00
10 changed files with 81 additions and 15 deletions

2
.gitignore vendored
View File

@@ -7,6 +7,8 @@
.idea/ .idea/
.vscode/ .vscode/
pubspec_overrides.yaml
melos_cherrypick.iml melos_cherrypick.iml
melos_cherrypick_workspace.iml melos_cherrypick_workspace.iml
melos_cherrypick_flutter.iml melos_cherrypick_flutter.iml

View File

@@ -3,6 +3,57 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 2025-05-16
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`cherrypick` - `v2.0.2`](#cherrypick---v202)
- [`cherrypick_flutter` - `v1.1.1`](#cherrypick_flutter---v111)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `cherrypick_flutter` - `v1.1.1`
---
#### `cherrypick` - `v2.0.2`
- **FIX**: support passing params when resolving dependency recursively in parent scope.
## 2025-05-03
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`cherrypick_flutter` - `v1.1.0`](#cherrypick_flutter---v110)
---
#### `cherrypick_flutter` - `v1.1.0`
- **FIX**: update description.
- **FIX**: update gitignore.
- **FEAT**: modify api in CherryPickProvider.
## 2025-05-02 ## 2025-05-02
### Changes ### Changes

View File

@@ -1,3 +1,7 @@
## 2.0.2
- **FIX**: support passing params when resolving dependency recursively in parent scope.
## 2.0.1 ## 2.0.1
- **FIX**: fix warning. - **FIX**: fix warning.

View File

@@ -130,6 +130,6 @@ class Scope {
} }
// 2 Поиск зависимостей в родительском скоупе // 2 Поиск зависимостей в родительском скоупе
return _parentScope?.tryResolve(named: named); return _parentScope?.tryResolve(named: named, params: params);
} }
} }

View File

@@ -1,6 +1,6 @@
name: cherrypick name: cherrypick
description: Cherrypick is a small dependency injection (DI) library for dart/flutter projects. description: Cherrypick is a small dependency injection (DI) library for dart/flutter projects.
version: 2.0.1 version: 2.0.2
homepage: https://pese-git.github.io/cherrypick-site/ homepage: https://pese-git.github.io/cherrypick-site/
documentation: https://github.com/pese-git/cherrypick/wiki documentation: https://github.com/pese-git/cherrypick/wiki
repository: https://github.com/pese-git/cherrypick repository: https://github.com/pese-git/cherrypick

View File

@@ -27,3 +27,6 @@ migrate_working_dir/
**/doc/api/ **/doc/api/
.dart_tool/ .dart_tool/
build/ build/
pubspec_overrides.yaml

View File

@@ -1,3 +1,13 @@
## 1.1.1
- Update a dependency to the latest release.
## 1.1.0
- **FIX**: update description.
- **FIX**: update gitignore.
- **FEAT**: modify api in CherryPickProvider.
## 1.0.1 ## 1.0.1
- Update a dependency to the latest release. - Update a dependency to the latest release.

View File

@@ -14,14 +14,15 @@ import 'package:flutter/widgets.dart';
/// limitations under the License. /// limitations under the License.
/// ///
class CherryPickProvider extends InheritedWidget { final class CherryPickProvider extends InheritedWidget {
// Holds a reference to the root scope object Scope openRootScope() => CherryPick.openRootScope();
final Scope rootScope;
Scope openSubScope({String scopeName = '', String separator = '.'}) =>
CherryPick.openScope(scopeName: scopeName, separator: separator);
// Constructor for CherryPickProvider. Initializes with a required rootScope and child widget. // Constructor for CherryPickProvider. Initializes with a required rootScope and child widget.
const CherryPickProvider({ const CherryPickProvider({
super.key, super.key,
required this.rootScope,
required super.child, required super.child,
}); });
@@ -38,7 +39,6 @@ class CherryPickProvider extends InheritedWidget {
// Determines whether the widget should notify dependents when it changes // Determines whether the widget should notify dependents when it changes
@override @override
bool updateShouldNotify(CherryPickProvider oldWidget) { bool updateShouldNotify(CherryPickProvider oldWidget) {
// Notify if the rootScope has changed return false;
return rootScope != oldWidget.rootScope;
} }
} }

View File

@@ -1,6 +1,6 @@
name: cherrypick_flutter name: cherrypick_flutter
description: "A new Flutter package project." description: "Flutter library that allows access to the root scope through the context using `CherryPickProvider`."
version: 1.0.1 version: 1.1.1
homepage: https://pese-git.github.io/cherrypick-site/ homepage: https://pese-git.github.io/cherrypick-site/
documentation: https://github.com/pese-git/cherrypick/wiki documentation: https://github.com/pese-git/cherrypick/wiki
repository: https://github.com/pese-git/cherrypick repository: https://github.com/pese-git/cherrypick
@@ -13,7 +13,7 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
cherrypick: ^2.0.1 cherrypick: ^2.0.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

View File

@@ -1,4 +0,0 @@
# melos_managed_dependency_overrides: cherrypick
dependency_overrides:
cherrypick:
path: ../cherrypick