diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml index 53449da..6472e9f 100644 --- a/.idea/libraries/Flutter_Plugins.xml +++ b/.idea/libraries/Flutter_Plugins.xml @@ -2,6 +2,15 @@ + + + + + + + + + diff --git a/.idea/misc.xml b/.idea/misc.xml index 2d8500d..80a1400 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d2e61..3d984c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.10 - 2024-06-09 + +* Update packages + ## 2.0.9 - 2023-10-14 * Update packages diff --git a/README.md b/README.md index 0ee91a2..659cb01 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ To manage the migration use this package https://pub.dev/packages/version_migrat Add in pubspec: ``` -native_shared_preferences: ^2.0.9 +native_shared_preferences: ^2.0.10 ``` ## Usage diff --git a/android/build.gradle b/android/build.gradle index 5eaf572..bd1a0ae 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:8.1.2' } } @@ -22,7 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 31 + compileSdkVersion 36 if (project.android.hasProperty("namespace")) { namespace 'yeniellandestoy.native_shared_preferences' diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 01a286e..7bb2df6 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/android/src/main/java/yeniellandestoy/native_shared_preferences/NativeSharedPreferencesPlugin.java b/android/src/main/java/yeniellandestoy/native_shared_preferences/NativeSharedPreferencesPlugin.java index 8de7ebd..751dcfb 100644 --- a/android/src/main/java/yeniellandestoy/native_shared_preferences/NativeSharedPreferencesPlugin.java +++ b/android/src/main/java/yeniellandestoy/native_shared_preferences/NativeSharedPreferencesPlugin.java @@ -12,11 +12,6 @@ public class NativeSharedPreferencesPlugin implements FlutterPlugin { private static final String CHANNEL_NAME = "native_shared_preferences"; private MethodChannel channel; - public static void registerWith(PluginRegistry.Registrar registrar) { - final NativeSharedPreferencesPlugin plugin = new NativeSharedPreferencesPlugin(); - plugin.setupChannel(registrar.messenger(), registrar.context()); - } - @Override public void onAttachedToEngine(FlutterPlugin.FlutterPluginBinding binding) { setupChannel(binding.getBinaryMessenger(), binding.getApplicationContext()); diff --git a/ios/Classes/NativeSharedPreferencesPlugin.m b/ios/Classes/NativeSharedPreferencesPlugin.m index d480169..70f1a5f 100644 --- a/ios/Classes/NativeSharedPreferencesPlugin.m +++ b/ios/Classes/NativeSharedPreferencesPlugin.m @@ -95,6 +95,8 @@ +(void)mapDateToMilliseconds:(NSDictionary *)dictionary mappedDictionary:(NSMuta [self mapDateToMilliseconds:(NSDictionary *)element mappedDictionary:newMappedDictionary]; [newArray addObject:newMappedDictionary]; + } else if ([element isKindOfClass:[NSDate class]]) { + [newArray addObject:[NSNumber numberWithDouble:floor([((NSDate *)element) timeIntervalSince1970] * 1000)]]; } else { [newArray addObject:element]; } diff --git a/pubspec.yaml b/pubspec.yaml index 2fbf95b..d05b155 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: native_shared_preferences description: This packages is a copy of the shared_prefrences package but without the prefix in the keys. Is used to migrate the data from previous native app. -version: 2.0.9 +version: 2.0.10 homepage: https://github.com/yeniel/native_shared_preferences environment: