pickApp method
Future<MailApp?>
pickApp({
- String? title,
- String? cancelLabel,
- String? emptyMessage,
- String? okLabel,
- String? otherAppsLabel,
- bool showEmptyAlert = true,
- bool showOtherApps = true,
override
Shows the OS dialog listing installed mail apps and returns the pick,
or null when dismissed or when nothing is installed.
Implementation
@override
Future<MailApp?> pickApp({
String? title,
String? cancelLabel,
String? emptyMessage,
String? okLabel,
String? otherAppsLabel,
bool showEmptyAlert = true,
bool showOtherApps = true,
}) async {
final picked = await methodChannel.invokeMapMethod<Object?, Object?>(
'pickApp',
{
'title': title,
'cancelLabel': cancelLabel,
'emptyMessage': emptyMessage,
'okLabel': okLabel,
'otherAppsLabel': otherAppsLabel,
'showEmptyAlert': showEmptyAlert,
'showOtherApps': showOtherApps,
},
);
return picked == null ? null : MailApp.fromMap(picked);
}