Skip to content

Commit e98fb61

Browse files
author
cgiuliani
committed
feat: add removeLastScopeWhere method
1 parent f7b9dce commit e98fb61

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

configurator/lib/src/configuration.dart

+11
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ class Configuration {
8181
_scopes.removeWhere((scope) => predicate(scope));
8282
}
8383

84+
Future<void> removeLastScopeWhere(
85+
PopScopePredicate predicate, {
86+
bool notify = true,
87+
}) async {
88+
var idx = _scopes.lastIndexWhere((scope) => predicate(scope));
89+
90+
if (idx > -1) {
91+
_scopes.removeAt(idx);
92+
}
93+
}
94+
8495
Future<void> removeScopesOfType<T extends ConfigScope>() async {
8596
_scopes.removeWhere((s) => s is T);
8697

configurator/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: configurator
22
description: A new Flutter package project.
3-
version: 0.0.37
3+
version: 0.0.38
44
homepage:
55

66
environment:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.11/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-25 11:33:48.966905","version":"3.10.5"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.11/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-28 09:39:53.766371","version":"3.10.5"}

configurator_flutter/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: configurator_flutter
22
description: A new Flutter package project.
3-
version: 0.0.37
3+
version: 0.0.38
44
homepage:
55

66
environment:
@@ -30,7 +30,7 @@ dependencies:
3030
git:
3131
url: [email protected]:camrongiuliani/configurator.git
3232
path: configurator
33-
ref: 0.0.37
33+
ref: 0.0.38
3434

3535
dev_dependencies:
3636
flutter_test:

0 commit comments

Comments
 (0)