Skip to content

Commit

Permalink
Add macOS to _webViewString helper
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmorgan authored Aug 20, 2024
1 parent 428cc98 commit f026094
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,11 @@ String _webViewNull() {
return 'null';
}

// JavaScript String evaluate to different string values on Android and iOS.
// JavaScript String evaluates to different strings depending on the platform.
// This utility method returns the string boolean value of the current platform.
String _webViewString(String value) {
if (defaultTargetPlatform == TargetPlatform.iOS) {
if (defaultTargetPlatform == TargetPlatform.iOS ||
defaultTargetPlatform == TargetPlatform.macOS) {
return value;
}
return '"$value"';
Expand Down

0 comments on commit f026094

Please sign in to comment.