Skip to content

Commit 90b0584

Browse files
Ben Calabresekwalrath
Ben Calabrese
authored andcommitted
Update highlight in design.md (#1743)
Updates the highlight in the "good" example given for "PREFER signatures in function type annotations." Previously, the good example did not highlight the return type in the function signature which is an important part of the change from the "bad" example.
1 parent 24852a9 commit 90b0584

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_guides/language/effective-dart/design.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1320,9 +1320,9 @@ function.
13201320
[Function]: {{site.dart_api}}/{{site.data.pkg-vers.SDK.channel}}/dart-core/Function-class.html
13211321

13221322
{:.good-style}
1323-
<?code-excerpt "misc/lib/effective_dart/design_good.dart (avoid-Function)" replace="/(void )?Function(\(.*?\))?/[!$&!]/g"?>
1323+
<?code-excerpt "misc/lib/effective_dart/design_good.dart (avoid-Function)" replace="/bool Function(\(.*?\))?/[!$&!]/g"?>
13241324
{% prettify dart %}
1325-
bool isValid(String value, bool [!Function(String)!] test) => ...
1325+
bool isValid(String value, [!bool Function(String)!] test) => ...
13261326
{% endprettify %}
13271327

13281328
{:.bad-style}

0 commit comments

Comments
 (0)