Convert current object to a map.
Usually for transfer to MethodChannel.
@override Map<String, dynamic> toMap() => <String, dynamic>{ 'type': type.value, 'mediaLocation': mediaLocation, };