Skip to content

Fix save #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 18, 2019
27 changes: 3 additions & 24 deletions lib/src/objects/parse_geo_point.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,12 @@ part of flutter_parse_sdk;
const String keyLatitude = 'latitude';
const String keyLongitude = 'longitude';

class ParseGeoPoint extends ParseObject {
class ParseGeoPoint {
/// Creates a Parse Object of type GeoPoint
ParseGeoPoint(
{double latitude = 0.0,
double longitude = 0.0,
bool debug,
ParseHTTPClient client,
bool autoSendSessionId})
: super(keyGeoPoint) {
this.latitude = latitude;
this.longitude = longitude;
ParseGeoPoint({this.latitude = 0.0, this.longitude = 0.0});

_debug = isDebugEnabled(objectLevelDebug: debug);
_client = client ??
ParseHTTPClient(
sendSessionId:
autoSendSessionId ?? ParseCoreData().autoSendSessionId,
securityContext: ParseCoreData().securityContext);
}
double latitude, longitude;

double get latitude => super.get<double>(keyLatitude);
set latitude(double latitude) => set<double>(keyLatitude, latitude);

double get longitude => super.get<double>(keyLongitude);
set longitude(double longitude) => set<double>(keyLongitude, longitude);

@override
Map<String, dynamic> toJson({bool full = false, bool forApiRQ = false}) =>
<String, dynamic>{
'__type': 'GeoPoint',
Expand Down