Skip to content
6 changes: 3 additions & 3 deletions lib/src/network/parse_live_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LiveQuery {
}

final String _className = query.object.className;
query.limiters.clear(); //Remove limites in LiveQuery
query.limiters.clear(); //Remove limits in LiveQuery
final String _where = query._buildQuery().replaceAll('where=', '');
//Convert where condition to Map
Map<String, dynamic> _whereMap = Map<String, dynamic>();
Expand All @@ -74,7 +74,7 @@ class LiveQuery {
_channel = IOWebSocketChannel(_webSocket);
_channel.stream.listen((dynamic message) {
if (_debug) {
print('$_printConstLiveQuery: Listen: ${message}');
print('$_printConstLiveQuery: Listen: $message');
}

final Map<String, dynamic> actionData = jsonDecode(message);
Expand Down Expand Up @@ -167,7 +167,7 @@ class LiveQuery {
print(
'$_printConstLiveQuery: UnsubscribeMessage: $_unsubscribeMessage');
}
await _channel.sink.add(jsonEncode(_unsubscribeMessage));
_channel.sink.add(jsonEncode(_unsubscribeMessage));
await _channel.sink.close();
}
}
Expand Down
8 changes: 4 additions & 4 deletions lib/src/network/parse_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@ class QueryBuilder<T extends ParseObject> {

// Add a constraint to the query that requires a particular key's value match another QueryBuilder
void whereMatchesQuery(String column, QueryBuilder query) {
String inQuery = query._buildQueryRelational(query.object.className);
final String inQuery = query._buildQueryRelational(query.object.className);

queries.add(MapEntry<String, dynamic>(
_SINGLE_QUERY, '\"$column\":{\"\$inQuery\":$inQuery}'));
}

//Add a constraint to the query that requires a particular key's value does not match another QueryBuilder
void whereDoesNotMatchQuery(String column, QueryBuilder query) {
String inQuery = query._buildQueryRelational(query.object.className);
final String inQuery = query._buildQueryRelational(query.object.className);

queries.add(MapEntry<String, dynamic>(
_SINGLE_QUERY, '\"$column\":{\"\$notInQuery\":$inQuery}'));
Expand Down Expand Up @@ -371,9 +371,9 @@ class QueryBuilder<T extends ParseObject> {
// Compact all the queries in the correct format
for (MapEntry<String, dynamic> queryToCompact in listOfQueriesCompact) {
var queryToCompactValue = queryToCompact.value.toString();
queryToCompactValue = queryToCompactValue.replaceFirst("{", "");
queryToCompactValue = queryToCompactValue.replaceFirst('{', '');
queryToCompactValue = queryToCompactValue.replaceRange(
queryToCompactValue.length - 1, queryToCompactValue.length, "");
queryToCompactValue.length - 1, queryToCompactValue.length, '');
if (listOfQueriesCompact.first == queryToCompact) {
queryEnd += queryToCompactValue.replaceAll(queryStart, ' ');
} else {
Expand Down
6 changes: 3 additions & 3 deletions lib/src/objects/parse_acl.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
part of flutter_parse_sdk;

/// [ParseACL] is used to control which users can access or modify a particular object
/// [ParseObject] can have its own [ParceACL]
/// [ParseObject] can have its own [ParseACL]
/// You can grant read and write permissions separately to specific users
/// or you can grant permissions to "the public" so that, for example, any user could read a particular object but
/// only a particular set of users could write to that object
Expand Down Expand Up @@ -125,8 +125,8 @@ class _ACLPermissions {
_ACLPermissions(this._readPermission, this._writePermission);
final String _keyReadPermission = 'read';
final String _keyWritePermission = 'write';
bool _readPermission = false;
bool _writePermission = false;
final bool _readPermission;
final bool _writePermission;

bool getReadPermission() {
return _readPermission;
Expand Down
6 changes: 4 additions & 2 deletions lib/src/objects/parse_installation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,15 @@ class ParseInstallation extends ParseObject {
///Subscribes the device to a channel of push notifications.
void subscribeToChannel(String value) {
final List<dynamic> channel = <String>[value];
addUnique('channels', channel);
setAddUnique('channels', channel);
save();
}

///Unsubscribes the device to a channel of push notifications.
void unsubscribeFromChannel(String value) {
final List<dynamic> channel = <String>[value];
removeAll('channels', channel);
setRemove('channels', channel);
save();
}

///Returns an <List<String>> containing all the channel names this device is subscribed to.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/objects/parse_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ParseObject extends ParseBase implements ParseCloneable {
final Map<String, dynamic> map = json.decode(result.body);
objectId = map['objectId'].toString();
}

return handleResponse<ParseObject>(
this, result, ParseApiRQ.create, _debug, className);
} on Exception catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/objects/response/parse_response_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ class _ParseResponseBuilder {
}

bool isHealthCheck(Response apiResponse) {
return apiResponse.body == "{\"status\":\"ok\"}";
return apiResponse.body == '{\"status\":\"ok\"}';
}
}