From 6cbbd6a043161d3bcb53f16f031b584b5083a9c9 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Wed, 23 Oct 2024 13:48:03 +0200 Subject: [PATCH] fix: resolve deprecation warning regarding whereNotNull --- lib/src/core/definitions/security/combo_security_scheme.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/core/definitions/security/combo_security_scheme.dart b/lib/src/core/definitions/security/combo_security_scheme.dart index 4e684f8b..3425123f 100644 --- a/lib/src/core/definitions/security/combo_security_scheme.dart +++ b/lib/src/core/definitions/security/combo_security_scheme.dart @@ -4,7 +4,6 @@ // // SPDX-License-Identifier: BSD-3-Clause -import "package:collection/collection.dart"; import "package:curie/curie.dart"; import "../extensions/json_parser.dart"; @@ -51,7 +50,7 @@ final class ComboSecurityScheme extends SecurityScheme { ); final count = - [oneOf, allOf].whereNotNull().fold(0, (previous, _) => previous + 1); + [oneOf, allOf].nonNulls.fold(0, (previous, _) => previous + 1); if (count != 1) { throw FormatException(