toScript method
Implementation
@override
String toScript({
DartBlockTypedLanguage language = DartBlockTypedLanguage.java,
}) {
final text = compositionNode.toScript(language: language);
// Remove outer parentheses for clarity and because they're unnnecessary.
if (text.startsWith("(") && text.endsWith(")") && text.length > 2) {
return text.substring(1, text.length - 1);
} else {
return text;
}
}