API Documentation for toMap.
Map<String, Object> toMap() => <String, Object>{ 'level': level, 'isCharging': isCharging, 'status': status, 'temperature': temperature, };