toMap method
Implementation
@override
Map<String, dynamic> toMap() {
final config = super.toMap();
// Geolocation Options
if (desiredAccuracy != null) config['desiredAccuracy'] = desiredAccuracy;
if (distanceFilter != null) config['distanceFilter'] = distanceFilter;
if (maxAcceptableAccuracy != null) config['maxAcceptableAccuracy'] = maxAcceptableAccuracy;
if (maxAcceptableSpeedAccuracy != null) config['maxAcceptableSpeedAccuracy'] = maxAcceptableSpeedAccuracy;
if (locationUpdateInterval != null) config['locationUpdateInterval'] = locationUpdateInterval;
if (fastestLocationUpdateInterval != null) config['fastestLocationUpdateInterval'] = fastestLocationUpdateInterval;
// HTTP & Persistence
if (serverUrl != null) {
config['serverUrl'] = serverUrl;
}
if (params != null) {
config['params'] = params;
}
if (headers != null) {
config['headers'] = headers;
}
// Application
if (stopOnTerminate != null) {
config['stopOnTerminate'] = stopOnTerminate;
}
if (debug != null) {
config['debug'] = debug;
}
////
// iOS Options
//
////
// Android Options
//
if (notification != null) {
config['notification'] = notification!.toMap();
}
return config;
}