From 93f90a3f72a8baaf3f3669ccff8f5f53804c8012 Mon Sep 17 00:00:00 2001 From: Hans Kokx Date: Mon, 19 May 2025 17:00:27 +0200 Subject: [PATCH] Fix DebugAuthInterface logout method Added environment key to ArcaneEnvironment constructor Renamed switchEnvironment parameter in ArcaneEnvironment constructor Bumped arcane_helper_utils dependency version --- example/lib/interfaces/debug_auth_interface.dart | 4 +++- lib/src/providers/environment_provider.dart | 7 +++---- pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/example/lib/interfaces/debug_auth_interface.dart b/example/lib/interfaces/debug_auth_interface.dart index 2c2f54e..5c99873 100644 --- a/example/lib/interfaces/debug_auth_interface.dart +++ b/example/lib/interfaces/debug_auth_interface.dart @@ -25,7 +25,9 @@ class DebugAuthInterface ); @override - Future> logout() async { + Future> logout({ + Future Function()? onLoggedOut, + }) async { Arcane.log("Logging out"); _isSignedIn = false; diff --git a/lib/src/providers/environment_provider.dart b/lib/src/providers/environment_provider.dart index 0331e6a..7a62d46 100644 --- a/lib/src/providers/environment_provider.dart +++ b/lib/src/providers/environment_provider.dart @@ -14,11 +14,10 @@ class ArcaneEnvironment extends InheritedWidget { /// Creates an `ArcaneEnvironment` widget. const ArcaneEnvironment({ required this.environment, - required Widget child, required void Function(Environment) switchEnvironment, - Key? key, - }) : _switchEnvironment = switchEnvironment, - super(key: key, child: child); + required super.child, + super.key, + }) : _switchEnvironment = switchEnvironment; /// Retrieves the `ArcaneEnvironment` instance from the nearest ancestor. /// diff --git a/pubspec.yaml b/pubspec.yaml index 9459b68..d778a15 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ environment: flutter: ">=1.17.0" dependencies: - arcane_helper_utils: ^1.4.1 + arcane_helper_utils: ^1.4.5 collection: ^1.19.0 flutter: sdk: flutter