signIn method

Future<String?> signIn(
  1. BuildContext context
)

Initiates the UAE Pass authentication process.

context: The BuildContext to navigate to the authentication view.

Returns a String representing the authentication code obtained during the process.

Implementation

Future<String?> signIn(BuildContext context) async {
  String url = await _getURL();
  if (context.mounted) {
    return await Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => UaePassLoginView(
          url: url,
          urlScheme: _appScheme,
          isProduction: _isProduction,
        ),
      ),
    );
  }
  return null;
}