Skip to content

Commit 05f294c

Browse files
authored
Fixes for Style Guide for Flutter Repo (flutter#150167)
Fix broken links, typos, and inconsistent formatting in the Style Guide for Flutter Repo. Fixes [150164](flutter#150164).
1 parent 00f9483 commit 05f294c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/contributing/Style-guide-for-Flutter-repo.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Style guide for Flutter repo
1+
# Style guide for Flutter repo
22

33
## Summary
44

@@ -30,8 +30,8 @@ understanding with new team members.
3030
The primary goal of these style guidelines is to improve code readability so
3131
that everyone, whether reading the code for the first time or
3232
maintaining it for years, can quickly determine what the code does.
33-
Secondary goals are to design systems that are simple, to increase the
34-
likelihood of catching bugs quickly, and avoiding arguments when there are
33+
Secondary goals are to design systems that are simple; to increase the
34+
likelihood of catching bugs quickly; and to avoid arguments when there are
3535
disagreements over subjective matters.
3636

3737
For anything not covered by this document, check the
@@ -537,7 +537,7 @@ Example:
537537
abstract class Picture ...
538538
```
539539

540-
You can also use "See also" links, is in:
540+
You can also use "See also" links, as in:
541541

542542
```dart
543543
/// See also:
@@ -1525,7 +1525,7 @@ String capitalize(String s) {
15251525
If your code is passing an inline closure that merely returns a list or
15261526
map literal, or a switch expression, or is merely calling another function,
15271527
then if the argument is on its own line, then rather than using braces and a
1528-
return` statement, you can instead use the `=>` form. When doing this, the
1528+
`return` statement, you can instead use the `=>` form. When doing this, the
15291529
closing `]`, `}`, or `)` bracket will line up with the argument name, for
15301530
named arguments, or the `(` of the argument list, for positional arguments.
15311531

@@ -1870,7 +1870,7 @@ the features.
18701870

18711871
### Import conventions
18721872

1873-
Under lib/src, for in-folder import use relative import. For cross-folder import,
1873+
Under `lib/src`, for in-folder import, use relative import. For cross-folder import,
18741874
import the entire package with absolute import.
18751875

18761876
When importing the `rendering.dart` library into higher level libraries,
@@ -1899,7 +1899,7 @@ The `dart:math` library is always imported `as math`.
18991899

19001900
As a general rule, if a feature is entirely self-contained (not requiring low-level integration into the Flutter framework) and is not something with universal appeal, we would encourage that that feature be provided as a package.
19011901

1902-
We try to be very conservative with what we put in the core framework, because there's a high cost to having anything there. We have to commit to supporting it for years to come, we have to document it, test it, create samples, we have to consider everyone's varied desires which they may have as they use the feature, we have to fix bugs. If there's design problems, we may not find out for a long time but then once we do we then have to figure out how to fix them without breaking people, or we have to migrate all our existing widgets to the new architecture, etc.
1902+
We try to be very conservative with what we put in the core framework, because there's a high cost to having anything there. We have to commit to supporting it for years to come, we have to document it, test it, create samples, we have to consider everyone's varied desires which they may have as they use the feature, we have to fix bugs. If there are design problems, we may not find out for a long time but then once we do we then have to figure out how to fix them without breaking downstream code, or we have to migrate all our existing widgets to the new architecture, etc.
19031903

19041904
Basically, code is expensive. So before we take it, if possible, we like to see if we can prove the code's value. By creating a package, we can see if people use the feature, how they like it, whether it would be useful for the framework, etc, without having to take on the costs.
19051905

0 commit comments

Comments
 (0)