diff --git a/CHANGELOG.md b/CHANGELOG.md index 23bc07ed9..8ce20bba1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.14 +Corrected delete & path issue +Added Geo queries +Added ability to add login oAuth data + ## 1.0.13 Added full bool to convert objects to JSON correctly diff --git a/README.md b/README.md index 12abb93e9..563d31260 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Want to get involved? Join our Slack channel and help out! (http://flutter-parse To install, either add to your pubspec.yaml ``` dependencies: - parse_server_sdk: ^1.0.13 + parse_server_sdk: ^1.0.14 ``` or clone this repository and add to your project. As this is an early development with multiple contributors, it is probably best to download/clone and keep updating as an when a new feature is added. diff --git a/example/lib/main.dart b/example/lib/main.dart index 99468d277..06dbf8527 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,9 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_plugin_example/application_constants.dart'; import 'package:flutter_plugin_example/diet_plan.dart'; +import 'package:flutter_stetho/flutter_stetho.dart'; import 'package:parse_server_sdk/parse_server_sdk.dart'; -void main() => runApp(new MyApp()); +void main() { + Stetho.initialize(); + runApp(new MyApp()); +} class MyApp extends StatefulWidget { @override @@ -109,10 +113,10 @@ class _MyAppState extends State { if (randomInt is int) print('Saving generic value worked!'); // Shows example of pinning an item - dietPlan.pin(); + await dietPlan.pin(); // shows example of retrieving a pin - var newDietPlanFromPin = DietPlan().fromPin('R5EonpUDWy'); + var newDietPlanFromPin = await DietPlan().fromPin('R5EonpUDWy'); if (newDietPlanFromPin != null) print('Retreiving from pin worked!'); } else { print(ApplicationConstants.keyAppName + ": " + apiResponse.error.message); @@ -149,9 +153,6 @@ class _MyAppState extends State { if (response.success) user = response.result; response = await user.verificationEmailRequest(); - if (response.success) user = response.result; - - user = null; // Best practice for starting the app. This will check for a valid user user = await ParseUser.currentUser(); await user.logout(); diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 152aa9e24..ba2f6813c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,9 +8,9 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 + flutter_stetho: ^0.2.2 dev_dependencies: - parse_server_sdk: path: ../ diff --git a/lib/src/base/parse_constants.dart b/lib/src/base/parse_constants.dart index 1d6037a9e..dbdf3bb3f 100644 --- a/lib/src/base/parse_constants.dart +++ b/lib/src/base/parse_constants.dart @@ -1,7 +1,7 @@ part of flutter_parse_sdk; // Library -const String keySdkVersion = '1.0.13'; +const String keySdkVersion = '1.0.14'; const String keyLibraryName = 'Flutter Parse SDK'; // End Points diff --git a/lib/src/objects/parse_object.dart b/lib/src/objects/parse_object.dart index 5c28f8e8a..4ccca79a1 100644 --- a/lib/src/objects/parse_object.dart +++ b/lib/src/objects/parse_object.dart @@ -190,9 +190,10 @@ class ParseObject extends ParseBase implements ParseCloneable { } /// Deletes the current object locally and online - Future delete(String path, String objectId) async { + Future delete(String objectId, {String path}) async { try { - var uri = "${ParseCoreData().serverUrl}$_path/$objectId"; + path ??= _path; + var uri = "${ParseCoreData().serverUrl}$path/$objectId"; var result = await _client.delete(uri); return handleResponse(this, result, ParseApiRQ.delete, _debug, className); } on Exception catch (e) { diff --git a/pubspec.yaml b/pubspec.yaml index ec68b252b..f28937a4d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: parse_server_sdk description: Flutter plugin for Parse Server, (https://parseplatform.org), (https://back4app.com) -version: 1.0.13 +version: 1.0.14 homepage: https://github.com/phillwiggins/flutter_parse_sdk author: PhillWiggins