Authenticator.fromFlow constructor

Authenticator.fromFlow(
  1. Flow flow, {
  2. dynamic urlLancher(
    1. String url
    )?,
  3. String? redirectMessage,
  4. String? htmlPage,
})

Creates an authenticator that uses the given flow.

Implementation

Authenticator.fromFlow(
  this.flow, {
  Function(String url)? urlLancher,
  String? redirectMessage,
  this.htmlPage,
})  : assert(
        htmlPage != null ? redirectMessage == null : true,
        'You can only use one variable htmlPage (give entire html) or redirectMessage (only string message)',
      ),
      redirectMessage = redirectMessage ?? 'You can now close this window',
      port = flow.redirectUri.port,
      urlLancher = urlLancher ?? _runBrowser;