SunnyApp / flutter_contact

A flutter plugin for retrieving, creating, saving, and watching contacts on native devices
BSD 3-Clause "New" or "Revised" License
81 stars 62 forks source link

Replace OffsetDateTime call by Date. #9

Closed SamiKouatli closed 4 years ago

SamiKouatli commented 4 years ago

OffsetDateTime is avalaible only for sdk version > 26. Using the plugin with older version of Android causes an application crash.

This modification allows us to use the plugin with older version of Android. It uses java.util.Date which is the old java way to manage date with java.time.Instant which is the tool in Java 8 to keep compatibility with older Java version.

Tested this code on Android 4.4 it does not crash anymore.

kw2019ltd commented 4 years ago

pls merge this pr