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
This commit is contained in:
@@ -164,7 +164,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
),
|
||||
// A group that orders in widget order, regardless of what the order is set to.
|
||||
FocusTraversalGroup(
|
||||
// Note that because this is NOT an OrderedTraversalPolicy, the
|
||||
// Because this is NOT an OrderedTraversalPolicy, the
|
||||
// assigned order of these OrderedButtons is ignored, and they
|
||||
// are traversed in widget order. TRY THIS: change this to
|
||||
// "OrderedTraversalPolicy()" and see that it now follows the
|
||||
|
||||
@@ -52,7 +52,7 @@ class _HomeState extends State<Home> {
|
||||
_fooVersion += 1;
|
||||
// Changing the SharedAppData's value for 'foo' causes the
|
||||
// widgets that depend on 'foo' to be rebuilt.
|
||||
SharedAppData.setValue<String, String?>(context, 'foo', 'FOO $_fooVersion'); // note: no setState()
|
||||
SharedAppData.setValue<String, String?>(context, 'foo', 'FOO $_fooVersion'); // no need to call setState()
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
@@ -60,7 +60,7 @@ class _HomeState extends State<Home> {
|
||||
child: const Text('change bar'),
|
||||
onPressed: () {
|
||||
_barVersion += 1;
|
||||
SharedAppData.setValue<String, String?>(context, 'bar', 'BAR $_barVersion'); // note: no setState()
|
||||
SharedAppData.setValue<String, String?>(context, 'bar', 'BAR $_barVersion'); // no need to call setState()
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -28,7 +28,7 @@ void main() {
|
||||
}
|
||||
|
||||
void expectInnerGestureDetectorBehavior(WidgetTester tester, HitTestBehavior behavior) {
|
||||
// Note that there is a third GestureDetector added by Scaffold
|
||||
// There is a third GestureDetector added by Scaffold.
|
||||
final Finder innerGestureDetectorFinder = find.byType(GestureDetector).at(1);
|
||||
final GestureDetector innerGestureDetector = tester.firstWidget<GestureDetector>(innerGestureDetectorFinder);
|
||||
expect(innerGestureDetector.behavior, behavior);
|
||||
|
||||
@@ -32,24 +32,24 @@ ui.Picture paint(ui.Rect paintBounds) {
|
||||
final double devicePixelRatio = ui.window.devicePixelRatio;
|
||||
final ui.Size logicalSize = ui.window.physicalSize / devicePixelRatio;
|
||||
|
||||
// Saves a copy of current transform onto the save stack
|
||||
// Saves a copy of current transform onto the save stack.
|
||||
canvas.save();
|
||||
|
||||
// Note that transforms that occur after this point apply only to the
|
||||
// yellow-bluish rectangle
|
||||
// Transforms that occur after this point apply only to the
|
||||
// yellow-bluish rectangle.
|
||||
|
||||
// This line will cause the transform to shift entirely outside the paint
|
||||
// boundaries, which will cause the canvas interface to discard its
|
||||
// commands. Comment it out to see it on screen.
|
||||
canvas.translate(-mid.dx / 2.0, logicalSize.height * 2.0);
|
||||
|
||||
// Clips the current transform
|
||||
// Clips the current transform.
|
||||
canvas.clipRect(
|
||||
ui.Rect.fromLTRB(0, radius + 50, logicalSize.width, logicalSize.height),
|
||||
clipOp: ui.ClipOp.difference,
|
||||
);
|
||||
|
||||
// Shifts the coordinate space of and rotates the current transform
|
||||
// Shifts the coordinate space of and rotates the current transform.
|
||||
canvas.translate(mid.dx, mid.dy);
|
||||
canvas.rotate(math.pi/4);
|
||||
|
||||
@@ -59,14 +59,14 @@ ui.Picture paint(ui.Rect paintBounds) {
|
||||
<ui.Color>[const ui.Color(0xFFFFFF00), const ui.Color(0xFF0000FF)],
|
||||
);
|
||||
|
||||
// Draws a yellow-bluish rectangle
|
||||
// Draws a yellow-bluish rectangle.
|
||||
canvas.drawRect(
|
||||
ui.Rect.fromLTRB(-radius, -radius, radius, radius),
|
||||
ui.Paint()..shader = yellowBlue,
|
||||
);
|
||||
|
||||
// Note that transforms that occur after this point apply only to the
|
||||
// yellow circle
|
||||
// Transforms that occur after this point apply only to the
|
||||
// yellow circle.
|
||||
|
||||
// Scale x and y by 0.5.
|
||||
final Float64List scaleMatrix = Float64List.fromList(<double>[
|
||||
@@ -77,20 +77,20 @@ ui.Picture paint(ui.Rect paintBounds) {
|
||||
]);
|
||||
canvas.transform(scaleMatrix);
|
||||
|
||||
// Sets paint to transparent yellow
|
||||
// Sets paint to transparent yellow.
|
||||
paint.color = const ui.Color.fromARGB(128, 0, 255, 0);
|
||||
|
||||
// Draws a transparent yellow circle
|
||||
// Draws a transparent yellow circle.
|
||||
canvas.drawCircle(ui.Offset.zero, radius, paint);
|
||||
|
||||
// Restores the transform from before `save` was called
|
||||
// Restores the transform from before `save` was called.
|
||||
canvas.restore();
|
||||
|
||||
// Sets paint to transparent red
|
||||
// Sets paint to transparent red.
|
||||
paint.color = const ui.Color.fromARGB(128, 255, 0, 0);
|
||||
|
||||
// Note that this circle is drawn on top of the previous layer that contains
|
||||
// the rectangle and smaller circle
|
||||
// This circle is drawn on top of the previous layer that contains
|
||||
// the rectangle and smaller circle.
|
||||
canvas.drawCircle(const ui.Offset(150.0, 300.0), radius, paint);
|
||||
|
||||
// When we're done issuing painting commands, we end the recording an receive
|
||||
|
||||
Reference in New Issue
Block a user