openDeviceContactPicker static method
Future<Contact?>
openDeviceContactPicker(
{ - bool iOSLocalizedLabels = true,
- bool androidLocalizedLabels = true,
})
Implementation
static Future<Contact?> openDeviceContactPicker(
{bool iOSLocalizedLabels = true,
bool androidLocalizedLabels = true}) async {
dynamic result = await _channel
.invokeMethod('openDeviceContactPicker', <String, dynamic>{
'iOSLocalizedLabels': iOSLocalizedLabels,
'androidLocalizedLabels': androidLocalizedLabels,
});
// result contains either :
// - an List of contacts containing 0 or 1 contact
// - a FormOperationErrorCode value
if (result is List) {
if (result.isEmpty) {
return null;
}
result = result.first;
}
return _handleFormOperation(result);
}