Skip to content

Commit

Permalink
💥 Upgrade to Flutter version 3
Browse files Browse the repository at this point in the history
Migration Guide:

This release drops support for Flutter v2, and adds support for Flutter v3. Make sure to upgrade to Flutter v3 when upgrading to this version.
  • Loading branch information
LinusU committed Nov 2, 2022
1 parent 4877503 commit 316aa6a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.4.2"
version: "0.4.3"
flutter_web_plugins:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -163,4 +163,4 @@ packages:
version: "2.1.2"
sdks:
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.0.0"
flutter: ">=3.0.0"
6 changes: 3 additions & 3 deletions lib/flutter_web_auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class FlutterWebAuth {
throw ArgumentError.value(callbackUrlScheme, 'callbackUrlScheme', 'must be a valid URL scheme');
}

WidgetsBinding.instance?.removeObserver(_resumedObserver); // safety measure so we never add this observer twice
WidgetsBinding.instance?.addObserver(_resumedObserver);
WidgetsBinding.instance.removeObserver(_resumedObserver); // safety measure so we never add this observer twice
WidgetsBinding.instance.addObserver(_resumedObserver);
return await _channel.invokeMethod('authenticate', <String, dynamic>{
'url': url,
'callbackUrlScheme': callbackUrlScheme,
Expand All @@ -50,6 +50,6 @@ class FlutterWebAuth {
/// terminate all `authenticate` calls with an error.
static Future<void> _cleanUpDanglingCalls() async {
await _channel.invokeMethod('cleanUpDanglingCalls');
WidgetsBinding.instance?.removeObserver(_resumedObserver);
WidgetsBinding.instance.removeObserver(_resumedObserver);
}
}
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ packages:
version: "2.1.2"
sdks:
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.0.0"
flutter: ">=3.0.0"
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version: 0.4.3
homepage: https://github.com/LinusU/flutter_web_auth

environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"
sdk: ">=2.17.0-0 <3.0.0"
flutter: ">=3.0.0"

dependencies:
flutter:
Expand Down

0 comments on commit 316aa6a

Please sign in to comment.