Skip to content

Commit 6205c11

Browse files
authored
Remove "note that" in our documentation (as per style guide) (#120842)
* lerp documentation * Remove Note, Note That from repo * Improve BorderSide documentation. * apply review comments
1 parent 9fe5567 commit 6205c11

File tree

72 files changed

+256
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+256
-206
lines changed

dev/benchmarks/complex_layout/lib/src/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ class GalleryDrawer extends StatelessWidget {
630630
Widget build(BuildContext context) {
631631
final ScrollMode currentMode = ComplexLayoutApp.of(context)!.scrollMode;
632632
return Drawer(
633-
// Note: for real apps, see the Gallery material Drawer demo. More
633+
// For real apps, see the Gallery material Drawer demo. More
634634
// typically, a drawer would have a fixed header with a scrolling body
635635
// below it.
636636
child: ListView(

dev/benchmarks/microbenchmarks/lib/foundation/platform_asset_bundle.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void main() async {
2424
watch.reset();
2525
watch.start();
2626
for (int i = 0; i < _kBatchSize; i += 1) {
27-
// Note: We don't load images like this. PlatformAssetBundle is used for
27+
// We don't load images like this. PlatformAssetBundle is used for
2828
// other assets (like Rive animations). We are using an image because it's
2929
// conveniently sized and available for the test.
3030
tally += (await bundle.load('packages/flutter_gallery_assets/places/india_pondicherry_salt_farm.png')).lengthInBytes;

dev/benchmarks/multiple_flutters/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ buildscript {
1313
classpath "com.android.tools.build:gradle:7.3.0"
1414
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1515

16-
// NOTE: Do not place your application dependencies here; they belong
17-
// in the individual module build.gradle files
16+
// Do not place your application dependencies here; they belong
17+
// in the individual module build.gradle files.
1818
}
1919
}
2020

dev/bots/analyze.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ Future<void> verifyNullInitializedDebugExpensiveFields(String workingDirectory,
18421842
}
18431843
}
18441844

1845-
final RegExp tabooPattern = RegExp(r'^ *///.*\b(simply)\b', caseSensitive: false);
1845+
final RegExp tabooPattern = RegExp(r'^ *///.*\b(simply|note:|note that)\b', caseSensitive: false);
18461846

18471847
Future<void> verifyTabooDocumentation(String workingDirectory, { int minimumMatches = 100 }) async {
18481848
final List<String> errors = <String>[];
@@ -1859,7 +1859,8 @@ Future<void> verifyTabooDocumentation(String workingDirectory, { int minimumMatc
18591859
if (errors.isNotEmpty) {
18601860
foundError(<String>[
18611861
'${bold}Avoid the word "simply" in documentation. See https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#use-the-passive-voice-recommend-do-not-require-never-say-things-are-simple for details.$reset',
1862-
'${bold}In many cases the word can be omitted without loss of generality; in other cases it may require a bit of rewording to avoid implying that the task is simple.$reset',
1862+
'${bold}In many cases thes words can be omitted without loss of generality; in other cases it may require a bit of rewording to avoid implying that the task is simple.$reset',
1863+
'${bold}Similarly, avoid using "note:" or the phrase "note that". See https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-empty-prose for details.$reset',
18631864
...errors,
18641865
]);
18651866
}

dev/bots/docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function script_location() {
1818

1919
function generate_docs() {
2020
# Install and activate dartdoc.
21-
# NOTE: When updating to a new dartdoc version, please also update
21+
# When updating to a new dartdoc version, please also update
2222
# `dartdoc_options.yaml` to include newly introduced error and warning types.
2323
"$DART" pub global activate dartdoc 6.1.5
2424

dev/ci/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ On each new change to this `Dockerfile`, Cirrus will build a new version of
99
the Docker image as a dependency to any Linux tests. It is no longer necessary
1010
to manually build and push the Docker image locally.
1111

12-
NOTE: there are some factors external to the actual `Dockerfile` that would
12+
There are some factors external to the actual `Dockerfile` that would
1313
necessitate rebuilding the Docker image, such as upstream code changes, (Linux
1414
distribution) repository updates or a file that gets `COPY`ied into the image
1515
changing. In this case, a trivial `Dockerfile` change (such as a comment)

dev/conductor/core/lib/src/repository.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ abstract class Repository {
129129
'Fetch ${upstreamRemote.name} to ensure we have latest refs',
130130
workingDirectory: _checkoutDirectory!.path,
131131
);
132-
// Note: if [initialRef] is a remote ref the checkout will be left in a
133-
// detached HEAD state.
132+
// If [initialRef] is a remote ref, the checkout will be left in a detached HEAD state.
134133
await git.run(
135134
<String>['checkout', initialRef!],
136135
'Checking out initialRef $initialRef',

dev/conductor/core/test/start_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ void main() {
531531
'171876a4e6cf56ee6da1f97d203926bd7afda7ef';
532532
const String nextDartRevision =
533533
'f6c91128be6b77aef8351e1e3a9d07c85bc2e46e';
534-
// note that this significantly behind the candidate branch name
534+
// This is significantly behind the candidate branch name
535535
const String previousVersion = '0.9.0-1.0.pre';
536536
// This is what this release will be
537537
const String nextVersion = '0.9.0-1.1.pre';

dev/integration_tests/flutter_gallery/lib/gallery/example_code.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Note: This code is not runnable, it contains code snippets displayed in the
6-
// gallery.
5+
// This code is not runnable, it contains code snippets displayed in the Gallery.
76

87
import 'package:flutter/material.dart';
98

dev/integration_tests/ios_add2app_life_cycle/ios_add2app/FullScreenViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ -(void)viewWillDisappear:(BOOL)animated {
2222
self.navigationController.navigationBarHidden = NO;
2323
self.navigationController.hidesBarsOnSwipe = NO;
2424
if (self.isMovingFromParentViewController) {
25-
// Note that if we were doing things that might cause the VC
25+
// If we were doing things that might cause the VC
2626
// to disappear (like using the image_picker plugin)
27-
// we shouldn't do this. But in this case we know we're
27+
// we shouldn't do this, but in this case we know we're
2828
// just going back to the navigation controller.
2929
// If we needed Flutter to tell us when we could actually go away,
3030
// we'd need to communicate over a method channel with it.

dev/integration_tests/ios_host_app/Host/FullScreenViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ -(void)viewWillDisappear:(BOOL)animated {
2222
self.navigationController.navigationBarHidden = NO;
2323
self.navigationController.hidesBarsOnSwipe = NO;
2424
if (self.isMovingFromParentViewController) {
25-
// Note that if we were doing things that might cause the VC
25+
// If we were doing things that might cause the VC
2626
// to disappear (like using the image_picker plugin)
27-
// we shouldn't do this. But in this case we know we're
27+
// we shouldn't do this, but in this case we know we're
2828
// just going back to the navigation controller.
2929
// If we needed Flutter to tell us when we could actually go away,
3030
// we'd need to communicate over a method channel with it.

dev/integration_tests/ios_host_app/flutterapp/lib/main

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const String hybridRouteName = 'hybrid';
2121
/// Channel used to let the Flutter app know to reset the app to a specific
2222
/// route. See the [run] method.
2323
///
24-
/// Note that we shouldn't use the `setInitialRoute` method on the system
25-
/// navigation channel, as that never gets propagated back to Flutter after the
26-
/// initial call.
24+
/// We shouldn't use the `setInitialRoute` method on the system
25+
/// navigation channel, as that never gets propagated back to Flutter
26+
/// after the initial call.
2727
const String _kReloadChannelName = 'reload';
2828
const BasicMessageChannel<String> _kReloadChannel =
2929
BasicMessageChannel<String>(_kReloadChannelName, StringCodec());

dev/tools/gen_keycodes/lib/physical_key_data.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,21 @@ class PhysicalKeyData {
7676
return outputMap;
7777
}
7878

79-
/// Parses entries from Androids Generic.kl scan code data file.
79+
/// Parses entries from Android's `Generic.kl` scan code data file.
8080
///
8181
/// Lines in this file look like this (without the ///):
82+
///
83+
/// ```
8284
/// key 100 ALT_RIGHT
8385
/// # key 101 "KEY_LINEFEED"
8486
/// key 477 F12 FUNCTION
87+
/// ```
8588
///
8689
/// We parse the commented out lines as well as the non-commented lines, so
8790
/// that we can get names for all of the available scan codes, not just ones
8891
/// defined for the generic profile.
8992
///
90-
/// Also, note that some keys (notably MEDIA_EJECT) can be mapped to more than
93+
/// Some keys (notably `MEDIA_EJECT`) can be mapped to more than
9194
/// one scan code, so the mapping can't just be 1:1, it has to be 1:many.
9295
static Map<String, List<int>> _readAndroidScanCodes(String keyboardLayout, String nameMap) {
9396
final RegExp keyEntry = RegExp(

examples/api/lib/widgets/focus_traversal/focus_traversal_group.0.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class MyStatelessWidget extends StatelessWidget {
164164
),
165165
// A group that orders in widget order, regardless of what the order is set to.
166166
FocusTraversalGroup(
167-
// Note that because this is NOT an OrderedTraversalPolicy, the
167+
// Because this is NOT an OrderedTraversalPolicy, the
168168
// assigned order of these OrderedButtons is ignored, and they
169169
// are traversed in widget order. TRY THIS: change this to
170170
// "OrderedTraversalPolicy()" and see that it now follows the

examples/api/lib/widgets/shared_app_data/shared_app_data.0.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ class _HomeState extends State<Home> {
5252
_fooVersion += 1;
5353
// Changing the SharedAppData's value for 'foo' causes the
5454
// widgets that depend on 'foo' to be rebuilt.
55-
SharedAppData.setValue<String, String?>(context, 'foo', 'FOO $_fooVersion'); // note: no setState()
55+
SharedAppData.setValue<String, String?>(context, 'foo', 'FOO $_fooVersion'); // no need to call setState()
5656
},
5757
),
5858
const SizedBox(height: 16),
5959
ElevatedButton(
6060
child: const Text('change bar'),
6161
onPressed: () {
6262
_barVersion += 1;
63-
SharedAppData.setValue<String, String?>(context, 'bar', 'BAR $_barVersion'); // note: no setState()
63+
SharedAppData.setValue<String, String?>(context, 'bar', 'BAR $_barVersion'); // no need to call setState()
6464
},
6565
),
6666
],

examples/api/test/widgets/gesture_detector/gesture_detector.2_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void main() {
2828
}
2929

3030
void expectInnerGestureDetectorBehavior(WidgetTester tester, HitTestBehavior behavior) {
31-
// Note that there is a third GestureDetector added by Scaffold
31+
// There is a third GestureDetector added by Scaffold.
3232
final Finder innerGestureDetectorFinder = find.byType(GestureDetector).at(1);
3333
final GestureDetector innerGestureDetector = tester.firstWidget<GestureDetector>(innerGestureDetectorFinder);
3434
expect(innerGestureDetector.behavior, behavior);

examples/layers/raw/canvas.dart

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,24 @@ ui.Picture paint(ui.Rect paintBounds) {
3232
final double devicePixelRatio = ui.window.devicePixelRatio;
3333
final ui.Size logicalSize = ui.window.physicalSize / devicePixelRatio;
3434

35-
// Saves a copy of current transform onto the save stack
35+
// Saves a copy of current transform onto the save stack.
3636
canvas.save();
3737

38-
// Note that transforms that occur after this point apply only to the
39-
// yellow-bluish rectangle
38+
// Transforms that occur after this point apply only to the
39+
// yellow-bluish rectangle.
4040

4141
// This line will cause the transform to shift entirely outside the paint
4242
// boundaries, which will cause the canvas interface to discard its
4343
// commands. Comment it out to see it on screen.
4444
canvas.translate(-mid.dx / 2.0, logicalSize.height * 2.0);
4545

46-
// Clips the current transform
46+
// Clips the current transform.
4747
canvas.clipRect(
4848
ui.Rect.fromLTRB(0, radius + 50, logicalSize.width, logicalSize.height),
4949
clipOp: ui.ClipOp.difference,
5050
);
5151

52-
// Shifts the coordinate space of and rotates the current transform
52+
// Shifts the coordinate space of and rotates the current transform.
5353
canvas.translate(mid.dx, mid.dy);
5454
canvas.rotate(math.pi/4);
5555

@@ -59,14 +59,14 @@ ui.Picture paint(ui.Rect paintBounds) {
5959
<ui.Color>[const ui.Color(0xFFFFFF00), const ui.Color(0xFF0000FF)],
6060
);
6161

62-
// Draws a yellow-bluish rectangle
62+
// Draws a yellow-bluish rectangle.
6363
canvas.drawRect(
6464
ui.Rect.fromLTRB(-radius, -radius, radius, radius),
6565
ui.Paint()..shader = yellowBlue,
6666
);
6767

68-
// Note that transforms that occur after this point apply only to the
69-
// yellow circle
68+
// Transforms that occur after this point apply only to the
69+
// yellow circle.
7070

7171
// Scale x and y by 0.5.
7272
final Float64List scaleMatrix = Float64List.fromList(<double>[
@@ -77,20 +77,20 @@ ui.Picture paint(ui.Rect paintBounds) {
7777
]);
7878
canvas.transform(scaleMatrix);
7979

80-
// Sets paint to transparent yellow
80+
// Sets paint to transparent yellow.
8181
paint.color = const ui.Color.fromARGB(128, 0, 255, 0);
8282

83-
// Draws a transparent yellow circle
83+
// Draws a transparent yellow circle.
8484
canvas.drawCircle(ui.Offset.zero, radius, paint);
8585

86-
// Restores the transform from before `save` was called
86+
// Restores the transform from before `save` was called.
8787
canvas.restore();
8888

89-
// Sets paint to transparent red
89+
// Sets paint to transparent red.
9090
paint.color = const ui.Color.fromARGB(128, 255, 0, 0);
9191

92-
// Note that this circle is drawn on top of the previous layer that contains
93-
// the rectangle and smaller circle
92+
// This circle is drawn on top of the previous layer that contains
93+
// the rectangle and smaller circle.
9494
canvas.drawCircle(const ui.Offset(150.0, 300.0), radius, paint);
9595

9696
// When we're done issuing painting commands, we end the recording an receive

packages/flutter/lib/fix_data/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ https://github.com/flutter/flutter/wiki/Data-driven-Fixes
3131

3232
## When making structural changes to this directory
3333

34-
Note that the tests in this directory are also invoked from external
35-
repositories. Specifically, the CI system for the dart-lang/sdk repo runs these
36-
tests in order to ensure that changes to the dart fix file format do not break
37-
Flutter.
34+
The tests in this directory are also invoked from external
35+
repositories. Specifically, the CI system for the dart-lang/sdk repo
36+
runs these tests in order to ensure that changes to the dart fix file
37+
format do not break Flutter.
3838

3939
See [tools/bots/flutter/analyze_flutter_flutter.sh](https://github.com/dart-lang/sdk/blob/main/tools/bots/flutter/analyze_flutter_flutter.sh)
4040
for where the tests are invoked.

packages/flutter/lib/src/cupertino/refresh.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ class CupertinoSliverRefreshControl extends StatefulWidget {
398398
switch (refreshState) {
399399
case RefreshIndicatorMode.drag:
400400
// While we're dragging, we draw individual ticks of the spinner while simultaneously
401-
// easing the opacity in. Note that the opacity curve values here were derived using
401+
// easing the opacity in. The opacity curve values here were derived using
402402
// Xcode through inspecting a native app running on iOS 13.5.
403403
const Curve opacityCurve = Interval(0.0, 0.35, curve: Curves.easeInOut);
404404
return Opacity(

packages/flutter/lib/src/gestures/resampler.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ class PointerEventResampler {
240240
// generated when the position has changed.
241241
if (event is! PointerMoveEvent && event is! PointerHoverEvent) {
242242
// Add synthetics `move` or `hover` event if position has changed.
243-
// Note: Devices without `hover` events are expected to always have
243+
//
244+
// Devices without `hover` events are expected to always have
244245
// `add` and `down` events with the same position and this logic will
245246
// therefore never produce `hover` events.
246247
if (position != _position) {

packages/flutter/lib/src/material/button_bar.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,14 @@ class ButtonBar extends StatelessWidget {
146146

147147
/// The spacing between buttons when the button bar overflows.
148148
///
149-
/// If the [children] do not fit into a single row, they are
150-
/// arranged into a column. This parameter provides additional
151-
/// vertical space in between buttons when it does overflow.
149+
/// If the [children] do not fit into a single row, they are arranged into a
150+
/// column. This parameter provides additional vertical space in between
151+
/// buttons when it does overflow.
152152
///
153-
/// Note that the button spacing may appear to be more than
154-
/// the value provided. This is because most buttons adhere to the
155-
/// [MaterialTapTargetSize] of 48px. So, even though a button
156-
/// might visually be 36px in height, it might still take up to
157-
/// 48px vertically.
153+
/// The button spacing may appear to be more than the value provided. This is
154+
/// because most buttons adhere to the [MaterialTapTargetSize] of 48px. So,
155+
/// even though a button might visually be 36px in height, it might still take
156+
/// up to 48px vertically.
158157
///
159158
/// If null then no spacing will be added in between buttons in
160159
/// an overflow state.

packages/flutter/lib/src/material/dialog.dart

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,10 @@ class AlertDialog extends StatelessWidget {
482482
/// Typically used to provide padding to the button bar between the button bar
483483
/// and the edges of the dialog.
484484
///
485-
/// If there are no [actions], then no padding will be included. It is also
486-
/// important to note that [buttonPadding] may contribute to the padding on
487-
/// the edges of [actions] as well.
485+
/// The [buttonPadding] may contribute to the padding on the edges of
486+
/// [actions] as well.
487+
///
488+
/// If there are no [actions], then no padding will be included.
488489
///
489490
/// {@tool snippet}
490491
/// This is an example of a set of actions aligned with the content widget.
@@ -546,21 +547,20 @@ class AlertDialog extends StatelessWidget {
546547
/// * [OverflowBar], which [actions] configures to lay itself out.
547548
final VerticalDirection? actionsOverflowDirection;
548549

549-
/// The spacing between [actions] when the [OverflowBar] switches
550-
/// to a column layout because the actions don't fit horizontally.
550+
/// The spacing between [actions] when the [OverflowBar] switches to a column
551+
/// layout because the actions don't fit horizontally.
551552
///
552553
/// If the widgets in [actions] do not fit into a single row, they are
553-
/// arranged into a column. This parameter provides additional
554-
/// vertical space in between buttons when it does overflow.
554+
/// arranged into a column. This parameter provides additional vertical space
555+
/// between buttons when it does overflow.
555556
///
556-
/// Note that the button spacing may appear to be more than
557-
/// the value provided. This is because most buttons adhere to the
558-
/// [MaterialTapTargetSize] of 48px. So, even though a button
559-
/// might visually be 36px in height, it might still take up to
560-
/// 48px vertically.
557+
/// The button spacing may appear to be more than the value provided. This is
558+
/// because most buttons adhere to the [MaterialTapTargetSize] of 48px. So,
559+
/// even though a button might visually be 36px in height, it might still take
560+
/// up to 48px vertically.
561561
///
562-
/// If null then no spacing will be added in between buttons in
563-
/// an overflow state.
562+
/// If null then no spacing will be added in between buttons in an overflow
563+
/// state.
564564
final double? actionsOverflowButtonSpacing;
565565

566566
/// The padding that surrounds each button in [actions].

0 commit comments

Comments
 (0)