Skip to content
Merged
Prev Previous commit
Next Next commit
TODO for Cap
  • Loading branch information
yaakovschectman committed Sep 23, 2024
commit 9de05c85b7c5296aa99b54911b120066504bb627
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,8 @@ PlatformJointType platformJointTypeFromJointType(JointType jointType) {
/// Converts platform interface's Cap to Pigeon's PlatformCap.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No action required: You are following the pattern of the rest of this file but both this method name and documentation do not help me understand what is being converted here or how to learn about either the to or from object.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could trivially improve them all a fair amount by using [] references for both class names. That was just an oversight on my part when I started converting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use dart doc linking notation for the classes.

@visibleForTesting
PlatformCap platformCapFromCap(Cap cap) {
// TODO(schectman): Convert Cap to structured data.
// https://github.com/flutter/flutter/issues/155121
final List<Object> json = cap.toJson() as List<Object>;
final String tag = json[0] as String;
switch (tag) {
Expand Down