Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8a19145f
Unverified
Commit
8a19145f
authored
Jun 04, 2020
by
chunhtai
Committed by
GitHub
Jun 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update build doc string to advocate avoiding doing tasks other than b… (#58213)
parent
e934c2fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
async.dart
packages/flutter/lib/src/widgets/async.dart
+6
-0
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+10
-4
No files found.
packages/flutter/lib/src/widgets/async.dart
View file @
8a19145f
...
@@ -471,6 +471,9 @@ class StreamBuilder<T> extends StreamBuilderBase<T, AsyncSnapshot<T>> {
...
@@ -471,6 +471,9 @@ class StreamBuilder<T> extends StreamBuilderBase<T, AsyncSnapshot<T>> {
super
(
key:
key
,
stream:
stream
);
super
(
key:
key
,
stream:
stream
);
/// The build strategy currently used by this builder.
/// The build strategy currently used by this builder.
///
/// This builder must only return a widget and should not have any side
/// effects as it may be called multiple times.
final
AsyncWidgetBuilder
<
T
>
builder
;
final
AsyncWidgetBuilder
<
T
>
builder
;
/// The data that will be used to create the initial snapshot.
/// The data that will be used to create the initial snapshot.
...
@@ -686,6 +689,9 @@ class FutureBuilder<T> extends StatefulWidget {
...
@@ -686,6 +689,9 @@ class FutureBuilder<T> extends StatefulWidget {
/// the value to which the future completed. If it completed with an error,
/// the value to which the future completed. If it completed with an error,
/// [AsyncSnapshot.hasError] will be true and [AsyncSnapshot.error] will be
/// [AsyncSnapshot.hasError] will be true and [AsyncSnapshot.error] will be
/// set to the error object.
/// set to the error object.
///
/// This builder must only return a widget and should not have any side
/// effects as it may be called multiple times.
final
AsyncWidgetBuilder
<
T
>
builder
;
final
AsyncWidgetBuilder
<
T
>
builder
;
/// The data that will be used to create the snapshots provided until a
/// The data that will be used to create the snapshots provided until a
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
8a19145f
...
@@ -662,9 +662,11 @@ abstract class StatelessWidget extends Widget {
...
@@ -662,9 +662,11 @@ abstract class StatelessWidget extends Widget {
/// Describes the part of the user interface represented by this widget.
/// Describes the part of the user interface represented by this widget.
///
///
/// The framework calls this method when this widget is inserted into the
/// The framework calls this method when this widget is inserted into the tree
/// tree in a given [BuildContext] and when the dependencies of this widget
/// in a given [BuildContext] and when the dependencies of this widget change
/// change (e.g., an [InheritedWidget] referenced by this widget changes).
/// (e.g., an [InheritedWidget] referenced by this widget changes). This
/// method can potentially be called in every frames should not have any side
/// effects beyond building a widget.
///
///
/// The framework replaces the subtree below this widget with the widget
/// The framework replaces the subtree below this widget with the widget
/// returned by this method, either by updating the existing subtree or by
/// returned by this method, either by updating the existing subtree or by
...
@@ -1315,7 +1317,8 @@ abstract class State<T extends StatefulWidget> with Diagnosticable {
...
@@ -1315,7 +1317,8 @@ abstract class State<T extends StatefulWidget> with Diagnosticable {
/// Describes the part of the user interface represented by this widget.
/// Describes the part of the user interface represented by this widget.
///
///
/// The framework calls this method in a number of different situations:
/// The framework calls this method in a number of different situations. For
/// example:
///
///
/// * After calling [initState].
/// * After calling [initState].
/// * After calling [didUpdateWidget].
/// * After calling [didUpdateWidget].
...
@@ -1325,6 +1328,9 @@ abstract class State<T extends StatefulWidget> with Diagnosticable {
...
@@ -1325,6 +1328,9 @@ abstract class State<T extends StatefulWidget> with Diagnosticable {
/// * After calling [deactivate] and then reinserting the [State] object into
/// * After calling [deactivate] and then reinserting the [State] object into
/// the tree at another location.
/// the tree at another location.
///
///
/// This method can potentially be called in every frames and should not have
/// any side effects beyond building a widget.
///
/// The framework replaces the subtree below this widget with the widget
/// The framework replaces the subtree below this widget with the widget
/// returned by this method, either by updating the existing subtree or by
/// returned by this method, either by updating the existing subtree or by
/// removing the subtree and inflating a new subtree, depending on whether the
/// removing the subtree and inflating a new subtree, depending on whether the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment