Skip to content

Commit 3de2a00

Browse files
authored
Merge pull request #20 from phillwiggins/release/v1.0.2
Version 1.0.1 - Code tidy on queries
2 parents b0e98dd + 452f976 commit 3de2a00

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.2
2+
3+
Fixed login
4+
15
## 1.0.1
26

37
Added documentation and GeoPoints

README.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ Want to get involved? Join our Slack channel and help out! (http://flutter-parse
1313
To install, either add to your pubspec.yaml
1414
```
1515
dependencies:
16-
17-
parse_server_sdk: ^1.0.1
18-
19-
20-
21-
16+
parse_server_sdk: ^1.0.2
2217
```
2318
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.
2419

lib/src/data/parse_data_user.dart

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ class User extends ParseBase {
2626
factory User() => _instance;
2727

2828
/// Returns a [User] from a [Map] object
29-
fromJson(Map objectData) {
29+
fromJson(objectData) {
3030
if (getObjectData() == null) setObjectData(objectData);
3131
getObjectData().addAll(objectData);
32-
if (getObjectData().containsKey(ParseConstants.OBJECT_ID)) objectId = get(ParseConstants.OBJECT_ID).toString();
33-
if (getObjectData().containsKey(ParseConstants.CREATED_AT)) createdAt = convertStringToDateTime(get(ParseConstants.CREATED_AT).toString());
34-
if (getObjectData().containsKey(ParseConstants.UPDATED_AT)) updatedAt = convertStringToDateTime(get(ParseConstants.UPDATED_AT).toString());
35-
if (getObjectData().containsKey(ACL)) acl = get(ACL).toString();
36-
if (getObjectData().containsKey(USERNAME)) username = get(USERNAME).toString();
37-
if (getObjectData().containsKey(PASSWORD)) password = get(PASSWORD).toString();
38-
if (getObjectData().containsKey(EMAIL)) emailAddress = get(EMAIL).toString();
32+
if (getObjectData().containsKey(ParseConstants.OBJECT_ID)) objectId = getObjectData()[ParseConstants.OBJECT_ID];
33+
if (getObjectData().containsKey(ParseConstants.CREATED_AT)) createdAt = convertStringToDateTime(getObjectData()[ParseConstants.CREATED_AT]);
34+
if (getObjectData().containsKey(ParseConstants.UPDATED_AT)) updatedAt = convertStringToDateTime(getObjectData()[ParseConstants.UPDATED_AT]);
35+
if (getObjectData().containsKey(ACL)) acl = getObjectData()[ACL].toString();
36+
if (getObjectData().containsKey(USERNAME)) username = getObjectData()[USERNAME];
37+
if (getObjectData().containsKey(PASSWORD)) password = getObjectData()[PASSWORD];
38+
if (getObjectData().containsKey(EMAIL)) emailAddress = getObjectData()[EMAIL];
3939

4040
if (updatedAt == null) updatedAt = createdAt;
4141

lib/src/objects/parse_user.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,14 @@ class ParseUser {
167167

168168
var responseString = ' \n';
169169

170-
responseString += "----"
171-
"\n${_client.data.appName} API Response ($className : ${type.toString()}) :";
170+
responseString += "----""\n${_client.data.appName} API Response ($className : ${type.toString()}) :";
172171

173172
if (response.statusCode == 200 || response.statusCode == 201) {
174173
responseString += "\nStatus Code: ${response.statusCode}";
175174
responseString += "\nPayload: ${responseData.toString()}";
176175

177176
if (responseData.containsKey('objectId')) {
178-
User.instance.fromJson(JsonDecoder().convert(response.body) as Map);
177+
User.instance.fromJson(responseData);
179178
_client.data.sessionId = responseData['sessionToken'];
180179
}
181180
} else {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: parse_server_sdk
22
description: This is a Flutter plugin that allows communication with a Parse Server, (https://parseplatform.org)
3-
version: 1.0.1
3+
version: 1.0.2
44
homepage: https://github.com/phillwiggins/flutter_parse_sdk
55
author: PhillWiggins <[email protected]>
66

0 commit comments

Comments
 (0)