Skip to content

Commit

Permalink
docs(code_style): removed return keyword from arrow function (#93)
Browse files Browse the repository at this point in the history
tmsbrndz authored Jan 25, 2025
1 parent c7c6ec5 commit 4842121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content/docs/code_style/code_style.mdx
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ Among other things, the release of Dart 3.0 introduced [record types](https://da
<Tabs>
<TabItem label="Bad ❗️">
```dart
Future<(String, String)> getUserNameAndEmail() async => return _someApiFetchMethod();
Future<(String, String)> getUserNameAndEmail() async => _someApiFetchMethod();
final userData = await getUserNameAndEmail();
@@ -33,7 +33,7 @@ The above example will compile, but it is not immediately obvious what value `us
<Tabs>
<TabItem label="Good ✅">
```dart
Future<(String, String)> getUserNameAndEmail() async => return _someApiFetchMethod();
Future<(String, String)> getUserNameAndEmail() async => _someApiFetchMethod();
final (username, email) = await getUserNameAndEmail();

0 comments on commit 4842121

Please sign in to comment.