parseCallback static method

Map<String, String> parseCallback(
  1. String url
)

Parse redirect URI that contains ?code=&state= Example: https://myapp.com/callback?code=AbC123&state=xyz or custom scheme: com.modder.widgets://oauth?code=...&state=...

Implementation

static Map<String, String> parseCallback(String url) {
  final uri = Uri.parse(url);
  return uri.queryParameters;
}