From 178dd6d38bd8f47462c74a0ce86dd3207507fd63 Mon Sep 17 00:00:00 2001 From: Maurits van Beusekom Date: Sun, 24 Dec 2023 08:48:10 +0200 Subject: [PATCH] Fix mistake in resetLazySingleton method --- packages/flutter_ioc/example/pubspec.yaml | 4 +--- packages/flutter_ioc/lib/src/ioc_container.dart | 2 +- packages/flutter_ioc/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/flutter_ioc/example/pubspec.yaml b/packages/flutter_ioc/example/pubspec.yaml index 6f9d167..dd87ce8 100644 --- a/packages/flutter_ioc/example/pubspec.yaml +++ b/packages/flutter_ioc/example/pubspec.yaml @@ -5,10 +5,8 @@ version: 1.0.0 publish_to: none dependencies: - flutter_ioc: - path: ../ flutter_ioc_get_it: path: ../../flutter_ioc_get_it environment: - sdk: '>=2.18.1 <3.0.0' \ No newline at end of file + sdk: '>=2.18.1 <4.0.0' \ No newline at end of file diff --git a/packages/flutter_ioc/lib/src/ioc_container.dart b/packages/flutter_ioc/lib/src/ioc_container.dart index b7ccc42..df84788 100644 --- a/packages/flutter_ioc/lib/src/ioc_container.dart +++ b/packages/flutter_ioc/lib/src/ioc_container.dart @@ -308,7 +308,7 @@ abstract class IocContainer { /// [onDispose] callback. This function overrides the disposing /// you might have provided when registering. FutureOr resetLazySingleton({ - Object? instance, + T? instance, String? instanceName, FutureOr Function(T)? onDispose, }); diff --git a/packages/flutter_ioc/pubspec.yaml b/packages/flutter_ioc/pubspec.yaml index 22a1499..8152760 100644 --- a/packages/flutter_ioc/pubspec.yaml +++ b/packages/flutter_ioc/pubspec.yaml @@ -5,7 +5,7 @@ version: 2.0.0 publish_to: none environment: - sdk: '>=2.18.1 <3.0.0' + sdk: '>=2.18.1 <4.0.0' dev_dependencies: lints: ^2.0.0