Map<String, dynamic> toMap() { return <String, dynamic>{ 'endedTime': ?endedTime, 'startedTime': ?startedTime, }; }