Compare commits

...

5 Commits

Author SHA1 Message Date
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
7 changed files with 43 additions and 13 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,29 @@
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-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

@@ -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,9 @@
## 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.0
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.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

View File

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