Add web platform boilerplate [SDK-3983] #197
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📋 Changes
This PR adds the web platform interface to the auth0_flutter_platform_interface package, and the respective –empty– implementation to the app-facing auth0_flutter package. For non-web platforms, this implementation is no-op, whereas for the web it allows to call the actual JS interop methods. The existing mobile-related files in the app-facing package were moved under a new mobile directory.
An empty Auth0Web class was also added to auth0_flutter.dart (in the app-facing package).
📎 References
This follows the approach explored in https://github.com/auth0/auth0-flutter/tree/flutter-web/option-2.
🎯 Testing
This was tested manually by adding a small JS library to index.html and calling it from Dart code.