openContactInsertForm method
Opens a native insert form with data
preloaded
Implementation
@override
Future<Contact?> openContactInsertForm([Contact? data]) async {
final map =
await channel.invokeMethod('openContactInsertForm', data?.toMap());
if (map["success"] == true) {
final contact = Contact.of(map["contact"] ?? <String, dynamic>{}, mode);
_log.info("Saved contact: ${contact?.identifier}");
return contact;
} else {
_log.info("Contact form was not saved: ${map["code"] ?? 'unknown'}");
return null;
}
}