getAccessTokenFromURL function

String? getAccessTokenFromURL(
  1. dynamic url
)

Analyze a URL and try to extract an AccessToken from it. @param url The URL to look into.

Implementation

String? getAccessTokenFromURL(dynamic url) {
  final uri = url is String ? Uri.parse(url) : url;
  final query = Uri.tryParse(
    uri.fragment.startsWith('/') ? uri.fragment.substring(1) : uri.fragment,
  )?.queryParameters;
  return query?['access_token'];
}