     
     func dictionaryToContact(dictionary : [String:Any]) -> CNMutableContact{
         let contact = CNMutableContact()
-        
+
         //Simple fields
         contact.givenName = dictionary["givenName"] as? String ?? ""
         contact.familyName = dictionary["familyName"] as? String ?? ""

        return result
    }
    
    func addContact(contact : CNMutableContact) -> Bool {
        let store = CNContactStore()
        do{
            let saveRequest = CNSaveRequest()
            saveRequest.add(contact, toContainerWithIdentifier: nil)
            try store.execute(saveRequest)
        }
        catch {
            print(error.localizedDescription)
            return false
        }
        return true
    }
    
    func deleteContact(dictionary : [String:Any]) -> Bool{

            result(getContacts(query: (call.arguments as! String?)))
        case "addContact":
            let contact = dictionaryToContact(dictionary: call.arguments as! [String : Any])

            let addResult = addContact(contact: contact)
            if (addResult == "") {
                result(nil)
            }
            else {
                result(FlutterError(code: "", message: addResult, details: nil))
            }
        case "deleteContact":
            if(deleteContact(dictionary: call.arguments as! [String : Any])){
