diff --git a/dev/snippets/config/templates/README.md b/dev/snippets/config/templates/README.md index 071da8b4a6..9401b01cd3 100644 --- a/dev/snippets/config/templates/README.md +++ b/dev/snippets/config/templates/README.md @@ -68,33 +68,35 @@ follows: - [`stateful_widget`](stateful_widget.tmpl) : The default code block will be placed as the body of the `State` object of a - StatefulWidget subclass. Because the default code block is placed as the body - of a stateful widget, you will need to implement the `build()` function, and any + `StatefulWidget` subclass. Because the default code block is placed as the body + of a stateful widget, you will need to implement the `build()` method, and any state variables. It also has a `preamble` in addition to the default code block, which will be placed at the top level of the Dart file, so bare - function calls are not allowed in the preamble. It also has an `imports` + method calls are not allowed in the preamble. The default code block is + placed as the body of a stateful widget, so you will need to implement the + `build()` method, and any state variables. It also has an `imports` section to import additional packages. Please only import things that are part of flutter or part of default dependencies for a `flutter create` project. - It creates a WidgetsApp around the child stateful widget. + It creates a `WidgetsApp` around the child stateful widget. -- [`stateless_widget`](stateless_widget.tmpl) : - Identical to the `stateful_widget` template, except that the default code - block is inserted as the `build` function in a - StatelessWidget. There is no need to include the @override before the build - function (the template adds this for you). +- [`stateless_widget`](stateless_widget.tmpl) : Identical to the + `stateful_widget` template, except that the default code block is + inserted as a method (which should be the `build` method) in a + `StatelessWidget`. The `@override` before the build method is added by + the template, so must be omitted from the sample code. - [`stateful_widget_material`](stateful_widget_material.tmpl) : Similar to `stateful_widget`, except that it imports the material library, and uses - a MaterialApp instead of WidgetsApp. + a `MaterialApp` instead of `WidgetsApp`. - [`stateless_widget_material`](stateless_widget_material.tmpl) : Similar to `stateless_widget`, except that it imports the material library, and uses - a MaterialApp instead of WidgetsApp. + a `MaterialApp` instead of `WidgetsApp`. - [`stateful_widget_scaffold`](stateful_widget_scaffold.tmpl) : Similar to `stateful_widget_material`, except that it wraps the stateful widget with a - Scaffold. + `Scaffold`. - [`stateless_widget_scaffold`](stateless_widget_scaffold.tmpl) : Similar to `stateless_widget_material`, except that it wraps the stateless widget with a - Scaffold. + `Scaffold`. diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index d653669dd2..99bd26766d 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart @@ -3017,11 +3017,11 @@ mixin ContainerRenderObjectMixin