openSpecificMailApp static method

Future<bool> openSpecificMailApp(
  1. MailApp mailApp
)

Attempts to open a specific email app installed on the device. Get a MailApp from calling getMailApps

Implementation

static Future<bool> openSpecificMailApp(MailApp mailApp) async {
  if (_isAndroid) {
    var result = await _channel.invokeMethod<bool>(
          'openSpecificMailApp',
          <String, dynamic>{'name': mailApp.name},
        ) ??
        false;
    return result;
  } else if (_isIOS) {
    return await launch(
      mailApp.iosLaunchScheme,
      forceSafariVC: false,
    );
  } else {
    throw Exception('Platform not supported');
  }
}