forked from LinusU/flutter_web_auth
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Web implementation not being found properly
Fix #82
- Loading branch information
1 parent
bd024f0
commit 31d59ac
Showing
5 changed files
with
43 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import 'package:flutter/services.dart'; | ||
import 'package:flutter_web_auth_2_platform_interface/flutter_web_auth_2_platform_interface.dart'; | ||
|
||
/// Implements the plugin interface for unsupported platforms (just throws | ||
/// errors). | ||
class FlutterWebAuth2UnsupportedPlugin extends FlutterWebAuth2Platform { | ||
/// Registers the unsupported implementation. | ||
static void registerWith() { | ||
FlutterWebAuth2Platform.instance = FlutterWebAuth2UnsupportedPlugin(); | ||
} | ||
|
||
@override | ||
Future<String> authenticate({ | ||
required String url, | ||
required String callbackUrlScheme, | ||
required Map<String, dynamic> options, | ||
}) async { | ||
throw PlatformException( | ||
message: 'Platform either unsupported or unrecognised.', | ||
code: 'UNSUPPORTED', | ||
); | ||
} | ||
|
||
@override | ||
Future clearAllDanglingCalls() async { | ||
throw PlatformException( | ||
message: 'Platform either unsupported or unrecognised.', | ||
code: 'UNSUPPORTED', | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters