Return the internal field of the class in map format.
Map<String, dynamic> toMap() { return { 'type': type, 'confidence': confidence }; }