toMap method
- @override
BaseResult => map
Implementation
@override
Map toMap() {
Map map = super.toMap();
map['distance'] = this.distance;
map['duration'] = this.duration;
map['averageSpeed'] = this.averageSpeed;
map['maxSpeed'] = this.maxSpeed;
map['speedingNum'] = this.speedingNum;
map['harshAccelerationNum'] = this.harshAccelerationNum;
map['harshBreakingNum'] = this.harshBreakingNum;
map['harshSteeringNum'] = this.harshSteeringNum;
map['startPoint'] = this.startPoint?.toMap();
map['endPoint'] = this.endPoint?.toMap();
map['speedings'] = this.speedings?.map((e) => e?.toMap())?.toList();
map['harshAccelerationPoints'] =
this.harshAccelerationPoints?.map((e) => e?.toMap())?.toList();
map['harshBreakingPoints'] =
this.harshBreakingPoints?.map((e) => e?.toMap())?.toList();
map['harshSteeringPoints'] =
this.harshSteeringPoints?.map((e) => e?.toMap())?.toList();
return map;
}