Skip to content

Commit

Permalink
Merge pull request lukasgit#95 from lukasgit/staging
Browse files Browse the repository at this point in the history
Sync staging 0.4.3 with master branch
  • Loading branch information
lukasgit authored Apr 23, 2020
2 parents d4675de + 844399d commit 34d9eae
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.4.3] - April 22, 2020

* Fixed getContactsForEmail with iOSLocalizedLabels (@pavanbuzz)

## [0.4.2] - April 21, 2020

* Two methods have been added to handle creating and editing contacts with device contact form (@engylemure)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To use this plugin, add `contacts_service` as a [dependency in your `pubspec.yam
For example:
```yaml
dependencies:
contacts_service: ^0.4.2
contacts_service: ^0.4.3
```
## Permissions
Expand Down
10 changes: 5 additions & 5 deletions ios/Classes/SwiftContactsServicePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public class SwiftContactsServicePlugin: NSObject, FlutterPlugin, CNContactViewC
}
case "openContactForm":
self.result = result
openContactForm()
_ = openContactForm()
case "openExistingContact":
let contact = call.arguments as! [String : Any]
self.result = result
openExistingContact(contact: contact, result: result)
let contact = call.arguments as! [String : Any]
self.result = result
_ = openExistingContact(contact: contact, result: result)
default:
result(FlutterMethodNotImplemented)
}
Expand Down Expand Up @@ -444,7 +444,7 @@ public class SwiftContactsServicePlugin: NSObject, FlutterPlugin, CNContactViewC
return contact
}

func contactToDictionary(contact: CNContact, localizedLabels: Bool) -> [String:Any]{
func contactToDictionary(contact: CNContact, localizedLabels: Bool = true) -> [String:Any]{

var result = [String:Any]()

Expand Down
6 changes: 4 additions & 2 deletions lib/contacts_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ class ContactsService {
static Future<Iterable<Contact>> getContactsForEmail(String email,
{bool withThumbnails = true,
bool photoHighResolution = true,
bool orderByGivenName = true}) async {
bool orderByGivenName = true,
bool iOSLocalizedLabels = true}) async {
Iterable contacts = await _channel.invokeMethod('getContactsForEmail',<String,dynamic>{
'email': email,
'withThumbnails': withThumbnails,
'photoHighResolution': photoHighResolution,
'orderByGivenName': orderByGivenName
'orderByGivenName': orderByGivenName,
'iOSLocalizedLabels': iOSLocalizedLabels,
});
return contacts.map((m) => Contact.fromMap(m));
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: contacts_service
description: A Flutter plugin to retrieve and manage contacts on Android and iOS devices.
version: 0.4.2
version: 0.4.3
authors:
- Lukas Dickie <lukas@changefly.com>
- Clovis Nicolas <clovisnicolas0@gmail.com>
Expand Down

0 comments on commit 34d9eae

Please sign in to comment.