selectContacts method

  1. @override
Future<List<Contact>?> selectContacts()
override

Implementation

@override
Future<List<Contact>?> selectContacts() async {
  if (!Platform.isIOS) throw UnimplementedError();

  final List<dynamic>? result =
      await methodChannel.invokeMethod<List<dynamic>?>('selectContacts');
  if (result == null) {
    return null;
  }
  return result.map((e) => Contact.fromMap(e)).toList();
}