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
c00a794f
Unverified
Commit
c00a794f
authored
Nov 27, 2018
by
Ian Hickson
Committed by
GitHub
Nov 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more documentation around WidgetBuilder and close friends. (#24731)
parent
a2a1311a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+23
-1
No files found.
packages/flutter/lib/src/widgets/framework.dart
View file @
c00a794f
...
...
@@ -3633,12 +3633,23 @@ class ErrorWidget extends LeafRenderObjectWidget {
/// or [State.build].
///
/// Used by [Builder.builder], [OverlayEntry.builder], etc.
///
/// See also:
///
/// * [IndexedWidgetBuilder], which is similar but also takes an index.
/// * [TransitionBuilder], which is similar but also takes a child.
/// * [ValueWidgetBuilder], which is similar but takes a value and a child.
typedef
WidgetBuilder
=
Widget
Function
(
BuildContext
context
);
/// Signature for a function that creates a widget for a given index, e.g., in a
/// list.
///
/// Used by [ListView.builder] and other APIs that use lazily-generated widgets.
///
/// See also:
///
/// * [WidgetBuilder], which is similar but only takes a [BuildContext].
/// * [TransitionBuilder], which is similar but also takes a child.
typedef
IndexedWidgetBuilder
=
Widget
Function
(
BuildContext
context
,
int
index
);
/// A builder that builds a widget given a child.
...
...
@@ -3647,11 +3658,22 @@ typedef IndexedWidgetBuilder = Widget Function(BuildContext context, int index);
///
/// Used by [AnimatedBuilder.builder], as well as [WidgetsApp.builder] and
/// [MaterialApp.builder].
///
/// See also:
///
/// * [WidgetBuilder], which is similar but only takes a [BuildContext].
/// * [IndexedWidgetBuilder], which is similar but also takes an index.
/// * [ValueWidgetBuilder], which is similar but takes a value and a child.
typedef
TransitionBuilder
=
Widget
Function
(
BuildContext
context
,
Widget
child
);
/// A Signiture for a function that creates a widget given [onStepContinue] and [onStepCancel].
/// A builder that creates a widget given the two callbacks `onStepContinue` and
/// `onStepCancel`.
///
/// Used by [Stepper.builder].
///
/// See also:
///
/// * [WidgetBuilder], which is similar but only takes a [BuildContext].
typedef
ControlsWidgetBuilder
=
Widget
Function
(
BuildContext
context
,
{
VoidCallback
onStepContinue
,
VoidCallback
onStepCancel
});
/// An [Element] that composes other [Element]s.
...
...
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