You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grammatical polish for grammatical number and subject-verb agreement issues. (#11651)
_Description of what this PR is changing or adding, and why:_
Grammatical polish for grammatical number and subject-verb agreement
issues.
_Issues fixed by this PR (if any):_
_PRs or commits this PR depends on (if any):_
## Presubmit checklist
- [x] This PR is marked as draft with an explanation if not meant to
land until a future stable release.
- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.
Copy file name to clipboardExpand all lines: src/content/app-architecture/guide.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,8 @@ the following simplified version of that diagram will be used as an anchor.
72
72
:::note
73
73
Apps with complex logic might also have a logic layer that sits in between the
74
74
UI layer and data layer. This logic layer is commonly called the *domain layer.*
75
-
The domain layer contains additional components called often interactors or
76
-
use-cases. The domain layer is covered later in this guide.
75
+
The domain layer contains additional components often called *interactors* or
76
+
*use-cases*. The domain layer is covered later in this guide.
77
77
:::
78
78
79
79
## UI layer
@@ -92,12 +92,12 @@ The UI layer is made up of two architectural components,
92
92
based on the MVVM design pattern:
93
93
94
94
***Views** describe how to present application data to the user.
95
-
Specifically, it refers to a *composition of widgets* that make a feature.
95
+
Specifically, they refer to *compositions of widgets* that make a feature.
96
96
For instance, a view is often (but not always) a screen that
97
97
has a `Scaffold` widget, along with
98
98
all of the widgets below it in the widget tree.
99
99
Views are also responsible for passing events to
100
-
the view model in response to user interaction.
100
+
the view model in response to user interactions.
101
101
***View models** contain the logic that converts app data into *UI State*,
102
102
because data from repositories is often formatted differently from
103
103
the data that needs to be displayed.
@@ -118,12 +118,12 @@ and you can test the logic of your UI independently of Flutter widgets.
118
118
'View' is an abstract term, and one view doesn't equal one widget.
119
119
Widgets are composable, and several can be combined to create one view.
120
120
Therefore, view models don't have a 1-to-1 relationship with widgets,
121
-
but rather a 1-to-1 relation with a *collection* of widgets.
121
+
but rather a 1-to-1 relationship with a *collection* of widgets.
122
122
:::
123
123
124
124
A feature of an application is user centric,
125
125
and therefore defined by the UI layer.
126
-
Every instance of a pair of view and view model defines one feature in your app.
126
+
Every instance of a paired *view* and *view model* defines one feature in your app.
127
127
This is often a screen in your app, but it doesn't have to be.
128
128
For example, consider logging in and out.
129
129
Logging in is generally done on a specific screen whose
@@ -136,7 +136,7 @@ logging out of an app is generally not done on a dedicated screen.
136
136
The ability to log out is generally presented to the user as a button in
137
137
a menu, a user account screen, or any number of different locations.
138
138
It's often presented in multiple locations.
139
-
In that scenario, you might have a `LogoutViewModel` and a `LogoutView` which
139
+
In such scenarios, you might have a `LogoutViewModel` and a `LogoutView` which
140
140
only contains a single button that can be dropped into other widgets.
141
141
142
142
### Views
@@ -180,7 +180,7 @@ A view model's main responsibilities include:
180
180
attached to an event handler, like a button press or form submission.
181
181
182
182
Commands are named for the [command pattern][],
183
-
and are Dart functions that allow the views to
183
+
and are Dart functions that allow views to
184
184
execute complex logic without knowledge of its implementation.
185
185
Commands are written as members of the view model class to
186
186
be called by the gesture handlers in the view class.
@@ -199,7 +199,7 @@ check out the [state management fundamentals][].
199
199
200
200
The data layer of an app handles your business data and logic.
201
201
Two pieces of architecture make up the data layer: services and repositories.
202
-
These pieces should have welldefined inputs and outputs
202
+
These pieces should have well-defined inputs and outputs
203
203
to simplify their reusability and testability.
204
204
205
205
<imgsrc='/assets/images/docs/app-architecture/guide/feature-architecture-simplified-Data-highlighted.png'alt="A simplified diagram of the architecture described on this page with the Data layer highlighted.">
@@ -317,7 +317,7 @@ A good approach is to add use-cases only when needed.
317
317
If you find that your view models are
318
318
accessing data through use-cases most of the time,
319
319
you can always refactor your code to utilize use-cases exclusively.
320
-
The example app used later in this guide uses use-cases for some features,
320
+
The example app used later in this guide has use-cases for some features,
321
321
but also has view models that interact with repositories directly.
322
322
A complex feature may ultimately end up looking like this:
0 commit comments