mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Some more documentation around WidgetBuilder and close friends. (#24731)
This commit is contained in:
parent
a2a1311a1a
commit
c00a794f56
@ -3633,12 +3633,23 @@ class ErrorWidget extends LeafRenderObjectWidget {
|
|||||||
/// or [State.build].
|
/// or [State.build].
|
||||||
///
|
///
|
||||||
/// Used by [Builder.builder], [OverlayEntry.builder], etc.
|
/// 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);
|
typedef WidgetBuilder = Widget Function(BuildContext context);
|
||||||
|
|
||||||
/// Signature for a function that creates a widget for a given index, e.g., in a
|
/// Signature for a function that creates a widget for a given index, e.g., in a
|
||||||
/// list.
|
/// list.
|
||||||
///
|
///
|
||||||
/// Used by [ListView.builder] and other APIs that use lazily-generated widgets.
|
/// 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);
|
typedef IndexedWidgetBuilder = Widget Function(BuildContext context, int index);
|
||||||
|
|
||||||
/// A builder that builds a widget given a child.
|
/// 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
|
/// Used by [AnimatedBuilder.builder], as well as [WidgetsApp.builder] and
|
||||||
/// [MaterialApp.builder].
|
/// [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);
|
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].
|
/// 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});
|
typedef ControlsWidgetBuilder = Widget Function(BuildContext context, {VoidCallback onStepContinue, VoidCallback onStepCancel});
|
||||||
|
|
||||||
/// An [Element] that composes other [Element]s.
|
/// An [Element] that composes other [Element]s.
|
||||||
|
Loading…
Reference in New Issue
Block a user