Skip to content

Commit

Permalink
Merge pull request jfacoustic#13 from jfacoustic/hotfix/checkWebBefor…
Browse files Browse the repository at this point in the history
…eAndroid

Fixes platform exception when running on web
  • Loading branch information
jfacoustic authored Apr 28, 2022
2 parents d532aab + cb5f8fe commit 7caf2e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/flutter_auth0_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

class Auth0Credentials {
Expand Down Expand Up @@ -44,7 +45,7 @@ class FlutterAuth0Client {
});

Future<Auth0Credentials> login() async {
if (Platform.isAndroid && scheme == null) {
if (!kIsWeb && Platform.isAndroid && scheme == null) {
throw Exception("Scheme is required on Android.");
}
final rawJson = await _channel.invokeMethod('login', {
Expand Down

0 comments on commit 7caf2e7

Please sign in to comment.