jsonToObj static method
The function converts a JSON object into a Region object in Dart. @param {Map<String, dynamic>} json - A map containing key-value pairs where the keys are strings and the values can be of any type. @returns an instance of the Region class.
Implementation
static Region jsonToObj(Map<String, dynamic> json) {
int radius = json['radius'];
return Region(
json['date'] as int,
json['didenter'] as bool,
json['identifier'] as String,
json['latitude'] as double,
json['longitude'] as double,
radius.toDouble(),
json['frompositiondetection'] as bool,
json['eventname'] as String,
json['spenttime'] as int,
);
}