Skip to content

Commit 65e99ca

Browse files
authored
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.
1 parent 61a368c commit 65e99ca

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/content/app-architecture/guide.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ the following simplified version of that diagram will be used as an anchor.
7272
:::note
7373
Apps with complex logic might also have a logic layer that sits in between the
7474
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.
7777
:::
7878

7979
## UI layer
@@ -92,12 +92,12 @@ The UI layer is made up of two architectural components,
9292
based on the MVVM design pattern:
9393

9494
* **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.
9696
For instance, a view is often (but not always) a screen that
9797
has a `Scaffold` widget, along with
9898
all of the widgets below it in the widget tree.
9999
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.
101101
* **View models** contain the logic that converts app data into *UI State*,
102102
because data from repositories is often formatted differently from
103103
the data that needs to be displayed.
@@ -118,12 +118,12 @@ and you can test the logic of your UI independently of Flutter widgets.
118118
'View' is an abstract term, and one view doesn't equal one widget.
119119
Widgets are composable, and several can be combined to create one view.
120120
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.
122122
:::
123123

124124
A feature of an application is user centric,
125125
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.
127127
This is often a screen in your app, but it doesn't have to be.
128128
For example, consider logging in and out.
129129
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.
136136
The ability to log out is generally presented to the user as a button in
137137
a menu, a user account screen, or any number of different locations.
138138
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
140140
only contains a single button that can be dropped into other widgets.
141141

142142
### Views
@@ -180,7 +180,7 @@ A view model's main responsibilities include:
180180
attached to an event handler, like a button press or form submission.
181181

182182
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
184184
execute complex logic without knowledge of its implementation.
185185
Commands are written as members of the view model class to
186186
be called by the gesture handlers in the view class.
@@ -199,7 +199,7 @@ check out the [state management fundamentals][].
199199

200200
The data layer of an app handles your business data and logic.
201201
Two pieces of architecture make up the data layer: services and repositories.
202-
These pieces should have well defined inputs and outputs
202+
These pieces should have well-defined inputs and outputs
203203
to simplify their reusability and testability.
204204

205205
<img src='/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.
317317
If you find that your view models are
318318
accessing data through use-cases most of the time,
319319
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,
321321
but also has view models that interact with repositories directly.
322322
A complex feature may ultimately end up looking like this:
323323

0 commit comments

Comments
 (0)