Repository navigation
[camera_platform_interface] Fix VideoRecordedEvent equality and hashCode - #13452
ChandraChaan wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the VideoRecordedEvent class in camera_platform_interface to compare file.path instead of the file object itself in its equality (==) operator and hashCode getter. It also adds corresponding unit tests to verify this behavior, bumps the package version to 2.15.1, and updates the changelog. There are no review comments, and I have no feedback to provide.
|
Hi @bparrishMines, this is out of draft now and ready for review (it was waiting on the open PR limit). It is a small fix for flutter/flutter#195396: It will also need the |
…a-video-recorded-event-equality # Conflicts: # packages/camera/camera_platform_interface/CHANGELOG.md
|
Gentle follow-up on this one, @bparrishMines. Since my last comment I resolved a CHANGELOG conflict with |
VideoRecordedEvent.operator ==ignoresfile, whilehashCodehashes theXFileinstance. BecauseXFilehas no value equality, equal events can have different hash codes (for example, an event and itsfromJson(toJson())round-trip), and events for different files compare equal.This compares and hashes
file.pathin both, matching howtoJson/fromJsonalready identify the file, and adds tests for equal events, events with different paths, and a JSON round-trip.Fixes flutter/flutter#195396
Pre-Review Checklist
[shared_preferences]///).