Skip to content

Conversation

@Saad-Rajpoot
Copy link

What this does:

Fixes an issue where in release mode, the MethodChannel response contains obfuscated keys (a, b, c, d) instead of proper JSON keys like displayId, flags, etc.

Fix:

Updated displayFromJson() to safely fallback to obfuscated keys using null-aware operator:

Display displayFromJson(Map<String, dynamic> json) => Display(
  displayId: json['displayId'] ?? json['a'],
  flag: json['flags'] ?? json['b'],
  name: json['name'] ?? json['d'],
  rotation: json['rotation'] ?? json['c'],
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant