toMap method
Converts this DecibelData instance to a map.
Returns a map containing:
decibel: doubletimestamp: double
Example:
final data = DecibelData(
decibel: -45.0,
timestamp: 1234567890.0,
);
final map = data.toMap();
// map = {'decibel': -45.0, 'timestamp': 1234567890.0}
Implementation
Map<String, dynamic> toMap() {
return {
'decibel': decibel,
'timestamp': timestamp,
};
}