widgets

package
v1.17.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: BSD-3-Clause Imports: 40 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package widgets is the widgets library: the Widget, Element and State classes and the basic widgets built on the render tree.

Flutter: package:flutter/widgets.dart.

Index

Constants

View Source
const (
	// TagPointerLockUnavailable is the tag of the error of a lock that the platform cannot make: Wayland without
	// zwp_pointer_constraints_v1 and zwp_relative_pointer_manager_v1, a platform without windows.
	//
	// Flutter: no counterpart
	TagPointerLockUnavailable = ui.TagPointerLockUnavailable
	// TagPointerLockDenied is the tag of the error of a lock that the platform refuses: the web, outside a user
	// gesture.
	//
	// Flutter: no counterpart
	TagPointerLockDenied = ui.TagPointerLockDenied
)

The tags of the errors of PointerLock.Lock (SPEC §27.6, §27.11).

View Source
const (
	// ScrollDragControllerMomentumRetainStationaryDurationThreshold is how long
	// the pointer may be stationary for the drag to keep the momentum it
	// carried over from a fling.
	//
	// Flutter: widgets/scroll_activity.dart ScrollDragController.momentumRetainStationaryDurationThreshold
	ScrollDragControllerMomentumRetainStationaryDurationThreshold = 20 * time.Millisecond
	// ScrollDragControllerMomentumRetainVelocityThresholdFactor is the fraction
	// of the carried velocity the new fling must reach to add it.
	//
	// Flutter: widgets/scroll_activity.dart ScrollDragController.momentumRetainVelocityThresholdFactor
	ScrollDragControllerMomentumRetainVelocityThresholdFactor = 0.5
	// ScrollDragControllerMotionStoppedDurationThreshold is how long the pointer
	// must be stationary for the motion to count as stopped.
	//
	// Flutter: widgets/scroll_activity.dart ScrollDragController.motionStoppedDurationThreshold
	ScrollDragControllerMotionStoppedDurationThreshold = 50 * time.Millisecond
)

Constants of ScrollDragController.

View Source
const EditableTextDefaultSelectionHeightStyle = ui.BoxHeightStyleIncludeLineSpacingMiddle

EditableTextDefaultSelectionHeightStyle is the default height of the boxes of the selection.

Flutter: widgets/editable_text.dart EditableText.defaultSelectionHeightStyle

View Source
const EditableTextDefaultSelectionWidthStyle = ui.BoxWidthStyleMax

EditableTextDefaultSelectionWidthStyle is the default width of the boxes of the selection.

Flutter: widgets/editable_text.dart EditableText.defaultSelectionWidthStyle

View Source
const MinInteractiveDimension = 48.0

MinInteractiveDimension is the minimum dimension of any interactive region according to Material guidelines: the smallest size a tap target can have.

Flutter: widgets/constants.dart kMinInteractiveDimension

View Source
const NavigationToolbarMiddleSpacing = 16.0

NavigationToolbarMiddleSpacing is the default spacing around the middle widget of a NavigationToolbar.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.kMiddleSpacing

View Source
const NavigatorDefaultRouteName = "/"

NavigatorDefaultRouteName is the name of the default route: "/".

Flutter: widgets/navigator.dart Navigator.defaultRouteName

View Source
const SelectionOverlayFadeDuration = 150 * time.Millisecond

SelectionOverlayFadeDuration controls the fade-in and fade-out animations for the toolbar and handles.

Flutter: widgets/text_selection.dart SelectionOverlay.fadeDuration

View Source
const TreeSliverDefaultAnimationDuration = 150 * time.Millisecond

TreeSliverDefaultAnimationDuration is the duration of the toggle animation: 150 ms.

Flutter: widgets/sliver_tree.dart TreeSliver.defaultAnimationDuration

Variables

View Source
var ChildVicinityInvalid = rendering.ChildVicinityInvalid

ChildVicinityInvalid is the vicinity of no child.

Flutter: widgets/two_dimensional_viewport.dart ChildVicinity.invalid

View Source
var DefaultSelectionColor = ui.NewColor(0x80808080)

DefaultSelectionColor is the color of the selection highlight when none is given: Flutter's DefaultSelectionStyle.defaultColor, 0x80808080.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.defaultColor

View Source
var EditableTextGroupID = TextFieldTapRegionGroupID{}

EditableTextGroupID is the default group ID of the tap region of an EditableText: Flutter's EditableText type. It is the group of NewTextFieldTapRegion.

Flutter: widgets/editable_text.dart EditableText.groupId

View Source
var MagnifierInfoEmpty = MagnifierInfo{}

MagnifierInfoEmpty is the MagnifierInfo with all values set to 0. It is a read-only value.

Flutter: widgets/magnifier.dart MagnifierInfo.empty

View Source
var TextMagnifierConfigurationDisabled = NewTextMagnifierConfiguration()

TextMagnifierConfigurationDisabled is a TextMagnifierConfiguration that is disabled, meaning it never builds anything, regardless of platform. It is a read-only value.

Flutter: widgets/magnifier.dart TextMagnifierConfiguration.disabled

View Source
var TickerModeDataFallback = TickerModeData{Enabled: true}

TickerModeDataFallback is the mode where there is no TickerMode above: enabled, without forced frames.

Flutter: widgets/ticker_provider.dart TickerModeData.fallback

View Source
var TreeSliverDefaultAnimationCurve animation.Curve = animation.Curves.Linear

TreeSliverDefaultAnimationCurve is the curve of the toggle animation: linear.

Flutter: widgets/sliver_tree.dart TreeSliver.defaultAnimationCurve

TreeSliverDefaultToggleAnimationStyle is the style of the toggle animation when the tree has none.

Flutter: widgets/sliver_tree.dart TreeSliver.defaultToggleAnimationStyle

View Source
var UndoHistoryValueEmpty = UndoHistoryValue{}

UndoHistoryValueEmpty is the value that can neither undo nor redo.

Flutter: widgets/undo_history.dart UndoHistoryValue.empty

View Source
var WidgetStateMouseCursorAdaptiveClickable = WidgetStateMouseCursorResolveWith(func(states WidgetStates) services.MouseCursor {
	if states.Has(WidgetStateDisabled) || !foundation.IsWeb {
		return services.SystemMouseCursors.Basic
	}
	return services.SystemMouseCursors.Click
}, "WidgetStateMouseCursor(adaptiveClickable)")

WidgetStateMouseCursorAdaptiveClickable is the basic cursor on every platform but the web, as Flutter's native platforms use it, and the click cursor on the web (the pointing hand that buttons have there); it is the basic cursor when the widget is disabled too. It is read-only.

Flutter: widgets/widget_state.dart WidgetStateMouseCursor.adaptiveClickable

View Source
var WidgetStateMouseCursorClickable = WidgetStateMouseCursorResolveWith(func(states WidgetStates) services.MouseCursor {
	if states.Has(WidgetStateDisabled) {
		return services.SystemMouseCursors.Basic
	}
	return services.SystemMouseCursors.Click
}, "WidgetStateMouseCursor(clickable)")

WidgetStateMouseCursorClickable is the click cursor, or the basic one when the widget is disabled. It is read-only.

Flutter: widgets/widget_state.dart WidgetStateMouseCursor.clickable

View Source
var WidgetStateMouseCursorTextable = WidgetStateMouseCursorResolveWith(func(states WidgetStates) services.MouseCursor {
	if states.Has(WidgetStateDisabled) {
		return services.SystemMouseCursors.Basic
	}
	return services.SystemMouseCursors.Text
}, "WidgetStateMouseCursor(textable)")

WidgetStateMouseCursorTextable is the text cursor, or the basic one when the widget is disabled. It is read-only.

Flutter: widgets/widget_state.dart WidgetStateMouseCursor.textable

Functions

func ActionsHandler

func ActionsHandler(bc BuildContext, intent Intent) func()

ActionsHandler returns a function that invokes the action bound to the intent, or nil when there is none or it is not enabled. A widget like a button uses it as its callback.

Flutter: widgets/actions.dart Actions.handler

func ActionsInvoke

func ActionsInvoke(bc BuildContext, intent Intent) any

ActionsInvoke finds the action bound to the intent above the context and invokes it if it is enabled, and returns what it returned (nil for an action that is not enabled). In debug builds it panics with the tag ActionNotFound when no Actions has a mapping for the intent.

Flutter: widgets/actions.dart Actions.invoke

func ActionsMaybeInvoke

func ActionsMaybeInvoke(bc BuildContext, intent Intent) any

ActionsMaybeInvoke is ActionsInvoke that does nothing, and returns nil, when no action is found.

Flutter: widgets/actions.dart Actions.maybeInvoke

func AutocompleteHighlightedOptionOf

func AutocompleteHighlightedOptionOf(bc BuildContext) int

AutocompleteHighlightedOptionOf returns the index of the highlighted option of the closest AutocompleteHighlightedOption above the context, or 0.

Flutter: widgets/autocomplete.dart AutocompleteHighlightedOption.of

func AxisDirectionFromAxisReverseAndDirectionality

func AxisDirectionFromAxisReverseAndDirectionality(bc BuildContext, axis painting.Axis, reverse bool) painting.AxisDirection

AxisDirectionFromAxisReverseAndDirectionality is the axis direction for a main axis, whether it is reversed and the ambient text direction (the direction of the Directionality for a horizontal axis).

Flutter: widgets/basic.dart getAxisDirectionFromAxisReverseAndDirectionality

func BasicLocaleListResolution

func BasicLocaleListResolution(preferredLocales []ui.Locale, supportedLocales []ui.Locale) ui.Locale

BasicLocaleListResolution is the default algorithm that picks the locale of an app: the first of the preferred locales that the app supports in full, or by language and script, or by language and country, or by language, or by country, or the first supported locale. supportedLocales must not be empty.

Flutter: widgets/app.dart basicLocaleListResolution

func BuildTextSpanWithSpellCheckSuggestions

func BuildTextSpanWithSpellCheckSuggestions(value services.TextEditingValue, composingWithinCurrentTextRange bool,
	style, misspelledTextStyle *painting.TextStyle, spellCheckResults services.SpellCheckResults) *painting.TextSpan

BuildTextSpanWithSpellCheckSuggestions builds the TextSpan tree for the text of the value, with the misspelled words of the spell check results in the misspelled text style. When the text changed since the results were made, the spans are corrected first, or dropped for a word that changed. On Android the tree also underlines the composing region, unless composingWithinCurrentTextRange.

Flutter: widgets/spell_check.dart buildTextSpanWithSpellCheckSuggestions

func CanUpdate

func CanUpdate(oldWidget, newWidget Widget) bool

CanUpdate is whether the new widget can be used to update an element that has the old widget as its configuration: the two have the same type and equal keys.

Flutter: widgets/framework.dart Widget.canUpdate

func ChildDragAnchorStrategy

func ChildDragAnchorStrategy(draggable Widget, bc BuildContext, position ui.Offset) ui.Offset

ChildDragAnchorStrategy puts the feedback where the child is: the pointer keeps its place in the child.

Flutter: widgets/drag_target.dart childDragAnchorStrategy

func CompareFocusOrders

func CompareFocusOrders(a, b FocusOrder) int

CompareFocusOrders compares two orders; it panics with the tag FocusOrderIncomparable when they are not of the same kind.

Flutter: widgets/focus_traversal.dart FocusOrder.compareTo

func ConstraintsTransformHeightUnconstrained

func ConstraintsTransformHeightUnconstrained(c rendering.BoxConstraints) rendering.BoxConstraints

ConstraintsTransformHeightUnconstrained removes the constraints on the height.

Flutter: widgets/basic.dart ConstraintsTransformBox.heightUnconstrained

func ConstraintsTransformMaxHeightUnconstrained

func ConstraintsTransformMaxHeightUnconstrained(c rendering.BoxConstraints) rendering.BoxConstraints

ConstraintsTransformMaxHeightUnconstrained removes the maximum height.

Flutter: widgets/basic.dart ConstraintsTransformBox.maxHeightUnconstrained

func ConstraintsTransformMaxUnconstrained

func ConstraintsTransformMaxUnconstrained(c rendering.BoxConstraints) rendering.BoxConstraints

ConstraintsTransformMaxUnconstrained removes the maximum width and height.

Flutter: widgets/basic.dart ConstraintsTransformBox.maxUnconstrained

func ConstraintsTransformMaxWidthUnconstrained

func ConstraintsTransformMaxWidthUnconstrained(c rendering.BoxConstraints) rendering.BoxConstraints

ConstraintsTransformMaxWidthUnconstrained removes the maximum width.

Flutter: widgets/basic.dart ConstraintsTransformBox.maxWidthUnconstrained

func ConstraintsTransformUnconstrained

func ConstraintsTransformUnconstrained(rendering.BoxConstraints) rendering.BoxConstraints

ConstraintsTransformUnconstrained removes every constraint.

Flutter: widgets/basic.dart ConstraintsTransformBox.unconstrained

func ConstraintsTransformWidthUnconstrained

func ConstraintsTransformWidthUnconstrained(c rendering.BoxConstraints) rendering.BoxConstraints

ConstraintsTransformWidthUnconstrained removes the constraints on the width.

Flutter: widgets/basic.dart ConstraintsTransformBox.widthUnconstrained

func ContextMenuControllerRemoveAny

func ContextMenuControllerRemoveAny(bc BuildContext)

ContextMenuControllerRemoveAny removes the currently shown context menu from the UI. It does nothing if no context menu is currently shown.

If a menu is removed, and that menu provided an OnRemove callback when it was created, then that callback will be called.

Flutter: widgets/context_menu_controller.dart ContextMenuController.removeAny

func CreateLocalImageConfiguration

func CreateLocalImageConfiguration(bc BuildContext, size foundation.Opt[ui.Size]) painting.ImageConfiguration

CreateLocalImageConfiguration is the ImageConfiguration for what the context shows: the pixel ratio of its MediaQuery (when there is one), its text direction, the platform and the asset bundle and painting binding of the binding.

Deviation: the bundle is the one of the painting binding, as there is no DefaultAssetBundle widget (SPEC §12.10).

Flutter: widgets/image.dart createLocalImageConfiguration

func DebugCheckHasDirectionality

func DebugCheckHasDirectionality(bc BuildContext) bool

DebugCheckHasDirectionality panics with the tag DirectionalityMissing, naming the widget that needs it, when there is no Directionality above the context (or at it). Pass the empty string for the name when the widget is not known. It returns true so it can be used in a condition.

Flutter: widgets/debug.dart debugCheckHasDirectionality

func DebugCheckHasMediaQuery

func DebugCheckHasMediaQuery(bc BuildContext) bool

DebugCheckHasMediaQuery panics with the tag MediaQueryMissing when there is no MediaQuery above the context (or at it). It returns true so it can be used in a condition.

Flutter: widgets/debug.dart debugCheckHasMediaQuery

func DebugCheckHasOverlay

func DebugCheckHasOverlay(bc BuildContext) bool

DebugCheckHasOverlay panics with the tag OverlayMissing in debug builds if there is no Overlay widget above the context (within the closest LookupBoundary), and returns true.

Flutter: widgets/debug.dart debugCheckHasOverlay

func DebugCheckHasWidgetsLocalizations

func DebugCheckHasWidgetsLocalizations(bc BuildContext) bool

DebugCheckHasWidgetsLocalizations panics with the tag WidgetsLocalizationsMissing when there are no WidgetsLocalizations above the context. It returns true so it can be used in a condition.

Flutter: widgets/debug.dart debugCheckHasWidgetsLocalizations

func DebugChildrenHaveDuplicateKeys

func DebugChildrenHaveDuplicateKeys(parent Widget, children []Widget) bool

DebugChildrenHaveDuplicateKeys panics, in debug builds, with the tag ChildrenHaveDuplicateKeys when two of the children of the parent have the same key. It always returns false, so it can be used in a condition.

Flutter: widgets/debug.dart debugChildrenHaveDuplicateKeys

func DebugDescribeFocusTree

func DebugDescribeFocusTree(bc BuildContext) string

DebugDescribeFocusTree describes the focus tree of the app of the context.

Flutter: widgets/focus_manager.dart debugDescribeFocusTree

func DebugDumpApp

func DebugDumpApp(bc BuildContext)

DebugDumpApp prints the element tree of the app of the context, through the binding's debug Print (standard error unless the app set one). Debug builds only.

Deviation: Flutter's debugDumpApp is a global function; this one finds the binding through the context (SPEC §12.10).

Flutter: widgets/binding.dart debugDumpApp

func DebugDumpFocusTree

func DebugDumpFocusTree(bc BuildContext)

DebugDumpFocusTree prints the focus tree of the app of the context.

Flutter: widgets/focus_manager.dart debugDumpFocusTree

func DebugDumpLayerTree

func DebugDumpLayerTree(bc BuildContext)

DebugDumpLayerTree prints the layer tree of every view of the app of the context. Debug builds only.

Flutter: rendering/binding.dart debugDumpLayerTree

func DebugDumpPipelineOwnerTree

func DebugDumpPipelineOwnerTree(bc BuildContext)

DebugDumpPipelineOwnerTree prints the tree of pipeline owners of the app of the context. Debug builds only.

Flutter: rendering/binding.dart debugDumpPipelineOwnerTree

func DebugDumpRenderTree

func DebugDumpRenderTree(bc BuildContext)

DebugDumpRenderTree prints the render tree of every view of the app of the context. Debug builds only.

Flutter: rendering/binding.dart debugDumpRenderTree

func DebugDumpSemanticsTree

func DebugDumpSemanticsTree(bc BuildContext, order ...semantics.DebugSemanticsDumpOrder)

DebugDumpSemanticsTree prints the semantics tree of every view of the app of the context, in the order given (the zero value is traversal order, Flutter's default). Debug builds only.

Flutter: rendering/binding.dart debugDumpSemanticsTree

func DebugItemsHaveDuplicateKeys

func DebugItemsHaveDuplicateKeys(items []Widget) bool

DebugItemsHaveDuplicateKeys panics, in debug builds, with the tag ItemsHaveDuplicateKeys when two of the widgets have the same key. It always returns false.

Flutter: widgets/debug.dart debugItemsHaveDuplicateKeys

func DefaultErrorReporter

func DefaultErrorReporter(logger *slog.Logger) foundation.ErrorReporter

DefaultErrorReporter makes the error reporter that logs each error at the error level, with the error itself as the attribute "err". An *errors.Error logs its tag, route, metadata and stack, so that a test can replay the log entry through errors.ErrorJson and errors.FromJson. A nil logger means slog.Default().

Flutter: foundation/assertions.dart FlutterError.presentError

func DefaultScrollNotificationPredicate

func DefaultScrollNotificationPredicate(notification ScrollNotification) bool

DefaultScrollNotificationPredicate accepts the notifications that were dispatched by the closest scrollable (depth 0).

Flutter: widgets/scroll_notification.dart defaultScrollNotificationPredicate

func DefaultTextHeightBehaviorMaybeOf

func DefaultTextHeightBehaviorMaybeOf(bc BuildContext) *ui.TextHeightBehavior

DefaultTextHeightBehaviorMaybeOf is the behavior of the closest DefaultTextHeightBehavior above the context, if there is one.

Flutter: widgets/text.dart DefaultTextHeightBehavior.maybeOf

func DefaultTextHeightBehaviorOf

func DefaultTextHeightBehaviorOf(bc BuildContext) ui.TextHeightBehavior

DefaultTextHeightBehaviorOf is the behavior of the closest DefaultTextHeightBehavior above the context. It panics with the tag DefaultTextHeightBehaviorMissing when there is none.

Flutter: widgets/text.dart DefaultTextHeightBehavior.of

func DefaultTraversalRequestFocusCallback

func DefaultTraversalRequestFocusCallback(node *FocusNode, opts TraversalRequestFocusOpts)

DefaultTraversalRequestFocusCallback requests the focus for the node and scrolls it into view.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.defaultTraversalRequestFocusCallback

func DependOn

func DependOn[T InheritedWidgetInterface](bc BuildContext, aspect ...any) (T, bool)

DependOn returns the closest inherited widget of type T above the context and registers the context as a dependent of it: the context is rebuilt when the widget changes. The optional aspect is for inherited models. It returns the zero value and false when there is none. The context must be active.

Flutter: widgets/framework.dart BuildContext.dependOnInheritedWidgetOfExactType

func DependOnModel

func DependOnModel[T InheritedWidgetInterface](bc BuildContext, aspect any) (T, bool)

DependOnModel returns the closest model of type T above the context that supports the aspect, and makes the context depend on that aspect of every model of type T from the closest up to that one. With a nil aspect it is DependOn.

Flutter: widgets/inherited_model.dart InheritedModel.inheritFrom

func DescribeElements

func DescribeElements(name string, elements []Element) foundation.DiagnosticsNode

DescribeElements describes a list of elements as a block, for an error.

Flutter: widgets/framework.dart Element.describeElements

func DescribeWidget

DescribeWidget returns the diagnostics node of a widget: its type with the key, and the properties of its DebugFillProperties method when it has one.

Flutter: widgets/framework.dart Widget.toDiagnosticsNode

func DirectionalityOf

func DirectionalityOf(bc BuildContext) ui.TextDirection

DirectionalityOf is the direction of the closest Directionality above the context. It panics with the tag DirectionalityMissing when there is none.

Flutter: widgets/basic.dart Directionality.of

func DispatchNotification

func DispatchNotification(target BuildContext, notification Notification)

DispatchNotification starts bubbling the notification at the context: the closest NotifiableElement ancestor that handles it stops it.

Flutter: widgets/notification_listener.dart Notification.dispatch

func FeedbackForLongPress

func FeedbackForLongPress(bc BuildContext)

FeedbackForLongPress provides platform-specific feedback for a long press: it sends the long press semantics event, and on Android and Fuchsia vibrates. On iOS it plays the click sound and gives a heavy impact.

Flutter: widgets/feedback.dart Feedback.forLongPress

func FeedbackForTap

func FeedbackForTap(bc BuildContext)

FeedbackForTap provides platform-specific feedback for a tap: it sends the tap semantics event, and plays the click sound on Android and Fuchsia.

Flutter: widgets/feedback.dart Feedback.forTap

func FeedbackWrapForLongPress

func FeedbackWrapForLongPress(callback foundation.VoidCallback, bc BuildContext) foundation.VoidCallback

FeedbackWrapForLongPress returns a callback that provides the feedback for a long press and then calls the callback. It returns nil for a nil callback.

Flutter: widgets/feedback.dart Feedback.wrapForLongPress

func FeedbackWrapForTap

func FeedbackWrapForTap(callback foundation.VoidCallback, bc BuildContext) foundation.VoidCallback

FeedbackWrapForTap returns a callback that provides the feedback for a tap and then calls the callback. It returns nil for a nil callback.

Flutter: widgets/feedback.dart Feedback.wrapForTap

func FindAncestorRenderObjectOfType

func FindAncestorRenderObjectOfType[T rendering.RenderObject](bc BuildContext) (T, bool)

FindAncestorRenderObjectOfType returns the render object of the closest ancestor element that has one of type T, or the zero value and false.

Flutter: widgets/framework.dart BuildContext.findAncestorRenderObjectOfType

func FindAncestorStateOfType

func FindAncestorStateOfType[S State](bc BuildContext) (S, bool)

FindAncestorStateOfType returns the state of the closest StatefulWidget ancestor whose state is of type S, or the zero value and false.

Flutter: widgets/framework.dart BuildContext.findAncestorStateOfType

func FindAncestorWidgetOfExactType

func FindAncestorWidgetOfExactType[T Widget](bc BuildContext) (T, bool)

FindAncestorWidgetOfExactType returns the closest ancestor widget of type T (the exact type, not a type that embeds it), or the zero value and false. The context must be active.

Flutter: widgets/framework.dart BuildContext.findAncestorWidgetOfExactType

func FindRootAncestorStateOfType

func FindRootAncestorStateOfType[S State](bc BuildContext) (S, bool)

FindRootAncestorStateOfType returns the state of the furthest StatefulWidget ancestor whose state is of type S, or the zero value and false.

Flutter: widgets/framework.dart BuildContext.findRootAncestorStateOfType

func FocusIsAt

func FocusIsAt(bc BuildContext) bool

FocusIsAt is whether the nearest Focus above the context has the focus.

Flutter: widgets/focus_scope.dart Focus.isAt

func GetInherited

func GetInherited[T InheritedWidgetInterface](bc BuildContext) (T, bool)

GetInherited returns the closest inherited widget of type T above the context without registering a dependency: the context is not rebuilt when it changes. Use it from callbacks and from InitState.

Flutter: widgets/framework.dart BuildContext.getInheritedWidgetOfExactType

func IconFontEnsure

func IconFontEnsure(bc BuildContext, icon IconData)

IconFontEnsure loads the font of an icon into the text engine of the binding of the context, once, for a widget that draws the glyph of an icon as text instead of with an Icon (the back chevron of the Cupertino navigation bar). It does nothing for an icon with no Font.

Flutter: no counterpart

func InitActionBase

func InitActionBase(b *ActionBase, self Action)

InitActionBase sets the outer value of the action.

Flutter: widgets/actions.dart Action.new

func InitActionDispatcherBase

func InitActionDispatcherBase(b *ActionDispatcherBase, self ActionDispatcher, focusManager ...*FocusManager)

InitActionDispatcherBase tells the base of a dispatcher that embeds it which dispatcher it is part of, so that InvokeActionIfEnabled calls the InvokeAction the outer dispatcher overrides. Call it once, when the outer dispatcher is made.

Flutter: widgets/actions.dart ActionDispatcher.invokeActionIfEnabled

func InitBackButtonDispatcherBase

func InitBackButtonDispatcherBase(b *BackButtonDispatcherBase, self BackButtonDispatcher, report func() foundation.ErrorReporter)

InitBackButtonDispatcherBase sets the outer value of the dispatcher. The report function returns the reporter of the errors of the callbacks; it may be nil.

Flutter: widgets/router.dart BackButtonDispatcher

func InitBallisticScrollActivity

func InitBallisticScrollActivity(a *BallisticScrollActivity, self ScrollActivity, delegate ScrollActivityDelegate, simulation physics.Simulation, vsync scheduler.TickerProvider, shouldIgnorePointer bool, post func(func()))

InitBallisticScrollActivity sets up an activity that embeds a BallisticScrollActivity: self is the outer value, whose ApplyMoveTo the activity calls if it has one.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.new

func InitBoxScrollView

func InitBoxScrollView(v *BoxScrollView, self interface {
	ScrollViewSelf
	BoxScrollViewSelf
}, padding painting.EdgeInsetsGeometry, o ScrollViewOpts)

InitBoxScrollView sets up the box scroll view; self is the outer type.

Flutter: widgets/scroll_view.dart BoxScrollView.new

func InitComponentElement

func InitComponentElement(c *ComponentElement, self ComponentElementSelf, widget Widget)

InitComponentElement sets up a component element; self is the outer element.

Flutter: widgets/framework.dart ComponentElement.new

func InitContextActionBase

func InitContextActionBase(b *ContextActionBase, self ContextAction)

InitContextActionBase sets the outer value of the action.

Flutter: widgets/actions.dart ContextAction.new

func InitDrivenScrollActivity

func InitDrivenScrollActivity(a *DrivenScrollActivity, self ScrollActivity, delegate ScrollActivityDelegate, o DrivenScrollActivityOpts)

InitDrivenScrollActivity sets up an activity that embeds a DrivenScrollActivity: self is the outer value, whose ApplyMoveTo the activity calls if it has one.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.new

func InitElement

func InitElement(b *ElementBase, self Element, widget Widget)

InitElement sets up the base of an element: self is the outer element and widget is its first configuration.

Flutter: widgets/framework.dart Element.new

func InitFocusTraversalPolicyBase

func InitFocusTraversalPolicyBase(b *FocusTraversalPolicyBase, self FocusTraversalPolicy, opts ...FocusTraversalPolicyBaseOpts)

InitFocusTraversalPolicyBase sets the outer value of the base.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.new

func InitHeroController

func InitHeroController(c *HeroController, self NavigatorObserver)

InitHeroController sets the outer observer of a controller that is embedded in another type, so that the navigators call the methods that the outer type overrides (Flutter subclasses HeroController).

Flutter: no counterpart (the self pattern, SPEC §12.5)

func InitInheritedElement

func InitInheritedElement(e *InheritedElement, self InheritedElementSelf, w InheritedWidgetInterface)

InitInheritedElement sets up an inherited element; self is the outer element.

Flutter: widgets/framework.dart InheritedElement.new

func InitLocalHistoryRouteBase

func InitLocalHistoryRouteBase(b *LocalHistoryRouteBase, self LocalHistoryRoute, opts RouteOpts)

InitLocalHistoryRouteBase sets the outer value of the route.

Flutter: widgets/routes.dart LocalHistoryRoute

func InitModalRouteBase

func InitModalRouteBase(b *ModalRouteBase, self ModalRoute, opts ModalRouteOpts)

InitModalRouteBase sets the outer value of the route.

Flutter: widgets/routes.dart ModalRoute.new

func InitMultiChildRenderObjectElement

func InitMultiChildRenderObjectElement(e *MultiChildRenderObjectElement, self RenderObjectElementSelf, w multiChildRenderObjectWidget)

InitMultiChildRenderObjectElement sets up an element that embeds MultiChildRenderObjectElement, with the outer element as self.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.new

func InitMultiSelectableSelectionContainerDelegate

func InitMultiSelectableSelectionContainerDelegate(m *MultiSelectableSelectionContainerDelegate, self MultiSelectableDelegate)

InitMultiSelectableSelectionContainerDelegate sets the delegate that embeds the base, so that the base calls its overrides.

Flutter: no counterpart (the self pattern, SPEC §12.5)

func InitOverlayRouteBase

func InitOverlayRouteBase(b *OverlayRouteBase, self OverlayRoute, opts RouteOpts)

InitOverlayRouteBase sets the outer value of the route.

Flutter: widgets/routes.dart OverlayRoute.new

func InitPageBase

func InitPageBase(b *PageBase, self Page, opts ...PageOpts)

InitPageBase sets up the embedded base of a page whose outer value is self.

Flutter: widgets/navigator.dart Page.new

func InitPageRouteBase

func InitPageRouteBase(b *PageRouteBase, self PageRoute, opts PageRouteOpts)

InitPageRouteBase sets the outer value of the route.

Flutter: widgets/pages.dart PageRoute.new

func InitPopupRouteBase

func InitPopupRouteBase(b *PopupRouteBase, self PopupRoute, opts ModalRouteOpts)

InitPopupRouteBase sets the outer value of the route.

Flutter: widgets/routes.dart PopupRoute.new

func InitProxyElement

func InitProxyElement(p *ProxyElement, self ProxyElementSelf, widget proxyWidget)

InitProxyElement sets up a proxy element; self is the outer element.

Flutter: widgets/framework.dart ProxyElement.new

func InitRenderObjectElement

func InitRenderObjectElement(e *RenderObjectElement, self RenderObjectElementSelf, widget Widget)

InitRenderObjectElement sets up a render object element; self is the outer element.

Flutter: widgets/framework.dart RenderObjectElement.new

func InitRenderTreeRootElement

func InitRenderTreeRootElement(e *RenderTreeRootElement, self RenderObjectElementSelf, widget Widget)

InitRenderTreeRootElement sets up a render tree root element.

Flutter: widgets/framework.dart RenderTreeRootElement.new

func InitRouteBase

func InitRouteBase(b *RouteBase, self Route, opts RouteOpts)

InitRouteBase sets the outer value of the route.

Flutter: widgets/navigator.dart Route.new

func InitRouteInformationParserBase

func InitRouteInformationParserBase[T any](b *RouteInformationParserBase[T], self RouteInformationParser[T])

InitRouteInformationParserBase sets the outer value of the parser.

Flutter: widgets/router.dart RouteInformationParser.new

func InitRouterDelegateBase

func InitRouterDelegateBase[T any](b *RouterDelegateBase[T], self RouterDelegate[T])

InitRouterDelegateBase sets the outer value of the delegate.

Flutter: widgets/router.dart RouterDelegate.new

func InitScrollActivityBase

func InitScrollActivityBase(b *ScrollActivityBase, self ScrollActivity, delegate ScrollActivityDelegate)

InitScrollActivityBase sets the outer value and the delegate.

Flutter: widgets/scroll_activity.dart ScrollActivity.new

func InitScrollBehaviorBase

func InitScrollBehaviorBase(b *ScrollBehaviorBase, self ScrollBehavior)

InitScrollBehaviorBase sets the outer value.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.new

func InitScrollControllerBase

func InitScrollControllerBase(c *ScrollControllerBase, self ScrollController, o ScrollControllerOpts)

InitScrollControllerBase sets the outer value and the options.

Flutter: widgets/scroll_controller.dart ScrollController.new

func InitScrollMetricsMixin

func InitScrollMetricsMixin(m *ScrollMetricsMixin, self ScrollMetrics)

InitScrollMetricsMixin sets the outer value that the mixin's derived methods read the primitives from.

Flutter: widgets/scroll_metrics.dart ScrollMetrics

func InitScrollPhysicsBase

func InitScrollPhysicsBase(b *ScrollPhysicsBase, self, parent ScrollPhysics)

InitScrollPhysicsBase sets the outer value and the parent (nil for none).

Flutter: widgets/scroll_physics.dart ScrollPhysics.new

func InitScrollPositionBase

func InitScrollPositionBase(b *ScrollPositionBase, self ScrollPosition, physics ScrollPhysics, context ScrollContext, opts ...ScrollPositionOpts)

InitScrollPositionBase sets the outer value, the physics and the context, and absorbs the old position and restores the saved offset if the options say so. Call it last in the constructor of the position, after its own fields are set.

Flutter: widgets/scroll_position.dart ScrollPosition.new

func InitScrollPositionWithSingleContext

func InitScrollPositionWithSingleContext(p *ScrollPositionWithSingleContext, self ScrollPosition, physics ScrollPhysics, context ScrollContext, opts ...ScrollPositionWithSingleContextOpts)

InitScrollPositionWithSingleContext sets up the position; self is the outer position, for a type that embeds ScrollPositionWithSingleContext. The fields of the outer type that its Absorb and RestoreScrollOffset methods need must be set before the call, as they run in it.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.new

func InitScrollView

func InitScrollView(v *ScrollView, self ScrollViewSelf, o ScrollViewOpts)

InitScrollView sets up the scroll view; self is the outer type. In debug builds it panics with the tag ScrollViewPrimaryWithController when the view is primary and has a controller, ScrollViewCenterShrinkWrap when it shrink-wraps and has a center, ScrollViewAnchorInvalid when the anchor is not between 0 and 1, and ScrollViewSemanticChildCountInvalid when the semantic child count is negative.

Flutter: widgets/scroll_view.dart ScrollView.new

func InitShortcutManagerBase

func InitShortcutManagerBase(b *ShortcutManagerBase, self ShortcutManager, opts ShortcutManagerOpts)

InitShortcutManagerBase sets the outer value of the manager.

Flutter: widgets/shortcuts.dart ShortcutManager.new

func InitSliverMultiBoxAdaptorElement

func InitSliverMultiBoxAdaptorElement(e *SliverMultiBoxAdaptorElement, self RenderObjectElementSelf, w sliverMultiBoxWidget, replaceMovedChildren bool)

InitSliverMultiBoxAdaptorElement sets up an element of a sliver with boxes; self is the outer element, for an element type that embeds this one.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.new

func InitStaticSelectionContainerDelegate

func InitStaticSelectionContainerDelegate(d *StaticSelectionContainerDelegate, self StaticDelegate)

InitStaticSelectionContainerDelegate sets the delegate that embeds the static delegate, so that it calls its overrides.

Flutter: no counterpart (the self pattern, SPEC §12.5)

func InitTextSelectionGestureDetectorBuilder

InitTextSelectionGestureDetectorBuilder sets up the builder; self is the outer value that implements the handler (the builder itself when it isn't embedded).

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.new

func InitTransitionRouteBase

func InitTransitionRouteBase(b *TransitionRouteBase, self TransitionRoute, opts RouteOpts)

InitTransitionRouteBase sets the outer value of the route.

Flutter: widgets/routes.dart TransitionRoute.new

func InitTwoDimensionalScrollView

InitTwoDimensionalScrollView sets the outer widget and the properties.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.new

func IntentTypeOf

func IntentTypeOf[T Intent]() reflect.Type

IntentTypeOf is the key of an intent type in an ActionMap: Flutter's Type literal, such as DismissIntent.

Flutter: widgets/actions.dart Actions.actions

func InteractiveViewerGetAxisAlignedBoundingBox

func InteractiveViewerGetAxisAlignedBoundingBox(quad ui.Quad) ui.Quad

InteractiveViewerGetAxisAlignedBoundingBox is the smallest axis aligned rectangle, as a quad, that contains the quad.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.getAxisAlignedBoundingBox

func InteractiveViewerGetNearestPointInside

func InteractiveViewerGetNearestPointInside(point ui.Vector3, quad ui.Quad) ui.Vector3

InteractiveViewerGetNearestPointInside is the point inside the quad, which must be a rectangle, that is nearest to the point.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.getNearestPointInside

func InteractiveViewerGetNearestPointOnLine

func InteractiveViewerGetNearestPointOnLine(point, l1, l2 ui.Vector3) ui.Vector3

InteractiveViewerGetNearestPointOnLine is the point on the line segment between l1 and l2 that is nearest to the point.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.getNearestPointOnLine

func InteractiveViewerPointIsInside

func InteractiveViewerPointIsInside(point ui.Vector3, quad ui.Quad) bool

InteractiveViewerPointIsInside is whether the point is inside the quad, which must be a rectangle.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.pointIsInside

func LocalizationsLocaleOf

func LocalizationsLocaleOf(bc BuildContext) ui.Locale

LocalizationsLocaleOf is the locale of the closest Localizations above the context. It panics with the tag LocalizationsMissing when there is none.

Flutter: widgets/localizations.dart Localizations.localeOf

func LocalizationsMaybeLocaleOf

func LocalizationsMaybeLocaleOf(bc BuildContext) (ui.Locale, bool)

LocalizationsMaybeLocaleOf is the locale of the closest Localizations above the context, if there is one.

Flutter: widgets/localizations.dart Localizations.maybeLocaleOf

func LocalizationsOf

func LocalizationsOf[T any](bc BuildContext) (T, bool)

LocalizationsOf is the resources of type T of the closest Localizations above the context, if it has them.

Flutter: widgets/localizations.dart Localizations.of

func LookupBoundaryDebugIsHidingAncestorRenderObjectOfType

func LookupBoundaryDebugIsHidingAncestorRenderObjectOfType[T rendering.RenderObject](bc BuildContext) bool

LookupBoundaryDebugIsHidingAncestorRenderObjectOfType is whether a render object of type T is above the context but hidden from it by a LookupBoundary. In debug builds only; release builds report false.

Flutter: widgets/lookup_boundary.dart LookupBoundary.debugIsHidingAncestorRenderObjectOfType

func LookupBoundaryDebugIsHidingAncestorStateOfType

func LookupBoundaryDebugIsHidingAncestorStateOfType[S State](bc BuildContext) bool

LookupBoundaryDebugIsHidingAncestorStateOfType is whether a state of type S is above the context but hidden from it by a LookupBoundary. In debug builds only; release builds report false.

Flutter: widgets/lookup_boundary.dart LookupBoundary.debugIsHidingAncestorStateOfType

func LookupBoundaryDebugIsHidingAncestorWidgetOfExactType

func LookupBoundaryDebugIsHidingAncestorWidgetOfExactType[T Widget](bc BuildContext) bool

LookupBoundaryDebugIsHidingAncestorWidgetOfExactType is whether a widget of type T is above the context but hidden from it by a LookupBoundary. In debug builds only; release builds report false.

Flutter: widgets/lookup_boundary.dart LookupBoundary.debugIsHidingAncestorWidgetOfExactType

func LookupBoundaryDependOnInheritedWidgetOfExactType

func LookupBoundaryDependOnInheritedWidgetOfExactType[T InheritedWidgetInterface](bc BuildContext, aspect ...any) (T, bool)

LookupBoundaryDependOnInheritedWidgetOfExactType is DependOn that does not look past a LookupBoundary. The context depends on the boundary even when nothing is found, so that its dependencies change when it moves in the tree.

Flutter: widgets/lookup_boundary.dart LookupBoundary.dependOnInheritedWidgetOfExactType

func LookupBoundaryFindAncestorRenderObjectOfType

func LookupBoundaryFindAncestorRenderObjectOfType[T rendering.RenderObject](bc BuildContext) (T, bool)

LookupBoundaryFindAncestorRenderObjectOfType is FindAncestorRenderObjectOfType that does not look past a LookupBoundary.

Flutter: widgets/lookup_boundary.dart LookupBoundary.findAncestorRenderObjectOfType

func LookupBoundaryFindAncestorStateOfType

func LookupBoundaryFindAncestorStateOfType[S State](bc BuildContext) (S, bool)

LookupBoundaryFindAncestorStateOfType is FindAncestorStateOfType that does not look past a LookupBoundary.

Flutter: widgets/lookup_boundary.dart LookupBoundary.findAncestorStateOfType

func LookupBoundaryFindAncestorWidgetOfExactType

func LookupBoundaryFindAncestorWidgetOfExactType[T Widget](bc BuildContext) (T, bool)

LookupBoundaryFindAncestorWidgetOfExactType is FindAncestorWidgetOfExactType that does not look past a LookupBoundary.

Flutter: widgets/lookup_boundary.dart LookupBoundary.findAncestorWidgetOfExactType

func LookupBoundaryFindRootAncestorStateOfType

func LookupBoundaryFindRootAncestorStateOfType[S State](bc BuildContext) (S, bool)

LookupBoundaryFindRootAncestorStateOfType is FindRootAncestorStateOfType that does not look past a LookupBoundary.

Flutter: widgets/lookup_boundary.dart LookupBoundary.findRootAncestorStateOfType

func LookupBoundaryGetInheritedWidgetOfExactType

func LookupBoundaryGetInheritedWidgetOfExactType[T InheritedWidgetInterface](bc BuildContext) (T, bool)

LookupBoundaryGetInheritedWidgetOfExactType is GetInherited that does not look past a LookupBoundary.

Flutter: widgets/lookup_boundary.dart LookupBoundary.getInheritedWidgetOfExactType

func LookupBoundaryVisitAncestorElements

func LookupBoundaryVisitAncestorElements(bc BuildContext, visitor ConditionalElementVisitor)

LookupBoundaryVisitAncestorElements walks the ancestors from the closest to the root until the visitor returns false or a LookupBoundary has been visited.

Flutter: widgets/lookup_boundary.dart LookupBoundary.visitAncestorElements

func LookupBoundaryVisitChildElements

func LookupBoundaryVisitChildElements(bc BuildContext, visitor ElementVisitor)

LookupBoundaryVisitChildElements visits the children of the context except the ones that are a LookupBoundary.

Flutter: widgets/lookup_boundary.dart LookupBoundary.visitChildElements

func MagnifierControllerShiftWithinBounds

func MagnifierControllerShiftWithinBounds(rect, bounds ui.Rect) ui.Rect

MagnifierControllerShiftWithinBounds is a utility for calculating a new Rect from rect such that rect is fully constrained within bounds.

Any point in the output rect is guaranteed to also be a point contained in bounds.

It is a runtime error for rect's width to be greater than bounds' width, and it is also an error for rect's height to be greater than bounds' height (a panic with the tag MagnifierRectLargerThanBounds in debug builds).

This algorithm translates rect the shortest distance such that it is entirely within bounds.

If rect is already within bounds, no shift will be applied to rect and rect will be returned as-is.

It is perfectly valid for the output rect to have a point along the edge of the bounds. If the desired output rect requires that no edges are parallel to edges of bounds, deflate the bounds by 1 to achieve this effect.

Flutter: widgets/magnifier.dart MagnifierController.shiftWithinBounds

func MaybeDirectionalityOf

func MaybeDirectionalityOf(bc BuildContext) (ui.TextDirection, bool)

MaybeDirectionalityOf is the direction of the closest Directionality above the context. The context depends on it.

Flutter: widgets/basic.dart Directionality.maybeOf

func MaybeViewOf

func MaybeViewOf(bc BuildContext) *ui.View

MaybeViewOf is the view that the closest View or RawView above the context shows its child in, or nil. The context depends on it. The lookup does not go past a LookupBoundary.

Flutter: widgets/view.dart View.maybeOf

func MediaQueryAccessibleNavigationOf

func MediaQueryAccessibleNavigationOf(bc BuildContext) bool

MediaQueryAccessibleNavigationOf is whether an accessibility service is in use.

Flutter: widgets/media_query.dart MediaQuery.accessibleNavigationOf

func MediaQueryAlwaysUse24HourFormatOf

func MediaQueryAlwaysUse24HourFormatOf(bc BuildContext) bool

MediaQueryAlwaysUse24HourFormatOf is whether to use the 24-hour format.

Flutter: widgets/media_query.dart MediaQuery.alwaysUse24HourFormatOf

func MediaQueryBoldTextOf

func MediaQueryBoldTextOf(bc BuildContext) bool

MediaQueryBoldTextOf is whether the user asked for bold text; false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.boldTextOf

func MediaQueryDevicePixelRatioOf

func MediaQueryDevicePixelRatioOf(bc BuildContext) float64

MediaQueryDevicePixelRatioOf is the number of device pixels per logical pixel.

Flutter: widgets/media_query.dart MediaQuery.devicePixelRatioOf

func MediaQueryDifferentiateWithoutColorOf

func MediaQueryDifferentiateWithoutColorOf(bc BuildContext) bool

MediaQueryDifferentiateWithoutColorOf is whether the user asked that color is not the only way things are told apart; false when there is no MediaQuery.

Deviation: Flutter has no such setting (SPEC §12.10).

Flutter: no counterpart

func MediaQueryDisableAnimationsOf

func MediaQueryDisableAnimationsOf(bc BuildContext) bool

MediaQueryDisableAnimationsOf is whether animations should be off or reduced.

Flutter: widgets/media_query.dart MediaQuery.disableAnimationsOf

func MediaQueryDisplayCornerRadiiOf

func MediaQueryDisplayCornerRadiiOf(bc BuildContext) foundation.Opt[painting.BorderRadius]

MediaQueryDisplayCornerRadiiOf is the radii of the corners of the display, None when they are not known; the context depends on them only.

Flutter: widgets/media_query.dart MediaQuery.displayCornerRadiiOf

func MediaQueryGestureSettingsOf

func MediaQueryGestureSettingsOf(bc BuildContext) gestures.DeviceGestureSettings

MediaQueryGestureSettingsOf is the gesture settings of the device.

Flutter: widgets/media_query.dart MediaQuery.gestureSettingsOf

func MediaQueryHeightOf

func MediaQueryHeightOf(bc BuildContext) float64

MediaQueryHeightOf is the height of the media; the context depends on the height only.

Flutter: widgets/media_query.dart MediaQuery.heightOf

func MediaQueryHighContrastOf

func MediaQueryHighContrastOf(bc BuildContext) bool

MediaQueryHighContrastOf is whether the user asked for a high contrast; false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.highContrastOf

func MediaQueryInvertColorsOf

func MediaQueryInvertColorsOf(bc BuildContext) bool

MediaQueryInvertColorsOf is whether the platform inverts the colors.

Flutter: widgets/media_query.dart MediaQuery.invertColorsOf

func MediaQueryMaybeAccessibleNavigationOf

func MediaQueryMaybeAccessibleNavigationOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeAccessibleNavigationOf is MediaQueryAccessibleNavigationOf that returns false in ok when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeAccessibleNavigationOf

func MediaQueryMaybeAlwaysUse24HourFormatOf

func MediaQueryMaybeAlwaysUse24HourFormatOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeAlwaysUse24HourFormatOf is MediaQueryAlwaysUse24HourFormatOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeAlwaysUse24HourFormatOf

func MediaQueryMaybeBoldTextOf

func MediaQueryMaybeBoldTextOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeBoldTextOf is the bold text setting; false in ok when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeBoldTextOf

func MediaQueryMaybeDevicePixelRatioOf

func MediaQueryMaybeDevicePixelRatioOf(bc BuildContext) (float64, bool)

MediaQueryMaybeDevicePixelRatioOf is MediaQueryDevicePixelRatioOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeDevicePixelRatioOf

func MediaQueryMaybeDifferentiateWithoutColorOf

func MediaQueryMaybeDifferentiateWithoutColorOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeDifferentiateWithoutColorOf is the setting; false in ok when there is no MediaQuery.

Flutter: no counterpart

func MediaQueryMaybeDisableAnimationsOf

func MediaQueryMaybeDisableAnimationsOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeDisableAnimationsOf is MediaQueryDisableAnimationsOf that returns false in ok when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeDisableAnimationsOf

func MediaQueryMaybeDisableAnimationsValue

func MediaQueryMaybeDisableAnimationsValue(bc BuildContext) bool

MediaQueryMaybeDisableAnimationsValue is whether animations are disabled by the MediaQuery above the context; false when there is none.

Flutter: widgets/media_query.dart MediaQuery.maybeDisableAnimationsOf

func MediaQueryMaybeDisplayCornerRadiiOf

func MediaQueryMaybeDisplayCornerRadiiOf(bc BuildContext) foundation.Opt[painting.BorderRadius]

MediaQueryMaybeDisplayCornerRadiiOf is MediaQueryDisplayCornerRadiiOf that returns None when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeDisplayCornerRadiiOf

func MediaQueryMaybeGestureSettingsOf

func MediaQueryMaybeGestureSettingsOf(bc BuildContext) (gestures.DeviceGestureSettings, bool)

MediaQueryMaybeGestureSettingsOf is MediaQueryGestureSettingsOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeGestureSettingsOf

func MediaQueryMaybeHeightOf

func MediaQueryMaybeHeightOf(bc BuildContext) (float64, bool)

MediaQueryMaybeHeightOf is MediaQueryHeightOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeHeightOf

func MediaQueryMaybeHighContrastOf

func MediaQueryMaybeHighContrastOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeHighContrastOf is the high contrast setting; false in ok when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeHighContrastOf

func MediaQueryMaybeInvertColorsOf

func MediaQueryMaybeInvertColorsOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeInvertColorsOf is MediaQueryInvertColorsOf that returns false in ok when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeInvertColorsOf

func MediaQueryMaybeOnOffSwitchLabelsOf

func MediaQueryMaybeOnOffSwitchLabelsOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeOnOffSwitchLabelsOf is the switch labels setting; false in ok when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeOnOffSwitchLabelsOf

func MediaQueryMaybePaddingOf

func MediaQueryMaybePaddingOf(bc BuildContext) (painting.EdgeInsets, bool)

MediaQueryMaybePaddingOf is MediaQueryPaddingOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybePaddingOf

func MediaQueryMaybePlatformBrightnessOf

func MediaQueryMaybePlatformBrightnessOf(bc BuildContext) (ui.Brightness, bool)

MediaQueryMaybePlatformBrightnessOf is the brightness of the system; false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybePlatformBrightnessOf

func MediaQueryMaybeReduceTransparencyOf

func MediaQueryMaybeReduceTransparencyOf(bc BuildContext) (value, ok bool)

MediaQueryMaybeReduceTransparencyOf is the setting; false in ok when there is no MediaQuery.

Flutter: no counterpart

func MediaQueryMaybeSizeOf

func MediaQueryMaybeSizeOf(bc BuildContext) (ui.Size, bool)

MediaQueryMaybeSizeOf is MediaQuerySizeOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeSizeOf

func MediaQueryMaybeSupportsShowingSystemContextMenu

func MediaQueryMaybeSupportsShowingSystemContextMenu(bc BuildContext) (value, ok bool)

MediaQueryMaybeSupportsShowingSystemContextMenu is MediaQuerySupportsShowingSystemContextMenu that returns false in ok when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeSupportsShowingSystemContextMenu

func MediaQueryMaybeSystemGestureInsetsOf

func MediaQueryMaybeSystemGestureInsetsOf(bc BuildContext) (painting.EdgeInsets, bool)

MediaQueryMaybeSystemGestureInsetsOf is MediaQuerySystemGestureInsetsOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeSystemGestureInsetsOf

func MediaQueryMaybeTextScalerOf

func MediaQueryMaybeTextScalerOf(bc BuildContext) (painting.TextScaler, bool)

MediaQueryMaybeTextScalerOf is the text scaler of the media; false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeTextScalerOf

func MediaQueryMaybeViewInsetsOf

func MediaQueryMaybeViewInsetsOf(bc BuildContext) (painting.EdgeInsets, bool)

MediaQueryMaybeViewInsetsOf is MediaQueryViewInsetsOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeViewInsetsOf

func MediaQueryMaybeViewPaddingOf

func MediaQueryMaybeViewPaddingOf(bc BuildContext) (painting.EdgeInsets, bool)

MediaQueryMaybeViewPaddingOf is MediaQueryViewPaddingOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeViewPaddingOf

func MediaQueryMaybeWidthOf

func MediaQueryMaybeWidthOf(bc BuildContext) (float64, bool)

MediaQueryMaybeWidthOf is MediaQueryWidthOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeWidthOf

func MediaQueryOnOffSwitchLabelsOf

func MediaQueryOnOffSwitchLabelsOf(bc BuildContext) bool

MediaQueryOnOffSwitchLabelsOf is whether the user asked for labels on switches; false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.onOffSwitchLabelsOf

func MediaQueryPaddingOf

func MediaQueryPaddingOf(bc BuildContext) painting.EdgeInsets

MediaQueryPaddingOf is the padding of the media.

Flutter: widgets/media_query.dart MediaQuery.paddingOf

func MediaQueryPlatformBrightnessOf

func MediaQueryPlatformBrightnessOf(bc BuildContext) ui.Brightness

MediaQueryPlatformBrightnessOf is the brightness of the system, or light when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.platformBrightnessOf

func MediaQueryReduceTransparencyOf

func MediaQueryReduceTransparencyOf(bc BuildContext) bool

MediaQueryReduceTransparencyOf is whether the user asked for less transparency and blur; false when there is no MediaQuery.

Deviation: Flutter has no such setting (SPEC §12.10).

Flutter: no counterpart

func MediaQuerySizeOf

func MediaQuerySizeOf(bc BuildContext) ui.Size

MediaQuerySizeOf is the size of the media; the context depends on the size only.

Flutter: widgets/media_query.dart MediaQuery.sizeOf

func MediaQuerySupportsShowingSystemContextMenu

func MediaQuerySupportsShowingSystemContextMenu(bc BuildContext) bool

MediaQuerySupportsShowingSystemContextMenu is whether the platform can show the system context menu.

Flutter: widgets/media_query.dart MediaQuery.supportsShowingSystemContextMenu

func MediaQuerySystemGestureInsetsOf

func MediaQuerySystemGestureInsetsOf(bc BuildContext) painting.EdgeInsets

MediaQuerySystemGestureInsetsOf is the system gesture insets of the media.

Flutter: widgets/media_query.dart MediaQuery.systemGestureInsetsOf

func MediaQueryTextScalerOf

func MediaQueryTextScalerOf(bc BuildContext) painting.TextScaler

MediaQueryTextScalerOf is the text scaler of the media, or no scaling when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.textScalerOf

func MediaQueryViewInsetsOf

func MediaQueryViewInsetsOf(bc BuildContext) painting.EdgeInsets

MediaQueryViewInsetsOf is the view insets of the media.

Flutter: widgets/media_query.dart MediaQuery.viewInsetsOf

func MediaQueryViewPaddingOf

func MediaQueryViewPaddingOf(bc BuildContext) painting.EdgeInsets

MediaQueryViewPaddingOf is the view padding of the media.

Flutter: widgets/media_query.dart MediaQuery.viewPaddingOf

func MediaQueryWidthOf

func MediaQueryWidthOf(bc BuildContext) float64

MediaQueryWidthOf is the width of the media; the context depends on the width only.

Flutter: widgets/media_query.dart MediaQuery.widthOf

func MenuControllerMaybeIsOpenOf(bc BuildContext) (isOpen, ok bool)

MenuControllerMaybeIsOpenOf returns whether the menu of the closest anchor that encloses the context is open, and whether there is such an anchor. It creates a dependency, so the context rebuilds when the menu opens or closes.

Flutter: widgets/raw_menu_anchor.dart MenuController.maybeIsOpenOf

func ModalRouteCanPopOf

func ModalRouteCanPopOf(bc BuildContext) foundation.Opt[bool]

ModalRouteCanPopOf is whether the route that the context is in can pop; none without a route.

Flutter: widgets/routes.dart ModalRoute.canPopOf

func ModalRouteIsActiveOf

func ModalRouteIsActiveOf(bc BuildContext) foundation.Opt[bool]

ModalRouteIsActiveOf is whether the route that the context is in is active; none without a route.

Flutter: widgets/routes.dart ModalRoute.isActiveOf

func ModalRouteIsCurrentOf

func ModalRouteIsCurrentOf(bc BuildContext) foundation.Opt[bool]

ModalRouteIsCurrentOf is whether the route that the context is in is the current one; none without a route. The context is rebuilt when it changes.

Flutter: widgets/routes.dart ModalRoute.isCurrentOf

func ModalRouteIsFirstOf

func ModalRouteIsFirstOf(bc BuildContext) foundation.Opt[bool]

ModalRouteIsFirstOf is whether the route that the context is in is the first one; none without a route.

Flutter: widgets/routes.dart ModalRoute.isFirstOf

func ModalRouteOpaqueOf

func ModalRouteOpaqueOf(bc BuildContext) foundation.Opt[bool]

ModalRouteOpaqueOf is whether the route that the context is in is opaque; none without a route.

Flutter: widgets/routes.dart ModalRoute.opaqueOf

func ModalRoutePopDispositionOf

func ModalRoutePopDispositionOf(bc BuildContext) foundation.Opt[RoutePopDisposition]

ModalRoutePopDispositionOf is the pop disposition of the route that the context is in; none without a route.

Flutter: widgets/routes.dart ModalRoute.popDispositionOf

func NavigatorCanPop(bc BuildContext) bool

NavigatorCanPop is whether the navigator of the context can pop.

Flutter: widgets/navigator.dart Navigator.canPop

func NavigatorMaybePop(bc BuildContext, result ...any) bool

NavigatorMaybePop pops the top route of the navigator of the context, unless the route does not want to be popped; it reports whether the pop was handled.

Flutter: widgets/navigator.dart Navigator.maybePop

func NavigatorPop(bc BuildContext, result ...any)

NavigatorPop pops the top route of the navigator of the context; the optional result is passed to the channel that Push returned.

Flutter: widgets/navigator.dart Navigator.pop

func NavigatorPopAndPushNamed(bc BuildContext, routeName string, opts ...NavigatorPushNamedOpts) <-chan any

NavigatorPopAndPushNamed pops the current route and pushes the named one.

Flutter: widgets/navigator.dart Navigator.popAndPushNamed

func NavigatorPopUntil(bc BuildContext, predicate RoutePredicate)

NavigatorPopUntil pops routes until the predicate is true.

Flutter: widgets/navigator.dart Navigator.popUntil

func NavigatorPopUntilWithResult(bc BuildContext, predicate RoutePredicate, result any)

NavigatorPopUntilWithResult pops routes until the predicate is true, and the last one popped gets the result.

Flutter: widgets/navigator.dart Navigator.popUntilWithResult

func NavigatorPush(bc BuildContext, route Route) <-chan any

NavigatorPush pushes the route onto the navigator of the context; the channel gets the result of the route when it is popped.

Flutter: widgets/navigator.dart Navigator.push

func NavigatorPushAndRemoveUntil(bc BuildContext, newRoute Route, predicate RoutePredicate) <-chan any

NavigatorPushAndRemoveUntil pushes the route and removes the routes below it until the predicate is true.

Flutter: widgets/navigator.dart Navigator.pushAndRemoveUntil

func NavigatorPushNamed(bc BuildContext, routeName string, opts ...NavigatorPushNamedOpts) <-chan any

NavigatorPushNamed pushes the route that has the name onto the navigator of the context.

Flutter: widgets/navigator.dart Navigator.pushNamed

func NavigatorPushNamedAndRemoveUntil(bc BuildContext, newRouteName string, predicate RoutePredicate, opts ...NavigatorPushNamedOpts) <-chan any

NavigatorPushNamedAndRemoveUntil pushes the named route and removes the routes below it until the predicate is true.

Flutter: widgets/navigator.dart Navigator.pushNamedAndRemoveUntil

func NavigatorPushReplacement(bc BuildContext, newRoute Route, opts ...NavigatorPushReplacementOpts) <-chan any

NavigatorPushReplacement replaces the current route of the navigator of the context by pushing the new one.

Flutter: widgets/navigator.dart Navigator.pushReplacement

func NavigatorPushReplacementNamed(bc BuildContext, routeName string, opts ...NavigatorPushNamedOpts) <-chan any

NavigatorPushReplacementNamed replaces the current route by the named one.

Flutter: widgets/navigator.dart Navigator.pushReplacementNamed

func NavigatorRemoveRoute(bc BuildContext, route Route, result ...any)

NavigatorRemoveRoute removes the route without animating.

Flutter: widgets/navigator.dart Navigator.removeRoute

func NavigatorRemoveRouteBelow(bc BuildContext, anchorRoute Route, result ...any)

NavigatorRemoveRouteBelow removes the route below the anchor without animating.

Flutter: widgets/navigator.dart Navigator.removeRouteBelow

func NavigatorReplace(bc BuildContext, oldRoute, newRoute Route)

NavigatorReplace replaces the old route by the new one.

Flutter: widgets/navigator.dart Navigator.replace

func NavigatorReplaceRouteBelow(bc BuildContext, anchorRoute, newRoute Route)

NavigatorReplaceRouteBelow replaces the route below the anchor by the new one.

Flutter: widgets/navigator.dart Navigator.replaceRouteBelow

func NewBorderRadiusTween

NewBorderRadiusTween creates a tween between two border radii. A value that is none counts as zero when the other is some, as BorderRadius.lerp does with null; between two nones the value stays none.

Flutter: widgets/implicit_animations.dart BorderRadiusTween

func NewBorderTween

func NewBorderTween(begin, end foundation.Opt[painting.Border]) *animation.Tween[foundation.Opt[painting.Border]]

NewBorderTween creates a tween between two borders. A value that is none counts as no border when the other is some; between two nones the value stays none.

Flutter: widgets/implicit_animations.dart BorderTween

func NewBoxConstraintsTween

func NewBoxConstraintsTween(begin, end rendering.BoxConstraints) *animation.Tween[rendering.BoxConstraints]

NewBoxConstraintsTween creates a tween between two box constraints.

Flutter: widgets/implicit_animations.dart BoxConstraintsTween

func NewDecorationTween

func NewDecorationTween(begin, end painting.Decoration) *animation.Tween[painting.Decoration]

NewDecorationTween creates a tween between two decorations (either may be nil).

Flutter: widgets/implicit_animations.dart DecorationTween

func NewEdgeInsetsGeometryTween

func NewEdgeInsetsGeometryTween(begin, end painting.EdgeInsetsGeometry) *animation.Tween[painting.EdgeInsetsGeometry]

NewEdgeInsetsGeometryTween creates a tween between two EdgeInsetsGeometry values, which can be of different kinds (either may be nil).

Flutter: widgets/implicit_animations.dart EdgeInsetsGeometryTween

func NewEdgeInsetsTween

func NewEdgeInsetsTween(begin, end painting.EdgeInsets) *animation.Tween[painting.EdgeInsets]

NewEdgeInsetsTween creates a tween between two EdgeInsets.

Flutter: widgets/implicit_animations.dart EdgeInsetsTween

func NewMatrix4Tween

func NewMatrix4Tween(begin, end *ui.Matrix4) *animation.Tween[*ui.Matrix4]

NewMatrix4Tween creates a tween between two matrices: it interpolates the translation, the rotation (as a quaternion) and the scale they decompose to. Both matrices are needed; a nil one panics with the tag Matrix4TweenNull when the tween is used in debug builds.

Flutter: widgets/implicit_animations.dart Matrix4Tween

func NewRelativeRectTween

func NewRelativeRectTween(begin, end rendering.RelativeRect) *animation.Tween[rendering.RelativeRect]

NewRelativeRectTween creates a tween between two relative rectangles.

Flutter: widgets/transitions.dart RelativeRectTween

func NewShortcutMapProperty

func NewShortcutMapProperty(name string, value ShortcutMap, opts ...foundation.DiagnosticsPropertyOpts) *foundation.DiagnosticsProperty

NewShortcutMapProperty creates the property that describes a shortcut map as "{{Key A}: ActivateIntent#00000, ...}".

Flutter: widgets/shortcuts.dart ShortcutMapProperty

func NewTextStyleTween

func NewTextStyleTween(begin, end *painting.TextStyle) *animation.Tween[*painting.TextStyle]

NewTextStyleTween creates a tween between two text styles.

Flutter: widgets/implicit_animations.dart TextStyleTween

func PipelineOwnerOf

func PipelineOwnerOf(bc BuildContext) *rendering.PipelineOwner

PipelineOwnerOf is the pipeline owner that the render view of the closest View above the context uses; the root pipeline owner of the renderer binding when there is no View above.

Flutter: widgets/view.dart View.pipelineOwnerOf

func PlatformProvidedMenuItemHasMenu

func PlatformProvidedMenuItemHasMenu(menu PlatformProvidedMenuItemType) bool

PlatformProvidedMenuItemHasMenu says whether the platform that the app runs on provides the item: macOS provides every type, the other platforms none.

Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItem.hasMenu

func PointerDragAnchorStrategy

func PointerDragAnchorStrategy(draggable Widget, bc BuildContext, position ui.Offset) ui.Offset

PointerDragAnchorStrategy puts the top left of the feedback at the pointer.

Flutter: widgets/drag_target.dart pointerDragAnchorStrategy

func PopNavigatorRouterDelegatePopRoute

func PopNavigatorRouterDelegatePopRoute(navigatorKey *GlobalKey[*NavigatorState]) bool

PopNavigatorRouterDelegatePopRoute is the PopRoute of a router delegate that has a Navigator: it asks the navigator to pop, and returns false (let the platform handle it) when there is no navigator.

Deviation: Flutter's PopNavigatorRouterDelegateMixin is a mixin that reads the navigatorKey getter; a delegate calls this function with its key.

Flutter: widgets/router.dart PopNavigatorRouterDelegateMixin.popRoute

func PrecacheImage

func PrecacheImage(provider painting.ImageProvider, bc BuildContext, opts ...PrecacheImageOpts) <-chan struct{}

PrecacheImage prefetches an image into the image cache. The returned channel is closed when the image has loaded, or failed to load.

Flutter: widgets/image.dart precacheImage

func PrimaryScrollControllerShouldInherit

func PrimaryScrollControllerShouldInherit(bc BuildContext, scrollDirection painting.Axis) bool

PrimaryScrollControllerShouldInherit is whether a scroll view along the axis that does not have a controller uses the closest PrimaryScrollController above the context: on the platforms and along the axis it names.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.shouldInherit

func RawAutocompleteOnFieldSubmitted

func RawAutocompleteOnFieldSubmitted(key *GlobalKey[State])

RawAutocompleteOnFieldSubmitted notifies the RawAutocomplete with the key that the field was submitted. Use it when the field is built outside of the RawAutocomplete.

Flutter: widgets/autocomplete.dart RawAutocomplete.onFieldSubmitted

func RawTooltipDismissAll

func RawTooltipDismissAll(bc BuildContext) bool

RawTooltipDismissAll dismisses all the open tooltips of the app, and says whether there were any.

Flutter: widgets/raw_tooltip.dart RawTooltip.dismissAllToolTips

func ResolveColorValue

func ResolveColorValue(c ui.ColorValue, bc BuildContext) ui.Color

ResolveColorValue is the color that c has in the context: the resolved color of a ResolvableColor, the color of any other value, and the zero Color for nil.

Flutter: cupertino/colors.dart CupertinoDynamicColor.resolve

func RouterNavigate

func RouterNavigate(bc BuildContext, callback func())

RouterNavigate calls the callback, which changes the state of the app, and makes the router report the new route information as a navigation: the provider adds an entry to the history. The callback runs at once.

Flutter: widgets/router.dart Router.navigate

func RouterNeglect

func RouterNeglect(bc BuildContext, callback func())

RouterNeglect calls the callback, which changes the state of the app, and makes the router report the new route information as a replacement: the provider replaces the current entry of the history. The callback runs at once.

Flutter: widgets/router.dart Router.neglect

func RunApp

func RunApp(app Widget, opts ...RunAppOpts) error

RunApp runs the app: it opens the first window, shows the widget in it, and runs the event loop until the last window is closed or the app asks to exit. It must be called on the main goroutine (SPEC §8.4, §13). The widget is wrapped in a View for the window; use RunWidget to provide the View yourself. It is RunAppContext with context.Background().

The failures of the environment come back as tagged errors (SPEC §14.1): NoDisplay, BackendUnknown, the platform's and the renderer's.

Flutter: widgets/binding.dart runApp

func RunAppContext

func RunAppContext(ctx context.Context, app Widget, opts ...RunAppOpts) error

RunAppContext is RunApp that ends when ctx ends, so that a program can end its app from outside the widget tree, for example on a signal:

ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)

When ctx ends the run ends as WidgetsBinding.ExitApplication with AppExitTypeRequired ends it: the observers and OnExitRequested are not asked, the windows, the renderer and the display are closed, and the function returns nil, not ctx.Err(). A ctx that has already ended returns nil before the display is opened, so no window appears. ctx is also the parent of the context of the binding's work (image loading, fonts). Glutter installs no signal handlers. On the web a page cannot close itself, but the run ends and the canvas is removed (SPEC §13).

Deviation: Flutter's runApp has no context; the embedder ends the process (SPEC §12.10).

Flutter: widgets/binding.dart runApp

func RunWidget

func RunWidget(app Widget, opts ...RunAppOpts) error

RunWidget is RunApp that does not wrap the widget in a View: the widget must be, or contain, a View. It is RunWidgetContext with context.Background().

Flutter: widgets/binding.dart runWidget

func RunWidgetContext

func RunWidgetContext(ctx context.Context, app Widget, opts ...RunAppOpts) error

RunWidgetContext is RunAppContext that does not wrap the widget in a View: the widget must be, or contain, a View.

Deviation: Flutter's runWidget has no context; the embedder ends the process (SPEC §12.10).

Flutter: widgets/binding.dart runWidget

func ScrollActionGetDirectionalIncrement

func ScrollActionGetDirectionalIncrement(state *ScrollableState, intent ScrollIntent) float64

ScrollActionGetDirectionalIncrement is the signed number of pixels to scroll the scrollable by for the intent: positive in the direction of its axis. It is zero when the intent is on the other axis.

Flutter: widgets/scrollable_helpers.dart ScrollAction.getDirectionalIncrement

func ScrollableEnsureVisible

func ScrollableEnsureVisible(bc BuildContext, opts ...EnsureVisibleOpts) *scheduler.TickerFuture

ScrollableEnsureVisible scrolls the scrollables that contain the context's render object so that it is visible, starting with the closest and then the ones around it. The future completes when the animations have.

Flutter: widgets/scrollable.dart Scrollable.ensureVisible

func ScrollableRecommendDeferredLoadingForContext

func ScrollableRecommendDeferredLoadingForContext(bc BuildContext, opts ...ScrollableOfOpts) bool

ScrollableRecommendDeferredLoadingForContext is whether the content below the context should defer loading images because the closest Scrollable (along the axis, if there is one in the options) moves fast.

Flutter: widgets/scrollable.dart Scrollable.recommendDeferredLoadingForContext

func SelectableRegionSelectionStatusScopeMaybeOf

func SelectableRegionSelectionStatusScopeMaybeOf(bc BuildContext) foundation.ValueListenable[SelectableRegionSelectionStatus]

SelectableRegionSelectionStatusScopeMaybeOf is the notifier of the status of the closest SelectableRegion above the context, or nil if there is none. It creates a dependency on the closest scope.

Flutter: widgets/selectable_region.dart SelectableRegionSelectionStatusScope.maybeOf

func SelectionContainerMaybeOf

func SelectionContainerMaybeOf(bc BuildContext) rendering.SelectionRegistrar

SelectionContainerMaybeOf gets the SelectionRegistrar from the context, or nil if there is none or the selection is disabled.

Flutter: widgets/selection_container.dart SelectionContainer.maybeOf

func ShowGeneralDialog

func ShowGeneralDialog(bc BuildContext, pageBuilder RoutePageBuilder, opts ...ShowGeneralDialogOpts) <-chan any

ShowGeneralDialog displays a dialog above the current contents of the app. It returns a channel that gets the result when the dialog is popped. In debug builds it panics with the tag ShowGeneralDialogBarrierLabelMissing when the barrier is dismissible and has no label.

Flutter: widgets/routes.dart showGeneralDialog

func TextSelectionToolbarAnchorsSelectionRect

func TextSelectionToolbarAnchorsSelectionRect(renderBox rendering.Box, startGlyphHeight, endGlyphHeight float64,
	selectionEndpoints []rendering.TextSelectionPoint) ui.Rect

TextSelectionToolbarAnchorsSelectionRect returns the Rect covering the given selection in the given box, in global coordinates.

Flutter: widgets/text_selection_toolbar_anchors.dart TextSelectionToolbarAnchors.getSelectionRect

func TextSelectionToolbarLayoutDelegateCenterOn

func TextSelectionToolbarLayoutDelegateCenterOn(position, width, max float64) float64

TextSelectionToolbarLayoutDelegateCenterOn returns the distance from zero that centers width as closely as possible to position from zero while fitting between zero and max.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.centerOn

func TickerModeGetValuesNotifier

func TickerModeGetValuesNotifier(bc BuildContext) foundation.ValueListenable[TickerModeData]

TickerModeGetValuesNotifier is a ValueListenable of the ticker mode at the context. The context does not depend on it, so it can be used in InitState and Dispose; a context that is not mounted gets the fallback.

Flutter: widgets/ticker_provider.dart TickerMode.getValuesNotifier

func TreeSliverDefaultTreeRowExtentBuilder

func TreeSliverDefaultTreeRowExtentBuilder[T any](*TreeSliverNode[T], rendering.SliverLayoutDimensions) float64

TreeSliverDefaultTreeRowExtentBuilder gives every row a height of 40.

Flutter: widgets/sliver_tree.dart TreeSliver.defaultTreeRowExtentBuilder

func TweenOf

func TweenOf[T any](t *animation.Tween[T], anim animation.Animation[float64]) foundation.Opt[T]

TweenOf evaluates the tween (if there is one) at the animation's value.

Flutter: widgets/implicit_animations.dart (tween?.evaluate(animation))

func ViewOf

func ViewOf(bc BuildContext) *ui.View

ViewOf is MaybeViewOf that panics with the tag ViewOfWithoutView in debug builds, and in release builds too, when there is no View above the context.

Flutter: widgets/view.dart View.of

func ViewportElementOnNotification

func ViewportElementOnNotification(notification Notification) bool

ViewportElementOnNotification is what the element of a viewport does with a notification that bubbles through it: it counts it if it is a ViewportNotification, and returns false so that the notification keeps bubbling. An element that implements NotifiableElement calls it from OnNotification.

Flutter: widgets/scroll_notification.dart ViewportElementMixin.onNotification

func ViewportGetDefaultCrossAxisDirection

func ViewportGetDefaultCrossAxisDirection(bc BuildContext, axisDirection painting.AxisDirection) painting.AxisDirection

ViewportGetDefaultCrossAxisDirection is the cross axis direction of a viewport with the axis direction: the text direction for a vertical axis, down for a horizontal one. It panics with the tag DirectionalityMissing in debug builds when it needs the text direction and there is no Directionality.

Flutter: widgets/viewport.dart Viewport.getDefaultCrossAxisDirection

func VisibilityOf

func VisibilityOf(bc BuildContext) bool

VisibilityOf is whether the closest Visibility or IndexedStack above the context shows it: false if any of the Visibility widgets above hides it. The context depends on all of them.

Flutter: widgets/indexed_stack.dart Visibility.of

func VisitTween

func VisitTween[T any](v *TweenVisitor, slot **animation.Tween[T], target foundation.Opt[T], equal func(a, b T) bool,
	construct func(value T) *animation.Tween[T])

VisitTween visits one tween of an implicitly animated state. The slot is the state's field for the tween; the target is the value the widget has now (none when the widget doesn't set it, which makes the slot nil); construct makes a tween that starts and ends at a value; equal compares two values.

Flutter: widgets/implicit_animations.dart TweenVisitor

func WidgetStateResolveAs

func WidgetStateResolveAs[T any](value any, states WidgetStates) T

WidgetStateResolveAs resolves the value for the states: when the value is a WidgetStateProperty[T] it is resolved, otherwise it must be a T and is returned as it is (Dart's WidgetStateProperty.resolveAs, where a Color can also be a WidgetStateColor). A value that is neither panics with the tag WidgetStateResolveAsType.

Flutter: widgets/widget_state.dart WidgetStateProperty.resolveAs

func WidgetToStringShort

func WidgetToStringShort(w Widget) string

WidgetToStringShort describes a widget in a few words: its type, followed by its key if it has one ("Foo-[<'k'>]"). Unlike other objects it has no hash.

Deviation: it is a function, because the embedded base struct of a widget cannot see the outer type (SPEC §12.10).

Flutter: widgets/framework.dart Widget.toStringShort

func WindowScopeContentSizeOf

func WindowScopeContentSizeOf(bc BuildContext) ui.Size

WindowScopeContentSizeOf is the content size of the window that hosts the context, in logical pixels; the context depends on it only.

Flutter: widgets/_window.dart WindowScope.contentSizeOf

func WindowScopeIsActivatedOf

func WindowScopeIsActivatedOf(bc BuildContext) bool

WindowScopeIsActivatedOf is whether the window that hosts the context is activated.

Flutter: widgets/_window.dart WindowScope.isActivatedOf

func WindowScopeIsFullscreenOf

func WindowScopeIsFullscreenOf(bc BuildContext) bool

WindowScopeIsFullscreenOf is whether the window that hosts the context is fullscreen.

Flutter: widgets/_window.dart WindowScope.isFullscreenOf

func WindowScopeIsMaximizedOf

func WindowScopeIsMaximizedOf(bc BuildContext) bool

WindowScopeIsMaximizedOf is whether the window that hosts the context is maximized.

Flutter: widgets/_window.dart WindowScope.isMaximizedOf

func WindowScopeIsMinimizedOf

func WindowScopeIsMinimizedOf(bc BuildContext) bool

WindowScopeIsMinimizedOf is whether the window that hosts the context is minimized.

Flutter: widgets/_window.dart WindowScope.isMinimizedOf

func WindowScopeMaybeContentSizeOf

func WindowScopeMaybeContentSizeOf(bc BuildContext) (ui.Size, bool)

WindowScopeMaybeContentSizeOf is WindowScopeContentSizeOf that returns false when there is no scope.

Flutter: widgets/_window.dart WindowScope.maybeContentSizeOf

func WindowScopeMaybeIsActivatedOf

func WindowScopeMaybeIsActivatedOf(bc BuildContext) (activated, ok bool)

WindowScopeMaybeIsActivatedOf is WindowScopeIsActivatedOf that returns false as its second result when there is no scope.

Flutter: widgets/_window.dart WindowScope.maybeIsActivatedOf

func WindowScopeMaybeIsFullscreenOf

func WindowScopeMaybeIsFullscreenOf(bc BuildContext) (fullscreen, ok bool)

WindowScopeMaybeIsFullscreenOf is WindowScopeIsFullscreenOf that returns false as its second result when there is no scope.

Flutter: widgets/_window.dart WindowScope.maybeIsFullscreenOf

func WindowScopeMaybeIsMaximizedOf

func WindowScopeMaybeIsMaximizedOf(bc BuildContext) (maximized, ok bool)

WindowScopeMaybeIsMaximizedOf is WindowScopeIsMaximizedOf that returns false as its second result when there is no scope.

Flutter: widgets/_window.dart WindowScope.maybeIsMaximizedOf

func WindowScopeMaybeIsMinimizedOf

func WindowScopeMaybeIsMinimizedOf(bc BuildContext) (minimized, ok bool)

WindowScopeMaybeIsMinimizedOf is WindowScopeIsMinimizedOf that returns false as its second result when there is no scope.

Flutter: widgets/_window.dart WindowScope.maybeIsMinimizedOf

func WindowScopeMaybeTitleOf

func WindowScopeMaybeTitleOf(bc BuildContext) (string, bool)

WindowScopeMaybeTitleOf is WindowScopeTitleOf that returns false when there is no scope.

Flutter: widgets/_window.dart WindowScope.maybeTitleOf

func WindowScopeTitleOf

func WindowScopeTitleOf(bc BuildContext) string

WindowScopeTitleOf is the title of the window that hosts the context.

Flutter: widgets/_window.dart WindowScope.titleOf

Types

type AbsorbPointer

type AbsorbPointer struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

AbsorbPointer absorbs pointers during hit testing.

Flutter: widgets/basic.dart AbsorbPointer

func NewAbsorbPointer

func NewAbsorbPointer(child Widget, opts ...AbsorbPointerOpts) *AbsorbPointer

NewAbsorbPointer creates the widget.

Flutter: widgets/basic.dart AbsorbPointer.new

func (*AbsorbPointer) Absorbing

func (w *AbsorbPointer) Absorbing() foundation.Opt[bool]

Absorbing is whether this widget absorbs pointers during hit testing; the default is true.

Flutter: widgets/basic.dart AbsorbPointer.absorbing

func (*AbsorbPointer) CreateRenderObject

func (w *AbsorbPointer) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart AbsorbPointer.createRenderObject

func (*AbsorbPointer) UpdateRenderObject

func (w *AbsorbPointer) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart AbsorbPointer.updateRenderObject

type AbsorbPointerOpts

type AbsorbPointerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Absorbing is whether this widget absorbs pointers during hit testing; the default is true.
	Absorbing foundation.Opt[bool]
}

AbsorbPointerOpts are the optional parameters of NewAbsorbPointer.

Flutter: widgets/basic.dart AbsorbPointer.new

type Action

type Action interface {
	// IntentType is the type of the intents the action handles. An interface type
	// (such as the Intent interface) accepts every intent that implements it.
	//
	// Flutter: widgets/actions.dart Action.intentType
	IntentType() reflect.Type
	// IsEnabled is whether the action is enabled for the intent: it can be
	// invoked. The default is IsActionEnabled.
	//
	// Flutter: widgets/actions.dart Action.isEnabled
	IsEnabled(intent Intent) bool
	// IsActionEnabled is whether the action is enabled for every intent.
	//
	// Flutter: widgets/actions.dart Action.isActionEnabled
	IsActionEnabled() bool
	// ConsumesKey is whether the key event that triggered the intent is consumed:
	// handled by the action and not passed on. The default is true.
	//
	// Flutter: widgets/actions.dart Action.consumesKey
	ConsumesKey(intent Intent) bool
	// ToKeyEventResult is what a key event that triggered the intent results in,
	// given the value that Invoke returned. The default is Handled when ConsumesKey,
	// else SkipRemainingHandlers.
	//
	// Flutter: widgets/actions.dart Action.toKeyEventResult
	ToKeyEventResult(intent Intent, invokeResult any) KeyEventResult
	// Invoke carries out the action and returns its result, which is nil for most
	// actions.
	//
	// Flutter: widgets/actions.dart Action.invoke
	Invoke(intent Intent) any
	// AddActionListener adds a function that is called when the action notifies
	// that its enabled state changed.
	//
	// Flutter: widgets/actions.dart Action.addActionListener
	AddActionListener(listener ActionListenerCallback) ActionListenerHandle
	// RemoveActionListener removes a listener.
	//
	// Flutter: widgets/actions.dart Action.removeActionListener
	RemoveActionListener(handle ActionListenerHandle)
	// CallingAction is the action that this one overrides while it is invoked as
	// an override, or nil.
	//
	// Flutter: widgets/actions.dart Action.callingAction
	CallingAction() Action
	// contains filtered or unexported methods
}

Action is a handler of an Intent: a discrete piece of work that the user asks for. An action is found for an intent by the Actions widgets above a context, and Shortcuts invoke it for a key.

Implement it by embedding ActionBase (or ContextActionBase), setting the base up with InitActionBase, and giving the methods that differ from the defaults: IntentType, Invoke (or InvokeWithContext), and optionally IsActionEnabled, IsEnabled, ConsumesKey and ToKeyEventResult. Generic code asks the intent for its concrete type with a type assertion.

Deviation: Flutter's Action<T extends Intent> is a generic abstract class; the type argument is the value of IntentType (SPEC §12.10).

Flutter: widgets/actions.dart Action

func ActionsFind

func ActionsFind[T Intent](bc BuildContext) Action

ActionsFind is the action bound to the intent type T above the context, and the context depends on the Actions that has it. In debug builds it panics with the tag ActionNotFound when there is none.

Flutter: widgets/actions.dart Actions.find

func ActionsFindIntent

func ActionsFindIntent(bc BuildContext, intent Intent) Action

ActionsFindIntent is ActionsFind for the type of the intent.

Flutter: widgets/actions.dart Actions.find

func ActionsMaybeFind

func ActionsMaybeFind[T Intent](bc BuildContext) Action

ActionsMaybeFind is ActionsFind that returns nil instead of panicking.

Flutter: widgets/actions.dart Actions.maybeFind

func ActionsMaybeFindIntent

func ActionsMaybeFindIntent(bc BuildContext, intent Intent) Action

ActionsMaybeFindIntent is ActionsMaybeFind for the type of the intent.

Flutter: widgets/actions.dart Actions.maybeFind

func NewDoNothingActionFor

func NewDoNothingActionFor[T Intent](opts ...DoNothingActionOpts) Action

NewDoNothingActionFor creates a DoNothingAction for an intent type.

Flutter: widgets/actions.dart DoNothingAction

func NewOverridableAction

func NewOverridableAction(defaultAction Action, bc BuildContext) Action

NewOverridableAction creates an action that does what the default action does unless an Actions widget above the lookup context has an action for the same intent: then that action, the override, does its work, and can call the default through its CallingAction. Widgets use it for the actions that an app can replace.

Flutter: widgets/actions.dart Action.overridable

type ActionBase

type ActionBase struct {
	// contains filtered or unexported fields
}

ActionBase implements the parts of Action that do not depend on the intent. Embed it, and call InitActionBase with the outer value.

Flutter: widgets/actions.dart Action

func (*ActionBase) AddActionListener

func (b *ActionBase) AddActionListener(listener ActionListenerCallback) ActionListenerHandle

AddActionListener adds a listener of the action's changes.

Flutter: widgets/actions.dart Action.addActionListener

func (*ActionBase) CallingAction

func (b *ActionBase) CallingAction() Action

CallingAction is the action that this one overrides while it runs as an override.

Flutter: widgets/actions.dart Action.callingAction

func (*ActionBase) ConsumesKey

func (b *ActionBase) ConsumesKey(Intent) bool

ConsumesKey is true.

Flutter: widgets/actions.dart Action.consumesKey

func (*ActionBase) DebugFillProperties

func (b *ActionBase) DebugFillProperties(*foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds nothing.

Flutter: widgets/actions.dart Action

func (*ActionBase) IntentType

func (b *ActionBase) IntentType() reflect.Type

IntentType accepts every intent; actions for one kind of intent override it.

Flutter: widgets/actions.dart Action.intentType

func (*ActionBase) Invoke

func (b *ActionBase) Invoke(Intent) any

Invoke panics: an action must implement it.

Flutter: widgets/actions.dart Action.invoke

func (*ActionBase) IsActionEnabled

func (b *ActionBase) IsActionEnabled() bool

IsActionEnabled is true.

Flutter: widgets/actions.dart Action.isActionEnabled

func (*ActionBase) IsEnabled

func (b *ActionBase) IsEnabled(Intent) bool

IsEnabled is IsActionEnabled.

Flutter: widgets/actions.dart Action.isEnabled

func (*ActionBase) NotifyActionListeners

func (b *ActionBase) NotifyActionListeners()

NotifyActionListeners tells the listeners that the action changed. A listener that panics does not stop the others.

Flutter: widgets/actions.dart Action.notifyActionListeners

func (*ActionBase) RemoveActionListener

func (b *ActionBase) RemoveActionListener(handle ActionListenerHandle)

RemoveActionListener removes a listener.

Flutter: widgets/actions.dart Action.removeActionListener

func (*ActionBase) SetErrorReporter

func (b *ActionBase) SetErrorReporter(r foundation.ErrorReporter)

SetErrorReporter sets the function that receives the panics of the listeners. Without one, the first panic goes on after the last listener was called.

Flutter: no counterpart (FlutterError.reportError is global)

func (*ActionBase) ToKeyEventResult

func (b *ActionBase) ToKeyEventResult(intent Intent, _ any) KeyEventResult

ToKeyEventResult is Handled when the action consumes the key, else SkipRemainingHandlers.

Flutter: widgets/actions.dart Action.toKeyEventResult

type ActionDispatcher

type ActionDispatcher interface {
	// InvokeAction invokes the action for the intent; the action must be enabled.
	// A nil context means the context of the primary focus.
	//
	// Flutter: widgets/actions.dart ActionDispatcher.invokeAction
	InvokeAction(action Action, intent Intent, bc BuildContext) any
	// InvokeActionIfEnabled invokes the action if it is enabled, and says whether
	// it was and what it returned.
	//
	// Flutter: widgets/actions.dart ActionDispatcher.invokeActionIfEnabled
	InvokeActionIfEnabled(action Action, intent Intent, bc BuildContext) (bool, any)
}

ActionDispatcher invokes actions: it is the one place that runs them, so that it can be replaced to log or intercept. Actions widgets have one (the default, when none is given).

Flutter: widgets/actions.dart ActionDispatcher

func ActionsOf

func ActionsOf(bc BuildContext) ActionDispatcher

ActionsOf is the dispatcher of the closest Actions above the context that has one, and the context depends on the closest Actions. Without a dispatcher it is the default one.

Flutter: widgets/actions.dart Actions.of

type ActionDispatcherBase

type ActionDispatcherBase struct {
	// contains filtered or unexported fields
}

ActionDispatcherBase is the default ActionDispatcher. Embed it to override a method and call the embedded one for the rest.

Flutter: widgets/actions.dart ActionDispatcher

func NewActionDispatcher

func NewActionDispatcher(focusManager ...*FocusManager) *ActionDispatcherBase

NewActionDispatcher creates the default dispatcher. The focus manager gives it the primary focus, whose context an action is invoked with when none is given; without one, such an action gets no context.

Flutter: widgets/actions.dart ActionDispatcher.new

func (*ActionDispatcherBase) DebugFillProperties

DebugFillProperties adds nothing.

Flutter: widgets/actions.dart ActionDispatcher

func (*ActionDispatcherBase) InvokeAction

func (d *ActionDispatcherBase) InvokeAction(action Action, intent Intent, bc BuildContext) any

InvokeAction invokes the action. In debug builds it panics with the tag ActionNotEnabled when the action is not enabled.

Flutter: widgets/actions.dart ActionDispatcher.invokeAction

func (*ActionDispatcherBase) InvokeActionIfEnabled

func (d *ActionDispatcherBase) InvokeActionIfEnabled(action Action, intent Intent, bc BuildContext) (bool, any)

InvokeActionIfEnabled invokes the action if it is enabled.

Flutter: widgets/actions.dart ActionDispatcher.invokeActionIfEnabled

type ActionListener

type ActionListener struct {
	StatefulWidget
	// contains filtered or unexported fields
}

ActionListener is a widget that listens to an action and calls a function when the action notifies; it removes the listener when it goes away.

Flutter: widgets/actions.dart ActionListener

func NewActionListener

func NewActionListener(listener ActionListenerCallback, action Action, child Widget, opts ...WidgetOpts) *ActionListener

NewActionListener creates the widget.

Flutter: widgets/actions.dart ActionListener.new

func (*ActionListener) Action

func (w *ActionListener) Action() Action

Action is the action that is listened to.

Flutter: widgets/actions.dart ActionListener.action

func (*ActionListener) Child

func (w *ActionListener) Child() Widget

Child is the widget below.

Flutter: widgets/actions.dart ActionListener.child

func (*ActionListener) CreateState

func (w *ActionListener) CreateState() State

CreateState creates the state.

Flutter: widgets/actions.dart ActionListener.createState

func (*ActionListener) Listener

func (w *ActionListener) Listener() ActionListenerCallback

Listener is the function that is called when the action notifies.

Flutter: widgets/actions.dart ActionListener.listener

type ActionListenerCallback

type ActionListenerCallback func(action Action)

ActionListenerCallback is the type of a function that listens to an action.

Flutter: widgets/actions.dart ActionListenerCallback

type ActionListenerHandle

type ActionListenerHandle int

ActionListenerHandle identifies a listener added to an action, to remove it.

Flutter: no counterpart (Go functions are not comparable)

type ActionMap

type ActionMap map[reflect.Type]Action

ActionMap maps the type of an intent to the action that handles it, like Flutter's Map<Type, Action<Intent>>. Make the keys with IntentTypeOf.

Flutter: widgets/actions.dart Actions.actions

func WidgetsAppDefaultActions

func WidgetsAppDefaultActions() ActionMap

WidgetsAppDefaultActions returns the actions that WidgetsApp uses when it is not given any. Every call makes new actions, so apps can change the map.

Deviation: a function that returns a new map, where Flutter has a static mutable map (SPEC §12.10).

Flutter: widgets/app.dart WidgetsApp.defaultActions

type Actions

type Actions struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Actions is a widget that establishes a map of intent types to actions for its descendants. Use ActionsInvoke and the other functions to find an action for an intent and run it.

Flutter: widgets/actions.dart Actions

func NewActions

func NewActions(actions ActionMap, child Widget, opts ...ActionsOpts) *Actions

NewActions creates a widget that maps intent types to actions.

Flutter: widgets/actions.dart Actions.new

func (*Actions) Actions

func (w *Actions) Actions() ActionMap

Actions is the map of intent types to actions.

Flutter: widgets/actions.dart Actions.actions

func (*Actions) Child

func (w *Actions) Child() Widget

Child is the widget below.

Flutter: widgets/actions.dart Actions.child

func (*Actions) CreateState

func (w *Actions) CreateState() State

CreateState creates the state.

Flutter: widgets/actions.dart Actions.createState

func (*Actions) DebugFillProperties

func (w *Actions) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the dispatcher and the actions.

Flutter: widgets/actions.dart Actions.debugFillProperties

func (*Actions) Dispatcher

func (w *Actions) Dispatcher() ActionDispatcher

Dispatcher is the dispatcher of the widget, or nil.

Flutter: widgets/actions.dart Actions.dispatcher

type ActionsOpts

type ActionsOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Dispatcher invokes the actions; the default is the one of the closest Actions
	// above that has one, else the default dispatcher.
	Dispatcher ActionDispatcher
}

ActionsOpts are the optional parameters of NewActions.

Flutter: widgets/actions.dart Actions.new

type ActivateAction

type ActivateAction struct{ ActionBase }

ActivateAction is an action for ActivateIntent; embed it in the action of a control.

Flutter: widgets/actions.dart ActivateAction

func (*ActivateAction) IntentType

func (a *ActivateAction) IntentType() reflect.Type

IntentType is ActivateIntent.

Flutter: widgets/actions.dart Action.intentType

type ActivateIntent

type ActivateIntent struct{ IntentBase }

ActivateIntent is an intent that activates the focused control.

Flutter: widgets/actions.dart ActivateIntent

type Align

type Align struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

Align aligns its child within itself and optionally sizes itself based on the child's size.

Flutter: widgets/basic.dart Align

func NewAlign

func NewAlign(child Widget, opts ...AlignOpts) *Align

NewAlign creates the widget.

Flutter: widgets/basic.dart Align.new

func (*Align) Alignment

func (w *Align) Alignment() painting.AlignmentGeometry

Alignment is how to align the child; the default is Alignment.center.

Flutter: widgets/basic.dart Align.alignment

func (*Align) CreateRenderObject

func (w *Align) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Align.createRenderObject

func (*Align) HeightFactor

func (w *Align) HeightFactor() foundation.Opt[float64]

HeightFactor sets its height to the child's height times this factor when it is given.

Flutter: widgets/basic.dart Align.heightFactor

func (*Align) UpdateRenderObject

func (w *Align) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Align.updateRenderObject

func (*Align) WidthFactor

func (w *Align) WidthFactor() foundation.Opt[float64]

WidthFactor sets its width to the child's width times this factor when it is given.

Flutter: widgets/basic.dart Align.widthFactor

type AlignOpts

type AlignOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment is how to align the child; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
	// WidthFactor sets its width to the child's width times this factor when it is given.
	WidthFactor foundation.Opt[float64]
	// HeightFactor sets its height to the child's height times this factor when it is given.
	HeightFactor foundation.Opt[float64]
}

AlignOpts are the optional parameters of NewAlign.

Flutter: widgets/basic.dart Align.new

type AlignTransition

type AlignTransition struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

AlignTransition animates the alignment of a child.

Flutter: widgets/transitions.dart AlignTransition

func NewAlignTransition

func NewAlignTransition(alignment animation.Animation[painting.AlignmentGeometry], child Widget, opts ...AlignTransitionOpts) *AlignTransition

NewAlignTransition creates the widget.

Flutter: widgets/transitions.dart AlignTransition.new

func (*AlignTransition) Alignment

Alignment is the animation of the alignment.

Flutter: widgets/transitions.dart AlignTransition.alignment

func (*AlignTransition) Build

Build aligns the child by the current alignment.

Flutter: widgets/transitions.dart AlignTransition.build

func (*AlignTransition) Child

func (w *AlignTransition) Child() Widget

Child is the widget below this one.

Flutter: widgets/transitions.dart AlignTransition.child

func (*AlignTransition) HeightFactor

func (w *AlignTransition) HeightFactor() foundation.Opt[float64]

HeightFactor is the factor of the child's height.

Flutter: widgets/transitions.dart AlignTransition.heightFactor

func (*AlignTransition) WidthFactor

func (w *AlignTransition) WidthFactor() foundation.Opt[float64]

WidthFactor is the factor of the child's width.

Flutter: widgets/transitions.dart AlignTransition.widthFactor

type AlignTransitionOpts

type AlignTransitionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// WidthFactor, if given, sizes the width as a multiple of the child's.
	WidthFactor foundation.Opt[float64]
	// HeightFactor, if given, sizes the height as a multiple of the child's.
	HeightFactor foundation.Opt[float64]
}

AlignTransitionOpts are the optional parameters of NewAlignTransition.

Flutter: widgets/transitions.dart AlignTransition.new

type AlwaysScrollableScrollPhysics

type AlwaysScrollableScrollPhysics struct {
	ScrollPhysicsBase
}

AlwaysScrollableScrollPhysics accepts user scrolling even when the content is smaller than the viewport.

Flutter: widgets/scroll_physics.dart AlwaysScrollableScrollPhysics

func NewAlwaysScrollableScrollPhysics

func NewAlwaysScrollableScrollPhysics(parent ScrollPhysics) *AlwaysScrollableScrollPhysics

NewAlwaysScrollableScrollPhysics creates the physics with the parent (nil for none).

Flutter: widgets/scroll_physics.dart AlwaysScrollableScrollPhysics.new

func (*AlwaysScrollableScrollPhysics) ApplyTo

ApplyTo returns a copy on top of the ancestor.

Flutter: widgets/scroll_physics.dart AlwaysScrollableScrollPhysics.applyTo

func (*AlwaysScrollableScrollPhysics) ShouldAcceptUserOffset

func (p *AlwaysScrollableScrollPhysics) ShouldAcceptUserOffset(ScrollMetrics) bool

ShouldAcceptUserOffset is always true.

Flutter: widgets/scroll_physics.dart AlwaysScrollableScrollPhysics.shouldAcceptUserOffset

type AndroidOverscrollIndicator

type AndroidOverscrollIndicator int

AndroidOverscrollIndicator is the types of overscroll indicators supported by TargetPlatform.android.

Flutter: widgets/scroll_configuration.dart AndroidOverscrollIndicator

const (
	// AndroidOverscrollIndicatorUnspecified is the zero value: the default of
	// the context that uses it.
	//
	// Flutter: no counterpart
	AndroidOverscrollIndicatorUnspecified AndroidOverscrollIndicator = iota
	// AndroidOverscrollIndicatorStretch utilizes a StretchingOverscrollIndicator,
	// which transforms the contents of a ScrollView when overscrolled.
	//
	// Flutter: widgets/scroll_configuration.dart AndroidOverscrollIndicator.stretch
	AndroidOverscrollIndicatorStretch
	// AndroidOverscrollIndicatorGlow utilizes a GlowingOverscrollIndicator,
	// painting a glowing semi circle on top of the ScrollView in response to
	// overscrolling.
	//
	// Flutter: widgets/scroll_configuration.dart AndroidOverscrollIndicator.glow
	AndroidOverscrollIndicatorGlow
)

func (AndroidOverscrollIndicator) String

String is the name with the enum, such as "AndroidOverscrollIndicator.stretch".

Flutter: widgets/scroll_configuration.dart AndroidOverscrollIndicator

type AnimatedAlign

type AnimatedAlign struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedAlign is the animated version of Align: it animates the alignment (and the size factors) when they change.

Flutter: widgets/implicit_animations.dart AnimatedAlign

func NewAnimatedAlign

func NewAnimatedAlign(alignment painting.AlignmentGeometry, duration time.Duration, child Widget, opts ...AnimatedAlignOpts) *AnimatedAlign

NewAnimatedAlign creates the widget. In debug builds it panics with the tag AlignFactorNegative when a factor is negative.

Flutter: widgets/implicit_animations.dart AnimatedAlign.new

func (*AnimatedAlign) Alignment

func (w *AnimatedAlign) Alignment() painting.AlignmentGeometry

Alignment is how to align the child.

Flutter: widgets/implicit_animations.dart AnimatedAlign.alignment

func (*AnimatedAlign) Child

func (w *AnimatedAlign) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedAlign.child

func (*AnimatedAlign) CreateState

func (w *AnimatedAlign) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedAlign.createState

func (*AnimatedAlign) HeightFactor

func (w *AnimatedAlign) HeightFactor() foundation.Opt[float64]

HeightFactor is the factor of the child's height.

Flutter: widgets/implicit_animations.dart AnimatedAlign.heightFactor

func (*AnimatedAlign) WidthFactor

func (w *AnimatedAlign) WidthFactor() foundation.Opt[float64]

WidthFactor is the factor of the child's width.

Flutter: widgets/implicit_animations.dart AnimatedAlign.widthFactor

type AnimatedAlignOpts

type AnimatedAlignOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// HeightFactor sets the height to the child's height times this factor.
	HeightFactor foundation.Opt[float64]
	// WidthFactor sets the width to the child's width times this factor.
	WidthFactor foundation.Opt[float64]
}

AnimatedAlignOpts are the optional parameters of NewAnimatedAlign.

Flutter: widgets/implicit_animations.dart AnimatedAlign.new

type AnimatedBuilder

type AnimatedBuilder struct{ ListenableBuilder }

AnimatedBuilder is a general-purpose widget for building animations: a ListenableBuilder that listens to an animation.

Flutter: widgets/transitions.dart AnimatedBuilder

func NewAnimatedBuilder

func NewAnimatedBuilder(animation foundation.Listenable, builder TransitionBuilder, child Widget, opts ...AnimatedBuilderOpts) *AnimatedBuilder

NewAnimatedBuilder creates a widget that builds again each time the animation (or any listenable) notifies.

Flutter: widgets/transitions.dart AnimatedBuilder.new

func (*AnimatedBuilder) Animation

func (w *AnimatedBuilder) Animation() foundation.Listenable

Animation is the animation (or listenable) that the widget builds with.

Flutter: widgets/transitions.dart AnimatedBuilder.animation

type AnimatedBuilderOpts

type AnimatedBuilderOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

AnimatedBuilderOpts are the optional parameters of NewAnimatedBuilder.

Flutter: widgets/transitions.dart AnimatedBuilder.new

type AnimatedContainer

type AnimatedContainer struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedContainer is an animated version of Container that gradually changes its values over a period of time: when it is rebuilt with a new alignment, padding, decoration, constraints, margin or transform, it animates from the old value to the new one.

Flutter: widgets/implicit_animations.dart AnimatedContainer

func NewAnimatedContainer

func NewAnimatedContainer(duration time.Duration, child Widget, opts ...AnimatedContainerOpts) *AnimatedContainer

NewAnimatedContainer creates the widget. In debug builds it panics with the tags of NewContainer for a negative margin or padding, a color together with a decoration, and an invalid decoration or constraints.

Flutter: widgets/implicit_animations.dart AnimatedContainer.new

func (*AnimatedContainer) Alignment

Alignment is how the child is aligned within the container.

Flutter: widgets/implicit_animations.dart AnimatedContainer.alignment

func (*AnimatedContainer) Child

func (w *AnimatedContainer) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedContainer.child

func (*AnimatedContainer) ClipBehavior

func (w *AnimatedContainer) ClipBehavior() ui.Clip

ClipBehavior is whether the contents are clipped to the decoration's shape.

Flutter: widgets/implicit_animations.dart AnimatedContainer.clipBehavior

func (*AnimatedContainer) Constraints

Constraints are the additional constraints to apply to the child.

Flutter: widgets/implicit_animations.dart AnimatedContainer.constraints

func (*AnimatedContainer) CreateState

func (w *AnimatedContainer) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedContainer.createState

func (*AnimatedContainer) Decoration

func (w *AnimatedContainer) Decoration() painting.Decoration

Decoration is the decoration to paint behind the child.

Flutter: widgets/implicit_animations.dart AnimatedContainer.decoration

func (*AnimatedContainer) ForegroundDecoration

func (w *AnimatedContainer) ForegroundDecoration() painting.Decoration

ForegroundDecoration is the decoration to paint in front of the child.

Flutter: widgets/implicit_animations.dart AnimatedContainer.foregroundDecoration

func (*AnimatedContainer) Margin

Margin is the empty space to surround the decoration and the child.

Flutter: widgets/implicit_animations.dart AnimatedContainer.margin

func (*AnimatedContainer) Padding

Padding is the empty space inside the decoration.

Flutter: widgets/implicit_animations.dart AnimatedContainer.padding

func (*AnimatedContainer) Transform

func (w *AnimatedContainer) Transform() *ui.Matrix4

Transform is the transformation matrix to apply before painting the container.

Flutter: widgets/implicit_animations.dart AnimatedContainer.transform

func (*AnimatedContainer) TransformAlignment

func (w *AnimatedContainer) TransformAlignment() painting.AlignmentGeometry

TransformAlignment is the alignment of the origin of the transform.

Flutter: widgets/implicit_animations.dart AnimatedContainer.transformAlignment

type AnimatedContainerOpts

type AnimatedContainerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animations; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// Alignment aligns the child within the container.
	Alignment painting.AlignmentGeometry
	// Padding is the empty space to inscribe inside the decoration.
	Padding painting.EdgeInsetsGeometry
	// Color is the background color; it is a shorthand for a BoxDecoration with
	// the color, so it cannot be given together with Decoration.
	Color foundation.Opt[ui.Color]
	// Decoration is the decoration to paint behind the child.
	Decoration painting.Decoration
	// ForegroundDecoration is the decoration to paint in front of the child.
	ForegroundDecoration painting.Decoration
	// Width is a tight width for the container, merged into Constraints.
	Width foundation.Opt[float64]
	// Height is a tight height for the container, merged into Constraints.
	Height foundation.Opt[float64]
	// Constraints are additional constraints to apply to the child.
	Constraints foundation.Opt[rendering.BoxConstraints]
	// Margin is the empty space to surround the decoration and the child.
	Margin painting.EdgeInsetsGeometry
	// Transform is the transformation matrix to apply before painting the
	// container.
	Transform *ui.Matrix4
	// TransformAlignment is the alignment of the origin of the transform.
	TransformAlignment painting.AlignmentGeometry
	// ClipBehavior is whether to clip the contents to the decoration's shape;
	// the default is ClipNone.
	ClipBehavior ui.Clip
}

AnimatedContainerOpts are the optional parameters of NewAnimatedContainer.

Flutter: widgets/implicit_animations.dart AnimatedContainer.new

type AnimatedCrossFade

type AnimatedCrossFade struct {
	StatefulWidget
	// contains filtered or unexported fields
}

AnimatedCrossFade is a widget that cross-fades between two given children and animates itself between their sizes.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade

func NewAnimatedCrossFade

func NewAnimatedCrossFade(firstChild, secondChild Widget, crossFadeState CrossFadeState, duration time.Duration, opts ...AnimatedCrossFadeOpts) *AnimatedCrossFade

NewAnimatedCrossFade creates the widget.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.new

func (*AnimatedCrossFade) Alignment

Alignment is how the children are aligned while the size animates.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.alignment

func (*AnimatedCrossFade) ClipBehavior

func (w *AnimatedCrossFade) ClipBehavior() ui.Clip

ClipBehavior is how the children are clipped.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.clipBehavior

func (*AnimatedCrossFade) CreateState

func (w *AnimatedCrossFade) CreateState() State

CreateState creates the state.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.createState

func (*AnimatedCrossFade) CrossFadeState

func (w *AnimatedCrossFade) CrossFadeState() CrossFadeState

CrossFadeState is the child that is visible.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.crossFadeState

func (*AnimatedCrossFade) Duration

func (w *AnimatedCrossFade) Duration() time.Duration

Duration is the duration of the transition.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.duration

func (*AnimatedCrossFade) ExcludeBottomFocus

func (w *AnimatedCrossFade) ExcludeBottomFocus() bool

ExcludeBottomFocus is whether the child that is fading out is excluded from focus.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.excludeBottomFocus

func (*AnimatedCrossFade) FirstChild

func (w *AnimatedCrossFade) FirstChild() Widget

FirstChild is the child that is visible when CrossFadeState is show first.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.firstChild

func (*AnimatedCrossFade) FirstCurve

func (w *AnimatedCrossFade) FirstCurve() animation.Curve

FirstCurve is the fade-in curve of the first child.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.firstCurve

func (*AnimatedCrossFade) OnEnd

func (w *AnimatedCrossFade) OnEnd() func()

OnEnd is called every time the animation completes, or nil.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.onEnd

func (*AnimatedCrossFade) ReverseDuration

func (w *AnimatedCrossFade) ReverseDuration() foundation.Opt[time.Duration]

ReverseDuration is the duration of the transition to the first child.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.reverseDuration

func (*AnimatedCrossFade) SecondChild

func (w *AnimatedCrossFade) SecondChild() Widget

SecondChild is the child that is visible when CrossFadeState is show second.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.secondChild

func (*AnimatedCrossFade) SecondCurve

func (w *AnimatedCrossFade) SecondCurve() animation.Curve

SecondCurve is the fade-in curve of the second child.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.secondCurve

func (*AnimatedCrossFade) SizeCurve

func (w *AnimatedCrossFade) SizeCurve() animation.Curve

SizeCurve is the curve of the size animation.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.sizeCurve

type AnimatedCrossFadeBuilder

type AnimatedCrossFadeBuilder func(topChild Widget, topChildKey foundation.Key, bottomChild Widget, bottomChildKey foundation.Key) Widget

AnimatedCrossFadeBuilder lays out the two children of an AnimatedCrossFade: the one on top is fading in, and the one at the bottom is fading out. The keys must be given to the children.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFadeBuilder

type AnimatedCrossFadeOpts

type AnimatedCrossFadeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// FirstCurve is the fade-in curve of the first child; the default is
	// Curves.Linear.
	FirstCurve animation.Curve
	// SecondCurve is the fade-in curve of the second child; the default is
	// Curves.Linear.
	SecondCurve animation.Curve
	// SizeCurve is the curve of the size animation; the default is Curves.Linear.
	SizeCurve animation.Curve
	// Alignment is how the children are aligned while the size animates; the
	// default is the top center.
	Alignment painting.AlignmentGeometry
	// ReverseDuration is the duration of the transition from the second child to
	// the first; the default is the duration.
	ReverseDuration foundation.Opt[time.Duration]
	// LayoutBuilder lays out the children; the default is
	// AnimatedCrossFadeDefaultLayoutBuilder.
	LayoutBuilder AnimatedCrossFadeBuilder
	// ExcludeBottomFocus is whether the child that is fading out is excluded
	// from focus; the default is true.
	ExcludeBottomFocus foundation.Opt[bool]
	// ClipBehavior is how the children are clipped; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// OnEnd is called every time the animation completes.
	OnEnd func()
}

AnimatedCrossFadeOpts are the optional parameters of NewAnimatedCrossFade.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.new

type AnimatedDefaultTextStyle

type AnimatedDefaultTextStyle struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedDefaultTextStyle animates the default text style of its subtree when the style changes.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle

func NewAnimatedDefaultTextStyle

func NewAnimatedDefaultTextStyle(style *painting.TextStyle, duration time.Duration, child Widget, opts ...AnimatedDefaultTextStyleOpts) *AnimatedDefaultTextStyle

NewAnimatedDefaultTextStyle creates the widget. In debug builds it panics with the tag TextMaxLinesInvalid when MaxLines is not greater than zero.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.new

func (*AnimatedDefaultTextStyle) Child

func (w *AnimatedDefaultTextStyle) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.child

func (*AnimatedDefaultTextStyle) CreateState

func (w *AnimatedDefaultTextStyle) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.createState

func (*AnimatedDefaultTextStyle) MaxLines

func (w *AnimatedDefaultTextStyle) MaxLines() foundation.Opt[int]

MaxLines is the maximum number of lines.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.maxLines

func (*AnimatedDefaultTextStyle) Overflow

Overflow is how visual overflow is handled.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.overflow

func (*AnimatedDefaultTextStyle) SoftWrap

func (w *AnimatedDefaultTextStyle) SoftWrap() bool

SoftWrap is whether the text wraps at the box width.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.softWrap

func (*AnimatedDefaultTextStyle) Style

Style is the target text style.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.style

func (*AnimatedDefaultTextStyle) TextAlign

func (w *AnimatedDefaultTextStyle) TextAlign() ui.TextAlign

TextAlign is how the text is aligned horizontally.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.textAlign

func (*AnimatedDefaultTextStyle) TextHeightBehavior

func (w *AnimatedDefaultTextStyle) TextHeightBehavior() *ui.TextHeightBehavior

TextHeightBehavior says how the line height applies to the first ascent and the last descent.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.textHeightBehavior

func (*AnimatedDefaultTextStyle) TextWidthBasis

func (w *AnimatedDefaultTextStyle) TextWidthBasis() painting.TextWidthBasis

TextWidthBasis is how the width of the text is measured.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.textWidthBasis

type AnimatedDefaultTextStyleOpts

type AnimatedDefaultTextStyleOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// TextAlign is how the text is aligned horizontally.
	TextAlign ui.TextAlign
	// SoftWrap is whether the text wraps at the box width; the default is true.
	SoftWrap foundation.Opt[bool]
	// Overflow is how visual overflow is handled; the default is
	// TextOverflowClip.
	Overflow painting.TextOverflow
	// MaxLines is the maximum number of lines; it must be greater than zero.
	MaxLines foundation.Opt[int]
	// TextWidthBasis is how the width of the text is measured; the default is
	// TextWidthBasisParent.
	TextWidthBasis painting.TextWidthBasis
	// TextHeightBehavior says how the line height applies to the first ascent and
	// the last descent.
	TextHeightBehavior *ui.TextHeightBehavior
}

AnimatedDefaultTextStyleOpts are the optional parameters of NewAnimatedDefaultTextStyle.

Flutter: widgets/implicit_animations.dart AnimatedDefaultTextStyle.new

type AnimatedFractionallySizedBox

type AnimatedFractionallySizedBox struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedFractionallySizedBox is the animated version of FractionallySizedBox: it animates the factors and the alignment when they change.

Flutter: widgets/implicit_animations.dart AnimatedFractionallySizedBox

func NewAnimatedFractionallySizedBox

func NewAnimatedFractionallySizedBox(duration time.Duration, child Widget, opts ...AnimatedFractionallySizedBoxOpts) *AnimatedFractionallySizedBox

NewAnimatedFractionallySizedBox creates the widget. In debug builds it panics with the tag AlignFactorNegative when a factor is negative.

Flutter: widgets/implicit_animations.dart AnimatedFractionallySizedBox.new

func (*AnimatedFractionallySizedBox) Alignment

Alignment is how to align the child.

Flutter: widgets/implicit_animations.dart AnimatedFractionallySizedBox.alignment

func (*AnimatedFractionallySizedBox) Child

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedFractionallySizedBox.child

func (*AnimatedFractionallySizedBox) CreateState

func (w *AnimatedFractionallySizedBox) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedFractionallySizedBox.createState

func (*AnimatedFractionallySizedBox) HeightFactor

HeightFactor is the fraction of the available height to give the child.

Flutter: widgets/implicit_animations.dart AnimatedFractionallySizedBox.heightFactor

func (*AnimatedFractionallySizedBox) WidthFactor

WidthFactor is the fraction of the available width to give the child.

Flutter: widgets/implicit_animations.dart AnimatedFractionallySizedBox.widthFactor

type AnimatedFractionallySizedBoxOpts

type AnimatedFractionallySizedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// Alignment is how to align the child; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
	// HeightFactor is the fraction of the available height to give the child.
	HeightFactor foundation.Opt[float64]
	// WidthFactor is the fraction of the available width to give the child.
	WidthFactor foundation.Opt[float64]
}

AnimatedFractionallySizedBoxOpts are the optional parameters of NewAnimatedFractionallySizedBox.

Flutter: widgets/implicit_animations.dart AnimatedFractionallySizedBox.new

type AnimatedGrid

type AnimatedGrid struct {
	StatefulWidget
	// contains filtered or unexported fields
}

AnimatedGrid is a scrolling container that animates items when they are inserted or removed.

Flutter: widgets/animated_scroll_view.dart AnimatedGrid

func NewAnimatedGrid

func NewAnimatedGrid(itemBuilder AnimatedItemBuilder, gridDelegate rendering.SliverGridDelegate, opts ...AnimatedScrollViewOpts) *AnimatedGrid

NewAnimatedGrid creates an animated grid whose items the builder builds and the delegate lays out.

Flutter: widgets/animated_scroll_view.dart AnimatedGrid.new

func (*AnimatedGrid) CreateState

func (w *AnimatedGrid) CreateState() State

CreateState creates the state.

Flutter: widgets/animated_scroll_view.dart AnimatedGrid.createState

func (*AnimatedGrid) GridDelegate

func (w *AnimatedGrid) GridDelegate() rendering.SliverGridDelegate

GridDelegate is the delegate that lays the items out.

Flutter: widgets/animated_scroll_view.dart AnimatedGrid.gridDelegate

type AnimatedGridState

type AnimatedGridState struct {
	StateOf[*AnimatedGrid]
	// contains filtered or unexported fields
}

AnimatedGridState is the state of an AnimatedGrid: it inserts and removes items with animations.

Flutter: widgets/animated_scroll_view.dart AnimatedGridState

func AnimatedGridMaybeOf

func AnimatedGridMaybeOf(bc BuildContext) (*AnimatedGridState, bool)

AnimatedGridMaybeOf is the state of the closest AnimatedGrid above the context, and false if there is none.

Flutter: widgets/animated_scroll_view.dart AnimatedGrid.maybeOf

func AnimatedGridOf

func AnimatedGridOf(bc BuildContext) *AnimatedGridState

AnimatedGridOf is the state of the closest AnimatedGrid above the context. In debug builds it panics with the tag AnimatedGridMissing when there is none.

Flutter: widgets/animated_scroll_view.dart AnimatedGrid.of

func (*AnimatedGridState) Build

func (s *AnimatedGridState) Build(bc BuildContext) Widget

Build builds the scroll view that has the sliver.

func (*AnimatedGridState) InsertAllItems

func (s *AnimatedGridState) InsertAllItems(index, length int, opts ...AnimatedItemOpts)

InsertAllItems inserts length items from the index, and animates them in.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.insertAllItems

func (*AnimatedGridState) InsertItem

func (s *AnimatedGridState) InsertItem(index int, opts ...AnimatedItemOpts)

InsertItem inserts an item at the index, and animates it in. The index is the one the item has after the insertion.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.insertItem

func (*AnimatedGridState) RemoveAllItems

func (s *AnimatedGridState) RemoveAllItems(builder AnimatedRemovedItemBuilder, opts ...AnimatedItemOpts)

RemoveAllItems removes all the items, and animates them out with the item that the builder builds.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.removeAllItems

func (*AnimatedGridState) RemoveItem

func (s *AnimatedGridState) RemoveItem(index int, builder AnimatedRemovedItemBuilder, opts ...AnimatedItemOpts)

RemoveItem removes the item at the index, and animates it out with the item that the builder builds.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.removeItem

type AnimatedItemBuilder

type AnimatedItemBuilder func(bc BuildContext, index int, animation animation.Animation[float64]) Widget

AnimatedItemBuilder builds an item of an animated list or grid, which it animates with the animation while the item is inserted.

Flutter: widgets/animated_scroll_view.dart AnimatedItemBuilder

type AnimatedItemOpts

type AnimatedItemOpts struct {
	// Duration is the duration of the animation; the default is 300ms.
	Duration foundation.Opt[time.Duration]
}

AnimatedItemOpts are the optional parameters of the methods that insert and remove items of an animated list or grid.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.insertItem

type AnimatedList

type AnimatedList struct {
	StatefulWidget
	// contains filtered or unexported fields
}

AnimatedList is a scrolling container that animates items when they are inserted or removed.

Flutter: widgets/animated_scroll_view.dart AnimatedList

func NewAnimatedList

func NewAnimatedList(itemBuilder AnimatedItemBuilder, opts ...AnimatedScrollViewOpts) *AnimatedList

NewAnimatedList creates an animated list whose items the builder builds.

Flutter: widgets/animated_scroll_view.dart AnimatedList.new

func NewAnimatedListSeparated

func NewAnimatedListSeparated(itemBuilder, separatorBuilder, removedSeparatorBuilder AnimatedItemBuilder, opts ...AnimatedScrollViewOpts) *AnimatedList

NewAnimatedListSeparated creates an animated list that has a separator between its items. The initial item count is the number of items, without the separators, and the removedSeparatorBuilder builds a separator that is removed.

Flutter: widgets/animated_scroll_view.dart AnimatedList.separated

func (*AnimatedList) CreateState

func (w *AnimatedList) CreateState() State

CreateState creates the state.

Flutter: widgets/animated_scroll_view.dart AnimatedList.createState

type AnimatedListState

type AnimatedListState struct {
	StateOf[*AnimatedList]
	// contains filtered or unexported fields
}

AnimatedListState is the state of an AnimatedList: it inserts and removes items with animations.

Flutter: widgets/animated_scroll_view.dart AnimatedListState

func AnimatedListMaybeOf

func AnimatedListMaybeOf(bc BuildContext) (*AnimatedListState, bool)

AnimatedListMaybeOf is the state of the closest AnimatedList above the context, and false if there is none.

Flutter: widgets/animated_scroll_view.dart AnimatedList.maybeOf

func AnimatedListOf

func AnimatedListOf(bc BuildContext) *AnimatedListState

AnimatedListOf is the state of the closest AnimatedList above the context. In debug builds it panics with the tag AnimatedListMissing when there is none.

Flutter: widgets/animated_scroll_view.dart AnimatedList.of

func (*AnimatedListState) Build

func (s *AnimatedListState) Build(bc BuildContext) Widget

Build builds the scroll view that has the sliver.

func (*AnimatedListState) InsertAllItems

func (s *AnimatedListState) InsertAllItems(index, length int, opts ...AnimatedItemOpts)

InsertAllItems inserts length items from the index, and animates them in.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.insertAllItems

func (*AnimatedListState) InsertItem

func (s *AnimatedListState) InsertItem(index int, opts ...AnimatedItemOpts)

InsertItem inserts an item at the index, and animates it in. The index is the one the item has after the insertion.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.insertItem

func (*AnimatedListState) RemoveAllItems

func (s *AnimatedListState) RemoveAllItems(builder AnimatedRemovedItemBuilder, opts ...AnimatedItemOpts)

RemoveAllItems removes all the items, and animates them out with the item that the builder builds.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.removeAllItems

func (*AnimatedListState) RemoveItem

func (s *AnimatedListState) RemoveItem(index int, builder AnimatedRemovedItemBuilder, opts ...AnimatedItemOpts)

RemoveItem removes the item at the index, and animates it out with the item that the builder builds.

Flutter: widgets/animated_scroll_view.dart AnimatedListState.removeItem

type AnimatedModalBarrier

type AnimatedModalBarrier struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

AnimatedModalBarrier is a widget that prevents the user from interacting with widgets behind itself, and can be configured with an animated color value.

Flutter: widgets/modal_barrier.dart AnimatedModalBarrier

func NewAnimatedModalBarrier

func NewAnimatedModalBarrier(color animation.Animation[foundation.Opt[ui.Color]], opts ...AnimatedModalBarrierOpts) *AnimatedModalBarrier

NewAnimatedModalBarrier creates the widget; the animation is of the color, none for transparent.

Flutter: widgets/modal_barrier.dart AnimatedModalBarrier.new

func (*AnimatedModalBarrier) Build

Build builds a ModalBarrier with the current color.

Flutter: widgets/modal_barrier.dart AnimatedModalBarrier.build

func (*AnimatedModalBarrier) Color

Color is the animation of the color of the barrier.

Flutter: widgets/modal_barrier.dart AnimatedModalBarrier.color

type AnimatedModalBarrierOpts

type AnimatedModalBarrierOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Dismissible is whether tapping the barrier calls OnDismiss; the default is
	// true.
	Dismissible foundation.Opt[bool]
	// SemanticsLabel is the semantic label of the barrier.
	SemanticsLabel string
	// BarrierSemanticsDismissible is whether assistive technology can dismiss the
	// barrier.
	BarrierSemanticsDismissible foundation.Opt[bool]
	// OnDismiss is called when the barrier is tapped and Dismissible is true.
	OnDismiss func()
	// ClipDetailsNotifier notifies the insets that clip the semantics.
	ClipDetailsNotifier *foundation.ValueNotifier[painting.EdgeInsets]
	// SemanticsOnTapHint is the hint of the tap action of the barrier.
	SemanticsOnTapHint string
}

AnimatedModalBarrierOpts are the optional parameters of NewAnimatedModalBarrier.

Flutter: widgets/modal_barrier.dart AnimatedModalBarrier.new

type AnimatedOpacity

type AnimatedOpacity struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedOpacity is the animated version of Opacity: it animates the opacity of its child when it changes.

Flutter: widgets/implicit_animations.dart AnimatedOpacity

func NewAnimatedOpacity

func NewAnimatedOpacity(opacity float64, duration time.Duration, child Widget, opts ...AnimatedOpacityOpts) *AnimatedOpacity

NewAnimatedOpacity creates the widget. In debug builds it panics with the tag OpacityOutOfRange when the opacity is not between 0 and 1.

Flutter: widgets/implicit_animations.dart AnimatedOpacity.new

func (*AnimatedOpacity) AlwaysIncludeSemantics

func (w *AnimatedOpacity) AlwaysIncludeSemantics() bool

AlwaysIncludeSemantics is whether the semantics of the child are included even when it is fully transparent.

Flutter: widgets/implicit_animations.dart AnimatedOpacity.alwaysIncludeSemantics

func (*AnimatedOpacity) Child

func (w *AnimatedOpacity) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedOpacity.child

func (*AnimatedOpacity) CreateState

func (w *AnimatedOpacity) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedOpacity.createState

func (*AnimatedOpacity) Opacity

func (w *AnimatedOpacity) Opacity() float64

Opacity is the target opacity, from 0 (transparent) to 1 (opaque).

Flutter: widgets/implicit_animations.dart AnimatedOpacity.opacity

type AnimatedOpacityOpts

type AnimatedOpacityOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// AlwaysIncludeSemantics is whether the semantics of the child are included
	// even when it is fully transparent.
	AlwaysIncludeSemantics bool
}

AnimatedOpacityOpts are the optional parameters of NewAnimatedOpacity.

Flutter: widgets/implicit_animations.dart AnimatedOpacity.new

type AnimatedPadding

type AnimatedPadding struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedPadding is the animated version of Padding: it animates the insets when they change.

Flutter: widgets/implicit_animations.dart AnimatedPadding

func NewAnimatedPadding

func NewAnimatedPadding(padding painting.EdgeInsetsGeometry, duration time.Duration, child Widget, opts ...AnimatedPaddingOpts) *AnimatedPadding

NewAnimatedPadding creates the widget. In debug builds it panics with the tag ContainerNegativePadding when the padding is negative.

Flutter: widgets/implicit_animations.dart AnimatedPadding.new

func (*AnimatedPadding) Child

func (w *AnimatedPadding) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedPadding.child

func (*AnimatedPadding) CreateState

func (w *AnimatedPadding) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedPadding.createState

func (*AnimatedPadding) Padding

Padding is the amount of space by which to inset the child.

Flutter: widgets/implicit_animations.dart AnimatedPadding.padding

type AnimatedPaddingOpts

type AnimatedPaddingOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
}

AnimatedPaddingOpts are the optional parameters of NewAnimatedPadding.

Flutter: widgets/implicit_animations.dart AnimatedPadding.new

type AnimatedPhysicalModel

type AnimatedPhysicalModel struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedPhysicalModel is the animated version of PhysicalModel: it animates the elevation, the colors and the border radius when they change.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel

func NewAnimatedPhysicalModel

func NewAnimatedPhysicalModel(color, shadowColor ui.Color, duration time.Duration, child Widget, opts ...AnimatedPhysicalModelOpts) *AnimatedPhysicalModel

NewAnimatedPhysicalModel creates the widget. In debug builds it panics with the tag PhysicalModelElevationNegative when the elevation is negative.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.new

func (*AnimatedPhysicalModel) AnimateColor

func (w *AnimatedPhysicalModel) AnimateColor() bool

AnimateColor is whether the color is animated.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.animateColor

func (*AnimatedPhysicalModel) AnimateShadowColor

func (w *AnimatedPhysicalModel) AnimateShadowColor() bool

AnimateShadowColor is whether the shadow color is animated.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.animateShadowColor

func (*AnimatedPhysicalModel) BorderRadius

BorderRadius is the target border radius.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.borderRadius

func (*AnimatedPhysicalModel) Child

func (w *AnimatedPhysicalModel) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.child

func (*AnimatedPhysicalModel) ClipBehavior

func (w *AnimatedPhysicalModel) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped and how.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.clipBehavior

func (*AnimatedPhysicalModel) Color

func (w *AnimatedPhysicalModel) Color() ui.Color

Color is the target background color.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.color

func (*AnimatedPhysicalModel) CreateState

func (w *AnimatedPhysicalModel) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.createState

func (*AnimatedPhysicalModel) Elevation

func (w *AnimatedPhysicalModel) Elevation() float64

Elevation is the target elevation.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.elevation

func (*AnimatedPhysicalModel) ShadowColor

func (w *AnimatedPhysicalModel) ShadowColor() ui.Color

ShadowColor is the target shadow color.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.shadowColor

func (*AnimatedPhysicalModel) Shape

Shape is the type of shape.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.shape

type AnimatedPhysicalModelOpts

type AnimatedPhysicalModelOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// Shape is the type of shape; the default is BoxShapeRectangle.
	Shape painting.BoxShape
	// ClipBehavior is whether the content is clipped and how; the default is
	// ClipNone.
	ClipBehavior ui.Clip
	// BorderRadius is the border radius of the rounded corners when the shape is
	// a rectangle.
	BorderRadius foundation.Opt[painting.BorderRadius]
	// Elevation is the z-coordinate at which to place this physical object; it
	// must not be negative.
	Elevation float64
	// AnimateColor is whether to animate the color; the default is true.
	AnimateColor foundation.Opt[bool]
	// AnimateShadowColor is whether to animate the shadow color; the default is
	// true.
	AnimateShadowColor foundation.Opt[bool]
}

AnimatedPhysicalModelOpts are the optional parameters of NewAnimatedPhysicalModel.

Flutter: widgets/implicit_animations.dart AnimatedPhysicalModel.new

type AnimatedPositioned

type AnimatedPositioned struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedPositioned is the animated version of Positioned, which must be a descendant of a Stack: it animates the position and size when they change.

Flutter: widgets/implicit_animations.dart AnimatedPositioned

func NewAnimatedPositioned

func NewAnimatedPositioned(duration time.Duration, child Widget, opts ...AnimatedPositionedOpts) *AnimatedPositioned

NewAnimatedPositioned creates the widget. In debug builds it panics with the tag PositionedOverconstrained when left, right and width, or top, bottom and height, are all given.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.new

func NewAnimatedPositionedFromRect

func NewAnimatedPositionedFromRect(rect ui.Rect, duration time.Duration, child Widget, opts ...AnimatedPositionedOpts) *AnimatedPositioned

NewAnimatedPositionedFromRect creates an AnimatedPositioned with the left, top, width and height of the rectangle.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.fromRect

func (*AnimatedPositioned) Bottom

Bottom is the offset of the child's bottom edge from the bottom of the stack.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.bottom

func (*AnimatedPositioned) Child

func (w *AnimatedPositioned) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.child

func (*AnimatedPositioned) CreateState

func (w *AnimatedPositioned) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.createState

func (*AnimatedPositioned) Height

Height is the child's height.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.height

func (*AnimatedPositioned) Left

Left is the offset of the child's left edge from the left of the stack.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.left

func (*AnimatedPositioned) Right

Right is the offset of the child's right edge from the right of the stack.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.right

func (*AnimatedPositioned) Top

Top is the offset of the child's top edge from the top of the stack.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.top

func (*AnimatedPositioned) Width

Width is the child's width.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.width

type AnimatedPositionedDirectional

type AnimatedPositionedDirectional struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedPositionedDirectional is the animated version of PositionedDirectional: it animates the position and size when they change.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional

func NewAnimatedPositionedDirectional

func NewAnimatedPositionedDirectional(duration time.Duration, child Widget, opts ...AnimatedPositionedDirectionalOpts) *AnimatedPositionedDirectional

NewAnimatedPositionedDirectional creates the widget. In debug builds it panics with the tag PositionedOverconstrained when start, end and width, or top, bottom and height, are all given.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.new

func (*AnimatedPositionedDirectional) Bottom

Bottom is the offset of the child's bottom edge from the bottom of the stack.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.bottom

func (*AnimatedPositionedDirectional) Child

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.child

func (*AnimatedPositionedDirectional) CreateState

func (w *AnimatedPositionedDirectional) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.createState

func (*AnimatedPositionedDirectional) End

End is the offset of the child's end edge from the end of the stack.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.end

func (*AnimatedPositionedDirectional) Height

Height is the child's height.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.height

func (*AnimatedPositionedDirectional) Start

Start is the offset of the child's start edge from the start of the stack.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.start

func (*AnimatedPositionedDirectional) Top

Top is the offset of the child's top edge from the top of the stack.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.top

func (*AnimatedPositionedDirectional) Width

Width is the child's width.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.width

type AnimatedPositionedDirectionalOpts

type AnimatedPositionedDirectionalOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// Start is the offset of the child's start edge from the start of the stack.
	Start foundation.Opt[float64]
	// Top is the offset of the child's top edge from the top of the stack.
	Top foundation.Opt[float64]
	// End is the offset of the child's end edge from the end of the stack.
	End foundation.Opt[float64]
	// Bottom is the offset of the child's bottom edge from the bottom of the
	// stack.
	Bottom foundation.Opt[float64]
	// Width is the child's width.
	Width foundation.Opt[float64]
	// Height is the child's height.
	Height foundation.Opt[float64]
}

AnimatedPositionedDirectionalOpts are the optional parameters of NewAnimatedPositionedDirectional.

Flutter: widgets/implicit_animations.dart AnimatedPositionedDirectional.new

type AnimatedPositionedOpts

type AnimatedPositionedOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// Left is the offset of the child's left edge from the left of the stack.
	Left foundation.Opt[float64]
	// Top is the offset of the child's top edge from the top of the stack.
	Top foundation.Opt[float64]
	// Right is the offset of the child's right edge from the right of the stack.
	Right foundation.Opt[float64]
	// Bottom is the offset of the child's bottom edge from the bottom of the
	// stack.
	Bottom foundation.Opt[float64]
	// Width is the child's width.
	Width foundation.Opt[float64]
	// Height is the child's height.
	Height foundation.Opt[float64]
}

AnimatedPositionedOpts are the optional parameters of NewAnimatedPositioned.

Flutter: widgets/implicit_animations.dart AnimatedPositioned.new

type AnimatedRemovedItemBuilder

type AnimatedRemovedItemBuilder func(bc BuildContext, animation animation.Animation[float64]) Widget

AnimatedRemovedItemBuilder builds an item that is being removed from an animated list or grid, which it animates with the animation, from 1 to 0.

Flutter: widgets/animated_scroll_view.dart AnimatedRemovedItemBuilder

type AnimatedRotation

type AnimatedRotation struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedRotation animates the rotation of a widget when it changes.

Flutter: widgets/implicit_animations.dart AnimatedRotation

func NewAnimatedRotation

func NewAnimatedRotation(turns float64, duration time.Duration, child Widget, opts ...AnimatedRotationOpts) *AnimatedRotation

NewAnimatedRotation creates the widget; one turn is a full rotation.

Flutter: widgets/implicit_animations.dart AnimatedRotation.new

func (*AnimatedRotation) Alignment

func (w *AnimatedRotation) Alignment() painting.Alignment

Alignment is the alignment of the origin of the rotation.

Flutter: widgets/implicit_animations.dart AnimatedRotation.alignment

func (*AnimatedRotation) Child

func (w *AnimatedRotation) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedRotation.child

func (*AnimatedRotation) CreateState

func (w *AnimatedRotation) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedRotation.createState

func (*AnimatedRotation) FilterQuality

func (w *AnimatedRotation) FilterQuality() foundation.Opt[ui.FilterQuality]

FilterQuality is the filter quality of the child while it animates.

Flutter: widgets/implicit_animations.dart AnimatedRotation.filterQuality

func (*AnimatedRotation) Turns

func (w *AnimatedRotation) Turns() float64

Turns is the target rotation, in turns.

Flutter: widgets/implicit_animations.dart AnimatedRotation.turns

type AnimatedRotationOpts

type AnimatedRotationOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// Alignment is the alignment of the origin of the rotation; the default is
	// Alignment.center.
	Alignment foundation.Opt[painting.Alignment]
	// FilterQuality is the filter quality of the child while it animates.
	FilterQuality foundation.Opt[ui.FilterQuality]
}

AnimatedRotationOpts are the optional parameters of NewAnimatedRotation.

Flutter: widgets/implicit_animations.dart AnimatedRotation.new

type AnimatedScale

type AnimatedScale struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedScale animates the scale of a widget when it changes.

Flutter: widgets/implicit_animations.dart AnimatedScale

func NewAnimatedScale

func NewAnimatedScale(scale float64, duration time.Duration, child Widget, opts ...AnimatedScaleOpts) *AnimatedScale

NewAnimatedScale creates the widget.

Flutter: widgets/implicit_animations.dart AnimatedScale.new

func (*AnimatedScale) Alignment

func (w *AnimatedScale) Alignment() painting.Alignment

Alignment is the alignment of the origin of the scale.

Flutter: widgets/implicit_animations.dart AnimatedScale.alignment

func (*AnimatedScale) Child

func (w *AnimatedScale) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedScale.child

func (*AnimatedScale) CreateState

func (w *AnimatedScale) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedScale.createState

func (*AnimatedScale) FilterQuality

func (w *AnimatedScale) FilterQuality() foundation.Opt[ui.FilterQuality]

FilterQuality is the filter quality of the child while it animates.

Flutter: widgets/implicit_animations.dart AnimatedScale.filterQuality

func (*AnimatedScale) Scale

func (w *AnimatedScale) Scale() float64

Scale is the target scale.

Flutter: widgets/implicit_animations.dart AnimatedScale.scale

type AnimatedScaleOpts

type AnimatedScaleOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// Alignment is the alignment of the origin of the scale; the default is
	// Alignment.center.
	Alignment foundation.Opt[painting.Alignment]
	// FilterQuality is the filter quality of the child while it animates.
	FilterQuality foundation.Opt[ui.FilterQuality]
}

AnimatedScaleOpts are the optional parameters of NewAnimatedScale.

Flutter: widgets/implicit_animations.dart AnimatedScale.new

type AnimatedScrollViewOpts

type AnimatedScrollViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// InitialItemCount is the number of items that the view starts with.
	InitialItemCount int
	// ScrollDirection is the axis along which the view scrolls; the default is
	// AxisVertical.
	ScrollDirection painting.Axis
	// Reverse is whether the view scrolls against the reading direction.
	Reverse bool
	// Controller reads and controls the scroll position.
	Controller ScrollController
	// Primary is whether this is the primary scroll view.
	Primary foundation.Opt[bool]
	// Physics is how the view responds to the user.
	Physics ScrollPhysics
	// ShrinkWrap is whether the extent of the view is the extent of its content.
	// It does not apply to AnimatedGrid.
	ShrinkWrap bool
	// Padding is the amount of space by which to inset the items; nil lets the
	// MediaQuery decide.
	Padding painting.EdgeInsetsGeometry
	// ClipBehavior is how the view clips its content; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// ScrollCacheExtent is how far beyond the viewport the view builds items.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
}

AnimatedScrollViewOpts are the optional parameters of NewAnimatedList, NewAnimatedListSeparated and NewAnimatedGrid.

Flutter: widgets/animated_scroll_view.dart AnimatedList.new

type AnimatedSize

type AnimatedSize struct {
	StatefulWidget
	// contains filtered or unexported fields
}

AnimatedSize animates its size to match the size of its child.

Flutter: widgets/animated_size.dart AnimatedSize

func NewAnimatedSize

func NewAnimatedSize(duration time.Duration, child Widget, opts ...AnimatedSizeOpts) *AnimatedSize

NewAnimatedSize creates the widget; the child may be nil.

Flutter: widgets/animated_size.dart AnimatedSize.new

func (*AnimatedSize) Alignment

func (w *AnimatedSize) Alignment() painting.AlignmentGeometry

Alignment is how the child is aligned while the size animates.

Flutter: widgets/animated_size.dart AnimatedSize.alignment

func (*AnimatedSize) Child

func (w *AnimatedSize) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/animated_size.dart AnimatedSize.child

func (*AnimatedSize) ClipBehavior

func (w *AnimatedSize) ClipBehavior() ui.Clip

ClipBehavior is how the child is clipped while it overflows.

Flutter: widgets/animated_size.dart AnimatedSize.clipBehavior

func (*AnimatedSize) CreateState

func (w *AnimatedSize) CreateState() State

CreateState creates the state.

Flutter: widgets/animated_size.dart AnimatedSize.createState

func (*AnimatedSize) Curve

func (w *AnimatedSize) Curve() animation.Curve

Curve is the curve of the animation.

Flutter: widgets/animated_size.dart AnimatedSize.curve

func (*AnimatedSize) Duration

func (w *AnimatedSize) Duration() time.Duration

Duration is the duration of the animation.

Flutter: widgets/animated_size.dart AnimatedSize.duration

func (*AnimatedSize) OnEnd

func (w *AnimatedSize) OnEnd() func()

OnEnd is called every time the animation completes, or nil.

Flutter: widgets/animated_size.dart AnimatedSize.onEnd

func (*AnimatedSize) ReverseDuration

func (w *AnimatedSize) ReverseDuration() foundation.Opt[time.Duration]

ReverseDuration is the duration when the size shrinks.

Flutter: widgets/animated_size.dart AnimatedSize.reverseDuration

type AnimatedSizeOpts

type AnimatedSizeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment is how the child is aligned while the size animates; the
	// default is the center.
	Alignment painting.AlignmentGeometry
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// ReverseDuration is the duration when the size shrinks; the default is the
	// duration.
	ReverseDuration foundation.Opt[time.Duration]
	// ClipBehavior is how the child is clipped while it overflows; the default is
	// ClipHardEdge.
	ClipBehavior ui.Clip
	// OnEnd is called every time the animation completes.
	OnEnd func()
}

AnimatedSizeOpts are the optional parameters of NewAnimatedSize.

Flutter: widgets/animated_size.dart AnimatedSize.new

type AnimatedSlide

type AnimatedSlide struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

AnimatedSlide animates the position of a widget relative to its normal position, as a fraction of its size, when the offset changes.

Flutter: widgets/implicit_animations.dart AnimatedSlide

func NewAnimatedSlide

func NewAnimatedSlide(offset ui.Offset, duration time.Duration, child Widget, opts ...AnimatedSlideOpts) *AnimatedSlide

NewAnimatedSlide creates the widget.

Flutter: widgets/implicit_animations.dart AnimatedSlide.new

func (*AnimatedSlide) Child

func (w *AnimatedSlide) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/implicit_animations.dart AnimatedSlide.child

func (*AnimatedSlide) CreateState

func (w *AnimatedSlide) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart AnimatedSlide.createState

func (*AnimatedSlide) Offset

func (w *AnimatedSlide) Offset() ui.Offset

Offset is the target offset, as a fraction of the size of the child.

Flutter: widgets/implicit_animations.dart AnimatedSlide.offset

type AnimatedSlideOpts

type AnimatedSlideOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
}

AnimatedSlideOpts are the optional parameters of NewAnimatedSlide.

Flutter: widgets/implicit_animations.dart AnimatedSlide.new

type AnimatedSwitcher

type AnimatedSwitcher struct {
	StatefulWidget
	// contains filtered or unexported fields
}

AnimatedSwitcher is a widget that by default does a cross-fade between a new widget and the widget previously set on the AnimatedSwitcher as a child. If the child changes type or key, the old one fades out while the new one fades in; a child of the same type and key only updates.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher

func NewAnimatedSwitcher

func NewAnimatedSwitcher(duration time.Duration, child Widget, opts ...AnimatedSwitcherOpts) *AnimatedSwitcher

NewAnimatedSwitcher creates the widget; the child may be nil.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.new

func (*AnimatedSwitcher) Child

func (w *AnimatedSwitcher) Child() Widget

Child is the current child, or nil.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.child

func (*AnimatedSwitcher) CreateState

func (w *AnimatedSwitcher) CreateState() State

CreateState creates the state.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.createState

func (*AnimatedSwitcher) Duration

func (w *AnimatedSwitcher) Duration() time.Duration

Duration is the duration of the transition from the old child to the new one.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.duration

func (*AnimatedSwitcher) ReverseDuration

func (w *AnimatedSwitcher) ReverseDuration() foundation.Opt[time.Duration]

ReverseDuration is the duration of the transition when a child is replaced.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.reverseDuration

func (*AnimatedSwitcher) SwitchInCurve

func (w *AnimatedSwitcher) SwitchInCurve() animation.Curve

SwitchInCurve is the curve of the transition of the new child.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.switchInCurve

func (*AnimatedSwitcher) SwitchOutCurve

func (w *AnimatedSwitcher) SwitchOutCurve() animation.Curve

SwitchOutCurve is the curve of the transition of the old child.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.switchOutCurve

type AnimatedSwitcherLayoutBuilder

type AnimatedSwitcherLayoutBuilder func(currentChild Widget, previousChildren []Widget) Widget

AnimatedSwitcherLayoutBuilder lays out the current child and the children that are on their way out (the previous children), in the order they should be painted. The current child is nil when there is none.

Flutter: widgets/animated_switcher.dart AnimatedSwitcherLayoutBuilder

type AnimatedSwitcherOpts

type AnimatedSwitcherOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ReverseDuration is the duration of the transition of a child that is
	// replaced; it defaults to the duration.
	ReverseDuration foundation.Opt[time.Duration]
	// SwitchInCurve is the curve of the transition of the new child; the default
	// is Curves.Linear.
	SwitchInCurve animation.Curve
	// SwitchOutCurve is the curve of the transition of the old child; the
	// default is Curves.Linear.
	SwitchOutCurve animation.Curve
	// TransitionBuilder builds the transition of each child; the default is
	// AnimatedSwitcherDefaultTransitionBuilder.
	TransitionBuilder AnimatedSwitcherTransitionBuilder
	// LayoutBuilder lays out the children; the default is
	// AnimatedSwitcherDefaultLayoutBuilder.
	LayoutBuilder AnimatedSwitcherLayoutBuilder
}

AnimatedSwitcherOpts are the optional parameters of NewAnimatedSwitcher.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.new

type AnimatedSwitcherTransitionBuilder

type AnimatedSwitcherTransitionBuilder func(child Widget, animation animation.Animation[float64]) Widget

AnimatedSwitcherTransitionBuilder builds the transition of a child of an AnimatedSwitcher from the child and the animation of its switch.

Flutter: widgets/animated_switcher.dart AnimatedSwitcherTransitionBuilder

type AnimatedTransitionBuilder

type AnimatedTransitionBuilder func(bc BuildContext, animation animation.Animation[float64], child Widget) Widget

AnimatedTransitionBuilder builds a transition of a child from an animation.

Flutter: widgets/dual_transition_builder.dart AnimatedTransitionBuilder

type AnimatedWidget

type AnimatedWidget struct {
	StatefulWidget
	// contains filtered or unexported fields
}

AnimatedWidget is the embedded base of a widget that rebuilds when a Listenable (usually an Animation) notifies. The widget type embeds it and implements Build; the base listens, and calls SetState for it.

type Spin struct {
	widgets.AnimatedWidget
}

func NewSpin(turns animation.Animation[float64]) *Spin {
	return &Spin{widgets.NewAnimatedWidgetBase(turns)}
}

func (w *Spin) Build(bc widgets.BuildContext) widgets.Widget { /* uses turns.Value() */ }

Flutter: widgets/transitions.dart AnimatedWidget

func NewAnimatedWidgetBase

func NewAnimatedWidgetBase(listenable foundation.Listenable, opts ...WidgetOpts) AnimatedWidget

NewAnimatedWidgetBase creates the embedded base of an animated widget.

Flutter: widgets/transitions.dart AnimatedWidget.new

func (*AnimatedWidget) CreateState

func (w *AnimatedWidget) CreateState() State

CreateState creates the state.

Flutter: widgets/transitions.dart AnimatedWidget.createState

func (*AnimatedWidget) Listenable

func (w *AnimatedWidget) Listenable() foundation.Listenable

Listenable is the listenable that the widget rebuilds with.

Flutter: widgets/transitions.dart AnimatedWidget.listenable

type AnimatedWidgetBaseState

type AnimatedWidgetBaseState[W ImplicitlyAnimated] struct {
	ImplicitlyAnimatedWidgetState[W]
}

AnimatedWidgetBaseState is the embedded base of the state of an implicitly animated widget that rebuilds on every tick of the animation.

Flutter: widgets/implicit_animations.dart AnimatedWidgetBaseState

func (*AnimatedWidgetBaseState) DisableAnimations

func (h *AnimatedWidgetBaseState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*AnimatedWidgetBaseState) ErrorReporter

func (h *AnimatedWidgetBaseState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*AnimatedWidgetBaseState[W]) InitState

func (s *AnimatedWidgetBaseState[W]) InitState()

InitState starts listening to the controller.

Flutter: widgets/implicit_animations.dart AnimatedWidgetBaseState.initState

type AnimatedWidgetInterface

type AnimatedWidgetInterface interface {
	Widget
	// Listenable is the listenable that the widget rebuilds with.
	Listenable() foundation.Listenable
	// Build describes the part of the user interface represented by the widget.
	Build(bc BuildContext) Widget
}

AnimatedWidgetInterface is what an animated widget implements: the embedded AnimatedWidget (which gives Listenable and CreateState) and Build. It is the type of the widget that AnimatedWidget's state builds.

Flutter: widgets/transitions.dart AnimatedWidget

type AnnotatedRegion

type AnnotatedRegion struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

AnnotatedRegion marks a region of the layer tree with a value, which an ancestor finds with a layer search (a Scene's AnnotatedRegionLayer). AppBar uses it for its system overlay style.

Deviation: the value is an any, not a type parameter (SPEC §12.10).

Flutter: widgets/annotated_region.dart AnnotatedRegion

func NewAnnotatedRegion

func NewAnnotatedRegion(value any, child Widget, opts ...AnnotatedRegionOpts) *AnnotatedRegion

NewAnnotatedRegion creates the widget.

Flutter: widgets/annotated_region.dart AnnotatedRegion.new

func (*AnnotatedRegion) CreateRenderObject

func (w *AnnotatedRegion) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/annotated_region.dart AnnotatedRegion.createRenderObject

func (*AnnotatedRegion) Sized

func (w *AnnotatedRegion) Sized() bool

Sized is whether the region is limited to the size of the child.

Flutter: widgets/annotated_region.dart AnnotatedRegion.sized

func (*AnnotatedRegion) UpdateRenderObject

func (w *AnnotatedRegion) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/annotated_region.dart AnnotatedRegion.updateRenderObject

func (*AnnotatedRegion) Value

func (w *AnnotatedRegion) Value() any

Value is the value that is provided for the region.

Flutter: widgets/annotated_region.dart AnnotatedRegion.value

type AnnotatedRegionOpts

type AnnotatedRegionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// NotSized says that the region is not limited to the size of the child but
	// has no bounds (Flutter's sized: false).
	NotSized bool
}

AnnotatedRegionOpts are the optional parameters of NewAnnotatedRegion.

Flutter: widgets/annotated_region.dart AnnotatedRegion.new

type AnyGlobalKey

type AnyGlobalKey interface {
	foundation.Key
	// CurrentElement is the element of the widget that has this key, or nil.
	CurrentElement() Element
	// contains filtered or unexported methods
}

AnyGlobalKey is a key that is unique across the whole app: the GlobalKey and GlobalObjectKey types. A widget with a global key keeps its element, and its state, when it moves to another place in the tree.

Flutter: widgets/framework.dart GlobalKey

type AnyPageStorageKey

type AnyPageStorageKey interface {
	foundation.LocalKey
	// StorageValue is the value of the key.
	//
	// Flutter: foundation/key.dart ValueKey.value
	StorageValue() any
}

AnyPageStorageKey is a PageStorageKey of any value type.

Flutter: widgets/page_storage.dart PageStorageKey

type AppLifecycleListener

type AppLifecycleListener struct {
	WidgetsBindingObserverBase
	// contains filtered or unexported fields
}

AppLifecycleListener listens to the changes of the app lifecycle state and to the requests to exit, and calls a callback for each. Create one with NewAppLifecycleListener and call Dispose when done.

Flutter: widgets/app_lifecycle_listener.dart AppLifecycleListener

func NewAppLifecycleListener

func NewAppLifecycleListener(binding *WidgetsBinding, opts ...AppLifecycleListenerOpts) *AppLifecycleListener

NewAppLifecycleListener creates a listener and registers it with the binding. It starts from the lifecycle state the scheduler binding has.

Flutter: widgets/app_lifecycle_listener.dart AppLifecycleListener.new

func (*AppLifecycleListener) Binding

func (l *AppLifecycleListener) Binding() *WidgetsBinding

Binding is the binding the listener is registered with.

Flutter: widgets/app_lifecycle_listener.dart AppLifecycleListener.binding

func (*AppLifecycleListener) DebugFillProperties

func (l *AppLifecycleListener) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the binding and the callbacks that are set.

Flutter: widgets/app_lifecycle_listener.dart AppLifecycleListener.debugFillProperties

func (*AppLifecycleListener) DidChangeAppLifecycleState

func (l *AppLifecycleListener) DidChangeAppLifecycleState(state ui.AppLifecycleState)

DidChangeAppLifecycleState calls the callback of the transition from the previous state to the new one. In debug builds a transition that the lifecycle does not allow panics with the tag AppLifecycleInvalidTransition.

Flutter: widgets/app_lifecycle_listener.dart AppLifecycleListener.didChangeAppLifecycleState

func (*AppLifecycleListener) DidRequestAppExit

func (l *AppLifecycleListener) DidRequestAppExit() ui.AppExitResponse

DidRequestAppExit asks OnExitRequested, or lets the app exit.

Flutter: widgets/app_lifecycle_listener.dart AppLifecycleListener.didRequestAppExit

func (*AppLifecycleListener) Dispose

func (l *AppLifecycleListener) Dispose()

Dispose removes the listener from the binding. Using the listener after this panics in debug builds with the tag AppLifecycleListenerDisposed.

Flutter: widgets/app_lifecycle_listener.dart AppLifecycleListener.dispose

type AppLifecycleListenerOpts

type AppLifecycleListenerOpts struct {
	// OnResume is called when the app is resumed (focused and visible).
	OnResume func()
	// OnInactive is called when the app goes from resumed to inactive (visible,
	// not focused).
	OnInactive func()
	// OnHide is called when the app goes from inactive to hidden.
	OnHide func()
	// OnShow is called when the app goes from hidden to inactive.
	OnShow func()
	// OnPause is called when the app goes from hidden to paused. Desktop
	// platforms do not use it.
	OnPause func()
	// OnRestart is called when the app goes from paused to hidden.
	OnRestart func()
	// OnDetach is called when the app is detached from the platform: it is
	// about to end.
	OnDetach func()
	// OnExitRequested is called when the app is asked to exit; the answer Cancel
	// keeps the app running (SPEC §8.7 "Closing"). Nil lets the app exit.
	OnExitRequested func() ui.AppExitResponse
	// OnStateChange is called with the new state after each change of the
	// lifecycle state, after the callback of the transition.
	OnStateChange func(state ui.AppLifecycleState)
}

AppLifecycleListenerOpts are the optional parameters of NewAppLifecycleListener. Each callback is called for the matching transition of the app lifecycle state; a nil one is skipped.

Flutter: widgets/app_lifecycle_listener.dart AppLifecycleListener.new

type AppPrivateCommandCallback

type AppPrivateCommandCallback func(action string, data map[string]any)

AppPrivateCommandCallback is the type of the function that EditableText calls for a private command of the input method.

Flutter: widgets/editable_text.dart AppPrivateCommandCallback

type ApplicationSwitcherDescription

type ApplicationSwitcherDescription struct {
	// Label is the title of the app.
	Label string
	// PrimaryColor is the color of the app's task switcher entry.
	PrimaryColor ui.Color
}

ApplicationSwitcherDescription is how the app is described to the system's task switcher and window title: a label and the primary color.

Flutter: services/system_chrome.dart ApplicationSwitcherDescription

type AspectRatio

type AspectRatio struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

AspectRatio sizes its child to a specific aspect ratio.

Flutter: widgets/basic.dart AspectRatio

func NewAspectRatio

func NewAspectRatio(aspectRatio float64, child Widget, opts ...AspectRatioOpts) *AspectRatio

NewAspectRatio creates the widget.

Flutter: widgets/basic.dart AspectRatio.new

func (*AspectRatio) AspectRatio

func (w *AspectRatio) AspectRatio() float64

AspectRatio is the aspect ratio to attempt to use: the width divided by the height.

Flutter: widgets/basic.dart AspectRatio.aspectRatio

func (*AspectRatio) CreateRenderObject

func (w *AspectRatio) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart AspectRatio.createRenderObject

func (*AspectRatio) UpdateRenderObject

func (w *AspectRatio) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart AspectRatio.updateRenderObject

type AspectRatioOpts

type AspectRatioOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

AspectRatioOpts are the optional parameters of NewAspectRatio.

Flutter: widgets/basic.dart AspectRatio.new

type AspectSet

type AspectSet struct {
	// contains filtered or unexported fields
}

AspectSet is the set of aspects of a model that a dependent depends on.

Flutter: widgets/inherited_model.dart InheritedModel.updateShouldNotifyDependent

func (*AspectSet) Contains

func (s *AspectSet) Contains(aspect any) bool

Contains is whether the aspect is in the set.

func (*AspectSet) Items

func (s *AspectSet) Items() []any

Items are the aspects, in the order they were added.

func (*AspectSet) Len

func (s *AspectSet) Len() int

Len is the number of aspects.

type AsyncSnapshot

type AsyncSnapshot[T any] struct {
	// contains filtered or unexported fields
}

AsyncSnapshot is the immutable most recent interaction with an asynchronous computation: its connection state and the latest data or error.

Flutter: widgets/async.dart AsyncSnapshot

func NewAsyncSnapshotNothing

func NewAsyncSnapshotNothing[T any]() AsyncSnapshot[T]

NewAsyncSnapshotNothing creates a snapshot in ConnectionStateNone with no data or error.

Flutter: widgets/async.dart AsyncSnapshot.nothing

func NewAsyncSnapshotWaiting

func NewAsyncSnapshotWaiting[T any]() AsyncSnapshot[T]

NewAsyncSnapshotWaiting creates a snapshot in ConnectionStateWaiting with no data or error.

Flutter: widgets/async.dart AsyncSnapshot.waiting

func NewAsyncSnapshotWithData

func NewAsyncSnapshotWithData[T any](state ConnectionState, data T) AsyncSnapshot[T]

NewAsyncSnapshotWithData creates a snapshot in the state with the data.

Flutter: widgets/async.dart AsyncSnapshot.withData

func NewAsyncSnapshotWithError

func NewAsyncSnapshotWithError[T any](state ConnectionState, err error) AsyncSnapshot[T]

NewAsyncSnapshotWithError creates a snapshot in the state with the error.

Flutter: widgets/async.dart AsyncSnapshot.withError

func (AsyncSnapshot[T]) ConnectionState

func (s AsyncSnapshot[T]) ConnectionState() ConnectionState

ConnectionState is the current state of the connection to the asynchronous computation.

Flutter: widgets/async.dart AsyncSnapshot.connectionState

func (AsyncSnapshot[T]) Data

func (s AsyncSnapshot[T]) Data() T

Data is the latest data received by the computation, or the zero value when there is none (see HasData).

Flutter: widgets/async.dart AsyncSnapshot.data

func (AsyncSnapshot[T]) Error

func (s AsyncSnapshot[T]) Error() error

Error is the latest error received by the computation, or nil.

Flutter: widgets/async.dart AsyncSnapshot.error

func (AsyncSnapshot[T]) HasData

func (s AsyncSnapshot[T]) HasData() bool

HasData is whether the snapshot has data.

Flutter: widgets/async.dart AsyncSnapshot.hasData

func (AsyncSnapshot[T]) HasError

func (s AsyncSnapshot[T]) HasError() bool

HasError is whether the snapshot has an error.

Flutter: widgets/async.dart AsyncSnapshot.hasError

func (AsyncSnapshot[T]) InState

func (s AsyncSnapshot[T]) InState(state ConnectionState) AsyncSnapshot[T]

InState is a copy of the snapshot in another connection state.

Flutter: widgets/async.dart AsyncSnapshot.inState

func (AsyncSnapshot[T]) RequireData

func (s AsyncSnapshot[T]) RequireData() T

RequireData is the latest data, or panics with the error of the snapshot, or with the tag AsyncSnapshotEmpty when it has neither.

Flutter: widgets/async.dart AsyncSnapshot.requireData

func (AsyncSnapshot[T]) String

func (s AsyncSnapshot[T]) String() string

String describes the snapshot.

Flutter: widgets/async.dart AsyncSnapshot.toString

type AsyncWidgetBuilder

type AsyncWidgetBuilder[T any] func(bc BuildContext, snapshot AsyncSnapshot[T]) Widget

AsyncWidgetBuilder builds a widget for the snapshot of an asynchronous computation.

Flutter: widgets/async.dart AsyncWidgetBuilder

type AttachOpts

type AttachOpts struct {
	// OnKeyEvent replaces the node's key event handler when it is not nil.
	OnKeyEvent FocusOnKeyEventCallback
}

AttachOpts are the optional parameters of FocusNode.Attach.

Flutter: widgets/focus_manager.dart FocusNode.attach

type AutocompleteFieldViewBuilder

type AutocompleteFieldViewBuilder func(bc BuildContext, textEditingController *TextEditingController, focusNode *FocusNode, onFieldSubmitted foundation.VoidCallback) Widget

AutocompleteFieldViewBuilder is the type of the function that builds the field view. The textEditingController and the focusNode are those the RawAutocomplete listens to; onFieldSubmitted must be called when the field is submitted.

Flutter: widgets/autocomplete.dart AutocompleteFieldViewBuilder

type AutocompleteFirstOptionIntent

type AutocompleteFirstOptionIntent struct{ IntentBase }

AutocompleteFirstOptionIntent is an intent to highlight the first option in the list of options.

Flutter: widgets/autocomplete.dart AutocompleteFirstOptionIntent

type AutocompleteHighlightedOption

type AutocompleteHighlightedOption struct {
	InheritedNotifier
	// contains filtered or unexported fields
}

AutocompleteHighlightedOption is an inherited widget that tells which option of the options view is highlighted.

Flutter: widgets/autocomplete.dart AutocompleteHighlightedOption

func NewAutocompleteHighlightedOption

func NewAutocompleteHighlightedOption(highlightIndexNotifier *foundation.ValueNotifier[int], child Widget, opts ...WidgetOpts) *AutocompleteHighlightedOption

NewAutocompleteHighlightedOption creates the widget.

Flutter: widgets/autocomplete.dart AutocompleteHighlightedOption.new

type AutocompleteLastOptionIntent

type AutocompleteLastOptionIntent struct{ IntentBase }

AutocompleteLastOptionIntent is an intent to highlight the last option in the list of options.

Flutter: widgets/autocomplete.dart AutocompleteLastOptionIntent

type AutocompleteNextOptionIntent

type AutocompleteNextOptionIntent struct{ IntentBase }

AutocompleteNextOptionIntent is an intent to highlight the next option in the list of options.

Flutter: widgets/autocomplete.dart AutocompleteNextOptionIntent

type AutocompleteNextPageOptionIntent

type AutocompleteNextPageOptionIntent struct{ IntentBase }

AutocompleteNextPageOptionIntent is an intent to highlight the option one page after the current highlighted option.

Flutter: widgets/autocomplete.dart AutocompleteNextPageOptionIntent

type AutocompleteOnSelected

type AutocompleteOnSelected[T comparable] func(option T)

AutocompleteOnSelected is the type of the callback that is called when an option is selected.

Flutter: widgets/autocomplete.dart AutocompleteOnSelected

type AutocompleteOptionToString

type AutocompleteOptionToString[T comparable] func(option T) string

AutocompleteOptionToString is the type of the function that turns an option into the string shown in the field.

Flutter: widgets/autocomplete.dart AutocompleteOptionToString

type AutocompleteOptionsBuilder

type AutocompleteOptionsBuilder[T comparable] func(textEditingValue services.TextEditingValue, deliver func(options []T))

AutocompleteOptionsBuilder is the type of the function that builds the options for the current text editing value. It calls deliver with the options, right away or later (on the UI thread, or through the binding's Post from another goroutine).

Deviation: Flutter's builder returns a FutureOr<Iterable<T>>; Go has no futures, so the options are delivered through a callback (SPEC §12.10).

Flutter: widgets/autocomplete.dart AutocompleteOptionsBuilder

type AutocompleteOptionsViewBuilder

type AutocompleteOptionsViewBuilder[T comparable] func(bc BuildContext, onSelected AutocompleteOnSelected[T], options []T) Widget

AutocompleteOptionsViewBuilder is the type of the function that builds the view of the options.

Flutter: widgets/autocomplete.dart AutocompleteOptionsViewBuilder

type AutocompletePreviousOptionIntent

type AutocompletePreviousOptionIntent struct{ IntentBase }

AutocompletePreviousOptionIntent is an intent to highlight the previous option in the list of options.

Flutter: widgets/autocomplete.dart AutocompletePreviousOptionIntent

type AutocompletePreviousPageOptionIntent

type AutocompletePreviousPageOptionIntent struct{ IntentBase }

AutocompletePreviousPageOptionIntent is an intent to highlight the option one page before the current highlighted option.

Flutter: widgets/autocomplete.dart AutocompletePreviousPageOptionIntent

type AutomaticKeepAlive

type AutomaticKeepAlive struct {
	StatefulWidget
	// contains filtered or unexported fields
}

AutomaticKeepAlive lets the descendants that dispatch a KeepAliveNotification keep their subtree alive in a lazy list: while any of them wants it, it builds a KeepAlive(true) parent data widget.

Flutter: widgets/automatic_keep_alive.dart AutomaticKeepAlive

func NewAutomaticKeepAlive

func NewAutomaticKeepAlive(child Widget, opts ...AutomaticKeepAliveOpts) *AutomaticKeepAlive

NewAutomaticKeepAlive creates a widget that keeps its child alive when the child asks for it.

Flutter: widgets/automatic_keep_alive.dart AutomaticKeepAlive.new

func (*AutomaticKeepAlive) Child

func (w *AutomaticKeepAlive) Child() Widget

Child is the widget below this one.

Flutter: widgets/automatic_keep_alive.dart AutomaticKeepAlive.child

func (*AutomaticKeepAlive) CreateState

func (w *AutomaticKeepAlive) CreateState() State

CreateState creates the state.

Flutter: widgets/automatic_keep_alive.dart AutomaticKeepAlive.createState

type AutomaticKeepAliveClient

type AutomaticKeepAliveClient struct {
	// contains filtered or unexported fields
}

AutomaticKeepAliveClient is what a State embeds to keep its subtree alive in a lazy list when its WantKeepAlive method returns true. The state calls UpdateKeepAlive when the answer changes, and KeepAliveBuild from its Build.

type itemState struct {
	widgets.StateOf[*Item]
	widgets.AutomaticKeepAliveClient
}

func (s *itemState) WantKeepAlive() bool { return true }

Flutter: widgets/automatic_keep_alive.dart AutomaticKeepAliveClientMixin

func (*AutomaticKeepAliveClient) KeepAliveBuild

func (c *AutomaticKeepAliveClient) KeepAliveBuild()

KeepAliveBuild is what a Build method calls first (Dart's super.build): it asks to be kept alive if WantKeepAlive says so and it has not yet.

Flutter: widgets/automatic_keep_alive.dart AutomaticKeepAliveClientMixin.build

func (*AutomaticKeepAliveClient) UpdateKeepAlive

func (c *AutomaticKeepAliveClient) UpdateKeepAlive()

UpdateKeepAlive keeps the subtree alive, or lets it go, as WantKeepAlive says. Call it when WantKeepAlive changes.

Flutter: widgets/automatic_keep_alive.dart AutomaticKeepAliveClientMixin.updateKeepAlive

type AutomaticKeepAliveOpts

type AutomaticKeepAliveOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

AutomaticKeepAliveOpts are the optional parameters of NewAutomaticKeepAlive.

Flutter: widgets/automatic_keep_alive.dart AutomaticKeepAlive.new

type AutovalidateMode

type AutovalidateMode int

AutovalidateMode used to configure when a FormField will validate and generate its error message.

Flutter: widgets/form.dart AutovalidateMode

const (
	// AutovalidateModeUnspecified is the zero value: the default, which is
	// AutovalidateModeDisabled for a Form, and for a FormField.
	AutovalidateModeUnspecified AutovalidateMode = iota
	// AutovalidateModeDisabled is no auto validation, it will only validate
	// its form field when its Validate is called, or when the Form's Validate is
	// called.
	//
	// Flutter: widgets/form.dart AutovalidateMode.disabled
	AutovalidateModeDisabled
	// AutovalidateModeAlways always validates the form field, even before the
	// user has interacted with it.
	//
	// Flutter: widgets/form.dart AutovalidateMode.always
	AutovalidateModeAlways
	// AutovalidateModeOnUserInteraction validates the form field only after the
	// field has been interacted with by the user.
	//
	// Flutter: widgets/form.dart AutovalidateMode.onUserInteraction
	AutovalidateModeOnUserInteraction
	// AutovalidateModeOnUnfocus validates the form field when the field loses
	// focus.
	//
	// Flutter: widgets/form.dart AutovalidateMode.onUnfocus
	AutovalidateModeOnUnfocus
	// AutovalidateModeOnUserInteractionIfError validates the form field after
	// the user has interacted with it, and only while it has an error.
	//
	// Flutter: widgets/form.dart AutovalidateMode.onUserInteractionIfError
	AutovalidateModeOnUserInteractionIfError
)

func (AutovalidateMode) Name

func (m AutovalidateMode) Name() string

Name is the name of the mode.

Flutter: widgets/form.dart AutovalidateMode.name

func (AutovalidateMode) String

func (m AutovalidateMode) String() string

String is "AutovalidateMode." and the name.

Flutter: widgets/form.dart AutovalidateMode.toString

type BackButtonCallback

type BackButtonCallback func() bool

BackButtonCallback is a function of the back button dispatchers: it returns true when it handled the back button.

Flutter: widgets/router.dart BackButtonDispatcher

type BackButtonCallbackHandle

type BackButtonCallbackHandle struct {
	// contains filtered or unexported fields
}

BackButtonCallbackHandle identifies a callback that was added to a dispatcher, to remove it.

Flutter: no counterpart

type BackButtonDispatcher

type BackButtonDispatcher interface {
	// HasCallbacks is whether the dispatcher or one of its children has a callback.
	//
	// Flutter: widgets/router.dart BackButtonDispatcher.hasCallbacks
	HasCallbacks() bool
	// AddCallback adds the callback that handles the back button; a dispatcher
	// supports one callback at a time.
	//
	// Flutter: widgets/router.dart BackButtonDispatcher.addCallback
	AddCallback(callback BackButtonCallback) BackButtonCallbackHandle
	// RemoveCallback removes the callback that AddCallback returned the handle of.
	//
	// Flutter: widgets/router.dart BackButtonDispatcher.removeCallback
	RemoveCallback(handle BackButtonCallbackHandle)
	// InvokeCallback calls the children, the last one that took priority first,
	// then the callback of the dispatcher, and returns what the first that handled
	// the button returned, or defaultValue.
	//
	// Flutter: widgets/router.dart BackButtonDispatcher.invokeCallback
	InvokeCallback(defaultValue bool) bool
	// CreateChildBackButtonDispatcher creates a child of this dispatcher.
	//
	// Flutter: widgets/router.dart BackButtonDispatcher.createChildBackButtonDispatcher
	CreateChildBackButtonDispatcher() *ChildBackButtonDispatcher
	// TakePriority makes this dispatcher the first one to be asked.
	//
	// Flutter: widgets/router.dart BackButtonDispatcher.takePriority
	TakePriority()
	// DeferTo makes the child the first one to be asked.
	//
	// Flutter: widgets/router.dart BackButtonDispatcher.deferTo
	DeferTo(child *ChildBackButtonDispatcher)
	// Forget removes the child from the ones that are asked.
	//
	// Flutter: widgets/router.dart BackButtonDispatcher.forget
	Forget(child *ChildBackButtonDispatcher)
	// contains filtered or unexported methods
}

BackButtonDispatcher tells the router that the platform's back button was pressed. A dispatcher has at most one callback of its own, and child dispatchers that take priority over it.

Flutter: widgets/router.dart BackButtonDispatcher

type BackButtonDispatcherBase

type BackButtonDispatcherBase struct {
	// contains filtered or unexported fields
}

BackButtonDispatcherBase implements BackButtonDispatcher: embed it and call InitBackButtonDispatcherBase.

Flutter: widgets/router.dart BackButtonDispatcher

func (*BackButtonDispatcherBase) AddCallback

AddCallback adds the callback.

Flutter: widgets/router.dart BackButtonDispatcher.addCallback

func (*BackButtonDispatcherBase) CreateChildBackButtonDispatcher

func (b *BackButtonDispatcherBase) CreateChildBackButtonDispatcher() *ChildBackButtonDispatcher

CreateChildBackButtonDispatcher creates a child dispatcher.

Flutter: widgets/router.dart BackButtonDispatcher.createChildBackButtonDispatcher

func (*BackButtonDispatcherBase) DeferTo

DeferTo makes the child the first to be asked. In debug builds a dispatcher without callbacks panics with the tag BackButtonDispatcherEmpty.

Flutter: widgets/router.dart BackButtonDispatcher.deferTo

func (*BackButtonDispatcherBase) Forget

Forget removes the child.

Flutter: widgets/router.dart BackButtonDispatcher.forget

func (*BackButtonDispatcherBase) HasCallbacks

func (b *BackButtonDispatcherBase) HasCallbacks() bool

HasCallbacks is whether the dispatcher has a callback or children.

Flutter: widgets/router.dart BackButtonDispatcher.hasCallbacks

func (*BackButtonDispatcherBase) InvokeCallback

func (b *BackButtonDispatcherBase) InvokeCallback(defaultValue bool) bool

InvokeCallback asks the children, the last one first, then the callback.

Flutter: widgets/router.dart BackButtonDispatcher.invokeCallback

func (*BackButtonDispatcherBase) RemoveCallback

func (b *BackButtonDispatcherBase) RemoveCallback(handle BackButtonCallbackHandle)

RemoveCallback removes the callback of the handle.

Flutter: widgets/router.dart BackButtonDispatcher.removeCallback

func (*BackButtonDispatcherBase) TakePriority

func (b *BackButtonDispatcherBase) TakePriority()

TakePriority removes the children, so that this dispatcher is asked first.

Flutter: widgets/router.dart BackButtonDispatcher.takePriority

type BackButtonListener

type BackButtonListener struct {
	StatefulWidget
	// contains filtered or unexported fields
}

BackButtonListener registers a callback with the back button dispatcher of the router above it, and takes priority over it while it is in the tree.

Flutter: widgets/router.dart BackButtonListener

func NewBackButtonListener

func NewBackButtonListener(onBackButtonPressed BackButtonCallback, child Widget, opts ...WidgetOpts) *BackButtonListener

NewBackButtonListener creates the widget; onBackButtonPressed returns true when it handled the button.

Flutter: widgets/router.dart BackButtonListener.new

func (*BackButtonListener) Child

func (w *BackButtonListener) Child() Widget

Child is the widget below.

Flutter: widgets/router.dart BackButtonListener.child

func (*BackButtonListener) CreateState

func (w *BackButtonListener) CreateState() State

CreateState creates the state.

Flutter: widgets/router.dart BackButtonListener.createState

type BackdropFilter

type BackdropFilter struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

BackdropFilter applies a filter to the existing painted content and then paints its child.

Flutter: widgets/basic.dart BackdropFilter

func NewBackdropFilter

func NewBackdropFilter(filter ui.ImageFilter, child Widget, opts ...BackdropFilterOpts) *BackdropFilter

NewBackdropFilter creates the widget.

Flutter: widgets/basic.dart BackdropFilter.new

func (*BackdropFilter) BackdropKey

BackdropKey is the key shared by the backdrop filters that use the same backdrop.

Flutter: widgets/basic.dart BackdropFilter.backdropKey

func (*BackdropFilter) BlendMode

func (w *BackdropFilter) BlendMode() ui.BlendMode

BlendMode is the blend mode to use to apply the filtered background content onto the background; the default is BlendModeSrcOver.

Flutter: widgets/basic.dart BackdropFilter.blendMode

func (*BackdropFilter) CreateRenderObject

func (w *BackdropFilter) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart BackdropFilter.createRenderObject

func (*BackdropFilter) Enabled

func (w *BackdropFilter) Enabled() foundation.Opt[bool]

Enabled is whether the filter is applied; the default is true.

Flutter: widgets/basic.dart BackdropFilter.enabled

func (*BackdropFilter) Filter

func (w *BackdropFilter) Filter() ui.ImageFilter

Filter is the image filter to apply to the existing painted content.

Flutter: widgets/basic.dart BackdropFilter.filter

func (*BackdropFilter) UpdateRenderObject

func (w *BackdropFilter) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart BackdropFilter.updateRenderObject

type BackdropFilterOpts

type BackdropFilterOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// BlendMode is the blend mode to use to apply the filtered background content onto the background; the default is BlendModeSrcOver.
	BlendMode ui.BlendMode
	// Enabled is whether the filter is applied; the default is true.
	Enabled foundation.Opt[bool]
	// BackdropKey is the key shared by the backdrop filters that use the same backdrop.
	BackdropKey foundation.Opt[rendering.BackdropKey]
}

BackdropFilterOpts are the optional parameters of NewBackdropFilter.

Flutter: widgets/basic.dart BackdropFilter.new

type BallisticScrollActivity

type BallisticScrollActivity struct {
	ScrollActivityBase
	// contains filtered or unexported fields
}

BallisticScrollActivity is the activity of a position that a simulation carries, after a fling or to bring an overscroll back.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity

func NewBallisticScrollActivity

func NewBallisticScrollActivity(delegate ScrollActivityDelegate, simulation physics.Simulation, vsync scheduler.TickerProvider, shouldIgnorePointer bool, post func(func())) *BallisticScrollActivity

NewBallisticScrollActivity creates the activity that runs the simulation with a controller from vsync. shouldIgnorePointer is the value of ShouldIgnorePointer, and post runs a function after the code running now (the microtask of Dart; nil runs it at once).

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.new

func (*BallisticScrollActivity) ApplyMoveTo

func (a *BallisticScrollActivity) ApplyMoveTo(value float64) bool

ApplyMoveTo moves the position to the value and returns whether to keep going: false when the position hit an edge and has overscroll.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.applyMoveTo

func (*BallisticScrollActivity) ApplyNewDimensions

func (a *BallisticScrollActivity) ApplyNewDimensions()

ApplyNewDimensions goes ballistic again with the current velocity.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.applyNewDimensions

func (*BallisticScrollActivity) DispatchOverscrollNotification

func (a *BallisticScrollActivity) DispatchOverscrollNotification(metrics ScrollMetrics, bc BuildContext, overscroll float64)

DispatchOverscrollNotification dispatches an OverscrollNotification with the velocity of the activity.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.dispatchOverscrollNotification

func (*BallisticScrollActivity) Dispose

func (a *BallisticScrollActivity) Dispose()

Dispose disposes the controller.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.dispose

func (*BallisticScrollActivity) IsScrolling

func (a *BallisticScrollActivity) IsScrolling() bool

IsScrolling is true.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.isScrolling

func (*BallisticScrollActivity) ResetActivity

func (a *BallisticScrollActivity) ResetActivity()

ResetActivity goes ballistic again with the current velocity.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.resetActivity

func (*BallisticScrollActivity) ShouldIgnorePointer

func (a *BallisticScrollActivity) ShouldIgnorePointer() bool

ShouldIgnorePointer is the value the activity was made with.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.shouldIgnorePointer

func (*BallisticScrollActivity) String

func (a *BallisticScrollActivity) String() string

String is the identity of the activity and its controller.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.toString

func (*BallisticScrollActivity) Velocity

func (a *BallisticScrollActivity) Velocity() float64

Velocity is the velocity of the simulation.

Flutter: widgets/scroll_activity.dart BallisticScrollActivity.velocity

type Banner struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Banner displays a diagonal message above the corner of another widget.

Flutter: widgets/banner.dart Banner

func NewBanner

func NewBanner(message string, location BannerLocation, child Widget, opts ...BannerOpts) *Banner

NewBanner creates the widget. The child, which may be nil, is the widget that the banner is over.

Flutter: widgets/banner.dart Banner.new

func (*Banner) Child

func (w *Banner) Child() Widget

Child is the widget that the banner is over.

Flutter: widgets/banner.dart Banner.child

func (*Banner) CreateState

func (w *Banner) CreateState() State

CreateState creates the state.

Flutter: widgets/banner.dart Banner.createState

func (*Banner) DebugFillProperties

func (w *Banner) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the message, directions, location, color and text style.

Flutter: widgets/banner.dart Banner.debugFillProperties

func (*Banner) Location

func (w *Banner) Location() BannerLocation

Location is the corner of the child where the banner is.

Flutter: widgets/banner.dart Banner.location

func (*Banner) Message

func (w *Banner) Message() string

Message is the text of the banner.

Flutter: widgets/banner.dart Banner.message

type BannerLocation

type BannerLocation int

BannerLocation is where to show a Banner.

Flutter: widgets/banner.dart BannerLocation

const (
	// BannerLocationUnspecified is the zero value: no location.
	//
	// Flutter: no counterpart
	BannerLocationUnspecified BannerLocation = iota
	// BannerLocationTopStart is the top corner on the start side of the reading
	// direction.
	//
	// Flutter: widgets/banner.dart BannerLocation.topStart
	BannerLocationTopStart
	// BannerLocationTopEnd is the top corner on the end side.
	//
	// Flutter: widgets/banner.dart BannerLocation.topEnd
	BannerLocationTopEnd
	// BannerLocationBottomStart is the bottom corner on the start side.
	//
	// Flutter: widgets/banner.dart BannerLocation.bottomStart
	BannerLocationBottomStart
	// BannerLocationBottomEnd is the bottom corner on the end side.
	//
	// Flutter: widgets/banner.dart BannerLocation.bottomEnd
	BannerLocationBottomEnd
)

The values of BannerLocation follow Flutter's declaration order.

func (BannerLocation) Name

func (l BannerLocation) Name() string

Name is the name of the location, as Dart's Enum.name.

Flutter: widgets/banner.dart BannerLocation

type BannerOpts

type BannerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TextDirection is the direction of the message; the default is the one of
	// the context, which then must have a Directionality.
	TextDirection ui.TextDirection
	// LayoutDirection is the direction in which the corners are placed; the
	// default is the one of the context.
	LayoutDirection ui.TextDirection
	// Color is the color of the banner.
	Color foundation.Opt[ui.Color]
	// TextStyle is the style of the message.
	TextStyle *painting.TextStyle
	// Shadow is the shadow of the banner.
	Shadow foundation.Opt[painting.BoxShadow]
}

BannerOpts are the optional parameters of NewBanner.

Flutter: widgets/banner.dart Banner.new

type BannerPainter

type BannerPainter struct {
	rendering.CustomPainterBase
	// contains filtered or unexported fields
}

BannerPainter paints a Banner: a diagonal ribbon with a message across a corner.

Flutter: widgets/banner.dart BannerPainter

func NewBannerPainter

func NewBannerPainter(message string, textDirection ui.TextDirection, location BannerLocation, layoutDirection ui.TextDirection, opts ...BannerPainterOpts) *BannerPainter

NewBannerPainter creates the painter.

Flutter: widgets/banner.dart BannerPainter.new

func (*BannerPainter) Dispose

func (p *BannerPainter) Dispose()

Dispose releases the text painter.

Flutter: widgets/banner.dart BannerPainter.dispose

func (*BannerPainter) HitTest

func (p *BannerPainter) HitTest(ui.Offset) foundation.Opt[bool]

HitTest is false: the banner does not take pointer events.

Flutter: widgets/banner.dart BannerPainter.hitTest

func (*BannerPainter) Paint

func (p *BannerPainter) Paint(canvas *ui.Canvas, size ui.Size)

Paint draws the ribbon.

Flutter: widgets/banner.dart BannerPainter.paint

func (*BannerPainter) ShouldRepaint

func (p *BannerPainter) ShouldRepaint(oldDelegate rendering.CustomPainter) bool

ShouldRepaint is whether the message, location, color or text style changed.

Flutter: widgets/banner.dart BannerPainter.shouldRepaint

type BannerPainterOpts

type BannerPainterOpts struct {
	// Color is the color of the banner; the default is a translucent dark red.
	Color foundation.Opt[ui.Color]
	// TextStyle is the style of the message; the default is white, bold and 10.2
	// logical pixels high.
	TextStyle *painting.TextStyle
	// Shadow is the shadow of the banner; the default is black at half opacity
	// with a blur radius of 6.
	Shadow foundation.Opt[painting.BoxShadow]
	// TextEngine lays out the message. Deviation: Flutter reaches the engine
	// through a global; the framework passes the engine of the PlatformDispatcher.
	TextEngine ui.ParagraphFactory
}

BannerPainterOpts are the optional parameters of NewBannerPainter.

Flutter: widgets/banner.dart BannerPainter.new

type BaseWindowController

type BaseWindowController interface {
	foundation.Listenable
	// ContentSize is the size of the drawable area of the window, in logical
	// pixels. It can differ from the size that was asked for, and from the size of
	// the window when the window has a title bar and borders.
	//
	// Flutter: widgets/_window.dart BaseWindowController.contentSize
	ContentSize() ui.Size
	// Destroy destroys the window. It does nothing when the window is destroyed
	// already.
	//
	// Flutter: widgets/_window.dart BaseWindowController.destroy
	Destroy()
	// RootView is the root view of the window, unique to each window.
	//
	// Flutter: widgets/_window.dart BaseWindowController.rootView
	RootView() *ui.View
	// contains filtered or unexported methods
}

BaseWindowController is the base of the window controllers. A controller belongs to one window and its root view. When the window is destroyed, by the app or by the platform, the controller is no longer valid. The controllers are the RegularWindowController and the DialogWindowController.

Deviation: the interface is sealed, as Flutter's class is; the pinned Flutter also has controllers for tooltips, popups and satellites, which are deferred (SPEC §8.7, §12.10).

Flutter: widgets/_window.dart BaseWindowController

func WindowScopeMaybeOf

func WindowScopeMaybeOf(bc BuildContext) BaseWindowController

WindowScopeMaybeOf is WindowScopeOf that returns nil when there is no scope.

Flutter: widgets/_window.dart WindowScope.maybeOf

func WindowScopeOf

func WindowScopeOf(bc BuildContext) BaseWindowController

WindowScopeOf is the controller of the window that hosts the context. It panics with the tag WindowScopeMissing when there is none: the context is not below a RegularWindow, a DialogWindow, or the first window of the app.

Flutter: widgets/_window.dart WindowScope.of

type Baseline

type Baseline struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

Baseline positions its child according to the child's baseline.

Flutter: widgets/basic.dart Baseline

func NewBaseline

func NewBaseline(baseline float64, baselineType ui.TextBaseline, child Widget, opts ...BaselineOpts) *Baseline

NewBaseline creates the widget.

Flutter: widgets/basic.dart Baseline.new

func (*Baseline) Baseline

func (w *Baseline) Baseline() float64

Baseline is the number of logical pixels from the top of this box at which to position the child's baseline.

Flutter: widgets/basic.dart Baseline.baseline

func (*Baseline) BaselineType

func (w *Baseline) BaselineType() ui.TextBaseline

BaselineType is the type of baseline to use for positioning the child.

Flutter: widgets/basic.dart Baseline.baselineType

func (*Baseline) CreateRenderObject

func (w *Baseline) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Baseline.createRenderObject

func (*Baseline) UpdateRenderObject

func (w *Baseline) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Baseline.updateRenderObject

type BaselineOpts

type BaselineOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

BaselineOpts are the optional parameters of NewBaseline.

Flutter: widgets/basic.dart Baseline.new

type BlockSemantics

type BlockSemantics struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

BlockSemantics drops all the semantics of the widgets that were painted before it in the same semantic container.

Flutter: widgets/basic.dart BlockSemantics

func NewBlockSemantics

func NewBlockSemantics(child Widget, opts ...BlockSemanticsOpts) *BlockSemantics

NewBlockSemantics creates a widget that blocks the semantics of the widgets painted before it.

Flutter: widgets/basic.dart BlockSemantics.new

func (*BlockSemantics) Blocking

func (w *BlockSemantics) Blocking() bool

Blocking is whether the widget blocks the earlier semantics.

Flutter: widgets/basic.dart BlockSemantics.blocking

func (*BlockSemantics) CreateRenderObject

func (w *BlockSemantics) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart BlockSemantics.createRenderObject

func (*BlockSemantics) UpdateRenderObject

func (w *BlockSemantics) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart BlockSemantics.updateRenderObject

type BlockSemanticsOpts

type BlockSemanticsOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Blocking is whether this widget blocks the semantics of widgets that were
	// painted before it in the same semantic container; the default is true.
	Blocking foundation.Opt[bool]
}

BlockSemanticsOpts are the optional parameters of NewBlockSemantics.

Flutter: widgets/basic.dart BlockSemantics.new

type BottomNavigationBarItem

type BottomNavigationBarItem struct {
	// contains filtered or unexported fields
}

BottomNavigationBarItem is an interactive button within either a Material or a Cupertino bottom navigation bar: an icon with an optional label.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem

func NewBottomNavigationBarItem

func NewBottomNavigationBarItem(icon Widget, opts ...BottomNavigationBarItemOpts) BottomNavigationBarItem

NewBottomNavigationBarItem creates an item with the icon. The active icon defaults to the icon.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.new

func (BottomNavigationBarItem) ActiveIcon

func (i BottomNavigationBarItem) ActiveIcon() Widget

ActiveIcon is the icon that shows when the item is selected.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.activeIcon

func (BottomNavigationBarItem) BackgroundColor

func (i BottomNavigationBarItem) BackgroundColor() foundation.Opt[ui.Color]

BackgroundColor is the color of the background of the Material bar.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.backgroundColor

func (BottomNavigationBarItem) Icon

Icon is the icon of the item.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.icon

func (BottomNavigationBarItem) Key

Key is the key that is passed through to the resultant widget.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.key

func (BottomNavigationBarItem) Label

func (i BottomNavigationBarItem) Label() string

Label is the text label of the item; the empty string means none.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.label

func (BottomNavigationBarItem) SemanticsLabel

func (i BottomNavigationBarItem) SemanticsLabel() foundation.Opt[string]

SemanticsLabel is the semantics label of the item, if one was given.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.semanticsLabel

func (BottomNavigationBarItem) Tooltip

func (i BottomNavigationBarItem) Tooltip() string

Tooltip is the text of the tooltip of the item; the empty string means none.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.tooltip

type BottomNavigationBarItemOpts

type BottomNavigationBarItemOpts struct {
	// Key is a key to be passed through to the resultant widget.
	Key foundation.Key
	// Label is the text label of the item; the empty string means none.
	Label string
	// ActiveIcon is the icon shown when the item is selected; the default is the icon.
	ActiveIcon Widget
	// BackgroundColor is the color of the background of the Material bar; the Cupertino tab bar does not use it.
	BackgroundColor foundation.Opt[ui.Color]
	// Tooltip is the text of the tooltip of the item; the empty string means none.
	Tooltip string
	// SemanticsLabel is the semantics label of the item, which replaces the label for the accessibility tools.
	SemanticsLabel foundation.Opt[string]
}

BottomNavigationBarItemOpts are the optional parameters of NewBottomNavigationBarItem.

Flutter: widgets/bottom_navigation_bar_item.dart BottomNavigationBarItem.new

type BouncingScrollPhysics

type BouncingScrollPhysics struct {
	ScrollPhysicsBase
	// contains filtered or unexported fields
}

BouncingScrollPhysics is the scroll physics of iOS and macOS: the content goes past its extents with friction, and a spring pulls it back.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics

func NewBouncingScrollPhysics

func NewBouncingScrollPhysics(opts ...BouncingScrollPhysicsOpts) *BouncingScrollPhysics

NewBouncingScrollPhysics creates the physics.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.new

func (*BouncingScrollPhysics) ApplyBoundaryConditions

func (p *BouncingScrollPhysics) ApplyBoundaryConditions(ScrollMetrics, float64) float64

ApplyBoundaryConditions has no boundary: the content can go past its extents.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.applyBoundaryConditions

func (*BouncingScrollPhysics) ApplyPhysicsToUserOffset

func (p *BouncingScrollPhysics) ApplyPhysicsToUserOffset(position ScrollMetrics, offset float64) float64

ApplyPhysicsToUserOffset applies the friction of the overscroll to a drag.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.applyPhysicsToUserOffset

func (*BouncingScrollPhysics) ApplyTo

func (p *BouncingScrollPhysics) ApplyTo(ancestor ScrollPhysics) ScrollPhysics

ApplyTo returns a copy on top of the ancestor.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.applyTo

func (*BouncingScrollPhysics) CarriedMomentum

func (p *BouncingScrollPhysics) CarriedMomentum(existingVelocity float64) float64

CarriedMomentum is the momentum of the fling that a new touch carries over; the formula is empirical.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.carriedMomentum

func (*BouncingScrollPhysics) CreateBallisticSimulation

func (p *BouncingScrollPhysics) CreateBallisticSimulation(position ScrollMetrics, velocity float64) physics.Simulation

CreateBallisticSimulation is a BouncingScrollSimulation when the position is out of range or the velocity is above the tolerance; otherwise nil.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.createBallisticSimulation

func (*BouncingScrollPhysics) DecelerationRate

func (p *BouncingScrollPhysics) DecelerationRate() ScrollDecelerationRate

DecelerationRate is how quickly the physics decelerate.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.decelerationRate

func (*BouncingScrollPhysics) DragStartDistanceMotionThreshold

func (p *BouncingScrollPhysics) DragStartDistanceMotionThreshold() foundation.Opt[float64]

DragStartDistanceMotionThreshold is 3.5 logical pixels, so that a finger that stops a fling does not move the content.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.dragStartDistanceMotionThreshold

func (*BouncingScrollPhysics) FrictionFactor

func (p *BouncingScrollPhysics) FrictionFactor(overscrollFraction float64) float64

FrictionFactor is the fraction of a drag that moves the position while it is overscrolled by the fraction of the viewport; the farther it goes, the less it moves.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.frictionFactor

func (*BouncingScrollPhysics) MaxFlingVelocity

func (p *BouncingScrollPhysics) MaxFlingVelocity() float64

MaxFlingVelocity is eight times the usual for the fast deceleration rate.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.maxFlingVelocity

func (*BouncingScrollPhysics) MinFlingVelocity

func (p *BouncingScrollPhysics) MinFlingVelocity() float64

MinFlingVelocity is twice that of the other physics, so that a slow drag does not fling.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.minFlingVelocity

func (*BouncingScrollPhysics) Spring

Spring is a stiffer spring for the fast deceleration rate.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.spring

type BouncingScrollPhysicsOpts

type BouncingScrollPhysicsOpts struct {
	// DecelerationRate is how quickly the physics decelerate; the default is
	// ScrollDecelerationRateNormal.
	DecelerationRate ScrollDecelerationRate
	// Parent is the physics to defer to.
	Parent ScrollPhysics
}

BouncingScrollPhysicsOpts are the optional parameters of NewBouncingScrollPhysics.

Flutter: widgets/scroll_physics.dart BouncingScrollPhysics.new

type BoxScrollView

type BoxScrollView struct {
	ScrollView
	// contains filtered or unexported fields
}

BoxScrollView is the base of the scroll views that have a single sliver of boxes, with a padding: ListView and GridView.

Flutter: widgets/scroll_view.dart BoxScrollView

func (*BoxScrollView) BuildSlivers

func (v *BoxScrollView) BuildSlivers(bc BuildContext) []Widget

BuildSlivers builds the sliver, padded.

Flutter: widgets/scroll_view.dart BoxScrollView.buildSlivers

func (*BoxScrollView) Padding

Padding is the amount of space by which to inset the children, or nil.

Flutter: widgets/scroll_view.dart BoxScrollView.padding

type BoxScrollViewSelf

type BoxScrollViewSelf interface {
	// BuildChildLayout builds the one sliver that the view shows.
	//
	// Flutter: widgets/scroll_view.dart BoxScrollView.buildChildLayout
	BuildChildLayout(bc BuildContext) Widget
}

BoxScrollViewSelf is what a box scroll view needs of the type that embeds it.

Flutter: widgets/scroll_view.dart BoxScrollView.buildChildLayout

type BuildContext

type BuildContext interface {
	// Widget is the current configuration of the element that this context
	// belongs to. It panics with the tag ElementWidgetUnmounted when the
	// element has been unmounted.
	//
	// Flutter: widgets/framework.dart BuildContext.widget
	Widget() Widget
	// Owner is the build owner that manages the element, or nil before the
	// element is mounted.
	//
	// Flutter: widgets/framework.dart BuildContext.owner
	Owner() *BuildOwner
	// Mounted is whether the element is in the tree: false after it has been
	// unmounted.
	//
	// Flutter: widgets/framework.dart BuildContext.mounted
	Mounted() bool
	// DebugDoingBuild is whether the widget of this context is being built.
	//
	// Flutter: widgets/framework.dart BuildContext.debugDoingBuild
	DebugDoingBuild() bool
	// Size is the size of the render box of this element; false when there is no
	// box. The element must be active, laid out and not in a build.
	//
	// Flutter: widgets/framework.dart BuildContext.size
	Size() (ui.Size, bool)
	// FindRenderObject is the render object of this element, or of the first
	// descendant that has one. It is valid only while the element is active.
	//
	// Flutter: widgets/framework.dart BuildContext.findRenderObject
	FindRenderObject() rendering.RenderObject

	// VisitAncestorElements walks the ancestors from the closest to the root
	// until the visitor returns false.
	//
	// Flutter: widgets/framework.dart BuildContext.visitAncestorElements
	VisitAncestorElements(visitor ConditionalElementVisitor)
	// VisitChildElements calls the visitor for each child of the element.
	//
	// Flutter: widgets/framework.dart BuildContext.visitChildElements
	VisitChildElements(visitor ElementVisitor)
	// DependOnInheritedElement registers the context as a dependent of the
	// inherited element, with an aspect for the models that use it, and returns
	// the inherited widget. The context is rebuilt when the widget changes.
	// Look inherited widgets up with DependOn instead.
	//
	// Flutter: widgets/framework.dart BuildContext.dependOnInheritedElement
	DependOnInheritedElement(ancestor InheritedElementSelf, aspect any) Widget

	// DescribeElement returns a node that describes the element, for an error.
	//
	// Flutter: widgets/framework.dart BuildContext.describeElement
	DescribeElement(name string, style ...foundation.DiagnosticsTreeStyle) foundation.DiagnosticsNode
	// DescribeWidget returns a node that describes the widget, for an error.
	//
	// Flutter: widgets/framework.dart BuildContext.describeWidget
	DescribeWidget(name string, style ...foundation.DiagnosticsTreeStyle) foundation.DiagnosticsNode
	// DescribeMissingAncestor returns nodes that describe an ancestor that
	// could not be found, for an error.
	//
	// Flutter: widgets/framework.dart BuildContext.describeMissingAncestor
	DescribeMissingAncestor(expectedAncestorType string) []foundation.DiagnosticsNode
	// DescribeOwnershipChain returns a node that lists the widgets that
	// created this one, for an error.
	//
	// Flutter: widgets/framework.dart BuildContext.describeOwnershipChain
	DescribeOwnershipChain(name string) foundation.DiagnosticsNode
	// contains filtered or unexported methods
}

BuildContext is a handle to the location of a widget in the widget tree. An element is its own build context: the one that a widget's Build method receives is the element that builds it.

Name a build context bc in Go code (ctx is for context.Context).

Flutter: widgets/framework.dart BuildContext

type BuildOwner

type BuildOwner struct {
	// OnBuildScheduled is called when the first element becomes dirty; the
	// owner of a binding uses it to schedule a frame.
	//
	// Flutter: widgets/framework.dart BuildOwner.onBuildScheduled
	OnBuildScheduled func()
	// OnError is the framework's error reporter: it receives the errors the
	// framework reports instead of throwing, such as the problems it finds while
	// it finalizes the tree or applies parent data, and the panics it recovers
	// from in Build and in the lifecycle hooks of a state (SPEC §14.2). Without
	// it these errors panic, because they must not pass unnoticed.
	//
	// Flutter: foundation/assertions.dart FlutterError.onError
	OnError foundation.ErrorReporter
	// Debug are the debug flags that the build reads; nil means all off.
	//
	// Flutter: widgets/debug.dart
	Debug *DebugOptions
	// Post runs a function on the UI thread, from any goroutine; the binding
	// passes its own. SetState called from another goroutine and the errors of
	// State.Go go through it (SPEC §13). Without it, only the UI thread may call
	// SetState.
	//
	// Flutter: no counterpart
	Post func(fn func())
	// UIThread says which goroutine is the UI thread. Debug builds check it in
	// MarkNeedsBuild, and SetState uses it to tell the UI thread from the
	// goroutines that must post. Without it nothing is checked.
	//
	// Flutter: no counterpart
	UIThread *foundation.UIThread
	// ErrorWidgetBuilder builds the widget that takes the place of a widget that
	// panicked in Build. The default is NewErrorWidgetWithDetails, with the text
	// of the error as the message in debug builds and an empty message in
	// release builds.
	//
	// Flutter: widgets/framework.dart ErrorWidget.builder
	ErrorWidgetBuilder func(err error) Widget
	// contains filtered or unexported fields
}

BuildOwner manages the widgets framework: it tracks which elements need rebuilding, rebuilds them in order of depth, and finalizes the tree by unmounting the elements that were deactivated.

Flutter: widgets/framework.dart BuildOwner

func NewBuildOwner

func NewBuildOwner(opts ...BuildOwnerOpts) *BuildOwner

NewBuildOwner creates a build owner.

Flutter: widgets/framework.dart BuildOwner.new

func (*BuildOwner) BuildScope

func (o *BuildOwner) BuildScope(context Element, callback func())

BuildScope builds the dirty elements of the scope of context, from the shallowest to the deepest, and elements that become dirty on the way if they are below. It first runs the callback, if there is one, with the tree locked. Pass a nil callback to just build.

Deviation: it is a method with the callback as a plain argument, where Flutter's is an optional positional one (SPEC §12.10).

Flutter: widgets/framework.dart BuildOwner.buildScope

func (*BuildOwner) DebugBuilding

func (o *BuildOwner) DebugBuilding() bool

DebugBuilding is whether the owner is in BuildScope. It is always false in release builds.

Flutter: widgets/framework.dart BuildOwner.debugBuilding

func (*BuildOwner) DebugInactiveElementsContain

func (o *BuildOwner) DebugInactiveElementsContain(element Element) bool

DebugInactiveElementsContain is whether the element is in the inactive list. It is false in release builds.

Flutter: widgets/framework.dart _InactiveElements.debugContains

func (*BuildOwner) FinalizeTree

func (o *BuildOwner) FinalizeTree()

FinalizeTree completes the build pass by unmounting the elements that are no longer active. In debug builds it also checks the global keys: it reports (see OnError) a key that is used by more than one widget, with the tags GlobalKeyUsedByMultipleWidgets, GlobalKeyUsedByMultipleParents and GlobalKeyDuplicateDetected. The binding calls it at the end of a frame.

Flutter: widgets/framework.dart BuildOwner.finalizeTree

func (*BuildOwner) FocusManager

func (o *BuildOwner) FocusManager() *FocusManager

FocusManager is the focus manager of the binding the owner belongs to, or nil.

Flutter: widgets/framework.dart BuildOwner.focusManager

func (*BuildOwner) GlobalKeyCount

func (o *BuildOwner) GlobalKeyCount() int

GlobalKeyCount is the number of global keys that are in use.

Flutter: widgets/framework.dart BuildOwner.globalKeyCount

func (*BuildOwner) LockState

func (o *BuildOwner) LockState(callback func())

LockState runs the callback with the tree locked: in debug builds, marking an element dirty inside it panics with MarkNeedsBuildWhileLocked.

Flutter: widgets/framework.dart BuildOwner.lockState

func (*BuildOwner) Reassemble

func (o *BuildOwner) Reassemble(root Element)

Reassemble marks the root element and everything below it for a rebuild, as after a hot reload. The element must be the root of this owner's tree.

Flutter: widgets/framework.dart BuildOwner.reassemble

func (*BuildOwner) ScheduleBuildFor

func (o *BuildOwner) ScheduleBuildFor(element Element)

ScheduleBuildFor adds the element to the dirty list of its build scope; the element must already be marked dirty. In debug builds it panics with the tag ScheduleBuildForNotDirty for an element that is not dirty, and with ScheduleBuildForInappropriately for an element that is already in the list outside of a build.

Flutter: widgets/framework.dart BuildOwner.scheduleBuildFor

type BuildOwnerOpts

type BuildOwnerOpts struct {
	// OnBuildScheduled is called when the first element becomes dirty.
	OnBuildScheduled func()
	// OnError is the framework's error reporter (see BuildOwner.OnError).
	OnError foundation.ErrorReporter
	// Debug are the debug flags; nil means all off.
	Debug *DebugOptions
	// Post runs a function on the UI thread, from any goroutine (see
	// BuildOwner.Post).
	Post func(fn func())
	// UIThread is the UI thread (see BuildOwner.UIThread).
	UIThread *foundation.UIThread
	// ErrorWidgetBuilder replaces the default ErrorWidget builder.
	ErrorWidgetBuilder func(err error) Widget
}

BuildOwnerOpts are the optional parameters of NewBuildOwner.

Flutter: widgets/framework.dart BuildOwner.new

type BuildScope

type BuildScope struct {
	// contains filtered or unexported fields
}

BuildScope is a set of dirty elements that are built together, in order of depth. A BuildOwner builds one scope at a time; a scope lets part of the tree (for example a LayoutBuilder's subtree) be built at another time than the rest.

Flutter: widgets/framework.dart BuildScope

func NewBuildScope

func NewBuildScope(opts ...BuildScopeOpts) *BuildScope

NewBuildScope creates a build scope.

Flutter: widgets/framework.dart BuildScope.new

type BuildScopeOpts

type BuildScopeOpts struct {
	// ScheduleRebuild is called when an element of the scope becomes dirty
	// and the scope is not being built.
	ScheduleRebuild func()
}

BuildScopeOpts are the optional parameters of NewBuildScope.

Flutter: widgets/framework.dart BuildScope.new

type BuildTextSpanFunc

type BuildTextSpanFunc func(bc BuildContext, style *painting.TextStyle, withComposing bool) *painting.TextSpan

BuildTextSpanFunc builds the span that a TextEditingController shows.

Flutter: no counterpart

type Builder

type Builder struct {
	StatelessWidget
	// contains filtered or unexported fields
}

Builder is a stateless utility widget whose build method uses its builder callback to create the widget's child. It gives the callback a context that is below the widget, so that lookups such as ThemeOf find what the widget above it provides.

Flutter: widgets/basic.dart Builder

func NewBuilder

func NewBuilder(builder WidgetBuilder, opts ...WidgetOpts) *Builder

NewBuilder creates a widget that calls the builder to build its child.

Flutter: widgets/basic.dart Builder.new

func (*Builder) Build

func (w *Builder) Build(bc BuildContext) Widget

Build calls the builder.

Flutter: widgets/basic.dart Builder.build

func (*Builder) Builder

func (w *Builder) Builder() WidgetBuilder

Builder is the function that builds the child.

Flutter: widgets/basic.dart Builder.builder

type ButtonActivateIntent

type ButtonActivateIntent struct{ IntentBase }

ButtonActivateIntent is an intent that activates the focused button, on platforms where buttons are activated by Enter (and not by Space).

Flutter: widgets/actions.dart ButtonActivateIntent

type CallbackAction

type CallbackAction[T Intent] struct {
	ActionBase
	// contains filtered or unexported fields
}

CallbackAction is an action that calls a function with the intent.

Flutter: widgets/actions.dart CallbackAction

func NewCallbackAction

func NewCallbackAction[T Intent](onInvoke func(intent T) any) *CallbackAction[T]

NewCallbackAction creates an action for intents of type T that calls onInvoke.

Flutter: widgets/actions.dart CallbackAction.new

func (*CallbackAction[T]) IntentType

func (a *CallbackAction[T]) IntentType() reflect.Type

IntentType is the type T.

Flutter: widgets/actions.dart Action.intentType

func (*CallbackAction[T]) Invoke

func (a *CallbackAction[T]) Invoke(intent Intent) any

Invoke calls the function.

Flutter: widgets/actions.dart CallbackAction.invoke

type CallbackShortcutEntry

type CallbackShortcutEntry struct {
	// Activator is the key combination.
	Activator ShortcutActivator
	// Callback is called when the combination is pressed.
	Callback func()
}

CallbackShortcutEntry binds an activator to a function.

Flutter: widgets/shortcuts.dart CallbackShortcuts.bindings

type CallbackShortcuts

type CallbackShortcuts struct {
	StatelessWidget
	// contains filtered or unexported fields
}

CallbackShortcuts is a widget that binds key combinations to functions, with no intents or actions: a quick way to handle a key in a part of the tree. Every binding that accepts an event runs, and the event is then handled.

Flutter: widgets/shortcuts.dart CallbackShortcuts

func NewCallbackShortcuts

func NewCallbackShortcuts(bindings []CallbackShortcutEntry, child Widget, opts ...WidgetOpts) *CallbackShortcuts

NewCallbackShortcuts creates the widget.

Flutter: widgets/shortcuts.dart CallbackShortcuts.new

func (*CallbackShortcuts) Bindings

func (w *CallbackShortcuts) Bindings() []CallbackShortcutEntry

Bindings are the key bindings.

Flutter: widgets/shortcuts.dart CallbackShortcuts.bindings

func (*CallbackShortcuts) Build

func (w *CallbackShortcuts) Build(bc BuildContext) Widget

Build builds a Focus that applies the bindings to the key events.

Flutter: widgets/shortcuts.dart CallbackShortcuts.build

func (*CallbackShortcuts) Child

func (w *CallbackShortcuts) Child() Widget

Child is the widget below.

Flutter: widgets/shortcuts.dart CallbackShortcuts.child

type CapturedThemes

type CapturedThemes struct {
	// contains filtered or unexported fields
}

CapturedThemes are inherited themes that were found above one context, to be applied to a widget in another place.

Flutter: widgets/inherited_theme.dart CapturedThemes

func CaptureThemes

func CaptureThemes(from, to BuildContext) *CapturedThemes

CaptureThemes finds the inherited themes between two contexts: the closest theme of each type above from, up to but not including to. A nil to goes up to the root. In debug builds it panics with the tag CaptureToNotAncestor when to is not an ancestor of from.

Flutter: widgets/inherited_theme.dart InheritedTheme.capture

func (*CapturedThemes) Wrap

func (c *CapturedThemes) Wrap(child Widget) Widget

Wrap makes a widget that wraps the child in copies of the themes.

Flutter: widgets/inherited_theme.dart CapturedThemes.wrap

type Center

type Center struct{ Align }

Center is an Align that aligns its child in the center.

Flutter: widgets/basic.dart Center

func NewCenter

func NewCenter(child Widget, opts ...CenterOpts) *Center

NewCenter creates a widget that centers its child.

Flutter: widgets/basic.dart Center.new

type CenterOpts

type CenterOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// WidthFactor sets the width to the child's width times this factor when it
	// is given.
	WidthFactor foundation.Opt[float64]
	// HeightFactor sets the height to the child's height times this factor when it
	// is given.
	HeightFactor foundation.Opt[float64]
}

CenterOpts are the optional parameters of NewCenter.

Flutter: widgets/basic.dart Center.new

type ChangeReportingBehavior

type ChangeReportingBehavior int

ChangeReportingBehavior is when a ListWheelScrollView reports the selected item.

Flutter: widgets/list_wheel_scroll_view.dart ChangeReportingBehavior

const (
	// ChangeReportingBehaviorUnspecified is the zero value: the default of the
	// widget.
	ChangeReportingBehaviorUnspecified ChangeReportingBehavior = iota
	// ChangeReportingBehaviorOnScrollEnd reports the selected item when the
	// scroll ends.
	//
	// Flutter: widgets/list_wheel_scroll_view.dart ChangeReportingBehavior.onScrollEnd
	ChangeReportingBehaviorOnScrollEnd
	// ChangeReportingBehaviorOnScrollUpdate reports the selected item on every
	// scroll update.
	//
	// Flutter: widgets/list_wheel_scroll_view.dart ChangeReportingBehavior.onScrollUpdate
	ChangeReportingBehaviorOnScrollUpdate
)

type CharacterActivator

type CharacterActivator struct {
	// contains filtered or unexported fields
}

CharacterActivator triggers when a key event produces the character, with the given modifiers. Because the character depends on the layout, it is the activator for shortcuts like "?" or "+".

Flutter: widgets/shortcuts.dart CharacterActivator

func NewCharacterActivator

func NewCharacterActivator(character string, opts ...CharacterActivatorOpts) CharacterActivator

NewCharacterActivator creates an activator for the character. It is a value.

Flutter: widgets/shortcuts.dart CharacterActivator.new

func (CharacterActivator) Accepts

Accepts is whether the event produced the character while the modifiers are as required.

Flutter: widgets/shortcuts.dart CharacterActivator.accepts

func (CharacterActivator) Alt

func (a CharacterActivator) Alt() bool

Alt is whether the Alt key must be pressed.

Flutter: widgets/shortcuts.dart CharacterActivator.alt

func (CharacterActivator) Character

func (a CharacterActivator) Character() string

Character is the character that triggers the shortcut.

Flutter: widgets/shortcuts.dart CharacterActivator.character

func (CharacterActivator) Control

func (a CharacterActivator) Control() bool

Control is whether the Control key must be pressed.

Flutter: widgets/shortcuts.dart CharacterActivator.control

func (CharacterActivator) DebugDescribeKeys

func (a CharacterActivator) DebugDescribeKeys() string

DebugDescribeKeys is the modifiers and the quoted character, joined by " + ".

Flutter: widgets/shortcuts.dart CharacterActivator.debugDescribeKeys

func (CharacterActivator) DebugFillProperties

func (a CharacterActivator) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the character and whether repeats are excluded.

Flutter: widgets/shortcuts.dart CharacterActivator.debugFillProperties

func (CharacterActivator) IncludeRepeats

func (a CharacterActivator) IncludeRepeats() bool

IncludeRepeats is whether the repeats of the key trigger the shortcut too.

Flutter: widgets/shortcuts.dart CharacterActivator.includeRepeats

func (CharacterActivator) Meta

func (a CharacterActivator) Meta() bool

Meta is whether the Meta key must be pressed.

Flutter: widgets/shortcuts.dart CharacterActivator.meta

func (CharacterActivator) SerializeForMenu

func (a CharacterActivator) SerializeForMenu() ShortcutSerialization

SerializeForMenu is the character and the modifiers of the activator.

Flutter: widgets/shortcuts.dart CharacterActivator.serializeForMenu

func (CharacterActivator) Triggers

Triggers is nil: any key can produce the character.

Flutter: widgets/shortcuts.dart CharacterActivator.triggers

type CharacterActivatorOpts

type CharacterActivatorOpts struct {
	// Alt requires the Alt key to be pressed.
	Alt bool
	// Control requires the Control key to be pressed.
	Control bool
	// Meta requires the Meta key to be pressed.
	Meta bool
	// ExcludeRepeats makes the activator reject the repeats of a key (Flutter's
	// includeRepeats is true by default).
	ExcludeRepeats bool
}

CharacterActivatorOpts are the optional parameters of NewCharacterActivator.

Flutter: widgets/shortcuts.dart CharacterActivator.new

type CheckedModeBanner

type CheckedModeBanner struct {
	StatelessWidget
	// contains filtered or unexported fields
}

CheckedModeBanner displays a "DEBUG" banner in the top end corner of its child in debug builds; in release and profile builds it shows only the child.

Flutter: widgets/banner.dart CheckedModeBanner

func NewCheckedModeBanner

func NewCheckedModeBanner(child Widget, opts ...WidgetOpts) *CheckedModeBanner

NewCheckedModeBanner creates the widget.

Flutter: widgets/banner.dart CheckedModeBanner.new

func (*CheckedModeBanner) Build

Build shows the banner in debug builds.

Flutter: widgets/banner.dart CheckedModeBanner.build

func (*CheckedModeBanner) Child

func (w *CheckedModeBanner) Child() Widget

Child is the widget that the banner is over.

Flutter: widgets/banner.dart CheckedModeBanner.child

func (*CheckedModeBanner) DebugFillProperties

func (w *CheckedModeBanner) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the message of the banner, or "disabled".

Flutter: widgets/banner.dart CheckedModeBanner.debugFillProperties

type ChildBackButtonDispatcher

type ChildBackButtonDispatcher struct {
	BackButtonDispatcherBase
	// contains filtered or unexported fields
}

ChildBackButtonDispatcher is a dispatcher below another one, for a Router nested in the router of the parent: the parent asks it first once it took priority.

Flutter: widgets/router.dart ChildBackButtonDispatcher

func NewChildBackButtonDispatcher

func NewChildBackButtonDispatcher(parent BackButtonDispatcher) *ChildBackButtonDispatcher

NewChildBackButtonDispatcher creates a child of the parent.

Flutter: widgets/router.dart ChildBackButtonDispatcher.new

func (*ChildBackButtonDispatcher) DeferTo

DeferTo makes the parent defer to this dispatcher, and this one to the child.

Flutter: widgets/router.dart ChildBackButtonDispatcher.deferTo

func (*ChildBackButtonDispatcher) NotifiedByParent

func (d *ChildBackButtonDispatcher) NotifiedByParent(defaultValue bool) bool

NotifiedByParent is called when the parent was asked and has not handled the button; the child invokes its callbacks.

Flutter: widgets/router.dart ChildBackButtonDispatcher.notifiedByParent

func (*ChildBackButtonDispatcher) Parent

Parent is the dispatcher that created this one.

Flutter: widgets/router.dart ChildBackButtonDispatcher.parent

func (*ChildBackButtonDispatcher) RemoveCallback

func (d *ChildBackButtonDispatcher) RemoveCallback(handle BackButtonCallbackHandle)

RemoveCallback removes the callback; without callbacks the parent forgets the child.

Flutter: widgets/router.dart ChildBackButtonDispatcher.removeCallback

func (*ChildBackButtonDispatcher) TakePriority

func (d *ChildBackButtonDispatcher) TakePriority()

TakePriority makes the parent ask this dispatcher first, and this dispatcher ask its own callback before its children.

Flutter: widgets/router.dart ChildBackButtonDispatcher.takePriority

type ChildIndexGetter

type ChildIndexGetter func(key foundation.Key) foundation.Opt[int]

ChildIndexGetter finds the index of the child that has the key, or none.

Flutter: widgets/scroll_delegate.dart ChildIndexGetter

type ChildVicinity

type ChildVicinity = rendering.ChildVicinity

ChildVicinity is the location of a child in the two-dimensional space of a two-dimensional viewport: the index along each axis.

Flutter: widgets/two_dimensional_viewport.dart ChildVicinity

func NewChildVicinity

func NewChildVicinity(xIndex, yIndex int) ChildVicinity

NewChildVicinity creates a vicinity.

Flutter: widgets/two_dimensional_viewport.dart ChildVicinity.new

type ClampingScrollPhysics

type ClampingScrollPhysics struct {
	ScrollPhysicsBase
}

ClampingScrollPhysics is the scroll physics of Android, Linux and Windows: the content stops at its extents.

Flutter: widgets/scroll_physics.dart ClampingScrollPhysics

func NewClampingScrollPhysics

func NewClampingScrollPhysics(parent ScrollPhysics) *ClampingScrollPhysics

NewClampingScrollPhysics creates the physics with the parent (nil for none).

Flutter: widgets/scroll_physics.dart ClampingScrollPhysics.new

func (*ClampingScrollPhysics) ApplyBoundaryConditions

func (p *ClampingScrollPhysics) ApplyBoundaryConditions(position ScrollMetrics, value float64) float64

ApplyBoundaryConditions is the part of the change that would take the position past its extents. In debug builds it panics with the tag ScrollBoundaryRedundant when value is the current position.

Flutter: widgets/scroll_physics.dart ClampingScrollPhysics.applyBoundaryConditions

func (*ClampingScrollPhysics) ApplyTo

func (p *ClampingScrollPhysics) ApplyTo(ancestor ScrollPhysics) ScrollPhysics

ApplyTo returns a copy on top of the ancestor.

Flutter: widgets/scroll_physics.dart ClampingScrollPhysics.applyTo

func (*ClampingScrollPhysics) CreateBallisticSimulation

func (p *ClampingScrollPhysics) CreateBallisticSimulation(position ScrollMetrics, velocity float64) physics.Simulation

CreateBallisticSimulation is a spring back into range when the position is out of range, a ClampingScrollSimulation for a fling inside the range, and nil when the velocity is too small or points away from the content.

Flutter: widgets/scroll_physics.dart ClampingScrollPhysics.createBallisticSimulation

type ClipOval

type ClipOval struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ClipOval clips its child using an oval.

Flutter: widgets/basic.dart ClipOval

func NewClipOval

func NewClipOval(child Widget, opts ...ClipOvalOpts) *ClipOval

NewClipOval creates the widget.

Flutter: widgets/basic.dart ClipOval.new

func (*ClipOval) ClipBehavior

func (w *ClipOval) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped and how; the default is ClipAntiAlias.

Flutter: widgets/basic.dart ClipOval.clipBehavior

func (*ClipOval) Clipper

func (w *ClipOval) Clipper() rendering.CustomClipper[ui.Rect]

Clipper calculates the rectangle whose inscribed oval is used for clipping; the default is the size of the child.

Flutter: widgets/basic.dart ClipOval.clipper

func (*ClipOval) CreateRenderObject

func (w *ClipOval) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ClipOval.createRenderObject

func (*ClipOval) DidUnmountRenderObject

func (w *ClipOval) DidUnmountRenderObject(renderObject rendering.RenderObject)

DidUnmountRenderObject clears what the render object holds.

Flutter: widgets/basic.dart ClipOval.didUnmountRenderObject

func (*ClipOval) UpdateRenderObject

func (w *ClipOval) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ClipOval.updateRenderObject

type ClipOvalOpts

type ClipOvalOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Clipper calculates the rectangle whose inscribed oval is used for clipping; the default is the size of the child.
	Clipper rendering.CustomClipper[ui.Rect]
	// ClipBehavior is whether the content is clipped and how; the default is ClipAntiAlias.
	ClipBehavior ui.Clip
}

ClipOvalOpts are the optional parameters of NewClipOval.

Flutter: widgets/basic.dart ClipOval.new

type ClipPath

type ClipPath struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ClipPath clips its child using a path.

Flutter: widgets/basic.dart ClipPath

func NewClipPath

func NewClipPath(child Widget, opts ...ClipPathOpts) *ClipPath

NewClipPath creates the widget.

Flutter: widgets/basic.dart ClipPath.new

func NewClipPathShape

func NewClipPathShape(shape painting.ShapeBorder, child Widget, opts ...ClipPathOpts) *ClipPath

NewClipPathShape creates a widget that clips its child to the outer path of a shape border.

Flutter: widgets/basic.dart ClipPath.shape

func (*ClipPath) ClipBehavior

func (w *ClipPath) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped and how; the default is ClipAntiAlias.

Flutter: widgets/basic.dart ClipPath.clipBehavior

func (*ClipPath) Clipper

func (w *ClipPath) Clipper() rendering.CustomClipper[*ui.Path]

Clipper calculates the path used for clipping; the default is a rectangle the size of the child.

Flutter: widgets/basic.dart ClipPath.clipper

func (*ClipPath) CreateRenderObject

func (w *ClipPath) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ClipPath.createRenderObject

func (*ClipPath) DidUnmountRenderObject

func (w *ClipPath) DidUnmountRenderObject(renderObject rendering.RenderObject)

DidUnmountRenderObject clears what the render object holds.

Flutter: widgets/basic.dart ClipPath.didUnmountRenderObject

func (*ClipPath) UpdateRenderObject

func (w *ClipPath) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ClipPath.updateRenderObject

type ClipPathOpts

type ClipPathOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Clipper calculates the path used for clipping; the default is a rectangle the size of the child.
	Clipper rendering.CustomClipper[*ui.Path]
	// ClipBehavior is whether the content is clipped and how; the default is ClipAntiAlias.
	ClipBehavior ui.Clip
}

ClipPathOpts are the optional parameters of NewClipPath.

Flutter: widgets/basic.dart ClipPath.new

type ClipRRect

type ClipRRect struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ClipRRect clips its child using a rounded rectangle.

Flutter: widgets/basic.dart ClipRRect

func NewClipRRect

func NewClipRRect(child Widget, opts ...ClipRRectOpts) *ClipRRect

NewClipRRect creates the widget.

Flutter: widgets/basic.dart ClipRRect.new

func (*ClipRRect) BorderRadius

func (w *ClipRRect) BorderRadius() painting.BorderRadiusGeometry

BorderRadius is the border radius of the rounded corners; the default is BorderRadiusZero.

Flutter: widgets/basic.dart ClipRRect.borderRadius

func (*ClipRRect) ClipBehavior

func (w *ClipRRect) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped and how; the default is ClipAntiAlias.

Flutter: widgets/basic.dart ClipRRect.clipBehavior

func (*ClipRRect) Clipper

func (w *ClipRRect) Clipper() rendering.CustomClipper[ui.RRect]

Clipper calculates the rounded rectangle used for clipping; it replaces the border radius when given.

Flutter: widgets/basic.dart ClipRRect.clipper

func (*ClipRRect) CreateRenderObject

func (w *ClipRRect) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ClipRRect.createRenderObject

func (*ClipRRect) DidUnmountRenderObject

func (w *ClipRRect) DidUnmountRenderObject(renderObject rendering.RenderObject)

DidUnmountRenderObject clears what the render object holds.

Flutter: widgets/basic.dart ClipRRect.didUnmountRenderObject

func (*ClipRRect) UpdateRenderObject

func (w *ClipRRect) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ClipRRect.updateRenderObject

type ClipRRectOpts

type ClipRRectOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// BorderRadius is the border radius of the rounded corners; the default is BorderRadiusZero.
	BorderRadius painting.BorderRadiusGeometry
	// Clipper calculates the rounded rectangle used for clipping; it replaces the border radius when given.
	Clipper rendering.CustomClipper[ui.RRect]
	// ClipBehavior is whether the content is clipped and how; the default is ClipAntiAlias.
	ClipBehavior ui.Clip
}

ClipRRectOpts are the optional parameters of NewClipRRect.

Flutter: widgets/basic.dart ClipRRect.new

type ClipRSuperellipse

type ClipRSuperellipse struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ClipRSuperellipse clips its child using a rounded superellipse.

Flutter: widgets/basic.dart ClipRSuperellipse

func NewClipRSuperellipse

func NewClipRSuperellipse(child Widget, opts ...ClipRSuperellipseOpts) *ClipRSuperellipse

NewClipRSuperellipse creates the widget.

Flutter: widgets/basic.dart ClipRSuperellipse.new

func (*ClipRSuperellipse) BorderRadius

BorderRadius is the border radius of the rounded corners; the default is BorderRadiusZero.

Flutter: widgets/basic.dart ClipRSuperellipse.borderRadius

func (*ClipRSuperellipse) ClipBehavior

func (w *ClipRSuperellipse) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped and how; the default is ClipAntiAlias.

Flutter: widgets/basic.dart ClipRSuperellipse.clipBehavior

func (*ClipRSuperellipse) Clipper

Clipper calculates the rounded superellipse used for clipping.

Flutter: widgets/basic.dart ClipRSuperellipse.clipper

func (*ClipRSuperellipse) CreateRenderObject

func (w *ClipRSuperellipse) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ClipRSuperellipse.createRenderObject

func (*ClipRSuperellipse) DidUnmountRenderObject

func (w *ClipRSuperellipse) DidUnmountRenderObject(renderObject rendering.RenderObject)

DidUnmountRenderObject clears what the render object holds.

Flutter: widgets/basic.dart ClipRSuperellipse.didUnmountRenderObject

func (*ClipRSuperellipse) UpdateRenderObject

func (w *ClipRSuperellipse) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ClipRSuperellipse.updateRenderObject

type ClipRSuperellipseOpts

type ClipRSuperellipseOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// BorderRadius is the border radius of the rounded corners; the default is BorderRadiusZero.
	BorderRadius painting.BorderRadiusGeometry
	// Clipper calculates the rounded superellipse used for clipping.
	Clipper rendering.CustomClipper[ui.RSuperellipse]
	// ClipBehavior is whether the content is clipped and how; the default is ClipAntiAlias.
	ClipBehavior ui.Clip
}

ClipRSuperellipseOpts are the optional parameters of NewClipRSuperellipse.

Flutter: widgets/basic.dart ClipRSuperellipse.new

type ClipRect

type ClipRect struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ClipRect clips its child using a rectangle.

Flutter: widgets/basic.dart ClipRect

func NewClipRect

func NewClipRect(child Widget, opts ...ClipRectOpts) *ClipRect

NewClipRect creates the widget.

Flutter: widgets/basic.dart ClipRect.new

func (*ClipRect) ClipBehavior

func (w *ClipRect) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped and how; the default is ClipHardEdge.

Flutter: widgets/basic.dart ClipRect.clipBehavior

func (*ClipRect) Clipper

func (w *ClipRect) Clipper() rendering.CustomClipper[ui.Rect]

Clipper calculates the rectangle used for clipping; the default is the size of the child.

Flutter: widgets/basic.dart ClipRect.clipper

func (*ClipRect) CreateRenderObject

func (w *ClipRect) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ClipRect.createRenderObject

func (*ClipRect) DidUnmountRenderObject

func (w *ClipRect) DidUnmountRenderObject(renderObject rendering.RenderObject)

DidUnmountRenderObject clears what the render object holds.

Flutter: widgets/basic.dart ClipRect.didUnmountRenderObject

func (*ClipRect) UpdateRenderObject

func (w *ClipRect) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ClipRect.updateRenderObject

type ClipRectOpts

type ClipRectOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Clipper calculates the rectangle used for clipping; the default is the size of the child.
	Clipper rendering.CustomClipper[ui.Rect]
	// ClipBehavior is whether the content is clipped and how; the default is ClipHardEdge.
	ClipBehavior ui.Clip
}

ClipRectOpts are the optional parameters of NewClipRect.

Flutter: widgets/basic.dart ClipRect.new

type ClipboardStatus

type ClipboardStatus int

ClipboardStatus is the status of the content on the clipboard.

Flutter: widgets/text_selection.dart ClipboardStatus

const (
	// ClipboardStatusUnspecified is the zero value: the default (unknown).
	//
	// Flutter: no counterpart
	ClipboardStatusUnspecified ClipboardStatus = iota
	// ClipboardStatusPasteable means the clipboard content can be pasted, such as
	// a string of nonzero length.
	//
	// Flutter: widgets/text_selection.dart ClipboardStatus.pasteable
	ClipboardStatusPasteable
	// ClipboardStatusUnknown means the status of the clipboard is unknown. Since
	// getting clipboard data is asynchronous, it is not known whether it can be
	// pasted.
	//
	// Flutter: widgets/text_selection.dart ClipboardStatus.unknown
	ClipboardStatusUnknown
	// ClipboardStatusNotPasteable means the clipboard content cannot be pasted,
	// such as when it is empty.
	//
	// Flutter: widgets/text_selection.dart ClipboardStatus.notPasteable
	ClipboardStatusNotPasteable
)

The values of ClipboardStatus follow Flutter's declaration order.

type ClipboardStatusNotifier

type ClipboardStatusNotifier struct {
	foundation.ValueNotifier[ClipboardStatus]
	WidgetsBindingObserverBase
	// contains filtered or unexported fields
}

ClipboardStatusNotifier notifies when the status of the clipboard changes. It queries the clipboard when it is asked to (Update), when the first listener is added while the status is unknown, and when the app resumes.

Flutter: widgets/text_selection.dart ClipboardStatusNotifier

func NewClipboardStatusNotifier

func NewClipboardStatusNotifier(binding *WidgetsBinding) *ClipboardStatusNotifier

NewClipboardStatusNotifier creates a notifier whose status is unknown until the first update.

Flutter: widgets/text_selection.dart ClipboardStatusNotifier.new

func NewWebClipboardStatusNotifier

func NewWebClipboardStatusNotifier(binding *WidgetsBinding) *ClipboardStatusNotifier

NewWebClipboardStatusNotifier creates the notifier that EditableText uses on the web: the status is always pasteable and the clipboard is never asked. Browsers show a permission dialog when the clipboard is read, which Update would cause before the paste button is even shown.

Flutter: widgets/editable_text.dart _WebClipboardStatusNotifier

func (*ClipboardStatusNotifier) AddListener

AddListener adds a listener; the first one starts to watch the app lifecycle, and the status is updated if it is unknown.

Flutter: widgets/text_selection.dart ClipboardStatusNotifier.addListener

func (*ClipboardStatusNotifier) DidChangeAppLifecycleState

func (n *ClipboardStatusNotifier) DidChangeAppLifecycleState(state ui.AppLifecycleState)

DidChangeAppLifecycleState updates the status when the app resumes.

Flutter: widgets/text_selection.dart ClipboardStatusNotifier.didChangeAppLifecycleState

func (*ClipboardStatusNotifier) Dispose

func (n *ClipboardStatusNotifier) Dispose()

Dispose stops watching the app lifecycle.

Flutter: widgets/text_selection.dart ClipboardStatusNotifier.dispose

func (*ClipboardStatusNotifier) RemoveListener

func (n *ClipboardStatusNotifier) RemoveListener(handle foundation.ListenerHandle)

RemoveListener removes a listener; without any left, it stops watching the app lifecycle.

Flutter: widgets/text_selection.dart ClipboardStatusNotifier.removeListener

func (*ClipboardStatusNotifier) Update

func (n *ClipboardStatusNotifier) Update()

Update asks the clipboard whether it has text, and sets the status when the answer arrives.

Flutter: widgets/text_selection.dart ClipboardStatusNotifier.update

type ColoredBox

type ColoredBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ColoredBox is a widget that paints its area with a specified color and then draws its child on top of that color.

Flutter: widgets/basic.dart ColoredBox

func NewColoredBox

func NewColoredBox(color ui.Color, child Widget, opts ...ColoredBoxOpts) *ColoredBox

NewColoredBox creates a widget that paints its area with the color.

Flutter: widgets/basic.dart ColoredBox.new

func (*ColoredBox) Color

func (w *ColoredBox) Color() ui.Color

Color is the color to paint the background area with.

Flutter: widgets/basic.dart ColoredBox.color

func (*ColoredBox) CreateRenderObject

func (w *ColoredBox) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ColoredBox.createRenderObject

func (*ColoredBox) IsAntiAlias

func (w *ColoredBox) IsAntiAlias() bool

IsAntiAlias is whether the box is painted with anti-aliasing.

Flutter: widgets/basic.dart ColoredBox.isAntiAlias

func (*ColoredBox) UpdateRenderObject

func (w *ColoredBox) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the color to the render object.

Flutter: widgets/basic.dart ColoredBox.updateRenderObject

type ColoredBoxOpts

type ColoredBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// IsAntiAlias is whether to paint the box with anti-aliasing; the default is
	// true.
	IsAntiAlias foundation.Opt[bool]
}

ColoredBoxOpts are the optional parameters of NewColoredBox.

Flutter: widgets/basic.dart ColoredBox.new

type Column

type Column struct{ Flex }

Column displays its children in a vertical array.

Flutter: widgets/basic.dart Column

func NewColumn

func NewColumn(children []Widget, opts ...ColumnOpts) *Column

NewColumn creates a vertical array of children.

Flutter: widgets/basic.dart Column.new

type ColumnOpts

type ColumnOpts = FlexOpts

ColumnOpts are the optional parameters of NewColumn; they are those of NewFlex.

Flutter: widgets/basic.dart Column.new

type ComponentElement

type ComponentElement struct {
	ElementBase
	// contains filtered or unexported fields
}

ComponentElement is an element that is composed of other elements: it builds one child widget. Embed it, call InitComponentElement and implement Build.

Flutter: widgets/framework.dart ComponentElement

func (*ComponentElement) DebugDoingBuild

func (c *ComponentElement) DebugDoingBuild() bool

DebugDoingBuild is whether the element is in its Build method.

Flutter: widgets/framework.dart ComponentElement.debugDoingBuild

func (*ComponentElement) ForgetChild

func (c *ComponentElement) ForgetChild(child Element)

ForgetChild drops the child.

Flutter: widgets/framework.dart ComponentElement.forgetChild

func (*ComponentElement) Mount

func (c *ComponentElement) Mount(parent Element, newSlot any)

Mount mounts the element and builds the first child.

Flutter: widgets/framework.dart ComponentElement.mount

func (*ComponentElement) PerformRebuild

func (c *ComponentElement) PerformRebuild()

PerformRebuild calls Build, updates the child to what it returned and clears the dirty flag.

Flutter: widgets/framework.dart ComponentElement.performRebuild

func (*ComponentElement) RenderObjectAttachingChild

func (c *ComponentElement) RenderObjectAttachingChild() Element

RenderObjectAttachingChild is the built child.

Flutter: widgets/framework.dart ComponentElement.renderObjectAttachingChild

func (*ComponentElement) VisitChildren

func (c *ComponentElement) VisitChildren(visitor ElementVisitor)

VisitChildren visits the built child.

Flutter: widgets/framework.dart ComponentElement.visitChildren

type ComponentElementSelf

type ComponentElementSelf interface {
	Element
	// Build describes the widget this element builds.
	//
	// Flutter: widgets/framework.dart ComponentElement.build
	Build() Widget
	// contains filtered or unexported methods
}

ComponentElementSelf is what a component element needs from the outer type: the Build method, which is Flutter's abstract ComponentElement.build.

Flutter: no counterpart

type CompositedTransformFollower

type CompositedTransformFollower struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

CompositedTransformFollower is a widget that follows a CompositedTransformTarget.

When this widget is composited during the compositing phase (which comes after the paint phase, as described in WidgetsBinding.drawFrame), it applies a transformation that brings TargetAnchor of the linked CompositedTransformTarget and FollowerAnchor of this widget together.

Flutter: widgets/basic.dart CompositedTransformFollower

func NewCompositedTransformFollower

func NewCompositedTransformFollower(link *rendering.LayerLink, child Widget, opts ...CompositedTransformFollowerOpts) *CompositedTransformFollower

NewCompositedTransformFollower creates a follower of the link.

Flutter: widgets/basic.dart CompositedTransformFollower.new

func (*CompositedTransformFollower) CreateRenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart CompositedTransformFollower.createRenderObject

func (*CompositedTransformFollower) UpdateRenderObject

func (w *CompositedTransformFollower) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject sets the link and the anchors.

Flutter: widgets/basic.dart CompositedTransformFollower.updateRenderObject

type CompositedTransformFollowerOpts

type CompositedTransformFollowerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// HideWhenUnlinked hides the follower when the link has no leader (Flutter's
	// showWhenUnlinked is true by default).
	HideWhenUnlinked bool
	// Offset is the additional offset to apply to the follower.
	Offset ui.Offset
	// TargetAnchor is the anchor point on the linked CompositedTransformTarget
	// that FollowerAnchor will line up with; the default is the top left.
	TargetAnchor foundation.Opt[painting.Alignment]
	// FollowerAnchor is the anchor point on this widget that TargetAnchor will
	// line up with; the default is the top left.
	FollowerAnchor foundation.Opt[painting.Alignment]
}

CompositedTransformFollowerOpts are the optional parameters of NewCompositedTransformFollower.

Flutter: widgets/basic.dart CompositedTransformFollower.new

type CompositedTransformTarget

type CompositedTransformTarget struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

CompositedTransformTarget is a widget that a CompositedTransformFollower can follow: it provides the anchor that is linked by the LayerLink.

Flutter: widgets/basic.dart CompositedTransformTarget

func NewCompositedTransformTarget

func NewCompositedTransformTarget(link *rendering.LayerLink, child Widget, opts ...WidgetOpts) *CompositedTransformTarget

NewCompositedTransformTarget creates the widget; the link is what followers use to find the target.

Flutter: widgets/basic.dart CompositedTransformTarget.new

func (*CompositedTransformTarget) CreateRenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart CompositedTransformTarget.createRenderObject

Link is the link that connects this target to its followers.

Flutter: widgets/basic.dart CompositedTransformTarget.link

func (*CompositedTransformTarget) UpdateRenderObject

func (w *CompositedTransformTarget) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject sets the link.

Flutter: widgets/basic.dart CompositedTransformTarget.updateRenderObject

type ConditionalElementVisitor

type ConditionalElementVisitor func(element Element) bool

ConditionalElementVisitor is called for each element a walk reaches and returns whether the walk goes on.

Flutter: widgets/framework.dart ConditionalElementVisitor

type ConnectionState

type ConnectionState int

ConnectionState is the state of connection to an asynchronous computation.

Flutter: widgets/async.dart ConnectionState

const (
	// ConnectionStateUnspecified is the zero value; it is not a real state.
	//
	// Flutter: no counterpart
	ConnectionStateUnspecified ConnectionState = iota
	// ConnectionStateNone is not currently connected to any asynchronous
	// computation.
	//
	// Flutter: widgets/async.dart ConnectionState.none
	ConnectionStateNone
	// ConnectionStateWaiting is connected to an asynchronous computation and
	// awaiting interaction.
	//
	// Flutter: widgets/async.dart ConnectionState.waiting
	ConnectionStateWaiting
	// ConnectionStateActive is connected to an active asynchronous computation.
	//
	// Flutter: widgets/async.dart ConnectionState.active
	ConnectionStateActive
	// ConnectionStateDone is connected to a terminated asynchronous computation.
	//
	// Flutter: widgets/async.dart ConnectionState.done
	ConnectionStateDone
)

The values of ConnectionState follow Flutter's declaration order.

func (ConnectionState) String

func (s ConnectionState) String() string

String is the name of the state as Flutter writes it.

Flutter: widgets/async.dart ConnectionState

type ConstrainedBox

type ConstrainedBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ConstrainedBox imposes additional constraints on its child.

Flutter: widgets/basic.dart ConstrainedBox

func NewConstrainedBox

func NewConstrainedBox(constraints rendering.BoxConstraints, child Widget, opts ...ConstrainedBoxOpts) *ConstrainedBox

NewConstrainedBox creates the widget.

Flutter: widgets/basic.dart ConstrainedBox.new

func (*ConstrainedBox) Constraints

func (w *ConstrainedBox) Constraints() rendering.BoxConstraints

Constraints are the additional constraints to impose on the child.

Flutter: widgets/basic.dart ConstrainedBox.constraints

func (*ConstrainedBox) CreateRenderObject

func (w *ConstrainedBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ConstrainedBox.createRenderObject

func (*ConstrainedBox) UpdateRenderObject

func (w *ConstrainedBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ConstrainedBox.updateRenderObject

type ConstrainedBoxOpts

type ConstrainedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

ConstrainedBoxOpts are the optional parameters of NewConstrainedBox.

Flutter: widgets/basic.dart ConstrainedBox.new

type ConstraintsTransformBox

type ConstraintsTransformBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ConstraintsTransformBox applies a BoxConstraintsTransform to the constraints its parent gives, before laying out its child.

Flutter: widgets/basic.dart ConstraintsTransformBox

func NewConstraintsTransformBox

func NewConstraintsTransformBox(constraintsTransform rendering.BoxConstraintsTransform, child Widget, opts ...ConstraintsTransformBoxOpts) *ConstraintsTransformBox

NewConstraintsTransformBox creates the widget.

Flutter: widgets/basic.dart ConstraintsTransformBox.new

func (*ConstraintsTransformBox) Alignment

Alignment is how to align the child; the default is Alignment.center.

Flutter: widgets/basic.dart ConstraintsTransformBox.alignment

func (*ConstraintsTransformBox) ClipBehavior

func (w *ConstraintsTransformBox) ClipBehavior() ui.Clip

ClipBehavior is whether the child is clipped when it overflows; the default is ClipNone.

Flutter: widgets/basic.dart ConstraintsTransformBox.clipBehavior

func (*ConstraintsTransformBox) ConstraintsTransform

func (w *ConstraintsTransformBox) ConstraintsTransform() rendering.BoxConstraintsTransform

ConstraintsTransform turns the constraints of the parent into those of the child.

Flutter: widgets/basic.dart ConstraintsTransformBox.constraintsTransform

func (*ConstraintsTransformBox) CreateRenderObject

func (w *ConstraintsTransformBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ConstraintsTransformBox.createRenderObject

func (*ConstraintsTransformBox) TextDirection

func (w *ConstraintsTransformBox) TextDirection() ui.TextDirection

TextDirection is the direction used to resolve a directional alignment; the default is the one of the closest Directionality.

Flutter: widgets/basic.dart ConstraintsTransformBox.textDirection

func (*ConstraintsTransformBox) UpdateRenderObject

func (w *ConstraintsTransformBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ConstraintsTransformBox.updateRenderObject

type ConstraintsTransformBoxOpts

type ConstraintsTransformBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TextDirection is the direction used to resolve a directional alignment; the default is the one of the closest Directionality.
	TextDirection ui.TextDirection
	// Alignment is how to align the child; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
	// ClipBehavior is whether the child is clipped when it overflows; the default is ClipNone.
	ClipBehavior ui.Clip
}

ConstraintsTransformBoxOpts are the optional parameters of NewConstraintsTransformBox.

Flutter: widgets/basic.dart ConstraintsTransformBox.new

type Container

type Container struct {
	StatelessWidget
	// contains filtered or unexported fields
}

Container is a convenience widget that combines common painting, positioning and sizing widgets.

Flutter: widgets/container.dart Container

func NewContainer

func NewContainer(child Widget, opts ...ContainerOpts) *Container

NewContainer creates a container. In debug builds it panics with the tags ContainerColorAndDecoration (both given), ContainerClipWithoutDecoration, and ContainerNegativePadding or the tags of the invalid decoration and constraints.

Flutter: widgets/container.dart Container.new

func (*Container) Alignment

func (w *Container) Alignment() painting.AlignmentGeometry

Alignment is how the child is aligned within the container.

Flutter: widgets/container.dart Container.alignment

func (*Container) Build

func (w *Container) Build(bc BuildContext) Widget

Build builds the widgets that the configuration needs, from the inside out: the alignment, the padding, the color, the clip, the decoration, the foreground decoration, the constraints, the margin and the transform.

Flutter: widgets/container.dart Container.build

func (*Container) Child

func (w *Container) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/container.dart Container.child

func (*Container) ClipBehavior

func (w *Container) ClipBehavior() ui.Clip

ClipBehavior is whether the contents are clipped to the decoration's shape.

Flutter: widgets/container.dart Container.clipBehavior

func (*Container) Color

func (w *Container) Color() foundation.Opt[ui.Color]

Color is the background color, if any.

Flutter: widgets/container.dart Container.color

func (*Container) Constraints

func (w *Container) Constraints() foundation.Opt[rendering.BoxConstraints]

Constraints are the additional constraints applied to the child, including the tight ones that Width and Height made.

Flutter: widgets/container.dart Container.constraints

func (*Container) Decoration

func (w *Container) Decoration() painting.Decoration

Decoration is the decoration painted behind the child.

Flutter: widgets/container.dart Container.decoration

func (*Container) ForegroundDecoration

func (w *Container) ForegroundDecoration() painting.Decoration

ForegroundDecoration is the decoration painted in front of the child.

Flutter: widgets/container.dart Container.foregroundDecoration

func (*Container) IsAntiAlias

func (w *Container) IsAntiAlias() bool

IsAntiAlias is whether the color is painted with anti-aliasing.

Flutter: widgets/container.dart Container.isAntiAlias

func (*Container) Margin

Margin is the empty space around the decoration.

Flutter: widgets/container.dart Container.margin

func (*Container) Padding

func (w *Container) Padding() painting.EdgeInsetsGeometry

Padding is the empty space inside the decoration.

Flutter: widgets/container.dart Container.padding

func (*Container) Transform

func (w *Container) Transform() *ui.Matrix4

Transform is the matrix applied before painting the container.

Flutter: widgets/container.dart Container.transform

func (*Container) TransformAlignment

func (w *Container) TransformAlignment() painting.AlignmentGeometry

TransformAlignment is the alignment of the origin of the transform.

Flutter: widgets/container.dart Container.transformAlignment

type ContainerOpts

type ContainerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment aligns the child within the container; when it is set a
	// container without a child expands to fill the parent.
	Alignment painting.AlignmentGeometry
	// Padding is the empty space to inscribe inside the decoration.
	Padding painting.EdgeInsetsGeometry
	// Color is the background color; it is a shorthand for a BoxDecoration with
	// the color, so it cannot be given together with Decoration.
	Color foundation.Opt[ui.Color]
	// IsAntiAlias is whether to paint the color with anti-aliasing; the default is
	// true.
	IsAntiAlias foundation.Opt[bool]
	// Decoration is the decoration to paint behind the child.
	Decoration painting.Decoration
	// ForegroundDecoration is the decoration to paint in front of the child.
	ForegroundDecoration painting.Decoration
	// Width is a tight width for the container, merged into Constraints.
	Width foundation.Opt[float64]
	// Height is a tight height for the container, merged into Constraints.
	Height foundation.Opt[float64]
	// Constraints are additional constraints to apply to the child.
	Constraints foundation.Opt[rendering.BoxConstraints]
	// Margin is the empty space to surround the decoration and the child.
	Margin painting.EdgeInsetsGeometry
	// Transform is the transformation matrix to apply before painting the
	// container.
	Transform *ui.Matrix4
	// TransformAlignment is the alignment of the origin of the transform, relative
	// to the size of the container.
	TransformAlignment painting.AlignmentGeometry
	// ClipBehavior is whether to clip the contents to the decoration's shape
	// (ClipNone, the default, does not clip); it needs a Decoration.
	ClipBehavior ui.Clip
}

ContainerOpts are the optional parameters of NewContainer.

Flutter: widgets/container.dart Container.new

type ContextAction

type ContextAction interface {
	Action
	// IsEnabledWithContext is IsEnabled with the context, which is nil when the
	// action is asked without one.
	//
	// Flutter: widgets/actions.dart ContextAction.isEnabled
	IsEnabledWithContext(intent Intent, bc BuildContext) bool
	// InvokeWithContext is Invoke with the context, which is nil when the action
	// is invoked without one.
	//
	// Flutter: widgets/actions.dart ContextAction.invoke
	InvokeWithContext(intent Intent, bc BuildContext) any
}

ContextAction is an action that is invoked with the context it was found from.

Flutter: widgets/actions.dart ContextAction

type ContextActionBase

type ContextActionBase struct {
	ActionBase
	// contains filtered or unexported fields
}

ContextActionBase implements ContextAction on top of ActionBase: Invoke and IsEnabled are the context variants with no context. Embed it, call InitContextActionBase, and implement InvokeWithContext.

Flutter: widgets/actions.dart ContextAction

func (*ContextActionBase) Invoke

func (b *ContextActionBase) Invoke(intent Intent) any

Invoke is InvokeWithContext with no context.

Flutter: widgets/actions.dart ContextAction.invoke

func (*ContextActionBase) InvokeWithContext

func (b *ContextActionBase) InvokeWithContext(Intent, BuildContext) any

InvokeWithContext panics: an action must implement it.

Flutter: widgets/actions.dart ContextAction.invoke

func (*ContextActionBase) IsEnabled

func (b *ContextActionBase) IsEnabled(intent Intent) bool

IsEnabled is IsEnabledWithContext with no context.

Flutter: widgets/actions.dart ContextAction.isEnabled

func (*ContextActionBase) IsEnabledWithContext

func (b *ContextActionBase) IsEnabledWithContext(Intent, BuildContext) bool

IsEnabledWithContext is IsActionEnabled.

Flutter: widgets/actions.dart ContextAction.isEnabled

type ContextMenuButtonItem

type ContextMenuButtonItem struct {
	// OnPressed is the callback to be called when the button is pressed; nil
	// disables the button.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.onPressed
	OnPressed foundation.VoidCallback
	// Type is the type of button this represents; the zero value is a custom one.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.type
	Type ContextMenuButtonType
	// Label is the label to display on the button. If Type is not custom and the
	// label is not provided, the default label for that type for the platform is
	// looked up.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.label
	Label foundation.Opt[string]
}

ContextMenuButtonItem is the type and callback for a context menu button.

Deviation: Dart compares the callbacks with ==; Go cannot compare functions, so Equal compares the type and the label and whether there is a callback.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem

func GetEditableButtonItems

func GetEditableButtonItems(clipboardStatus ClipboardStatus, c EditableButtonItemsCallbacks) []ContextMenuButtonItem

GetEditableButtonItems returns the items representing the buttons in this platform's default selection menu for an editable field. For example, EditableText uses this to generate the default buttons for its context menu.

Flutter: widgets/editable_text.dart EditableText.getEditableButtonItems

func GetSelectableButtonItems

func GetSelectableButtonItems(selectionGeometry rendering.SelectionGeometry, c SelectableButtonItemsCallbacks) []ContextMenuButtonItem

GetSelectableButtonItems returns the items representing the buttons in this platform's default selection menu. For example, SelectableRegion uses this to generate the default buttons for its context menu.

Flutter: widgets/selectable_region.dart SelectableRegion.getSelectableButtonItems

func NewContextMenuButtonItem

func NewContextMenuButtonItem(onPressed foundation.VoidCallback, opts ...ContextMenuButtonItemOpts) ContextMenuButtonItem

NewContextMenuButtonItem creates the item of a button.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.new

func (ContextMenuButtonItem) CopyWith

CopyWith creates a new item with the provided parameters overridden.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.copyWith

func (ContextMenuButtonItem) Equal

Equal reports whether the items have the same type and label and both have a callback or both have none.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.==

func (ContextMenuButtonItem) String

func (i ContextMenuButtonItem) String() string

String describes the item.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.toString

type ContextMenuButtonItemCopy

type ContextMenuButtonItemCopy struct {
	OnPressed foundation.VoidCallback
	Type      ContextMenuButtonType
	Label     foundation.Opt[string]
}

ContextMenuButtonItemCopy are the values CopyWith replaces.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.copyWith

type ContextMenuButtonItemOpts

type ContextMenuButtonItemOpts struct {
	// Type is the type of button; the default is custom.
	Type ContextMenuButtonType
	// Label is the label to display on the button.
	Label foundation.Opt[string]
}

ContextMenuButtonItemOpts are the optional parameters of NewContextMenuButtonItem.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonItem.new

type ContextMenuButtonType

type ContextMenuButtonType int

ContextMenuButtonType is a button that can appear in a context menu by default.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType

const (
	// ContextMenuButtonTypeUnspecified is the zero value: the default, a custom
	// button.
	//
	// Flutter: no counterpart
	ContextMenuButtonTypeUnspecified ContextMenuButtonType = iota
	// ContextMenuButtonTypeCut is a button that cuts the current text selection.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.cut
	ContextMenuButtonTypeCut
	// ContextMenuButtonTypeCopy is a button that copies the current text selection.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.copy
	ContextMenuButtonTypeCopy
	// ContextMenuButtonTypePaste is a button that pastes the clipboard contents
	// into the focused text field.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.paste
	ContextMenuButtonTypePaste
	// ContextMenuButtonTypeSelectAll is a button that selects all the contents of
	// the focused text field.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.selectAll
	ContextMenuButtonTypeSelectAll
	// ContextMenuButtonTypeDelete is a button that deletes the current text
	// selection.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.delete
	ContextMenuButtonTypeDelete
	// ContextMenuButtonTypeLookUp is a button that looks up the current text
	// selection.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.lookUp
	ContextMenuButtonTypeLookUp
	// ContextMenuButtonTypeSearchWeb is a button that launches a web search for
	// the current text selection.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.searchWeb
	ContextMenuButtonTypeSearchWeb
	// ContextMenuButtonTypeShare is a button that displays the share screen for
	// the current text selection.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.share
	ContextMenuButtonTypeShare
	// ContextMenuButtonTypeLiveTextInput is a button for starting Live Text input.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.liveTextInput
	ContextMenuButtonTypeLiveTextInput
	// ContextMenuButtonTypeCustom is anything other than the default button
	// types.
	//
	// Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType.custom
	ContextMenuButtonTypeCustom
)

The values of ContextMenuButtonType follow Flutter's declaration order, after the zero value, which is the default (a custom button).

func (ContextMenuButtonType) Name

func (t ContextMenuButtonType) Name() string

Name is the name of the button type, as Dart's enum name.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType

func (ContextMenuButtonType) String

func (t ContextMenuButtonType) String() string

String is the name with the type, as Dart prints an enum value.

Flutter: widgets/context_menu_button_item.dart ContextMenuButtonType

type ContextMenuController

type ContextMenuController struct {
	// contains filtered or unexported fields
}

ContextMenuController builds and manages a context menu at a given location.

There can only ever be one context menu shown at a given time in the entire app. Calling Show on one instance of this class will hide any other shown instances.

Deviation: Dart keeps the shown menu in static fields; here the binding of the context that shows it keeps it, and the static removeAny is ContextMenuControllerRemoveAny, which takes a context (SPEC §12.10).

Flutter: widgets/context_menu_controller.dart ContextMenuController

func NewContextMenuController

func NewContextMenuController(opts ...ContextMenuControllerOpts) *ContextMenuController

NewContextMenuController creates a context menu that can be shown with Show.

Flutter: widgets/context_menu_controller.dart ContextMenuController.new

func (*ContextMenuController) IsShown

func (c *ContextMenuController) IsShown() bool

IsShown reports whether this menu is currently being shown.

Flutter: widgets/context_menu_controller.dart ContextMenuController.isShown

func (*ContextMenuController) MarkNeedsBuild

func (c *ContextMenuController) MarkNeedsBuild()

MarkNeedsBuild causes the underlying OverlayEntry to rebuild during the next pipeline flush. It's necessary to call this function if the output of the builder has changed. It is an error if the context menu is not currently shown (the tag ContextMenuNotShown in debug builds).

Flutter: widgets/context_menu_controller.dart ContextMenuController.markNeedsBuild

func (*ContextMenuController) Remove

func (c *ContextMenuController) Remove()

Remove removes this menu from the UI. It does nothing if this instance is not currently shown: if another context menu is shown, that menu is not removed.

If an OnRemove callback was given to this instance, it will be called.

Flutter: widgets/context_menu_controller.dart ContextMenuController.remove

func (*ContextMenuController) Show

func (c *ContextMenuController) Show(bc BuildContext, contextMenuBuilder WidgetBuilder, opts ...ContextMenuShowOpts)

Show shows the given context menu. Since there can only be one shown context menu at a time, calling this will also remove any other context menu that is visible.

Flutter: widgets/context_menu_controller.dart ContextMenuController.show

type ContextMenuControllerOpts

type ContextMenuControllerOpts struct {
	// OnRemove is called when this menu is removed.
	OnRemove foundation.VoidCallback
}

ContextMenuControllerOpts are the optional parameters of NewContextMenuController.

Flutter: widgets/context_menu_controller.dart ContextMenuController.new

type ContextMenuShowOpts

type ContextMenuShowOpts struct {
	// DebugRequiredFor is the widget that requires the overlay, named in the
	// error when there is none.
	DebugRequiredFor Widget
}

ContextMenuShowOpts are the optional parameters of Show.

Flutter: widgets/context_menu_controller.dart ContextMenuController.show

type CopySelectionTextIntent

type CopySelectionTextIntent struct {
	IntentBase
	// Cause is what caused the selection to change.
	//
	// Flutter: widgets/text_editing_intents.dart CopySelectionTextIntent.cause
	Cause services.SelectionChangedCause
	// CollapseSelection is whether the selection collapses after the copy: a cut.
	//
	// Flutter: widgets/text_editing_intents.dart CopySelectionTextIntent.collapseSelection
	CollapseSelection bool
}

CopySelectionTextIntent is an intent that copies (or cuts) the selected text.

Flutter: widgets/text_editing_intents.dart CopySelectionTextIntent

func NewCopySelectionTextIntentCopy

func NewCopySelectionTextIntentCopy() CopySelectionTextIntent

NewCopySelectionTextIntentCopy creates the intent that copies the selection, by the keyboard.

Flutter: widgets/text_editing_intents.dart CopySelectionTextIntent.copy

func NewCopySelectionTextIntentCut

func NewCopySelectionTextIntentCut(cause services.SelectionChangedCause) CopySelectionTextIntent

NewCopySelectionTextIntentCut creates the intent that cuts the selection.

Flutter: widgets/text_editing_intents.dart CopySelectionTextIntent.cut

type CreateRectTween

type CreateRectTween func(begin, end foundation.Opt[ui.Rect]) *animation.Tween[foundation.Opt[ui.Rect]]

CreateRectTween creates the tween that a hero flight follows from one rect to another.

Flutter: widgets/heroes.dart CreateRectTween

type CrossFadeState

type CrossFadeState int

CrossFadeState is the child that an AnimatedCrossFade shows.

Flutter: widgets/animated_cross_fade.dart CrossFadeState

const (
	// CrossFadeStateUnspecified is the zero value; it is not a real state.
	//
	// Flutter: no counterpart
	CrossFadeStateUnspecified CrossFadeState = iota
	// CrossFadeStateShowFirst shows the first child and hides the second.
	//
	// Flutter: widgets/animated_cross_fade.dart CrossFadeState.showFirst
	CrossFadeStateShowFirst
	// CrossFadeStateShowSecond shows the second child and hides the first.
	//
	// Flutter: widgets/animated_cross_fade.dart CrossFadeState.showSecond
	CrossFadeStateShowSecond
)

The values of CrossFadeState.

type CustomMultiChildLayout

type CustomMultiChildLayout struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

CustomMultiChildLayout uses a delegate to size and position multiple children.

Flutter: widgets/basic.dart CustomMultiChildLayout

func NewCustomMultiChildLayout

func NewCustomMultiChildLayout(delegate rendering.MultiChildLayoutDelegate, children []Widget, opts ...CustomMultiChildLayoutOpts) *CustomMultiChildLayout

NewCustomMultiChildLayout creates the widget.

Flutter: widgets/basic.dart CustomMultiChildLayout.new

func (*CustomMultiChildLayout) CreateRenderObject

func (w *CustomMultiChildLayout) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart CustomMultiChildLayout.createRenderObject

func (*CustomMultiChildLayout) Delegate

Delegate controls the layout of the children.

Flutter: widgets/basic.dart CustomMultiChildLayout.delegate

func (*CustomMultiChildLayout) UpdateRenderObject

func (w *CustomMultiChildLayout) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart CustomMultiChildLayout.updateRenderObject

type CustomMultiChildLayoutOpts

type CustomMultiChildLayoutOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

CustomMultiChildLayoutOpts are the optional parameters of NewCustomMultiChildLayout.

Flutter: widgets/basic.dart CustomMultiChildLayout.new

type CustomPaint

type CustomPaint struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

CustomPaint provides a canvas on which to draw during the paint phase.

Flutter: widgets/basic.dart CustomPaint

func NewCustomPaint

func NewCustomPaint(child Widget, opts ...CustomPaintOpts) *CustomPaint

NewCustomPaint creates the widget.

Flutter: widgets/basic.dart CustomPaint.new

func (*CustomPaint) CreateRenderObject

func (w *CustomPaint) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart CustomPaint.createRenderObject

func (*CustomPaint) DidUnmountRenderObject

func (w *CustomPaint) DidUnmountRenderObject(renderObject rendering.RenderObject)

DidUnmountRenderObject clears what the render object holds.

Flutter: widgets/basic.dart CustomPaint.didUnmountRenderObject

func (*CustomPaint) ForegroundPainter

func (w *CustomPaint) ForegroundPainter() rendering.CustomPainter

ForegroundPainter paints after the child; nil for none.

Flutter: widgets/basic.dart CustomPaint.foregroundPainter

func (*CustomPaint) IsComplex

func (w *CustomPaint) IsComplex() bool

IsComplex is whether the painting is complex enough to benefit from caching.

Flutter: widgets/basic.dart CustomPaint.isComplex

func (*CustomPaint) Painter

func (w *CustomPaint) Painter() rendering.CustomPainter

Painter paints before the child; nil for none.

Flutter: widgets/basic.dart CustomPaint.painter

func (*CustomPaint) Size

func (w *CustomPaint) Size() ui.Size

Size is the size that this widget would prefer if it has no child; the default is zero.

Flutter: widgets/basic.dart CustomPaint.size

func (*CustomPaint) UpdateRenderObject

func (w *CustomPaint) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart CustomPaint.updateRenderObject

func (*CustomPaint) WillChange

func (w *CustomPaint) WillChange() bool

WillChange is whether the raster cache should be told that this painting is likely to change in the next frame.

Flutter: widgets/basic.dart CustomPaint.willChange

type CustomPaintOpts

type CustomPaintOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Painter paints before the child; nil for none.
	Painter rendering.CustomPainter
	// ForegroundPainter paints after the child; nil for none.
	ForegroundPainter rendering.CustomPainter
	// Size is the size that this widget would prefer if it has no child; the default is zero.
	Size ui.Size
	// IsComplex is whether the painting is complex enough to benefit from caching.
	IsComplex bool
	// WillChange is whether the raster cache should be told that this painting is likely to change in the next frame.
	WillChange bool
}

CustomPaintOpts are the optional parameters of NewCustomPaint.

Flutter: widgets/basic.dart CustomPaint.new

type CustomScrollView

type CustomScrollView struct {
	ScrollView
	// contains filtered or unexported fields
}

CustomScrollView is a ScrollView that creates custom scroll effects using slivers.

Flutter: widgets/scroll_view.dart CustomScrollView

func NewCustomScrollView

func NewCustomScrollView(slivers []Widget, opts ...CustomScrollViewOpts) *CustomScrollView

NewCustomScrollView creates a scroll view of the slivers.

Flutter: widgets/scroll_view.dart CustomScrollView.new

func (*CustomScrollView) BuildSlivers

func (v *CustomScrollView) BuildSlivers(BuildContext) []Widget

BuildSlivers is the list of slivers.

Flutter: widgets/scroll_view.dart CustomScrollView.buildSlivers

func (*CustomScrollView) Slivers

func (v *CustomScrollView) Slivers() []Widget

Slivers are the slivers that the viewport shows.

Flutter: widgets/scroll_view.dart CustomScrollView.slivers

type CustomScrollViewOpts

type CustomScrollViewOpts = ScrollViewOpts

CustomScrollViewOpts are the optional parameters of NewCustomScrollView.

Flutter: widgets/scroll_view.dart CustomScrollView.new

type CustomSingleChildLayout

type CustomSingleChildLayout struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

CustomSingleChildLayout defers the layout of its single child to a delegate.

Flutter: widgets/basic.dart CustomSingleChildLayout

func NewCustomSingleChildLayout

func NewCustomSingleChildLayout(delegate rendering.SingleChildLayoutDelegate, child Widget, opts ...CustomSingleChildLayoutOpts) *CustomSingleChildLayout

NewCustomSingleChildLayout creates the widget.

Flutter: widgets/basic.dart CustomSingleChildLayout.new

func (*CustomSingleChildLayout) CreateRenderObject

func (w *CustomSingleChildLayout) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart CustomSingleChildLayout.createRenderObject

func (*CustomSingleChildLayout) Delegate

Delegate controls the layout of the child.

Flutter: widgets/basic.dart CustomSingleChildLayout.delegate

func (*CustomSingleChildLayout) UpdateRenderObject

func (w *CustomSingleChildLayout) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart CustomSingleChildLayout.updateRenderObject

type CustomSingleChildLayoutOpts

type CustomSingleChildLayoutOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

CustomSingleChildLayoutOpts are the optional parameters of NewCustomSingleChildLayout.

Flutter: widgets/basic.dart CustomSingleChildLayout.new

type DebugCreator

type DebugCreator struct {
	// Element is the element that created the render object.
	Element Element
}

DebugCreator is the creator of a render object, set on the render objects the elements create so that their description can say where they came from.

Flutter: widgets/framework.dart DebugCreator

func (DebugCreator) String

func (c DebugCreator) String() string

String is the chain of the creator's ancestors.

Flutter: widgets/framework.dart DebugCreator.toString

type DebugOptions

type DebugOptions struct {
	// Rendering are the flags of the rendering library; nil makes a fresh set
	// when the binding is created.
	Rendering *rendering.DebugOptions
	// PrintRebuildDirtyWidgets prints a line each time an element is built or
	// rebuilt (debugPrintRebuildDirtyWidgets).
	PrintRebuildDirtyWidgets bool
	// PrintBuildScope prints a line when BuildScope starts and finishes
	// (debugPrintBuildScope).
	PrintBuildScope bool
	// PrintScheduleBuildForStacks prints the stack each time an element is
	// added to the dirty list (debugPrintScheduleBuildForStacks).
	PrintScheduleBuildForStacks bool
	// PrintGlobalKeyedWidgetLifecycle prints a line when a widget with a global
	// key is deactivated or unmounted (debugPrintGlobalKeyedWidgetLifecycle).
	PrintGlobalKeyedWidgetLifecycle bool
	// ProfileBuildsEnabled records the builds of every widget in the trace
	// (debugProfileBuildsEnabled).
	ProfileBuildsEnabled bool
	// ProfileBuildsEnabledUserWidgets records the builds of the widgets the app
	// created (debugProfileBuildsEnabledUserWidgets).
	ProfileBuildsEnabledUserWidgets bool
	// EnhanceBuildTimelineArguments adds the widget properties to the trace of a
	// build (debugEnhanceBuildTimelineArguments).
	EnhanceBuildTimelineArguments bool
	// HighlightDeprecatedWidgets draws a box around the deprecated widgets
	// (debugHighlightDeprecatedWidgets).
	HighlightDeprecatedWidgets bool
	// PaintFocusBoxes paints a box around the focused widget
	// (debugPaintFocusBoxes).
	PaintFocusBoxes bool
	// FocusChanges prints a line for each change of the focus tree
	// (debugFocusChanges).
	//
	// Flutter: widgets/focus_manager.dart debugFocusChanges
	FocusChanges bool
	// BrightnessOverride, when it is not BrightnessUnspecified, replaces the
	// platform brightness of the MediaQueryData made from the view
	// (debugBrightnessOverride).
	//
	// Flutter: foundation/debug.dart debugBrightnessOverride
	BrightnessOverride ui.Brightness
	// PrintKeyboardEvents prints what the hardware keyboard does with each key
	// event (debugPrintKeyboardEvents).
	//
	// Flutter: services/debug.dart debugPrintKeyboardEvents
	PrintKeyboardEvents bool
	// DeterministicCursor makes the caret of a text field not blink, for tests
	// that need a deterministic look (EditableText.debugDeterministicCursor).
	//
	// Deviation: Flutter's flag is a static variable of EditableText; this one is a
	// field of the options that the binding holds (SPEC §12.10).
	//
	// Flutter: widgets/editable_text.dart EditableText.debugDeterministicCursor
	DeterministicCursor bool
	// Print writes a line of debug output; nil writes to standard error
	// (debugPrint).
	//
	// Flutter: foundation/print.dart debugPrint
	Print func(line string)
}

DebugOptions are the debugging flags of the widgets library, and the ones of the rendering library they extend. The app passes one through RunAppOpts.Debug and the framework reads it through the binding. A flag has an effect only in debug builds.

Deviation: Flutter's flags are global variables; these are fields of a value that the binding holds (SPEC §12.10, §14.3).

Flutter: widgets/debug.dart

func NewDebugOptions

func NewDebugOptions() *DebugOptions

NewDebugOptions creates the flags, all off, with a fresh set of rendering flags.

Flutter: widgets/debug.dart

func (*DebugOptions) DebugPrint

func (o *DebugOptions) DebugPrint(line string)

DebugPrint writes the line through Print.

Flutter: foundation/print.dart debugPrint

type DecoratedBox

type DecoratedBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

DecoratedBox paints a decoration either before or after its child paints.

Flutter: widgets/basic.dart DecoratedBox

func NewDecoratedBox

func NewDecoratedBox(decoration painting.Decoration, child Widget, opts ...DecoratedBoxOpts) *DecoratedBox

NewDecoratedBox creates the widget.

Flutter: widgets/basic.dart DecoratedBox.new

func (*DecoratedBox) CreateRenderObject

func (w *DecoratedBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart DecoratedBox.createRenderObject

func (*DecoratedBox) Decoration

func (w *DecoratedBox) Decoration() painting.Decoration

Decoration is what to paint.

Flutter: widgets/basic.dart DecoratedBox.decoration

func (*DecoratedBox) Position

Position is whether to paint the box decoration behind or in front of the child; the default is DecorationPositionBackground.

Flutter: widgets/basic.dart DecoratedBox.position

func (*DecoratedBox) UpdateRenderObject

func (w *DecoratedBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart DecoratedBox.updateRenderObject

type DecoratedBoxOpts

type DecoratedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Position is whether to paint the box decoration behind or in front of the child; the default is DecorationPositionBackground.
	Position rendering.DecorationPosition
}

DecoratedBoxOpts are the optional parameters of NewDecoratedBox.

Flutter: widgets/basic.dart DecoratedBox.new

type DecoratedBoxTransition

type DecoratedBoxTransition struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

DecoratedBoxTransition animates the decoration of a DecoratedBox.

Flutter: widgets/transitions.dart DecoratedBoxTransition

func NewDecoratedBoxTransition

func NewDecoratedBoxTransition(decoration animation.Animation[painting.Decoration], child Widget, opts ...DecoratedBoxTransitionOpts) *DecoratedBoxTransition

NewDecoratedBoxTransition creates the widget.

Flutter: widgets/transitions.dart DecoratedBoxTransition.new

func (*DecoratedBoxTransition) Build

Build decorates the child with the current decoration.

Flutter: widgets/transitions.dart DecoratedBoxTransition.build

func (*DecoratedBoxTransition) Child

func (w *DecoratedBoxTransition) Child() Widget

Child is the widget below this one.

Flutter: widgets/transitions.dart DecoratedBoxTransition.child

func (*DecoratedBoxTransition) Decoration

Decoration is the animation of the decoration.

Flutter: widgets/transitions.dart DecoratedBoxTransition.decoration

func (*DecoratedBoxTransition) Position

Position is where the decoration is painted.

Flutter: widgets/transitions.dart DecoratedBoxTransition.position

type DecoratedBoxTransitionOpts

type DecoratedBoxTransitionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Position is where the decoration is painted relative to the child; the
	// default is background.
	Position rendering.DecorationPosition
}

DecoratedBoxTransitionOpts are the optional parameters of NewDecoratedBoxTransition.

Flutter: widgets/transitions.dart DecoratedBoxTransition.new

type Decorations

type Decorations int

Decorations is how the title bar of a window is made. The zero value is DecorationsAuto.

Flutter: no counterpart

const (
	// DecorationsAuto uses the title bar of the compositor, then libdecor's, then
	// the WindowDecoration of the framework.
	//
	// Flutter: no counterpart
	DecorationsAuto Decorations = iota
	// DecorationsApp skips the compositor's and libdecor's title bars: the app places
	// a WindowDecoration or a title bar of its own.
	//
	// Flutter: no counterpart
	DecorationsApp
)

The values of Decorations.

type DefaultPlatformMenuDelegate

type DefaultPlatformMenuDelegate struct {
	// contains filtered or unexported fields
}

DefaultPlatformMenuDelegate is the delegate of the binding: it gives the items numbers, sends them to the platform through the engine (ui.PlatformMenuHost) and runs the callbacks of the item that the user chose, opened or closed. On a platform without a menu bar it does nothing.

Deviation: Flutter sends the menus on the flutter/menu platform channel (SPEC §12.10).

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate

func NewDefaultPlatformMenuDelegate

func NewDefaultPlatformMenuDelegate(b *WidgetsBinding) *DefaultPlatformMenuDelegate

NewDefaultPlatformMenuDelegate makes the delegate of the binding.

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate.new

func (*DefaultPlatformMenuDelegate) ClearMenus

func (d *DefaultPlatformMenuDelegate) ClearMenus()

ClearMenus removes the menus.

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate.clearMenus

func (*DefaultPlatformMenuDelegate) DebugLockDelegate

func (d *DefaultPlatformMenuDelegate) DebugLockDelegate(bc BuildContext) bool

DebugLockDelegate locks the delegate to the context, in debug builds: it is false when another context has it.

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate.debugLockDelegate

func (*DefaultPlatformMenuDelegate) DebugUnlockDelegate

func (d *DefaultPlatformMenuDelegate) DebugUnlockDelegate(bc BuildContext) bool

DebugUnlockDelegate unlocks the delegate, in debug builds: it is false when another context has it.

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate.debugUnlockDelegate

func (*DefaultPlatformMenuDelegate) MenuClosed

func (d *DefaultPlatformMenuDelegate) MenuClosed(id int)

MenuClosed runs the OnClose callback of the menu.

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate._methodCallHandler (Menu.closed)

func (*DefaultPlatformMenuDelegate) MenuOpened

func (d *DefaultPlatformMenuDelegate) MenuOpened(id int)

MenuOpened runs the OnOpen callback of the menu.

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate._methodCallHandler (Menu.opened)

func (*DefaultPlatformMenuDelegate) MenuSelected

func (d *DefaultPlatformMenuDelegate) MenuSelected(id int)

MenuSelected runs the callback of the item, or invokes its intent in the focused widget.

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate._methodCallHandler (Menu.selectedCallback)

func (*DefaultPlatformMenuDelegate) SetMenus

func (d *DefaultPlatformMenuDelegate) SetMenus(topLevelMenus []PlatformMenuItem)

SetMenus gives the items their ids and sends the menus to the platform.

Flutter: widgets/platform_menu_bar.dart DefaultPlatformMenuDelegate.setMenus

type DefaultSelectionStyle

type DefaultSelectionStyle struct {
	InheritedTheme
	// contains filtered or unexported fields
}

DefaultSelectionStyle is the selection style to apply to descendant EditableText widgets which don't have an explicit style.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle

func DefaultSelectionStyleFallback

func DefaultSelectionStyleFallback() *DefaultSelectionStyle

DefaultSelectionStyleFallback is the style that DefaultSelectionStyleOf returns when the context has no enclosing default selection style: it has fallback values (none), and cannot be incorporated into the tree.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.fallback

func DefaultSelectionStyleOf

func DefaultSelectionStyleOf(bc BuildContext) *DefaultSelectionStyle

DefaultSelectionStyleOf is the closest instance of this class that encloses the context. If no such instance exists, it returns the fallback.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.of

func NewDefaultSelectionStyle

func NewDefaultSelectionStyle(child Widget, opts ...DefaultSelectionStyleOpts) *DefaultSelectionStyle

NewDefaultSelectionStyle creates a default selection style widget that specifies the selection properties for all widgets below it in the widget tree.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.new

func (*DefaultSelectionStyle) CursorColor

func (w *DefaultSelectionStyle) CursorColor() foundation.Opt[ui.Color]

CursorColor is the color of the text field's cursor.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.cursorColor

func (*DefaultSelectionStyle) MouseCursor

func (w *DefaultSelectionStyle) MouseCursor() services.MouseCursor

MouseCursor is the cursor for mouse pointers hovering over selectable Text widgets, or nil for the text cursor.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.mouseCursor

func (*DefaultSelectionStyle) SelectionColor

func (w *DefaultSelectionStyle) SelectionColor() foundation.Opt[ui.Color]

SelectionColor is the background color of selected text.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.selectionColor

func (*DefaultSelectionStyle) UpdateShouldNotify

func (w *DefaultSelectionStyle) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether a property changed.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.updateShouldNotify

func (*DefaultSelectionStyle) Wrap

func (w *DefaultSelectionStyle) Wrap(_ BuildContext, child Widget) Widget

Wrap returns a copy of the style with the given child.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.wrap

type DefaultSelectionStyleOpts

type DefaultSelectionStyleOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// CursorColor is the color of the text field's cursor.
	CursorColor foundation.Opt[ui.Color]
	// SelectionColor is the background color of selected text.
	SelectionColor foundation.Opt[ui.Color]
	// MouseCursor is the cursor for mouse pointers hovering over selectable Text
	// widgets; the default is the text cursor.
	MouseCursor services.MouseCursor
}

DefaultSelectionStyleOpts are the optional parameters of NewDefaultSelectionStyle.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.new

type DefaultTextEditingShortcuts

type DefaultTextEditingShortcuts struct {
	StatelessWidget
	// contains filtered or unexported fields
}

DefaultTextEditingShortcuts is a widget that provides the default key bindings of the text editing intents (a Shortcuts widget), for the text fields below it. Actions for the intents are provided by the text fields.

Deviation: the Linux, Windows and macOS bindings are ported (SPEC §12.10); iOS uses the macOS ones, as in Flutter, and Android and Fuchsia use the Linux ones. The bindings that give the keys to the input method (Flutter's disabling shortcuts) are not ported yet.

Flutter: widgets/default_text_editing_shortcuts.dart DefaultTextEditingShortcuts

func NewDefaultTextEditingShortcuts

func NewDefaultTextEditingShortcuts(child Widget, opts ...WidgetOpts) *DefaultTextEditingShortcuts

NewDefaultTextEditingShortcuts creates the widget.

Flutter: widgets/default_text_editing_shortcuts.dart DefaultTextEditingShortcuts.new

func (*DefaultTextEditingShortcuts) Build

Build returns the Shortcuts widget with the bindings of the platform.

Flutter: widgets/default_text_editing_shortcuts.dart DefaultTextEditingShortcuts.build

func (*DefaultTextEditingShortcuts) Child

Child is the widget below this widget in the tree.

Flutter: widgets/default_text_editing_shortcuts.dart DefaultTextEditingShortcuts.child

type DefaultTextHeightBehavior

type DefaultTextHeightBehavior struct {
	InheritedTheme
	// contains filtered or unexported fields
}

DefaultTextHeightBehavior is the text height behavior that descendant Text widgets use when they don't set their own.

Flutter: widgets/text.dart DefaultTextHeightBehavior

func NewDefaultTextHeightBehavior

func NewDefaultTextHeightBehavior(textHeightBehavior ui.TextHeightBehavior, child Widget, opts ...WidgetOpts) *DefaultTextHeightBehavior

NewDefaultTextHeightBehavior creates the widget.

Flutter: widgets/text.dart DefaultTextHeightBehavior.new

func (*DefaultTextHeightBehavior) TextHeightBehavior

func (w *DefaultTextHeightBehavior) TextHeightBehavior() ui.TextHeightBehavior

TextHeightBehavior is the behavior the widget gives.

Flutter: widgets/text.dart DefaultTextHeightBehavior.textHeightBehavior

func (*DefaultTextHeightBehavior) UpdateShouldNotify

func (w *DefaultTextHeightBehavior) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the behavior changed.

Flutter: widgets/text.dart DefaultTextHeightBehavior.updateShouldNotify

func (*DefaultTextHeightBehavior) Wrap

Wrap makes a DefaultTextHeightBehavior with this behavior around the child.

Flutter: widgets/text.dart DefaultTextHeightBehavior.wrap

type DefaultTextStyle

type DefaultTextStyle struct {
	InheritedTheme
	// contains filtered or unexported fields
}

DefaultTextStyle is the text style, and the other text options, that descendant Text widgets use when they don't set their own.

Flutter: widgets/text.dart DefaultTextStyle

func DefaultTextStyleOf

func DefaultTextStyleOf(bc BuildContext) *DefaultTextStyle

DefaultTextStyleOf is the default text style of the closest DefaultTextStyle above the context, or the fallback. The context depends on it.

Flutter: widgets/text.dart DefaultTextStyle.of

func NewDefaultTextStyle

func NewDefaultTextStyle(style *painting.TextStyle, child Widget, opts ...DefaultTextStyleOpts) *DefaultTextStyle

NewDefaultTextStyle creates the widget. In debug builds it panics with the tag TextMaxLinesInvalid when MaxLines is not greater than zero.

Flutter: widgets/text.dart DefaultTextStyle.new

func NewDefaultTextStyleFallback

func NewDefaultTextStyleFallback(opts ...WidgetOpts) *DefaultTextStyle

NewDefaultTextStyleFallback creates the default text style that is used when there is none above: an empty style, wrapping, clipping.

Flutter: widgets/text.dart DefaultTextStyle.fallback

func (*DefaultTextStyle) DebugFillProperties

func (w *DefaultTextStyle) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the style.

Flutter: widgets/text.dart DefaultTextStyle.debugFillProperties

func (*DefaultTextStyle) MaxLines

func (w *DefaultTextStyle) MaxLines() foundation.Opt[int]

MaxLines is the maximum number of lines, if any.

Flutter: widgets/text.dart DefaultTextStyle.maxLines

func (*DefaultTextStyle) Overflow

func (w *DefaultTextStyle) Overflow() painting.TextOverflow

Overflow is how visual overflow is handled.

Flutter: widgets/text.dart DefaultTextStyle.overflow

func (*DefaultTextStyle) SoftWrap

func (w *DefaultTextStyle) SoftWrap() bool

SoftWrap is whether the text wraps at the box width.

Flutter: widgets/text.dart DefaultTextStyle.softWrap

func (*DefaultTextStyle) Style

func (w *DefaultTextStyle) Style() *painting.TextStyle

Style is the text style to apply to descendant Text widgets without explicit style.

Flutter: widgets/text.dart DefaultTextStyle.style

func (*DefaultTextStyle) TextAlign

func (w *DefaultTextStyle) TextAlign() ui.TextAlign

TextAlign is how the text is aligned horizontally; unspecified is null.

Flutter: widgets/text.dart DefaultTextStyle.textAlign

func (*DefaultTextStyle) TextHeightBehavior

func (w *DefaultTextStyle) TextHeightBehavior() *ui.TextHeightBehavior

TextHeightBehavior is how the line height applies to the first ascent and the last descent, or nil.

Flutter: widgets/text.dart DefaultTextStyle.textHeightBehavior

func (*DefaultTextStyle) TextWidthBasis

func (w *DefaultTextStyle) TextWidthBasis() painting.TextWidthBasis

TextWidthBasis is how the width of the text is measured.

Flutter: widgets/text.dart DefaultTextStyle.textWidthBasis

func (*DefaultTextStyle) UpdateShouldNotify

func (w *DefaultTextStyle) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether any of the options changed.

Flutter: widgets/text.dart DefaultTextStyle.updateShouldNotify

func (*DefaultTextStyle) Wrap

func (w *DefaultTextStyle) Wrap(_ BuildContext, child Widget) Widget

Wrap makes a DefaultTextStyle with these options around the child.

Flutter: widgets/text.dart DefaultTextStyle.wrap

type DefaultTextStyleMergeOpts

type DefaultTextStyleMergeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Style is merged into the style of the ancestor.
	Style *painting.TextStyle
	// TextAlign replaces the alignment of the ancestor when specified.
	TextAlign ui.TextAlign
	// SoftWrap replaces the soft wrap of the ancestor when set.
	SoftWrap foundation.Opt[bool]
	// Overflow replaces the overflow of the ancestor when specified.
	Overflow painting.TextOverflow
	// MaxLines replaces the maximum lines of the ancestor when set.
	MaxLines foundation.Opt[int]
	// TextWidthBasis replaces the width basis of the ancestor when specified.
	TextWidthBasis painting.TextWidthBasis
	// TextHeightBehavior replaces the height behavior of the ancestor when set.
	TextHeightBehavior *ui.TextHeightBehavior
}

DefaultTextStyleMergeOpts are the optional parameters of NewDefaultTextStyleMerge. Zero values keep what the ancestor has.

Flutter: widgets/text.dart DefaultTextStyle.merge

type DefaultTextStyleOpts

type DefaultTextStyleOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TextAlign is how the text is aligned horizontally; unspecified means the
	// Text widget's default (start).
	TextAlign ui.TextAlign
	// SoftWrap is whether the text wraps at the box width; the default is true.
	SoftWrap foundation.Opt[bool]
	// Overflow is how visual overflow is handled; the default is
	// TextOverflowClip.
	Overflow painting.TextOverflow
	// MaxLines is the maximum number of lines; it must be greater than zero.
	MaxLines foundation.Opt[int]
	// TextWidthBasis is how the width of the text is measured; the default is
	// TextWidthBasisParent.
	TextWidthBasis painting.TextWidthBasis
	// TextHeightBehavior says how the line height applies to the first ascent and
	// the last descent.
	TextHeightBehavior *ui.TextHeightBehavior
}

DefaultTextStyleOpts are the optional parameters of NewDefaultTextStyle.

Flutter: widgets/text.dart DefaultTextStyle.new

type DefaultTextStyleTransition

type DefaultTextStyleTransition struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

DefaultTextStyleTransition animates the style of a DefaultTextStyle.

Flutter: widgets/transitions.dart DefaultTextStyleTransition

func NewDefaultTextStyleTransition

func NewDefaultTextStyleTransition(style animation.Animation[*painting.TextStyle], child Widget, opts ...DefaultTextStyleTransitionOpts) *DefaultTextStyleTransition

NewDefaultTextStyleTransition creates the widget.

Flutter: widgets/transitions.dart DefaultTextStyleTransition.new

func (*DefaultTextStyleTransition) Build

Build sets the default text style of the child to the current style.

Flutter: widgets/transitions.dart DefaultTextStyleTransition.build

func (*DefaultTextStyleTransition) Child

Child is the widget below this one.

Flutter: widgets/transitions.dart DefaultTextStyleTransition.child

func (*DefaultTextStyleTransition) Style

Style is the animation of the style.

Flutter: widgets/transitions.dart DefaultTextStyleTransition.style

type DefaultTextStyleTransitionOpts

type DefaultTextStyleTransitionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TextAlign is how the text is aligned horizontally.
	TextAlign ui.TextAlign
	// SoftWrap is whether the text breaks at soft line breaks; the default is true.
	SoftWrap foundation.Opt[bool]
	// Overflow is how visual overflow is handled; the default is clip.
	Overflow painting.TextOverflow
	// MaxLines is the maximum number of lines.
	MaxLines foundation.Opt[int]
}

DefaultTextStyleTransitionOpts are the optional parameters of NewDefaultTextStyleTransition.

Flutter: widgets/transitions.dart DefaultTextStyleTransition.new

type DefaultTransitionDelegate

type DefaultTransitionDelegate struct{}

DefaultTransitionDelegate is the transition delegate of a Navigator that has none: it pushes the last new route with a transition and adds the others, and pops the last exiting route (when it has no pageless routes above) with a transition and completes the others.

Flutter: widgets/navigator.dart DefaultTransitionDelegate

func (DefaultTransitionDelegate) Resolve

func (DefaultTransitionDelegate) Resolve(newPageRouteHistory []RouteTransitionRecord, locationToExitingPageRoute map[RouteTransitionRecord]RouteTransitionRecord, pageRouteToPagelessRoutes map[RouteTransitionRecord][]RouteTransitionRecord) []RouteTransitionRecord

Resolve decides the transitions as the type describes.

Flutter: widgets/navigator.dart DefaultTransitionDelegate.resolve

type DefaultWidgetsLocalizations

type DefaultWidgetsLocalizations struct{}

DefaultWidgetsLocalizations is the English WidgetsLocalizations that is used when no other delegate provides them.

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations

func (DefaultWidgetsLocalizations) CopyButtonLabel

func (DefaultWidgetsLocalizations) CopyButtonLabel() string

CopyButtonLabel is "Copy".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.copyButtonLabel

func (DefaultWidgetsLocalizations) CutButtonLabel

func (DefaultWidgetsLocalizations) CutButtonLabel() string

CutButtonLabel is "Cut".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.cutButtonLabel

func (DefaultWidgetsLocalizations) LookUpButtonLabel

func (DefaultWidgetsLocalizations) LookUpButtonLabel() string

LookUpButtonLabel is "Look Up".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.lookUpButtonLabel

func (DefaultWidgetsLocalizations) NoResultsFound

func (DefaultWidgetsLocalizations) NoResultsFound() string

NoResultsFound is "No results found".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.noResultsFound

func (DefaultWidgetsLocalizations) PasteButtonLabel

func (DefaultWidgetsLocalizations) PasteButtonLabel() string

PasteButtonLabel is "Paste".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.pasteButtonLabel

func (DefaultWidgetsLocalizations) RadioButtonUnselectedLabel

func (DefaultWidgetsLocalizations) RadioButtonUnselectedLabel() string

RadioButtonUnselectedLabel is "Not selected".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.radioButtonUnselectedLabel

func (DefaultWidgetsLocalizations) ReorderItemDown

func (DefaultWidgetsLocalizations) ReorderItemDown() string

ReorderItemDown is "Move down".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.reorderItemDown

func (DefaultWidgetsLocalizations) ReorderItemLeft

func (DefaultWidgetsLocalizations) ReorderItemLeft() string

ReorderItemLeft is "Move left".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.reorderItemLeft

func (DefaultWidgetsLocalizations) ReorderItemRight

func (DefaultWidgetsLocalizations) ReorderItemRight() string

ReorderItemRight is "Move right".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.reorderItemRight

func (DefaultWidgetsLocalizations) ReorderItemToEnd

func (DefaultWidgetsLocalizations) ReorderItemToEnd() string

ReorderItemToEnd is "Move to the end".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.reorderItemToEnd

func (DefaultWidgetsLocalizations) ReorderItemToStart

func (DefaultWidgetsLocalizations) ReorderItemToStart() string

ReorderItemToStart is "Move to the start".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.reorderItemToStart

func (DefaultWidgetsLocalizations) ReorderItemUp

func (DefaultWidgetsLocalizations) ReorderItemUp() string

ReorderItemUp is "Move up".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.reorderItemUp

func (DefaultWidgetsLocalizations) SearchResultsFound

func (DefaultWidgetsLocalizations) SearchResultsFound() string

SearchResultsFound is "Search results found".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.searchResultsFound

func (DefaultWidgetsLocalizations) SearchWebButtonLabel

func (DefaultWidgetsLocalizations) SearchWebButtonLabel() string

SearchWebButtonLabel is "Search Web".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.searchWebButtonLabel

func (DefaultWidgetsLocalizations) SelectAllButtonLabel

func (DefaultWidgetsLocalizations) SelectAllButtonLabel() string

SelectAllButtonLabel is "Select all".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.selectAllButtonLabel

func (DefaultWidgetsLocalizations) ShareButtonLabel

func (DefaultWidgetsLocalizations) ShareButtonLabel() string

ShareButtonLabel is "Share".

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.shareButtonLabel

func (DefaultWidgetsLocalizations) TextDirection

TextDirection is left to right.

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.textDirection

type DelegatedTransitionBuilder

type DelegatedTransitionBuilder func(bc BuildContext, animation, secondaryAnimation animation.Animation[float64], allowSnapshotting bool, child Widget) Widget

DelegatedTransitionBuilder builds the transition that a route delegates to the route below it: it returns nil when there is none.

Flutter: widgets/transitions.dart DelegatedTransitionBuilder

type DeleteCharacterIntent

type DeleteCharacterIntent struct {
	DirectionalTextEditingIntentBase
}

DeleteCharacterIntent is an intent that deletes a character in a direction.

Flutter: widgets/text_editing_intents.dart DeleteCharacterIntent

func NewDeleteCharacterIntent

func NewDeleteCharacterIntent(forward bool) DeleteCharacterIntent

NewDeleteCharacterIntent creates the intent.

Flutter: widgets/text_editing_intents.dart DeleteCharacterIntent.new

type DeleteToLineBreakIntent

type DeleteToLineBreakIntent struct {
	DirectionalTextEditingIntentBase
}

DeleteToLineBreakIntent is an intent that deletes from the caret to the next line break in a direction.

Flutter: widgets/text_editing_intents.dart DeleteToLineBreakIntent

func NewDeleteToLineBreakIntent

func NewDeleteToLineBreakIntent(forward bool) DeleteToLineBreakIntent

NewDeleteToLineBreakIntent creates the intent.

Flutter: widgets/text_editing_intents.dart DeleteToLineBreakIntent.new

type DeleteToNextWordBoundaryIntent

type DeleteToNextWordBoundaryIntent struct {
	DirectionalTextEditingIntentBase
}

DeleteToNextWordBoundaryIntent is an intent that deletes from the caret to the next word boundary in a direction.

Flutter: widgets/text_editing_intents.dart DeleteToNextWordBoundaryIntent

func NewDeleteToNextWordBoundaryIntent

func NewDeleteToNextWordBoundaryIntent(forward bool) DeleteToNextWordBoundaryIntent

NewDeleteToNextWordBoundaryIntent creates the intent.

Flutter: widgets/text_editing_intents.dart DeleteToNextWordBoundaryIntent.new

type DesktopTextSelectionToolbarLayoutDelegate

type DesktopTextSelectionToolbarLayoutDelegate struct {
	rendering.SingleChildLayoutDelegateBase
	// contains filtered or unexported fields
}

DesktopTextSelectionToolbarLayoutDelegate positions the text selection toolbar on desktop platforms: its top left corner is at the anchor, moved back as far as it takes for the toolbar to fit in the box.

Flutter: widgets/desktop_text_selection_toolbar_layout_delegate.dart DesktopTextSelectionToolbarLayoutDelegate

func NewDesktopTextSelectionToolbarLayoutDelegate

func NewDesktopTextSelectionToolbarLayoutDelegate(anchor ui.Offset) *DesktopTextSelectionToolbarLayoutDelegate

NewDesktopTextSelectionToolbarLayoutDelegate creates the delegate of a toolbar that is anchored to a point, given in the coordinates of the box that the delegate lays out.

Flutter: widgets/desktop_text_selection_toolbar_layout_delegate.dart DesktopTextSelectionToolbarLayoutDelegate.new

func (*DesktopTextSelectionToolbarLayoutDelegate) Anchor

Anchor is the point that the toolbar is placed at.

Flutter: widgets/desktop_text_selection_toolbar_layout_delegate.dart DesktopTextSelectionToolbarLayoutDelegate.anchor

func (*DesktopTextSelectionToolbarLayoutDelegate) GetConstraintsForChild

GetConstraintsForChild loosens the constraints.

Flutter: widgets/desktop_text_selection_toolbar_layout_delegate.dart DesktopTextSelectionToolbarLayoutDelegate.getConstraintsForChild

func (*DesktopTextSelectionToolbarLayoutDelegate) GetPositionForChild

func (d *DesktopTextSelectionToolbarLayoutDelegate) GetPositionForChild(size, childSize ui.Size) ui.Offset

GetPositionForChild puts the child at the anchor, or as close to it as keeps it inside the box.

Flutter: widgets/desktop_text_selection_toolbar_layout_delegate.dart DesktopTextSelectionToolbarLayoutDelegate.getPositionForChild

func (*DesktopTextSelectionToolbarLayoutDelegate) ShouldRelayout

ShouldRelayout is whether the anchor changed.

Flutter: widgets/desktop_text_selection_toolbar_layout_delegate.dart DesktopTextSelectionToolbarLayoutDelegate.shouldRelayout

type DiagonalDragBehavior

type DiagonalDragBehavior int

DiagonalDragBehavior is how a two-dimensional scrollable responds to a drag that is not along an axis.

Flutter: widgets/scroll_view.dart DiagonalDragBehavior

const (
	// DiagonalDragBehaviorNone allows scrolling along one axis at a time: the
	// one the drag starts along. It is the zero value.
	//
	// Flutter: widgets/scroll_view.dart DiagonalDragBehavior.none
	DiagonalDragBehaviorNone DiagonalDragBehavior = iota
	// DiagonalDragBehaviorWeightedEvent scrolls along both axes until one wins
	// the gesture, which is decided once per drag.
	//
	// Flutter: widgets/scroll_view.dart DiagonalDragBehavior.weightedEvent
	DiagonalDragBehaviorWeightedEvent
	// DiagonalDragBehaviorWeightedContinuous scrolls along both axes and weighs
	// the axes again at every update.
	//
	// Flutter: widgets/scroll_view.dart DiagonalDragBehavior.weightedContinuous
	DiagonalDragBehaviorWeightedContinuous
	// DiagonalDragBehaviorFree scrolls along both axes freely.
	//
	// Flutter: widgets/scroll_view.dart DiagonalDragBehavior.free
	DiagonalDragBehaviorFree
)

type DialogWindow

type DialogWindow struct {
	StatelessWidget
	// contains filtered or unexported fields
}

DialogWindow shows its child in the dialog window of a controller. When the widget leaves the tree the window stays, until the controller destroys it.

Flutter: widgets/_window.dart DialogWindow

func NewDialogWindow

func NewDialogWindow(controller *DialogWindowController, child Widget, opts ...DialogWindowOpts) *DialogWindow

NewDialogWindow creates the widget that shows the child in the dialog window of the controller.

Flutter: widgets/_window.dart DialogWindow.new

func (*DialogWindow) Build

func (w *DialogWindow) Build(BuildContext) Widget

Build shows the child in the view of the window.

Flutter: widgets/_window.dart DialogWindow.build

func (*DialogWindow) Child

func (w *DialogWindow) Child() Widget

Child is the content of the window.

Flutter: widgets/_window.dart DialogWindow.child

func (*DialogWindow) Controller

func (w *DialogWindow) Controller() *DialogWindowController

Controller is the controller of the window.

Flutter: widgets/_window.dart DialogWindow.controller

type DialogWindowController

type DialogWindowController struct {
	// contains filtered or unexported fields
}

DialogWindowController is the controller of a dialog window. A dialog with a parent is modal to it: it has no system menu, is not in the window switcher, and closes when the parent does. A dialog without a parent is modeless: it can be minimized but not maximized.

Flutter: widgets/_window.dart DialogWindowController

func NewDialogWindowController

func NewDialogWindowController(bc BuildContext, size ui.Size, opts ...DialogWindowControllerOpts) (*DialogWindowController, error)

NewDialogWindowController creates a dialog window of the size, in logical pixels, and the controller of it. See NewRegularWindowController for the errors.

Flutter: widgets/_window.dart DialogWindowController.new

func (*DialogWindowController) Activate

func (c *DialogWindowController) Activate()

Activate asks for the window to be shown at its size and position, out of the minimized state, and to get the focus. The platform decides whether it gets the focus and the top of the stack of windows. A hidden window is shown first.

Flutter: widgets/_window.dart RegularWindowController.activate

func (*DialogWindowController) ContentSize

func (c *DialogWindowController) ContentSize() ui.Size

ContentSize is the size of the content of the window in logical pixels.

Flutter: widgets/_window.dart BaseWindowController.contentSize

func (*DialogWindowController) Destroy

func (c *DialogWindowController) Destroy()

Destroy destroys the window and tells the delegate. It does nothing when the window is destroyed already.

Flutter: widgets/_window.dart BaseWindowController.destroy

func (*DialogWindowController) IsActivated

func (c *DialogWindowController) IsActivated() bool

IsActivated is whether the window is focused and can receive user input.

Flutter: widgets/_window.dart RegularWindowController.isActivated

func (*DialogWindowController) IsMinimized

func (c *DialogWindowController) IsMinimized() bool

IsMinimized is whether the window is minimized. Where the platform says so (X11) it is what the window manager did; otherwise (Wayland, whose xdg-shell does not say) it is what the controller last asked for, until the window is activated.

Flutter: widgets/_window.dart RegularWindowController.isMinimized

func (*DialogWindowController) Parent

Parent is the controller of the window the dialog is modal to, or nil for a modeless dialog.

Flutter: widgets/_window.dart DialogWindowController.parent

func (*DialogWindowController) RootView

func (c *DialogWindowController) RootView() *ui.View

RootView is the view of the window.

Flutter: widgets/_window.dart BaseWindowController.rootView

func (*DialogWindowController) SetConstraints

func (c *DialogWindowController) SetConstraints(constraints rendering.BoxConstraints)

SetConstraints asks for new limits on the size of the window. The platform may resize the window to satisfy them, or ignore them.

Flutter: widgets/_window.dart RegularWindowController.setConstraints

func (*DialogWindowController) SetContentType

func (c *DialogWindowController) SetContentType(contentType ui.ContentType)

SetContentType tells the compositor what the window shows (a game, a video or pictures), so that it can pick the refresh rate and the latency that suit it.

Flutter: no counterpart

func (*DialogWindowController) SetIcon

func (c *DialogWindowController) SetIcon(icon ui.WindowIcon) error

SetIcon sets the icon of the window; an empty icon removes it. It fails with WindowIconInvalid when a picture of the icon is wrong, and with the platform's error when it cannot use the icon. A platform that has no window icons ignores it.

Flutter: no counterpart

func (*DialogWindowController) SetMinimized

func (c *DialogWindowController) SetMinimized(minimized bool)

SetMinimized asks for the window to be minimized, or, with false, shown again.

Flutter: widgets/_window.dart RegularWindowController.setMinimized

func (*DialogWindowController) SetSize

func (c *DialogWindowController) SetSize(size ui.Size)

SetSize asks for a new content size of the window, in logical pixels. The platform may clamp it to the constraints of the window, or ignore it.

Flutter: widgets/_window.dart RegularWindowController.setSize

func (*DialogWindowController) SetTitle

func (c *DialogWindowController) SetTitle(title string)

SetTitle asks for a new title of the window.

Flutter: widgets/_window.dart RegularWindowController.setTitle

func (*DialogWindowController) Title

func (c *DialogWindowController) Title() string

Title is the title of the window. The platform decides what is shown; this is the title that was asked for, or the one the platform reported.

Flutter: widgets/_window.dart RegularWindowController.title

type DialogWindowControllerDelegate

type DialogWindowControllerDelegate interface {
	// OnWindowCloseRequested is called when the user asks to close the window. The
	// default destroys the window; an override can delay or prevent that.
	//
	// Flutter: widgets/_window.dart DialogWindowControllerDelegate.onWindowCloseRequested
	OnWindowCloseRequested(controller *DialogWindowController)
	// OnWindowDestroyed is called after the window is closed.
	//
	// Flutter: widgets/_window.dart DialogWindowControllerDelegate.onWindowDestroyed
	OnWindowDestroyed()
}

DialogWindowControllerDelegate listens to the life of a dialog window. Embed DialogWindowControllerDelegateBase and override what you need.

Flutter: widgets/_window.dart DialogWindowControllerDelegate

type DialogWindowControllerDelegateBase

type DialogWindowControllerDelegateBase struct{}

DialogWindowControllerDelegateBase is a DialogWindowControllerDelegate that destroys the window on a request to close it and does nothing when it is gone.

Flutter: widgets/_window.dart DialogWindowControllerDelegate

func (DialogWindowControllerDelegateBase) OnWindowCloseRequested

func (DialogWindowControllerDelegateBase) OnWindowCloseRequested(controller *DialogWindowController)

OnWindowCloseRequested destroys the window.

Flutter: widgets/_window.dart DialogWindowControllerDelegate.onWindowCloseRequested

func (DialogWindowControllerDelegateBase) OnWindowDestroyed

func (DialogWindowControllerDelegateBase) OnWindowDestroyed()

OnWindowDestroyed does nothing.

Flutter: widgets/_window.dart DialogWindowControllerDelegate.onWindowDestroyed

type DialogWindowControllerOpts

type DialogWindowControllerOpts struct {
	// Constraints are the smallest and largest size of the window; see
	// RegularWindowControllerOpts.Constraints.
	Constraints foundation.Opt[rendering.BoxConstraints]
	// Parent is the controller of the window the dialog is modal to; nil makes a
	// modeless dialog.
	Parent BaseWindowController
	// Title is the title of the window.
	Title string
	// Delegate listens to the life of the window; the default destroys the window
	// when the user closes it.
	Delegate DialogWindowControllerDelegate
	// Decorations is how the title bar is made; the default is DecorationsAuto.
	Decorations Decorations
	// Icon is the icon of the window; the default is none.
	Icon ui.WindowIcon
	// ContentType is the hint about what the window shows.
	ContentType ui.ContentType
}

DialogWindowControllerOpts are the optional parameters of NewDialogWindowController.

Flutter: widgets/_window.dart DialogWindowController.new

type DialogWindowOpts

type DialogWindowOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

DialogWindowOpts are the optional parameters of NewDialogWindow.

Flutter: widgets/_window.dart DialogWindow.new

type DidRemovePageCallback

type DidRemovePageCallback func(page Page)

DidRemovePageCallback is called after the route of a page was removed from the navigator by an imperative call such as Pop, so that the page can be removed from Navigator.pages.

Flutter: widgets/navigator.dart DidRemovePageCallback

type DirectionalCaretMovementIntent

type DirectionalCaretMovementIntent interface {
	DirectionalTextEditingIntent
	// CollapseSelection is whether the selection collapses to the new caret.
	//
	// Flutter: widgets/text_editing_intents.dart DirectionalCaretMovementIntent.collapseSelection
	CollapseSelection() bool
	// CollapseAtReversal is whether the selection collapses when the direction
	// reverses.
	//
	// Flutter: widgets/text_editing_intents.dart DirectionalCaretMovementIntent.collapseAtReversal
	CollapseAtReversal() bool
	// ContinuesAtWrap is whether the movement continues at a line wrap.
	//
	// Flutter: widgets/text_editing_intents.dart DirectionalCaretMovementIntent.continuesAtWrap
	ContinuesAtWrap() bool
}

DirectionalCaretMovementIntent is the interface of the intents that move or extend the caret in a direction.

Flutter: widgets/text_editing_intents.dart DirectionalCaretMovementIntent

type DirectionalCaretMovementIntentBase

type DirectionalCaretMovementIntentBase struct {
	DirectionalTextEditingIntentBase
	// contains filtered or unexported fields
}

DirectionalCaretMovementIntentBase implements DirectionalCaretMovementIntent; embed it.

Flutter: widgets/text_editing_intents.dart DirectionalCaretMovementIntent

func (DirectionalCaretMovementIntentBase) CollapseAtReversal

func (i DirectionalCaretMovementIntentBase) CollapseAtReversal() bool

CollapseAtReversal is whether the selection collapses when the direction reverses.

Flutter: widgets/text_editing_intents.dart DirectionalCaretMovementIntent.collapseAtReversal

func (DirectionalCaretMovementIntentBase) CollapseSelection

func (i DirectionalCaretMovementIntentBase) CollapseSelection() bool

CollapseSelection is whether the selection collapses to the new caret.

Flutter: widgets/text_editing_intents.dart DirectionalCaretMovementIntent.collapseSelection

func (DirectionalCaretMovementIntentBase) ContinuesAtWrap

func (i DirectionalCaretMovementIntentBase) ContinuesAtWrap() bool

ContinuesAtWrap is whether the movement continues at a line wrap.

Flutter: widgets/text_editing_intents.dart DirectionalCaretMovementIntent.continuesAtWrap

type DirectionalFocusAction

type DirectionalFocusAction struct {
	ContextActionBase
	// contains filtered or unexported fields
}

DirectionalFocusAction is the action that handles a DirectionalFocusIntent.

Deviation: it is a ContextAction, like NextFocusAction (SPEC §12.10).

Flutter: widgets/focus_traversal.dart DirectionalFocusAction

func NewDirectionalFocusAction

func NewDirectionalFocusAction() *DirectionalFocusAction

NewDirectionalFocusAction creates the action.

Flutter: widgets/focus_traversal.dart DirectionalFocusAction.new

func NewDirectionalFocusActionForTextField

func NewDirectionalFocusActionForTextField() *DirectionalFocusAction

NewDirectionalFocusActionForTextField creates the action for a text field: it does nothing for an intent that ignores text fields.

Flutter: widgets/focus_traversal.dart DirectionalFocusAction.forTextField

func (*DirectionalFocusAction) IntentType

func (a *DirectionalFocusAction) IntentType() reflect.Type

IntentType is DirectionalFocusIntent.

Flutter: widgets/actions.dart Action.intentType

func (*DirectionalFocusAction) InvokeWithContext

func (a *DirectionalFocusAction) InvokeWithContext(intent Intent, bc BuildContext) any

InvokeWithContext moves the primary focus in the direction of the intent.

Flutter: widgets/focus_traversal.dart DirectionalFocusAction.invoke

type DirectionalFocusIntent

type DirectionalFocusIntent struct {
	IntentBase
	// Direction is the direction to move the focus in.
	//
	// Flutter: widgets/focus_traversal.dart DirectionalFocusIntent.direction
	Direction TraversalDirection
	// AllowTextFields lets a DirectionalFocusAction made for text fields move the
	// focus too (Flutter's ignoreTextFields is true by default).
	AllowTextFields bool
}

DirectionalFocusIntent is an intent that moves the focus in a direction (the arrow keys by default).

Flutter: widgets/focus_traversal.dart DirectionalFocusIntent

func (DirectionalFocusIntent) DebugFillProperties

DebugFillProperties adds the direction.

Flutter: widgets/focus_traversal.dart DirectionalFocusIntent.debugFillProperties

func (DirectionalFocusIntent) IgnoreTextFields

func (i DirectionalFocusIntent) IgnoreTextFields() bool

IgnoreTextFields is whether the action of a text field leaves the intent alone.

Flutter: widgets/focus_traversal.dart DirectionalFocusIntent.ignoreTextFields

type DirectionalTextEditingIntent

type DirectionalTextEditingIntent interface {
	Intent
	// IsForward is whether the intent acts forward, toward the end of the text.
	//
	// Flutter: widgets/text_editing_intents.dart DirectionalTextEditingIntent.forward
	IsForward() bool
}

DirectionalTextEditingIntent is the interface of the intents that act in a direction in the text: forward is toward the end of the text.

Flutter: widgets/text_editing_intents.dart DirectionalTextEditingIntent

type DirectionalTextEditingIntentBase

type DirectionalTextEditingIntentBase struct {
	IntentBase
	// contains filtered or unexported fields
}

DirectionalTextEditingIntentBase implements DirectionalTextEditingIntent; embed it.

Flutter: widgets/text_editing_intents.dart DirectionalTextEditingIntent

func (DirectionalTextEditingIntentBase) IsForward

func (i DirectionalTextEditingIntentBase) IsForward() bool

IsForward is whether the intent acts toward the end of the text.

Flutter: widgets/text_editing_intents.dart DirectionalTextEditingIntent.forward

type Directionality

type Directionality struct {
	InheritedWidget
	// contains filtered or unexported fields
}

Directionality is the inherited widget that says in which direction the text and the widgets that depend on it are laid out (left to right or right to left).

Deviation: Flutter's is a "ubiquitous" inherited widget that finds its dependents by walking the subtree; this one keeps the dependents like any other inherited widget, which notifies the same elements (SPEC §12.10).

Flutter: widgets/basic.dart Directionality

func NewDirectionality

func NewDirectionality(textDirection ui.TextDirection, child Widget, opts ...WidgetOpts) *Directionality

NewDirectionality creates the widget that gives the text direction to the widgets below it.

Flutter: widgets/basic.dart Directionality.new

func (*Directionality) TextDirection

func (w *Directionality) TextDirection() ui.TextDirection

TextDirection is the direction the widget gives.

Flutter: widgets/basic.dart Directionality.textDirection

func (*Directionality) UpdateShouldNotify

func (w *Directionality) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the direction changed.

Flutter: widgets/basic.dart Directionality.updateShouldNotify

type DismissAction

type DismissAction struct{ ActionBase }

DismissAction is an action for DismissIntent; embed it in the action of a dismissable widget.

Flutter: widgets/actions.dart DismissAction

func (*DismissAction) IntentType

func (a *DismissAction) IntentType() reflect.Type

IntentType is DismissIntent.

Flutter: widgets/actions.dart Action.intentType

type DismissDirection

type DismissDirection int

DismissDirection is the direction in which a Dismissible can be dismissed.

TODO: the Dismissible widget (Flutter's widgets/dismissible.dart), which is not part of the plan yet; only the enum exists, for SnackBar's dismissDirection.

Flutter: widgets/dismissible.dart DismissDirection

const (
	// DismissDirectionUnspecified is the zero value: the default of the widget.
	//
	// Flutter: no counterpart
	DismissDirectionUnspecified DismissDirection = iota
	// DismissDirectionVertical can be dismissed by dragging either up or down.
	//
	// Flutter: widgets/dismissible.dart DismissDirection.vertical
	DismissDirectionVertical
	// DismissDirectionHorizontal can be dismissed by dragging either left or right.
	//
	// Flutter: widgets/dismissible.dart DismissDirection.horizontal
	DismissDirectionHorizontal
	// DismissDirectionEndToStart can be dismissed by dragging in the reading
	// direction's opposite direction (to the start).
	//
	// Flutter: widgets/dismissible.dart DismissDirection.endToStart
	DismissDirectionEndToStart
	// DismissDirectionStartToEnd can be dismissed by dragging in the reading
	// direction (to the end).
	//
	// Flutter: widgets/dismissible.dart DismissDirection.startToEnd
	DismissDirectionStartToEnd
	// DismissDirectionUp can be dismissed by dragging up only.
	//
	// Flutter: widgets/dismissible.dart DismissDirection.up
	DismissDirectionUp
	// DismissDirectionDown can be dismissed by dragging down only.
	//
	// Flutter: widgets/dismissible.dart DismissDirection.down
	DismissDirectionDown
	// DismissDirectionNone cannot be dismissed by dragging.
	//
	// Flutter: widgets/dismissible.dart DismissDirection.none
	DismissDirectionNone
)

func (DismissDirection) Name

func (d DismissDirection) Name() string

Name returns the Dart enum name, such as "endToStart".

Flutter: widgets/dismissible.dart DismissDirection.name

func (DismissDirection) String

func (d DismissDirection) String() string

String returns the name Dart prints, such as "DismissDirection.up".

Flutter: widgets/dismissible.dart DismissDirection.toString

type DismissIntent

type DismissIntent struct{ IntentBase }

DismissIntent is an intent that dismisses the current route, dialog or popup (Escape by default).

Flutter: widgets/actions.dart DismissIntent

type DismissMenuAction

type DismissMenuAction struct {
	DismissAction
	// contains filtered or unexported fields
}

DismissMenuAction is an action that closes the menu: it handles the DismissIntent for the root of the menus of a controller.

Flutter: widgets/raw_menu_anchor.dart DismissMenuAction

func NewDismissMenuAction

func NewDismissMenuAction(controller *MenuController) *DismissMenuAction

NewDismissMenuAction creates the action.

Flutter: widgets/raw_menu_anchor.dart DismissMenuAction.new

func (*DismissMenuAction) IntentType

func (a *DismissMenuAction) IntentType() reflect.Type

IntentType is DismissIntent.

Flutter: widgets/raw_menu_anchor.dart DismissMenuAction

func (*DismissMenuAction) Invoke

func (a *DismissMenuAction) Invoke(Intent) any

Invoke closes the menus of the controller.

Flutter: widgets/raw_menu_anchor.dart DismissMenuAction.invoke

func (*DismissMenuAction) IsEnabled

func (a *DismissMenuAction) IsEnabled(Intent) bool

IsEnabled is whether the controller is attached to an anchor.

Flutter: widgets/raw_menu_anchor.dart DismissMenuAction.isEnabled

type DoNothingAction

type DoNothingAction struct {
	ActionBase
	// contains filtered or unexported fields
}

DoNothingAction is an action that does nothing; it is bound to the DoNothingIntents.

Flutter: widgets/actions.dart DoNothingAction

func NewDoNothingAction

func NewDoNothingAction(opts ...DoNothingActionOpts) *DoNothingAction

NewDoNothingAction creates the action.

Flutter: widgets/actions.dart DoNothingAction.new

func (*DoNothingAction) ConsumesKey

func (a *DoNothingAction) ConsumesKey(Intent) bool

ConsumesKey is whether the action consumes the key.

Flutter: widgets/actions.dart DoNothingAction.consumesKey

func (*DoNothingAction) Invoke

func (a *DoNothingAction) Invoke(Intent) any

Invoke does nothing.

Flutter: widgets/actions.dart DoNothingAction.invoke

type DoNothingActionOpts

type DoNothingActionOpts struct {
	// DoesNotConsumeKey makes the key event go on to the other handlers (Flutter's
	// consumesKey is true by default).
	DoesNotConsumeKey bool
}

DoNothingActionOpts are the optional parameters of NewDoNothingAction.

Flutter: widgets/actions.dart DoNothingAction.new

type DoNothingAndStopPropagationIntent

type DoNothingAndStopPropagationIntent struct{ IntentBase }

DoNothingAndStopPropagationIntent is an intent that does nothing and stops the key event from going on: the key is not consumed, but no other handler gets it.

Flutter: widgets/actions.dart DoNothingAndStopPropagationIntent

type DoNothingAndStopPropagationTextIntent

type DoNothingAndStopPropagationTextIntent struct{ IntentBase }

DoNothingAndStopPropagationTextIntent is an intent that does nothing and stops a key from reaching the handlers above, in a text field: a shortcut that would otherwise take a key a text field needs, such as Space, is mapped to it.

Flutter: widgets/text_editing_intents.dart DoNothingAndStopPropagationTextIntent

type DoNothingIntent

type DoNothingIntent struct{ IntentBase }

DoNothingIntent is an intent that does nothing, to disable a shortcut: map the key to it and bind it to a DoNothingAction.

Flutter: widgets/actions.dart DoNothingIntent

type DragAnchorStrategy

type DragAnchorStrategy func(draggable Widget, bc BuildContext, position ui.Offset) ui.Offset

DragAnchorStrategy says where the feedback of a Draggable is placed relative to the pointer: it returns the offset of the pointer in the feedback. The draggable is the widget (a *Draggable or *LongPressDraggable).

Flutter: widgets/drag_target.dart DragAnchorStrategy

type DragBoundary

type DragBoundary struct {
	InheritedWidget
}

DragBoundary is a widget that provides a boundary for its descendants, which they use to keep what they drag inside it.

Flutter: widgets/drag_boundary.dart DragBoundary

func NewDragBoundary

func NewDragBoundary(child Widget, opts ...WidgetOpts) *DragBoundary

NewDragBoundary creates a boundary around the child.

Flutter: widgets/drag_boundary.dart DragBoundary.new

func (*DragBoundary) UpdateShouldNotify

func (w *DragBoundary) UpdateShouldNotify(Widget) bool

UpdateShouldNotify is true.

Flutter: widgets/drag_boundary.dart DragBoundary.updateShouldNotify

type DragBoundaryDelegate

type DragBoundaryDelegate[T any] interface {
	// IsWithinBoundary is whether the dragged object is within the boundary.
	//
	// Flutter: widgets/drag_boundary.dart DragBoundaryDelegate.isWithinBoundary
	IsWithinBoundary(draggedObject T) bool
	// NearestPositionWithinBoundary is the dragged object moved to the nearest
	// position within the boundary.
	//
	// Flutter: widgets/drag_boundary.dart DragBoundaryDelegate.nearestPositionWithinBoundary
	NearestPositionWithinBoundary(draggedObject T) T
}

DragBoundaryDelegate tells whether a dragged object is within the boundary, and where the nearest position within it is.

Flutter: widgets/drag_boundary.dart DragBoundaryDelegate

func DragBoundaryForRectMaybeOf

func DragBoundaryForRectMaybeOf(bc BuildContext, opts ...DragBoundaryForRectOfOpts) DragBoundaryDelegate[ui.Rect]

DragBoundaryForRectMaybeOf is the delegate for dragged rectangles of the closest DragBoundary above the context, and nil if there is none.

Flutter: widgets/drag_boundary.dart DragBoundary.forRectMaybeOf

func DragBoundaryForRectOf

func DragBoundaryForRectOf(bc BuildContext, opts ...DragBoundaryForRectOfOpts) DragBoundaryDelegate[ui.Rect]

DragBoundaryForRectOf is the delegate for dragged rectangles of the closest DragBoundary above the context; without one it is a delegate with no boundary.

Flutter: widgets/drag_boundary.dart DragBoundary.forRectOf

type DragBoundaryForRectOfOpts

type DragBoundaryForRectOfOpts struct {
	// UseLocalPosition makes the boundary be in the local coordinates of the
	// DragBoundary instead of the global ones (Flutter's useGlobalPosition: false).
	UseLocalPosition bool
}

DragBoundaryForRectOfOpts are the optional parameters of the DragBoundaryForRect functions.

Flutter: widgets/drag_boundary.dart DragBoundary.forRectOf

type DragEndCallback

type DragEndCallback func(details DraggableDetails)

DragEndCallback is called when a Draggable is dropped.

Flutter: widgets/drag_target.dart DragEndCallback

type DragExport

type DragExport struct {
	// Text is offered as text/plain.
	Text string
	// URIs are offered as text/uri-list; a file is a file:// URI.
	URIs []string
	// Actions are the actions the app allows; the default is copy.
	Actions ui.DropActions
}

DragExport is what a Draggable offers to other applications, and to other windows, through the platform's drag and drop (Glutter's addition; Flutter has no drag and drop between applications).

Flutter: no counterpart

type DragScrollActivity

type DragScrollActivity struct {
	ScrollActivityBase
	// contains filtered or unexported fields
}

DragScrollActivity is the activity of a position that the user drags.

Flutter: widgets/scroll_activity.dart DragScrollActivity

func NewDragScrollActivity

func NewDragScrollActivity(delegate ScrollActivityDelegate, controller *ScrollDragController) *DragScrollActivity

NewDragScrollActivity creates the activity for the drag controller.

Flutter: widgets/scroll_activity.dart DragScrollActivity.new

func (*DragScrollActivity) DispatchOverscrollNotification

func (a *DragScrollActivity) DispatchOverscrollNotification(metrics ScrollMetrics, bc BuildContext, overscroll float64)

DispatchOverscrollNotification dispatches an OverscrollNotification with the drag details.

Flutter: widgets/scroll_activity.dart DragScrollActivity.dispatchOverscrollNotification

func (*DragScrollActivity) DispatchScrollEndNotification

func (a *DragScrollActivity) DispatchScrollEndNotification(metrics ScrollMetrics, bc BuildContext)

DispatchScrollEndNotification dispatches a ScrollEndNotification with the drag details if the drag ended.

Flutter: widgets/scroll_activity.dart DragScrollActivity.dispatchScrollEndNotification

func (*DragScrollActivity) DispatchScrollStartNotification

func (a *DragScrollActivity) DispatchScrollStartNotification(metrics ScrollMetrics, bc BuildContext)

DispatchScrollStartNotification dispatches a ScrollStartNotification with the drag details.

Flutter: widgets/scroll_activity.dart DragScrollActivity.dispatchScrollStartNotification

func (*DragScrollActivity) DispatchScrollUpdateNotification

func (a *DragScrollActivity) DispatchScrollUpdateNotification(metrics ScrollMetrics, bc BuildContext, scrollDelta float64)

DispatchScrollUpdateNotification dispatches a ScrollUpdateNotification with the drag details.

Flutter: widgets/scroll_activity.dart DragScrollActivity.dispatchScrollUpdateNotification

func (*DragScrollActivity) Dispose

func (a *DragScrollActivity) Dispose()

Dispose forgets the controller.

Flutter: widgets/scroll_activity.dart DragScrollActivity.dispose

func (*DragScrollActivity) IsScrolling

func (a *DragScrollActivity) IsScrolling() bool

IsScrolling is true.

Flutter: widgets/scroll_activity.dart DragScrollActivity.isScrolling

func (*DragScrollActivity) ShouldIgnorePointer

func (a *DragScrollActivity) ShouldIgnorePointer() bool

ShouldIgnorePointer is true, except for a drag with a trackpad.

Flutter: widgets/scroll_activity.dart DragScrollActivity.shouldIgnorePointer

func (*DragScrollActivity) String

func (a *DragScrollActivity) String() string

String is the identity of the activity and its controller.

Flutter: widgets/scroll_activity.dart DragScrollActivity.toString

func (*DragScrollActivity) Velocity

func (a *DragScrollActivity) Velocity() float64

Velocity is zero: the drag moves the position, not a velocity.

Flutter: widgets/scroll_activity.dart DragScrollActivity.velocity

type DragTarget

type DragTarget[T any] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

DragTarget is a widget that receives the data of a Draggable when it is dropped on it. It also receives the drags of the platform, as *ExternalDragData, when T accepts it.

Flutter: widgets/drag_target.dart DragTarget

func NewDragTarget

func NewDragTarget[T any](builder DragTargetBuilder[T], opts ...DragTargetOpts[T]) *DragTarget[T]

NewDragTarget creates a widget that receives drags. The builder builds its contents from the data of the drags over it.

Flutter: widgets/drag_target.dart DragTarget.new

func (*DragTarget[T]) Builder

func (w *DragTarget[T]) Builder() DragTargetBuilder[T]

Builder builds the contents of the target.

Flutter: widgets/drag_target.dart DragTarget.builder

func (*DragTarget[T]) CreateState

func (w *DragTarget[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/drag_target.dart DragTarget.createState

func (*DragTarget[T]) HitTestBehavior

func (w *DragTarget[T]) HitTestBehavior() rendering.HitTestBehavior

HitTestBehavior is how the target behaves during hit testing.

Flutter: widgets/drag_target.dart DragTarget.hitTestBehavior

type DragTargetAcceptWithDetails

type DragTargetAcceptWithDetails[T any] func(details DragTargetDetails[T])

DragTargetAcceptWithDetails is called when a drag that the target accepted is dropped on it.

Flutter: widgets/drag_target.dart DragTargetAcceptWithDetails

type DragTargetBuilder

type DragTargetBuilder[T any] func(bc BuildContext, candidateData []foundation.Opt[T], rejectedData []any) Widget

DragTargetBuilder builds the contents of a DragTarget from the data of the drags over it: candidateData are the data of the drags that would be accepted if dropped now, rejectedData the data of the drags the target refuses.

Flutter: widgets/drag_target.dart DragTargetBuilder

type DragTargetDetails

type DragTargetDetails[T any] struct {
	// Data is the data of the Draggable.
	//
	// Flutter: widgets/drag_target.dart DragTargetDetails.data
	Data T
	// Offset is the global position of the feedback, the pointer minus the anchor.
	//
	// Flutter: widgets/drag_target.dart DragTargetDetails.offset
	Offset ui.Offset
}

DragTargetDetails is the data of a drag over a DragTarget and where it is.

Flutter: widgets/drag_target.dart DragTargetDetails

type DragTargetLeave

type DragTargetLeave[T any] func(data foundation.Opt[T])

DragTargetLeave is called when a drag leaves a DragTarget, or is dropped elsewhere; the data is None if the drag has none.

Flutter: widgets/drag_target.dart DragTargetLeave

type DragTargetMove

type DragTargetMove[T any] func(details DragTargetDetails[T])

DragTargetMove is called when a drag moves over a DragTarget.

Flutter: widgets/drag_target.dart DragTargetMove

type DragTargetOpts

type DragTargetOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OnWillAcceptWithDetails decides whether the target accepts the drag over it;
	// without it every drag with data is accepted.
	OnWillAcceptWithDetails DragTargetWillAcceptWithDetails[T]
	// OnAcceptWithDetails is called when a drag is dropped on the target and the
	// target accepted it.
	OnAcceptWithDetails DragTargetAcceptWithDetails[T]
	// OnLeave is called when a drag leaves the target or is dropped elsewhere.
	OnLeave DragTargetLeave[T]
	// OnMove is called when a drag moves over the target.
	OnMove DragTargetMove[T]
	// HitTestBehavior is how the target behaves during hit testing; the default is
	// HitTestBehaviorTranslucent.
	HitTestBehavior rendering.HitTestBehavior
	// RepeatMove calls OnMove once per frame while a drag is over the target, also
	// when the pointer does not move, so that a target can scroll or expand while the
	// pointer rests over it. A frame is scheduled only while such a drag is over such
	// a target.
	//
	// Deviation: Flutter calls onMove only when the pointer moves (SPEC §12.10).
	RepeatMove bool
}

DragTargetOpts are the optional parameters of NewDragTarget.

Flutter: widgets/drag_target.dart DragTarget.new

type DragTargetWillAcceptWithDetails

type DragTargetWillAcceptWithDetails[T any] func(details DragTargetDetails[T]) bool

DragTargetWillAcceptWithDetails decides whether a DragTarget accepts the drag that is over it.

Flutter: widgets/drag_target.dart DragTargetWillAcceptWithDetails

type DragUpdateCallback

type DragUpdateCallback func(details gestures.DragUpdateDetails)

DragUpdateCallback is called when a Draggable moves.

Flutter: widgets/drag_target.dart DragUpdateCallback

type Draggable

type Draggable[T any] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Draggable is a widget that can be dragged from to a DragTarget. While the drag goes on, the feedback follows the pointer in the Overlay.

Flutter: widgets/drag_target.dart Draggable

func NewDraggable

func NewDraggable[T any](feedback, child Widget, opts ...DraggableOpts[T]) *Draggable[T]

NewDraggable creates a draggable widget. The feedback is shown under the pointer during the drag.

Flutter: widgets/drag_target.dart Draggable.new

func (*Draggable[T]) Affinity

func (w *Draggable[T]) Affinity() foundation.Opt[painting.Axis]

Affinity is the axis in which the drag competes with other gestures.

Flutter: widgets/drag_target.dart Draggable.affinity

func (*Draggable[T]) Axis

func (w *Draggable[T]) Axis() foundation.Opt[painting.Axis]

Axis is the axis the drag is restricted to.

Flutter: widgets/drag_target.dart Draggable.axis

func (*Draggable[T]) Child

func (w *Draggable[T]) Child() Widget

Child is the widget below this one in the tree, shown when no drag goes on.

Flutter: widgets/drag_target.dart Draggable.child

func (*Draggable[T]) CreateState

func (w *Draggable[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/drag_target.dart Draggable.createState

func (*Draggable[T]) Data

func (w *Draggable[T]) Data() foundation.Opt[T]

Data is the data that a DragTarget receives.

Flutter: widgets/drag_target.dart Draggable.data

func (*Draggable[T]) Delay

func (w *Draggable[T]) Delay() time.Duration

Delay is how long the pointer must stay down before a LongPressDraggable starts the drag.

Flutter: widgets/drag_target.dart LongPressDraggable.delay

func (*Draggable[T]) Feedback

func (w *Draggable[T]) Feedback() Widget

Feedback is the widget shown under the pointer during the drag.

Flutter: widgets/drag_target.dart Draggable.feedback

func (*Draggable[T]) HapticFeedbackOnStart

func (w *Draggable[T]) HapticFeedbackOnStart() bool

HapticFeedbackOnStart is whether a LongPressDraggable gives haptic feedback when the drag starts. The desktop has no haptic feedback, so it does nothing there.

Flutter: widgets/drag_target.dart LongPressDraggable.hapticFeedbackOnStart

func (*Draggable[T]) MaxSimultaneousDrags

func (w *Draggable[T]) MaxSimultaneousDrags() foundation.Opt[int]

MaxSimultaneousDrags is how many drags may go on at once.

Flutter: widgets/drag_target.dart Draggable.maxSimultaneousDrags

type DraggableCanceledCallback

type DraggableCanceledCallback func(velocity gestures.Velocity, offset ui.Offset)

DraggableCanceledCallback is called when a Draggable is dropped where no target accepts it.

Flutter: widgets/drag_target.dart DraggableCanceledCallback

type DraggableDetails

type DraggableDetails struct {
	// WasAccepted is whether a DragTarget accepted the drop.
	//
	// Flutter: widgets/drag_target.dart DraggableDetails.wasAccepted
	WasAccepted bool
	// Velocity is the velocity of the drag when it ended.
	//
	// Flutter: widgets/drag_target.dart DraggableDetails.velocity
	Velocity gestures.Velocity
	// Offset is where the feedback was when the drag ended, in global coordinates.
	//
	// Flutter: widgets/drag_target.dart DraggableDetails.offset
	Offset ui.Offset
}

DraggableDetails says how a drag of a Draggable ended.

Flutter: widgets/drag_target.dart DraggableDetails

type DraggableOpts

type DraggableOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Data is the data that a DragTarget receives when the drag is dropped on it.
	Data foundation.Opt[T]
	// Axis restricts the drag to one axis; none for any direction.
	Axis foundation.Opt[painting.Axis]
	// ChildWhenDragging is shown instead of the child while a drag is going on.
	ChildWhenDragging Widget
	// FeedbackOffset is the offset of the feedback from the pointer's hit test
	// position.
	FeedbackOffset ui.Offset
	// DragAnchorStrategy says where the feedback is relative to the pointer; the
	// default is ChildDragAnchorStrategy.
	DragAnchorStrategy DragAnchorStrategy
	// Affinity is the axis in which the drag competes with other gestures; none for
	// a drag that starts at once in any direction.
	Affinity foundation.Opt[painting.Axis]
	// MaxSimultaneousDrags is how many drags may go on at the same time; none for
	// any number.
	MaxSimultaneousDrags foundation.Opt[int]
	// OnDragStarted is called when a drag starts.
	OnDragStarted foundation.VoidCallback
	// OnDragUpdate is called when the drag moves.
	OnDragUpdate DragUpdateCallback
	// OnDraggableCanceled is called when the drag is dropped where no target
	// accepts it.
	OnDraggableCanceled DraggableCanceledCallback
	// OnDragEnd is called when the drag ends, however it ends.
	OnDragEnd DragEndCallback
	// OnDragCompleted is called when a target accepted the drop.
	OnDragCompleted foundation.VoidCallback
	// IgnoringFeedbackSemantics is whether the semantics of the feedback are left
	// out; the default is true.
	IgnoringFeedbackSemantics foundation.Opt[bool]
	// IgnoringFeedbackPointer is whether the feedback ignores the pointer; the
	// default is true.
	IgnoringFeedbackPointer foundation.Opt[bool]
	// RootOverlay is whether the feedback goes in the furthest Overlay.
	RootOverlay bool
	// HitTestBehavior is how the draggable behaves during hit testing; the default
	// is HitTestBehaviorDeferToChild.
	HitTestBehavior rendering.HitTestBehavior
	// AllowedButtonsFilter says which buttons may start a drag; the default allows
	// the primary button.
	AllowedButtonsFilter gestures.AllowedButtonsFilter
	// Slop is how far a pointer of any kind moves before the drag starts, so that a
	// click on a draggable row with a small movement stays a click; none for
	// Flutter's computeHitSlop (1 pixel for a mouse, the touch slop for the others).
	//
	// Deviation: Flutter has no such parameter (SPEC §12.10).
	Slop foundation.Opt[float64]
	// CancelOnEscape cancels a running drag of this draggable when the Escape key
	// goes down: the drag ends as if the pointer was cancelled (OnDraggableCanceled,
	// the OnLeave of the targets, the feedback removed).
	//
	// Deviation: Flutter has no such parameter (SPEC §12.10).
	CancelOnEscape bool
	// Export, when set, makes the drag a drag of the platform: other applications
	// and the other windows of the app can receive what it returns (Glutter's
	// addition; Flutter has no drag and drop between applications). The feedback is
	// then drawn by the platform, and DragTargets of this app receive the data of
	// the Draggable. Without platform support, or if the platform refuses, the drag
	// stays inside the window.
	Export func(data T) *DragExport
}

DraggableOpts are the optional parameters of NewDraggable.

Flutter: widgets/drag_target.dart Draggable.new

type DrivenScrollActivity

type DrivenScrollActivity struct {
	ScrollActivityBase
	// contains filtered or unexported fields
}

DrivenScrollActivity is the activity of a position that an animation drives to a value, or a simulation moves.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity

func NewDrivenScrollActivity

func NewDrivenScrollActivity(delegate ScrollActivityDelegate, opts ...DrivenScrollActivityOpts) *DrivenScrollActivity

NewDrivenScrollActivity creates the activity that animates the position from From to To. In debug builds it panics with the tag ScrollDurationInvalid when the duration is not positive.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.new

func NewDrivenScrollActivitySimulation

func NewDrivenScrollActivitySimulation(delegate ScrollActivityDelegate, simulation physics.Simulation, vsync scheduler.TickerProvider, post func(func())) *DrivenScrollActivity

NewDrivenScrollActivitySimulation creates the activity that moves the position with the simulation.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.simulation

func (*DrivenScrollActivity) ApplyMoveTo

func (a *DrivenScrollActivity) ApplyMoveTo(value float64) bool

ApplyMoveTo moves the position to the value and returns whether to keep going.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.applyMoveTo

func (*DrivenScrollActivity) DispatchOverscrollNotification

func (a *DrivenScrollActivity) DispatchOverscrollNotification(metrics ScrollMetrics, bc BuildContext, overscroll float64)

DispatchOverscrollNotification dispatches an OverscrollNotification with the velocity of the activity.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.dispatchOverscrollNotification

func (*DrivenScrollActivity) Dispose

func (a *DrivenScrollActivity) Dispose()

Dispose completes Done and disposes the controller.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.dispose

func (*DrivenScrollActivity) Done

Done is the future that completes when the activity is disposed: when the animation ended or another activity replaced this one.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.done

func (*DrivenScrollActivity) IsScrolling

func (a *DrivenScrollActivity) IsScrolling() bool

IsScrolling is true.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.isScrolling

func (*DrivenScrollActivity) ShouldIgnorePointer

func (a *DrivenScrollActivity) ShouldIgnorePointer() bool

ShouldIgnorePointer is true.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.shouldIgnorePointer

func (*DrivenScrollActivity) String

func (a *DrivenScrollActivity) String() string

String is the identity of the activity and its controller.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.toString

func (*DrivenScrollActivity) Velocity

func (a *DrivenScrollActivity) Velocity() float64

Velocity is the velocity of the animation.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.velocity

type DrivenScrollActivityOpts

type DrivenScrollActivityOpts struct {
	// From is the value to start from.
	From float64
	// To is the value to go to.
	To float64
	// Duration is the length of the animation; it must be positive.
	Duration time.Duration
	// Curve is the curve of the animation.
	Curve animation.Curve
	// Vsync gives the controller its ticker.
	Vsync scheduler.TickerProvider
	// Post runs a function after the code running now (a microtask); nil runs it
	// at once.
	Post func(func())
}

DrivenScrollActivityOpts are the parameters of NewDrivenScrollActivity.

Flutter: widgets/scroll_activity.dart DrivenScrollActivity.new

type DualTransitionBuilder

type DualTransitionBuilder struct {
	StatefulWidget
	// contains filtered or unexported fields
}

DualTransitionBuilder builds two transitions, one for the animation going forward and one for it going backward, so that a widget can have a different transition in each direction. The reverse builder is applied to the child and the forward builder to the result.

Flutter: widgets/dual_transition_builder.dart DualTransitionBuilder

func NewDualTransitionBuilder

func NewDualTransitionBuilder(animation animation.Animation[float64], forwardBuilder, reverseBuilder AnimatedTransitionBuilder, child Widget, opts ...DualTransitionBuilderOpts) *DualTransitionBuilder

NewDualTransitionBuilder creates the widget. The child, which may be nil, is given to the reverse builder.

Flutter: widgets/dual_transition_builder.dart DualTransitionBuilder.new

func (*DualTransitionBuilder) Animation

Animation is the animation that drives the transitions.

Flutter: widgets/dual_transition_builder.dart DualTransitionBuilder.animation

func (*DualTransitionBuilder) Child

func (w *DualTransitionBuilder) Child() Widget

Child is the widget that the transitions are applied to.

Flutter: widgets/dual_transition_builder.dart DualTransitionBuilder.child

func (*DualTransitionBuilder) CreateState

func (w *DualTransitionBuilder) CreateState() State

CreateState creates the state.

Flutter: widgets/dual_transition_builder.dart DualTransitionBuilder.createState

func (*DualTransitionBuilder) ForwardBuilder

ForwardBuilder builds the transition that is shown while the animation goes forward or is complete.

Flutter: widgets/dual_transition_builder.dart DualTransitionBuilder.forwardBuilder

func (*DualTransitionBuilder) ReverseBuilder

ReverseBuilder builds the transition that is shown while the animation goes in reverse.

Flutter: widgets/dual_transition_builder.dart DualTransitionBuilder.reverseBuilder

type DualTransitionBuilderOpts

type DualTransitionBuilderOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

DualTransitionBuilderOpts are the optional parameters of NewDualTransitionBuilder.

Flutter: widgets/dual_transition_builder.dart DualTransitionBuilder.new

type EdgeDraggingAutoScroller

type EdgeDraggingAutoScroller struct {
	// contains filtered or unexported fields
}

EdgeDraggingAutoScroller scrolls a scrollable when a dragged item gets near its edge, for a drag and drop or a reorder.

Flutter: widgets/scrollable_helpers.dart EdgeDraggingAutoScroller

func NewEdgeDraggingAutoScroller

func NewEdgeDraggingAutoScroller(scrollable *ScrollableState, velocityScalar float64, onScrollViewScrolled func()) *EdgeDraggingAutoScroller

NewEdgeDraggingAutoScroller creates the scroller for the scrollable. velocityScalar is the speed of the scrolling: the larger, the faster. onScrollViewScrolled may be nil.

Flutter: widgets/scrollable_helpers.dart EdgeDraggingAutoScroller.new

func (*EdgeDraggingAutoScroller) Scrollable

func (s *EdgeDraggingAutoScroller) Scrollable() *ScrollableState

Scrollable is the scrollable that the scroller scrolls.

Flutter: widgets/scrollable_helpers.dart EdgeDraggingAutoScroller.scrollable

func (*EdgeDraggingAutoScroller) Scrolling

func (s *EdgeDraggingAutoScroller) Scrolling() bool

Scrolling is whether the scroller is scrolling.

Flutter: widgets/scrollable_helpers.dart EdgeDraggingAutoScroller.scrolling

func (*EdgeDraggingAutoScroller) StartAutoScrollIfNecessary

func (s *EdgeDraggingAutoScroller) StartAutoScrollIfNecessary(dragTarget ui.Rect)

StartAutoScrollIfNecessary starts scrolling if the drag target is near an edge of the scrollable, and keeps going until StopAutoScroll.

Flutter: widgets/scrollable_helpers.dart EdgeDraggingAutoScroller.startAutoScrollIfNecessary

func (*EdgeDraggingAutoScroller) StopAutoScroll

func (s *EdgeDraggingAutoScroller) StopAutoScroll()

StopAutoScroll stops scrolling after the current animation.

Flutter: widgets/scrollable_helpers.dart EdgeDraggingAutoScroller.stopAutoScroll

type EditableButtonItemsCallbacks

type EditableButtonItemsCallbacks struct {
	OnCopy, OnCut, OnPaste, OnSelectAll, OnLookUp, OnSearchWeb, OnShare, OnLiveTextInput foundation.VoidCallback
}

EditableButtonItemsCallbacks are the callbacks of the buttons that GetEditableButtonItems returns; a nil one leaves the button out.

Flutter: widgets/editable_text.dart EditableText.getEditableButtonItems

type EditableText

type EditableText struct {
	StatefulWidget
	// contains filtered or unexported fields
}

EditableText is a basic text input field: it shows the text of a TextEditingController, the caret and the selection, handles the keys of the text editing shortcuts, and talks to the input method. Material's TextField is built on it.

Deviation: the stylus handwriting, Live Text, the processing of the text by other apps, the floating cursor and the autofill groups are not ported. Spell check is ported; the platform's spell checker (DefaultSpellCheckService) is Android's only (SPEC §12.10).

Flutter: widgets/editable_text.dart EditableText

func NewEditableText

func NewEditableText(controller *TextEditingController, focusNode *FocusNode, style *painting.TextStyle, cursorColor, backgroundCursorColor ui.Color, opts ...EditableTextOpts) *EditableText

NewEditableText creates the widget. In debug builds it panics with the tag EditableTextObscuringCharacterInvalid when the obscuring character is not one character, EditableTextMinLinesInvalid when the minimum number of lines is not positive, EditableTextMinLinesGreaterThanMaxLines when it is more than the maximum, EditableTextExpandsWithLines when the field expands and has a number of lines, EditableTextObscuredMultiline for an obscured multiline field, and EditableTextMisspelledTextStyleMissing for an enabled spell check configuration without a misspelled text style.

Flutter: widgets/editable_text.dart EditableText.new

func (*EditableText) Controller

func (w *EditableText) Controller() *TextEditingController

Controller is the controller of the text.

Flutter: widgets/editable_text.dart EditableText.controller

func (*EditableText) CreateState

func (w *EditableText) CreateState() State

CreateState creates the state.

Flutter: widgets/editable_text.dart EditableText.createState

func (*EditableText) DebugFillProperties

func (w *EditableText) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the field.

Flutter: widgets/editable_text.dart EditableText.debugFillProperties

func (*EditableText) FocusNode

func (w *EditableText) FocusNode() *FocusNode

FocusNode is the focus node of the field.

Flutter: widgets/editable_text.dart EditableText.focusNode

func (*EditableText) InputFormatters

func (w *EditableText) InputFormatters() []services.TextInputFormatter

InputFormatters are the formatters of the text, with the single line one for a field with one line.

Flutter: widgets/editable_text.dart EditableText.inputFormatters

func (*EditableText) KeyboardType

func (w *EditableText) KeyboardType() services.TextInputType

KeyboardType is the kind of text of the field.

Flutter: widgets/editable_text.dart EditableText.keyboardType

func (*EditableText) MagnifierConfiguration

func (w *EditableText) MagnifierConfiguration() *TextMagnifierConfiguration

MagnifierConfiguration is the configuration for the magnifier to use with selections in this text field.

Flutter: widgets/editable_text.dart EditableText.magnifierConfiguration

func (*EditableText) MaxLines

func (w *EditableText) MaxLines() foundation.Opt[int]

MaxLines is the maximum number of lines; none for no limit.

Flutter: widgets/editable_text.dart EditableText.maxLines

func (*EditableText) MinLines

func (w *EditableText) MinLines() foundation.Opt[int]

MinLines is the minimum number of lines.

Flutter: widgets/editable_text.dart EditableText.minLines

func (*EditableText) ObscureText

func (w *EditableText) ObscureText() bool

ObscureText is whether the text is hidden.

Flutter: widgets/editable_text.dart EditableText.obscureText

func (*EditableText) ObscuringCharacter

func (w *EditableText) ObscuringCharacter() string

ObscuringCharacter is the character that hides the text.

Flutter: widgets/editable_text.dart EditableText.obscuringCharacter

func (*EditableText) ReadOnly

func (w *EditableText) ReadOnly() bool

ReadOnly is whether the text can't be edited.

Flutter: widgets/editable_text.dart EditableText.readOnly

func (*EditableText) SelectionEnabled

func (w *EditableText) SelectionEnabled() bool

SelectionEnabled is whether the user can select text.

Flutter: widgets/editable_text.dart EditableText.selectionEnabled

func (*EditableText) ShowCursor

func (w *EditableText) ShowCursor() bool

ShowCursor is whether the caret is shown.

Flutter: widgets/editable_text.dart EditableText.showCursor

func (*EditableText) SpellCheckConfiguration

func (w *EditableText) SpellCheckConfiguration() *SpellCheckConfiguration

SpellCheckConfiguration is the configuration that details how spell check is performed; nil when the widget has none.

Flutter: widgets/editable_text.dart EditableText.spellCheckConfiguration

func (*EditableText) StrutStyle

func (w *EditableText) StrutStyle() *painting.StrutStyle

StrutStyle is the strut of the text, inherited from the style.

Flutter: widgets/editable_text.dart EditableText.strutStyle

func (*EditableText) Style

func (w *EditableText) Style() *painting.TextStyle

Style is the style of the text.

Flutter: widgets/editable_text.dart EditableText.style

type EditableTextContextMenuBuilder

type EditableTextContextMenuBuilder func(bc BuildContext, state *EditableTextState) Widget

EditableTextContextMenuBuilder builds the context menu of an EditableText.

Flutter: widgets/editable_text.dart EditableTextContextMenuBuilder

type EditableTextOpts

type EditableTextOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ReadOnly makes the text not editable.
	ReadOnly bool
	// ObscuringCharacter replaces the text when it is obscured; it must be one
	// character. The default is '•'.
	ObscuringCharacter string
	// ObscureText hides the text, for passwords. An obscured field can't be
	// multiline.
	ObscureText bool
	// Autocorrect says whether the input method corrects the text; the default is
	// true, or inferred from AutofillHints.
	Autocorrect foundation.Opt[bool]
	// SmartDashesType says whether dashes are replaced; the default is enabled,
	// or disabled for an obscured field.
	SmartDashesType services.SmartDashesType
	// SmartQuotesType says whether quotes are replaced; the default is enabled,
	// or disabled for an obscured field.
	SmartQuotesType services.SmartQuotesType
	// DisableSuggestions turns the suggestions of the input method off (Flutter's
	// enableSuggestions is true by default).
	DisableSuggestions bool
	// StrutStyle is the strut of the text; the default is made from the style.
	StrutStyle *painting.StrutStyle
	// TextAlign is how the text is aligned; the default is start.
	TextAlign ui.TextAlign
	// TextDirection is the direction of the text; the default is the one of the
	// Directionality.
	TextDirection ui.TextDirection
	// TextCapitalization says how the input method capitalizes.
	TextCapitalization services.TextCapitalization
	// Locale selects the glyphs and the language of the input.
	Locale foundation.Opt[ui.Locale]
	// TextScaler scales the text; the default is the one of the MediaQuery.
	TextScaler painting.TextScaler
	// MaxLines is the maximum number of lines; the default is 1 and
	// MaxLinesUnlimited (Flutter's null) is no limit.
	MaxLines foundation.Opt[int]
	// MinLines is the minimum number of lines.
	MinLines foundation.Opt[int]
	// Expands makes the field as tall as its parent allows; MaxLines and
	// MinLines must then be unset.
	Expands bool
	// DisableForceLine lets a single-line field be as narrow as its text
	// (Flutter's forceLine is true by default).
	DisableForceLine bool
	// TextHeightBehavior says how the line height applies to the first and last
	// lines; the default is the one of DefaultTextHeightBehavior.
	TextHeightBehavior *ui.TextHeightBehavior
	// TextWidthBasis says how the width of the text is measured; the default is
	// parent.
	TextWidthBasis painting.TextWidthBasis
	// Autofocus asks for the focus when the field is built.
	Autofocus bool
	// ShowCursor says whether the caret is shown; the default is !ReadOnly.
	ShowCursor foundation.Opt[bool]
	// ShowSelectionHandles says whether the selection handles are shown.
	ShowSelectionHandles bool
	// SelectionColor is the color of the selected text's background.
	SelectionColor foundation.Opt[ui.Color]
	// KeyboardType is the kind of text the input method offers; the default is
	// inferred from AutofillHints and MaxLines.
	KeyboardType foundation.Opt[services.TextInputType]
	// TextInputAction is the action of the Enter key; the default is newline for a
	// multiline field and done otherwise.
	TextInputAction services.TextInputAction
	// OnChanged is called when the text changes.
	OnChanged func(text string)
	// OnEditingComplete is called when the user finishes editing, such as with
	// Enter. Without it, the default is to clear the composing region and unfocus
	// (or move the focus for next and previous).
	OnEditingComplete func()
	// OnSubmitted is called with the text when the user finishes editing.
	OnSubmitted func(text string)
	// OnAppPrivateCommand is called for a private command of the input method.
	OnAppPrivateCommand AppPrivateCommandCallback
	// OnSelectionChanged is called when the selection changes.
	OnSelectionChanged SelectionChangedCallback
	// SelectionControls build the selection handles; nil for none.
	SelectionControls TextSelectionControls
	// OnSelectionHandleTapped is called when a selection handle is tapped.
	OnSelectionHandleTapped func()
	// GroupID is the group of the tap region of the field; the default is
	// EditableTextGroupID.
	GroupID any
	// OnTapOutside is called when a pointer goes down outside the field's tap
	// region; the default unfocuses the field.
	OnTapOutside TapRegionCallback
	// OnTapUpOutside is called when a pointer goes up outside the field's tap
	// region.
	OnTapUpOutside TapRegionUpCallback
	// InputFormatters change the text the user enters.
	InputFormatters []services.TextInputFormatter
	// MouseCursor is the cursor over the field; the default is the text cursor.
	MouseCursor services.MouseCursor
	// RendererIgnoresPointer makes the render object ignore taps and long
	// presses, for a gesture detector above it.
	RendererIgnoresPointer bool
	// CursorWidth is the width of the caret; the default is 2.
	CursorWidth foundation.Opt[float64]
	// CursorHeight is the height of the caret; the default is the line height.
	CursorHeight foundation.Opt[float64]
	// CursorRadius rounds the corners of the caret.
	CursorRadius foundation.Opt[ui.Radius]
	// CursorOpacityAnimates makes the caret fade instead of blink.
	//
	// Deviation: the fade is not ported; the caret blinks (SPEC §12.10).
	CursorOpacityAnimates bool
	// CursorOffset moves the caret from where the text puts it.
	CursorOffset foundation.Opt[ui.Offset]
	// PaintCursorAboveText paints the caret over the text.
	PaintCursorAboveText bool
	// SelectionHeightStyle is the height of the boxes of the selection; the
	// default is includeLineSpacingMiddle.
	SelectionHeightStyle ui.BoxHeightStyle
	// SelectionWidthStyle is the width of the boxes of the selection; the default
	// is max.
	SelectionWidthStyle ui.BoxWidthStyle
	// ScrollPadding is the space kept around the caret when the field scrolls to
	// show it; the default is 20 on all sides.
	ScrollPadding foundation.Opt[painting.EdgeInsets]
	// KeyboardAppearance is the brightness of the keyboard of the input method.
	KeyboardAppearance ui.Brightness
	// DragStartBehavior is where a drag starts; the default is start.
	DragStartBehavior gestures.DragStartBehavior
	// EnableInteractiveSelection says whether the user can select text; the
	// default is true unless the text is read-only and obscured.
	EnableInteractiveSelection foundation.Opt[bool]
	// SelectAllOnFocus selects the text when the field gets the focus; the
	// default is true on desktop, for a single-line field.
	SelectAllOnFocus foundation.Opt[bool]
	// ScrollController controls the scrolling of the field.
	ScrollController ScrollController
	// ScrollPhysics are the physics of the scrolling of the field.
	ScrollPhysics ScrollPhysics
	// AutocorrectionTextRectColor is the color behind the text the input method
	// corrects.
	AutocorrectionTextRectColor foundation.Opt[ui.Color]
	// AutofillHints say what the field is for.
	AutofillHints []string
	// AutofillClient is the client to autofill instead of the field.
	AutofillClient services.AutofillClient
	// ClipBehavior is how the text is clipped; the default is hard edge.
	ClipBehavior ui.Clip
	// ScrollBehavior is the behavior of the scrolling; the default hides the
	// overscroll and shows scrollbars for multiline fields.
	ScrollBehavior ScrollBehavior
	// DisableIMEPersonalizedLearning turns the learning of the input method off
	// (Flutter's enableIMEPersonalizedLearning is true by default).
	DisableIMEPersonalizedLearning bool
	// ContextMenuBuilder builds the context menu.
	ContextMenuBuilder EditableTextContextMenuBuilder
	// UndoController controls the undo history from outside.
	UndoController *UndoHistoryController
	// HintLocales are the languages the user is expected to type in.
	HintLocales []ui.Locale
	// EnableInlinePrediction turns the inline prediction of the input method on
	// or off.
	EnableInlinePrediction foundation.Opt[bool]
	// MagnifierConfiguration is the configuration for the magnifier to use with
	// selections in this text field; nil is TextMagnifierConfigurationDisabled.
	// A configuration is compared by identity: changing it to another value
	// recreates the selection overlay.
	MagnifierConfiguration *TextMagnifierConfiguration
	// SpellCheckConfiguration details how spell check is performed: the
	// SpellCheckService that checks the text and the TextStyle of the misspelled
	// words. Spell check is disabled for password input, including when ObscureText
	// is set. If the service is nil, spell check is disabled unless the
	// DefaultSpellCheckService is supported (Android), in which case it is used. If
	// the configuration is nil, spell check is disabled. An enabled configuration
	// needs a MisspelledTextStyle (the panic EditableTextMisspelledTextStyleMissing).
	SpellCheckConfiguration *SpellCheckConfiguration
}

EditableTextOpts are the optional parameters of NewEditableText.

Flutter: widgets/editable_text.dart EditableText.new

type EditableTextState

type EditableTextState struct {
	StateOf[*EditableText]
	TickerProvider
	AutomaticKeepAliveClient
	WidgetsBindingObserverBase
	// contains filtered or unexported fields
}

EditableTextState is the state of an EditableText. It is the text input client the input method talks to, and the delegate of the render object for the clipboard and the selection.

Flutter: widgets/editable_text.dart EditableTextState

func (*EditableTextState) Autofill

func (s *EditableTextState) Autofill(value services.TextEditingValue)

Autofill sets the value from an autofill.

Flutter: widgets/editable_text.dart EditableTextState.autofill

func (*EditableTextState) AutofillID

func (s *EditableTextState) AutofillID() string

AutofillID is the identifier of the field for autofill.

Flutter: widgets/editable_text.dart EditableTextState.autofillId

func (*EditableTextState) BeginBatchEdit

func (s *EditableTextState) BeginBatchEdit()

BeginBatchEdit starts a batch of edits: the input method is told about the value after the last one ends.

Flutter: widgets/editable_text.dart EditableTextState.beginBatchEdit

func (*EditableTextState) BringIntoView

func (s *EditableTextState) BringIntoView(position ui.TextPosition)

BringIntoView scrolls to show the position.

Flutter: widgets/editable_text.dart EditableTextState.bringIntoView

func (*EditableTextState) Build

func (s *EditableTextState) Build(bc BuildContext) Widget

Build builds the field.

Flutter: widgets/editable_text.dart EditableTextState.build

func (*EditableTextState) BuildTextSpan

func (s *EditableTextState) BuildTextSpan() *painting.TextSpan

BuildTextSpan builds the span that the field shows: the text, with the composing range underlined.

Flutter: widgets/editable_text.dart EditableTextState.buildTextSpan

func (*EditableTextState) ConnectionClosed

func (s *EditableTextState) ConnectionClosed()

ConnectionClosed unfocuses the field when the input method closes the connection.

Flutter: widgets/editable_text.dart EditableTextState.connectionClosed

func (*EditableTextState) ContextMenuAnchors

func (s *EditableTextState) ContextMenuAnchors() TextSelectionToolbarAnchors

ContextMenuAnchors returns the anchor points for the default context menu.

Flutter: widgets/editable_text.dart EditableTextState.contextMenuAnchors

func (*EditableTextState) ContextMenuButtonItems

func (s *EditableTextState) ContextMenuButtonItems() []ContextMenuButtonItem

ContextMenuButtonItems returns the items representing the buttons in this platform's default selection menu for the field.

Deviation: the look up, search web, share and Live Text buttons and the buttons of the text processing actions are not ported (SPEC §12.10).

Flutter: widgets/editable_text.dart EditableTextState.contextMenuButtonItems

func (*EditableTextState) CopyEnabled

func (s *EditableTextState) CopyEnabled() bool

CopyEnabled is whether the copy command is available.

Flutter: widgets/editable_text.dart EditableTextState.copyEnabled

func (*EditableTextState) CopySelection

func (s *EditableTextState) CopySelection(cause services.SelectionChangedCause)

CopySelection copies the selected text to the clipboard.

Flutter: widgets/editable_text.dart EditableTextState.copySelection

func (*EditableTextState) CurrentAutofillScope

func (s *EditableTextState) CurrentAutofillScope() services.AutofillScope

CurrentAutofillScope is the autofill group of the field, which is always nil.

Flutter: widgets/editable_text.dart EditableTextState.currentAutofillScope

func (*EditableTextState) CurrentTextEditingValue

func (s *EditableTextState) CurrentTextEditingValue() (services.TextEditingValue, bool)

CurrentTextEditingValue is the value for the input method.

Flutter: widgets/editable_text.dart EditableTextState.currentTextEditingValue

func (*EditableTextState) CursorBlinkInterval

func (s *EditableTextState) CursorBlinkInterval() time.Duration

CursorBlinkInterval is the time the caret is on, and then off. It is Flutter's 500 ms unless the system says another (Windows: the caret blink time of the control panel); a system whose user turned the blinking off gives the 500 ms as well, since the caret then does not blink at all.

Deviation: Flutter's interval is a constant (SPEC §12.10).

Flutter: widgets/editable_text.dart EditableTextState.cursorBlinkInterval

func (*EditableTextState) CursorCurrentlyVisible

func (s *EditableTextState) CursorCurrentlyVisible() bool

CursorCurrentlyVisible is whether the caret is on at the moment of the blink.

Flutter: widgets/editable_text.dart EditableTextState.cursorCurrentlyVisible

func (*EditableTextState) CutEnabled

func (s *EditableTextState) CutEnabled() bool

CutEnabled is whether the cut command is available.

Flutter: widgets/editable_text.dart EditableTextState.cutEnabled

func (*EditableTextState) CutSelection

func (s *EditableTextState) CutSelection(cause services.SelectionChangedCause)

CutSelection copies the selected text to the clipboard and removes it.

Flutter: widgets/editable_text.dart EditableTextState.cutSelection

func (*EditableTextState) DidChangeAppLifecycleState

func (s *EditableTextState) DidChangeAppLifecycleState(state ui.AppLifecycleState)

DidChangeAppLifecycleState remembers that the app resumed, so that the field doesn't select all its text when it gets the focus back.

Flutter: widgets/editable_text.dart EditableTextState._onResume

func (*EditableTextState) DidChangeDependencies

func (s *EditableTextState) DidChangeDependencies()

DidChangeDependencies updates the style and the focus on build, and restarts the blinking when the tickers are turned on or off.

Flutter: widgets/editable_text.dart EditableTextState.didChangeDependencies

func (*EditableTextState) DidChangeInputControl

func (s *EditableTextState) DidChangeInputControl(oldControl, newControl services.TextInputControl)

DidChangeInputControl shows or hides the new input control.

Flutter: widgets/editable_text.dart EditableTextState.didChangeInputControl

func (*EditableTextState) DidChangeMetrics

func (s *EditableTextState) DidChangeMetrics()

DidChangeMetrics updates the selection overlay and shows the caret when the keyboard shows up.

Flutter: widgets/editable_text.dart EditableTextState.didChangeMetrics

func (*EditableTextState) DidUpdateWidget

func (s *EditableTextState) DidUpdateWidget(old *EditableText)

DidUpdateWidget moves the listeners and updates the input method for the new widget.

Flutter: widgets/editable_text.dart EditableTextState.didUpdateWidget

func (*EditableTextState) DisableAnimations

func (h *EditableTextState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*EditableTextState) Dispose

func (s *EditableTextState) Dispose()

Dispose closes the input connection and stops the blinking.

Flutter: widgets/editable_text.dart EditableTextState.dispose

func (*EditableTextState) EndBatchEdit

func (s *EditableTextState) EndBatchEdit()

EndBatchEdit ends a batch of edits.

Flutter: widgets/editable_text.dart EditableTextState.endBatchEdit

func (*EditableTextState) ErrorReporter

func (h *EditableTextState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*EditableTextState) FindSuggestionSpanAtCursorIndex

func (s *EditableTextState) FindSuggestionSpanAtCursorIndex(cursorIndex int) (services.SuggestionSpan, bool)

FindSuggestionSpanAtCursorIndex finds the span that matches the index, using a binary search, and says whether there is one. The index is a byte offset into the text that the spell check results are for.

Flutter: widgets/editable_text.dart EditableTextState.findSuggestionSpanAtCursorIndex

func (*EditableTextState) GetGlyphHeights

func (s *EditableTextState) GetGlyphHeights() (startGlyphHeight, endGlyphHeight float64)

GetGlyphHeights returns the heights of the glyphs at the start and at the end of the selection.

Flutter: widgets/editable_text.dart EditableTextState.getGlyphHeights

func (*EditableTextState) HideMagnifier

func (s *EditableTextState) HideMagnifier()

HideMagnifier hides the magnifier.

Flutter: widgets/editable_text.dart EditableTextState.hideMagnifier

func (*EditableTextState) HideToolbar

func (s *EditableTextState) HideToolbar(hideHandles bool)

HideToolbar hides the toolbar, and the handles when hideHandles is set.

Flutter: widgets/editable_text.dart EditableTextState.hideToolbar

func (*EditableTextState) InitState

func (s *EditableTextState) InitState()

InitState starts to listen to the controller and the focus node.

Flutter: widgets/editable_text.dart EditableTextState.initState

func (*EditableTextState) InsertContent

InsertContent is not supported: the field has no content insertion configuration.

Flutter: widgets/editable_text.dart EditableTextState.insertContent

func (*EditableTextState) InsertTextPlaceholder

func (s *EditableTextState) InsertTextPlaceholder(ui.Size)

InsertTextPlaceholder does nothing: the stylus handwriting is not ported.

Flutter: widgets/editable_text.dart EditableTextState.insertTextPlaceholder

func (*EditableTextState) LiveTextInputEnabled

func (s *EditableTextState) LiveTextInputEnabled() bool

LiveTextInputEnabled is whether Live Text input is available; it is not ported.

Flutter: widgets/editable_text.dart EditableTextState.liveTextInputEnabled

func (*EditableTextState) LookUpEnabled

func (s *EditableTextState) LookUpEnabled() bool

LookUpEnabled is whether the look up command is available, which is only on iOS.

Flutter: widgets/editable_text.dart EditableTextState.lookUpEnabled

func (*EditableTextState) OnFocusReceived

func (s *EditableTextState) OnFocusReceived() bool

OnFocusReceived asks the field for the focus, for an input method that sends it.

Flutter: widgets/editable_text.dart EditableTextState.onFocusReceived

func (*EditableTextState) PasteEnabled

func (s *EditableTextState) PasteEnabled() bool

PasteEnabled is whether the paste command is available.

Flutter: widgets/editable_text.dart EditableTextState.pasteEnabled

func (*EditableTextState) PastePrimarySelection

func (s *EditableTextState) PastePrimarySelection(cause services.SelectionChangedCause)

PastePrimarySelection pastes the primary selection over the selection, as a middle click does on Linux desktops.

Flutter: no counterpart

func (*EditableTextState) PasteText

func (s *EditableTextState) PasteText(cause services.SelectionChangedCause)

PasteText pastes the text of the clipboard over the selection. The clipboard is read asynchronously.

Flutter: widgets/editable_text.dart EditableTextState.pasteText

func (*EditableTextState) PerformAction

func (s *EditableTextState) PerformAction(action services.TextInputAction)

PerformAction does what the action of the input method asks, such as Enter.

Flutter: widgets/editable_text.dart EditableTextState.performAction

func (*EditableTextState) PerformPrivateCommand

func (s *EditableTextState) PerformPrivateCommand(action string, data map[string]any)

PerformPrivateCommand passes a private command of the input method on.

Flutter: widgets/editable_text.dart EditableTextState.performPrivateCommand

func (*EditableTextState) PerformSelector

func (s *EditableTextState) PerformSelector(selectorName string)

PerformSelector does what a command of the Cocoa text system asks, by the name of its selector ("moveLeft:"): the intent that IntentForMacOSSelector gives for it is invoked in the focused node. A selector that is not known does nothing.

Flutter: widgets/editable_text.dart EditableTextState.performSelector

func (*EditableTextState) RemoveTextPlaceholder

func (s *EditableTextState) RemoveTextPlaceholder()

RemoveTextPlaceholder does nothing: the stylus handwriting is not ported.

Flutter: widgets/editable_text.dart EditableTextState.removeTextPlaceholder

func (*EditableTextState) RenderEditable

func (s *EditableTextState) RenderEditable() *rendering.RenderEditable

RenderEditable is the render object that shows the text. It is only available once the field is built.

Flutter: widgets/editable_text.dart EditableTextState.renderEditable

func (*EditableTextState) RequestKeyboard

func (s *EditableTextState) RequestKeyboard()

RequestKeyboard opens the input method, and gives the focus to the field.

Flutter: widgets/editable_text.dart EditableTextState.requestKeyboard

func (*EditableTextState) SearchWebEnabled

func (s *EditableTextState) SearchWebEnabled() bool

SearchWebEnabled is whether the search web command is available, which is only on iOS.

Flutter: widgets/editable_text.dart EditableTextState.searchWebEnabled

func (*EditableTextState) SelectAll

func (s *EditableTextState) SelectAll(cause services.SelectionChangedCause)

SelectAll selects all the text.

Flutter: widgets/editable_text.dart EditableTextState.selectAll

func (*EditableTextState) SelectAllEnabled

func (s *EditableTextState) SelectAllEnabled() bool

SelectAllEnabled is whether the select all command is available.

Flutter: widgets/editable_text.dart EditableTextState.selectAllEnabled

func (*EditableTextState) SelectionOverlay

func (s *EditableTextState) SelectionOverlay() *TextSelectionOverlay

SelectionOverlay is the overlay of the selection handles and toolbar of the field, or nil when there is none.

Flutter: widgets/editable_text.dart EditableTextState.selectionOverlay

func (*EditableTextState) SetSpellCheckResults

func (s *EditableTextState) SetSpellCheckResults(results *services.SpellCheckResults)

SetSpellCheckResults sets the spell check results, as the field's spell check does when the service answers; nil clears them. The text is not rebuilt until the next build.

Flutter: widgets/editable_text.dart EditableTextState.spellCheckResults

func (*EditableTextState) ShareEnabled

func (s *EditableTextState) ShareEnabled() bool

ShareEnabled is whether the share command is available, which is only on Android and iOS.

Flutter: widgets/editable_text.dart EditableTextState.shareEnabled

func (*EditableTextState) ShowAutocorrectionPromptRect

func (s *EditableTextState) ShowAutocorrectionPromptRect(start, end int)

ShowAutocorrectionPromptRect highlights the range that the input method corrects.

Flutter: widgets/editable_text.dart EditableTextState.showAutocorrectionPromptRect

func (*EditableTextState) ShowMagnifier

func (s *EditableTextState) ShowMagnifier(positionToShow ui.Offset)

ShowMagnifier shows the magnifier at the position given by positionToShow, if no magnifier exists.

Updates the magnifier to the position given by positionToShow, if a magnifier exits.

Does nothing if a magnifier couldn't be shown, such as when the selection overlay does not currently exist.

Flutter: widgets/editable_text.dart EditableTextState.showMagnifier

func (*EditableTextState) ShowSpellCheckSuggestionsToolbar

func (s *EditableTextState) ShowSpellCheckSuggestionsToolbar() bool

ShowSpellCheckSuggestionsToolbar shows the toolbar with the spell check suggestions of misspelled words that are available for click-and-replace, and says whether it did. It does not when spell check is off, on the web with the browser's context menu, for a read-only field, without a selection overlay, without results, or when the cursor is not in a misspelled word. The configuration needs a SpellCheckSuggestionsToolbarBuilder (the panic EditableTextSpellCheckToolbarBuilderMissing in debug builds).

Flutter: widgets/editable_text.dart EditableTextState.showSpellCheckSuggestionsToolbar

func (*EditableTextState) ShowToolbar

func (s *EditableTextState) ShowToolbar()

ShowToolbar is called by the input method to show the toolbar.

Flutter: widgets/editable_text.dart EditableTextState.showToolbar

func (*EditableTextState) SpellCheckConfiguration

func (s *EditableTextState) SpellCheckConfiguration() *SpellCheckConfiguration

SpellCheckConfiguration is the configuration that determines how spell check is performed: the one of the widget, with the spell check service inferred if it was not specified.

Flutter: widgets/editable_text.dart EditableTextState.spellCheckConfiguration

func (*EditableTextState) SpellCheckEnabled

func (s *EditableTextState) SpellCheckEnabled() bool

SpellCheckEnabled is whether spell check is enabled: a configuration was specified and the field is not a password field.

Flutter: widgets/editable_text.dart EditableTextState.spellCheckEnabled

func (*EditableTextState) SpellCheckResults

func (s *EditableTextState) SpellCheckResults() *services.SpellCheckResults

SpellCheckResults are the most up-to-date spell check results for the text input; nil when there are none. The results are updated by calls to the SpellCheckService, and used to build the TextSpan tree of the text and the menus with replacements for misspelled words.

Flutter: widgets/editable_text.dart EditableTextState.spellCheckResults

func (*EditableTextState) TextEditingValue

func (s *EditableTextState) TextEditingValue() services.TextEditingValue

TextEditingValue is the value of the text, selection and composing range.

Flutter: widgets/editable_text.dart EditableTextState.textEditingValue

func (*EditableTextState) TextInputConfiguration

func (s *EditableTextState) TextInputConfiguration() services.TextInputConfiguration

TextInputConfiguration is the configuration of the input method for the field.

Flutter: widgets/editable_text.dart EditableTextState.textInputConfiguration

func (*EditableTextState) ToggleToolbar

func (s *EditableTextState) ToggleToolbar(hideHandles bool)

ToggleToolbar shows the toolbar if it is hidden and hides it if it is shown.

Flutter: widgets/editable_text.dart EditableTextState.toggleToolbar

func (*EditableTextState) TryShowToolbar

func (s *EditableTextState) TryShowToolbar() bool

TryShowToolbar shows the toolbar if the field can, and says whether it did. Without a selection overlay it never does.

Flutter: widgets/editable_text.dart EditableTextState.showToolbar

func (*EditableTextState) UpdateEditingValue

func (s *EditableTextState) UpdateEditingValue(value services.TextEditingValue)

UpdateEditingValue takes the value that the input method sends.

Flutter: widgets/editable_text.dart EditableTextState.updateEditingValue

func (*EditableTextState) UpdateFloatingCursor

func (s *EditableTextState) UpdateFloatingCursor(services.RawFloatingCursorPoint)

UpdateFloatingCursor does nothing: the floating cursor is for iOS.

Flutter: widgets/editable_text.dart EditableTextState.updateFloatingCursor

func (*EditableTextState) UserUpdateTextEditingValue

func (s *EditableTextState) UserUpdateTextEditingValue(value services.TextEditingValue, cause services.SelectionChangedCause)

UserUpdateTextEditingValue sets the value that the user made, with the cause of the change. The formatters apply, and the field scrolls to the caret.

Flutter: widgets/editable_text.dart EditableTextState.userUpdateTextEditingValue

func (*EditableTextState) WantKeepAlive

func (s *EditableTextState) WantKeepAlive() bool

WantKeepAlive keeps the field alive in a lazy list while it has the focus.

Flutter: widgets/editable_text.dart EditableTextState.wantKeepAlive

type EditableTextTapOutsideIntent

type EditableTextTapOutsideIntent struct {
	IntentBase
	// FocusNode is the node of the text field.
	//
	// Flutter: widgets/text_editing_intents.dart EditableTextTapOutsideIntent.focusNode
	FocusNode *FocusNode
	// PointerDownEvent is the event of the pointer going down.
	//
	// Flutter: widgets/text_editing_intents.dart EditableTextTapOutsideIntent.pointerDownEvent
	PointerDownEvent *gestures.PointerDownEvent
}

EditableTextTapOutsideIntent is an intent that runs when a pointer goes down outside a text field.

Flutter: widgets/text_editing_intents.dart EditableTextTapOutsideIntent

type EditableTextTapUpOutsideIntent

type EditableTextTapUpOutsideIntent struct {
	IntentBase
	// FocusNode is the node of the text field.
	//
	// Flutter: widgets/text_editing_intents.dart EditableTextTapUpOutsideIntent.focusNode
	FocusNode *FocusNode
	// PointerUpEvent is the event of the pointer going up.
	//
	// Flutter: widgets/text_editing_intents.dart EditableTextTapUpOutsideIntent.pointerUpEvent
	PointerUpEvent *gestures.PointerUpEvent
}

EditableTextTapUpOutsideIntent is an intent that runs when a pointer goes up outside a text field.

Flutter: widgets/text_editing_intents.dart EditableTextTapUpOutsideIntent

type Element

type Element interface {
	BuildContext
	foundation.DiagnosticableTree
	fmt.Stringer
	foundation.ShortDescriber
	// AsElement is the embedded base.
	AsElement() *ElementBase

	// Slot is the location of the element in its parent's child model.
	//
	// Flutter: widgets/framework.dart Element.slot
	Slot() any
	// Depth is the distance from the root; it panics with the tag
	// ElementDepthBeforeMount in debug builds until the element is mounted.
	//
	// Flutter: widgets/framework.dart Element.depth
	Depth() int
	// Dirty is whether the element needs to be rebuilt.
	//
	// Flutter: widgets/framework.dart Element.dirty
	Dirty() bool
	// BuildScope is the build scope that builds this element; it is the one of
	// the parent unless an element overrides it.
	//
	// Flutter: widgets/framework.dart Element.buildScope
	BuildScope() *BuildScope
	// VisitChildren calls the visitor for each child. The default has none.
	//
	// Flutter: widgets/framework.dart Element.visitChildren
	VisitChildren(visitor ElementVisitor)
	// DebugVisitOnstageChildren calls the visitor for each child that is
	// visible; it is VisitChildren by default.
	//
	// Flutter: widgets/framework.dart Element.debugVisitOnstageChildren
	DebugVisitOnstageChildren(visitor ElementVisitor)
	// RenderObjectAttachingChild is the one child that holds the render
	// objects of this element's subtree, or nil.
	//
	// Flutter: widgets/framework.dart Element.renderObjectAttachingChild
	RenderObjectAttachingChild() Element
	// Mount adds the element to the tree under the parent, in the slot.
	//
	// Flutter: widgets/framework.dart Element.mount
	Mount(parent Element, newSlot any)
	// Update changes the widget of the element to a new one that CanUpdate.
	//
	// Flutter: widgets/framework.dart Element.update
	Update(newWidget Widget)
	// UpdateSlot changes the slot of the element.
	//
	// Flutter: widgets/framework.dart Element.updateSlot
	UpdateSlot(newSlot any)
	// DetachRenderObject removes the render objects of the subtree from the
	// render tree.
	//
	// Flutter: widgets/framework.dart Element.detachRenderObject
	DetachRenderObject()
	// AttachRenderObject puts the render objects of the subtree into the render
	// tree, in the slot.
	//
	// Flutter: widgets/framework.dart Element.attachRenderObject
	AttachRenderObject(newSlot any)
	// ForgetChild is told that the child is leaving for another parent.
	//
	// Flutter: widgets/framework.dart Element.forgetChild
	ForgetChild(child Element)
	// Activate moves the element back into the tree from the inactive list.
	//
	// Flutter: widgets/framework.dart Element.activate
	Activate()
	// Deactivate moves the element out of the tree to the inactive list.
	//
	// Flutter: widgets/framework.dart Element.deactivate
	Deactivate()
	// DebugDeactivated is called after the whole subtree is deactivated.
	//
	// Flutter: widgets/framework.dart Element.debugDeactivated
	DebugDeactivated()
	// Unmount removes the element for good.
	//
	// Flutter: widgets/framework.dart Element.unmount
	Unmount()
	// DidChangeDependencies is called when a dependency of the element
	// changes.
	//
	// Flutter: widgets/framework.dart Element.didChangeDependencies
	DidChangeDependencies()
	// PerformRebuild does the work of a rebuild.
	//
	// Flutter: widgets/framework.dart Element.performRebuild
	PerformRebuild()
	// Reassemble marks the subtree dirty, after a hot reload.
	//
	// Flutter: widgets/framework.dart Element.reassemble
	Reassemble()
	// DebugExpectsRenderObjectForSlot is whether the slot holds a render
	// object.
	//
	// Flutter: widgets/framework.dart Element.debugExpectsRenderObjectForSlot
	DebugExpectsRenderObjectForSlot(slot any) bool
	// MarkNeedsBuild marks the element dirty and schedules it to be built.
	//
	// Flutter: widgets/framework.dart Element.markNeedsBuild
	MarkNeedsBuild()
	// Rebuild builds the element if it is dirty.
	//
	// Flutter: widgets/framework.dart Element.rebuild
	Rebuild(opts ...RebuildOpts)
	// UpdateChild updates a child to a new widget; see ElementBase.UpdateChild.
	//
	// Flutter: widgets/framework.dart Element.updateChild
	UpdateChild(child Element, newWidget Widget, newSlot any) Element
	// InflateWidget makes a new child element; see ElementBase.InflateWidget.
	//
	// Flutter: widgets/framework.dart Element.inflateWidget
	InflateWidget(newWidget Widget, newSlot any) Element
	// DeactivateChild moves a child to the inactive list.
	//
	// Flutter: widgets/framework.dart Element.deactivateChild
	DeactivateChild(child Element)
	// RenderObject is the render object of this element, or of its first
	// descendant that has one; nil when there is none.
	//
	// Flutter: widgets/framework.dart Element.renderObject
	RenderObject() rendering.RenderObject
	// contains filtered or unexported methods
}

Element is an instantiation of a Widget at a particular location in the tree. It is also the BuildContext of its widget.

Element types embed ElementBase and call InitElement in their constructor, so that the base can make the virtual calls Flutter makes (SPEC §12.5). A method that overrides one of the base methods calls the base method on the embedded ElementBase where Flutter calls super.

Flutter: widgets/framework.dart Element

func CreateElement

func CreateElement(w Widget) Element

CreateElement inflates a widget to an element: its CreateElement method if it has one, otherwise the element of the kind of its embedded base: an InheritedElement, a ParentDataElement, a LeafRenderObjectElement, a SingleChildRenderObjectElement, a MultiChildRenderObjectElement, a StatefulElement (CreateState) or a StatelessElement (Build). A widget of any other kind panics with the tag WidgetKindUnknown.

Flutter: widgets/framework.dart Widget.createElement

func NewTwoDimensionalViewportElement

func NewTwoDimensionalViewportElement(w Widget) Element

NewTwoDimensionalViewportElement creates the element of a concrete two-dimensional viewport widget.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.createElement

type ElementBase

type ElementBase struct {
	// contains filtered or unexported fields
}

ElementBase is the part of every element that the framework ports from Flutter's Element class. Embed it and call InitElement.

Flutter: widgets/framework.dart Element

func (*ElementBase) Activate

func (b *ElementBase) Activate()

Activate moves the element back into the tree: it clears the dependencies that Deactivate unregistered, and rebuilds if it was dirty or had dependencies.

Flutter: widgets/framework.dart Element.activate

func (*ElementBase) AsElement

func (b *ElementBase) AsElement() *ElementBase

AsElement returns the base.

func (*ElementBase) AssignOwner

func (b *ElementBase) AssignOwner(owner *BuildOwner)

AssignOwner gives a root element its owner and a build scope of its own. Call it on the root element before mounting it.

Deviation: it is a method of every element, where Flutter has it in RootElementMixin, because Go cannot mix two bases into one element (SPEC §12.10).

Flutter: widgets/framework.dart RootElementMixin.assignOwner

func (*ElementBase) AttachRenderObject

func (b *ElementBase) AttachRenderObject(newSlot any)

AttachRenderObject attaches the descendants and sets the slot.

Flutter: widgets/framework.dart Element.attachRenderObject

func (*ElementBase) BuildScope

func (b *ElementBase) BuildScope() *BuildScope

BuildScope is the build scope of the parent, cached when the element is mounted or reparented.

Flutter: widgets/framework.dart Element.buildScope

func (*ElementBase) Deactivate

func (b *ElementBase) Deactivate()

Deactivate takes the element out of the tree: it unregisters from the inherited elements it depends on.

Flutter: widgets/framework.dart Element.deactivate

func (*ElementBase) DeactivateChild

func (b *ElementBase) DeactivateChild(child Element)

DeactivateChild moves the child to the inactive list of the owner: it is detached from this element and from the render tree, and deactivated.

Flutter: widgets/framework.dart Element.deactivateChild

func (*ElementBase) DebugDeactivated

func (b *ElementBase) DebugDeactivated()

DebugDeactivated is called after the element and its subtree have been deactivated.

Flutter: widgets/framework.dart Element.debugDeactivated

func (*ElementBase) DebugDependencies

func (b *ElementBase) DebugDependencies() []Element

DebugDependencies are the inherited elements this element depends on.

Flutter: widgets/framework.dart Element._dependencies

func (*ElementBase) DebugDescribeChildren

func (b *ElementBase) DebugDescribeChildren() []foundation.DiagnosticsNode

DebugDescribeChildren describes the children in visiting order.

Flutter: widgets/framework.dart Element.debugDescribeChildren

func (*ElementBase) DebugDoingBuild

func (b *ElementBase) DebugDoingBuild() bool

DebugDoingBuild is whether the element is in its build function. Only component elements build.

Flutter: widgets/framework.dart Element.debugDoingBuild

func (*ElementBase) DebugExpectsRenderObjectForSlot

func (b *ElementBase) DebugExpectsRenderObjectForSlot(any) bool

DebugExpectsRenderObjectForSlot is true by default.

Flutter: widgets/framework.dart Element.debugExpectsRenderObjectForSlot

func (*ElementBase) DebugFillProperties

func (b *ElementBase) DebugFillProperties(properties *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the depth, the widget, its key and properties, the dirty flag and the dependencies.

Flutter: widgets/framework.dart Element.debugFillProperties

func (*ElementBase) DebugGetCreatorChain

func (b *ElementBase) DebugGetCreatorChain(limit int) string

DebugGetCreatorChain describes this element and up to limit parents, such as "Padding ← Center ← ⋯".

Flutter: widgets/framework.dart Element.debugGetCreatorChain

func (*ElementBase) DebugGetDiagnosticChain

func (b *ElementBase) DebugGetDiagnosticChain() []Element

DebugGetDiagnosticChain is this element followed by its ancestors.

Flutter: widgets/framework.dart Element.debugGetDiagnosticChain

func (*ElementBase) DebugIsActive

func (b *ElementBase) DebugIsActive() bool

DebugIsActive is whether the element is in the tree. It is false in release builds.

Flutter: widgets/framework.dart Element.debugIsActive

func (*ElementBase) DebugIsDefunct

func (b *ElementBase) DebugIsDefunct() bool

DebugIsDefunct is whether the element has been unmounted. It is false in release builds.

Flutter: widgets/framework.dart Element.debugIsDefunct

func (*ElementBase) DebugVisitOnstageChildren

func (b *ElementBase) DebugVisitOnstageChildren(visitor ElementVisitor)

DebugVisitOnstageChildren is VisitChildren by default.

Flutter: widgets/framework.dart Element.debugVisitOnstageChildren

func (*ElementBase) DependOnInheritedElement

func (b *ElementBase) DependOnInheritedElement(ancestor InheritedElementSelf, aspect any) Widget

DependOnInheritedElement registers this element as a dependent of the inherited element and returns its widget.

Flutter: widgets/framework.dart Element.dependOnInheritedElement

func (*ElementBase) Depth

func (b *ElementBase) Depth() int

Depth is the distance from the root.

Flutter: widgets/framework.dart Element.depth

func (*ElementBase) DescribeElement

func (b *ElementBase) DescribeElement(name string, style ...foundation.DiagnosticsTreeStyle) foundation.DiagnosticsNode

DescribeElement describes this element as a property, for an error.

Flutter: widgets/framework.dart Element.describeElement

func (*ElementBase) DescribeMissingAncestor

func (b *ElementBase) DescribeMissingAncestor(expectedAncestorType string) []foundation.DiagnosticsNode

DescribeMissingAncestor describes this element and its ancestors for an error about an ancestor of the expected type that does not exist.

Flutter: widgets/framework.dart Element.describeMissingAncestor

func (*ElementBase) DescribeOwnershipChain

func (b *ElementBase) DescribeOwnershipChain(name string) foundation.DiagnosticsNode

DescribeOwnershipChain lists the elements from this one up to ten parents.

Flutter: widgets/framework.dart Element.describeOwnershipChain

func (*ElementBase) DescribeWidget

func (b *ElementBase) DescribeWidget(name string, style ...foundation.DiagnosticsTreeStyle) foundation.DiagnosticsNode

DescribeWidget describes this element as a property, for an error.

Flutter: widgets/framework.dart Element.describeWidget

func (*ElementBase) DetachRenderObject

func (b *ElementBase) DetachRenderObject()

DetachRenderObject detaches the descendants and clears the slot.

Flutter: widgets/framework.dart Element.detachRenderObject

func (*ElementBase) DidChangeDependencies

func (b *ElementBase) DidChangeDependencies()

DidChangeDependencies is called when a dependency of this element changes: it marks the element for a rebuild. In debug builds it panics with the tag DidChangeDependenciesOutsideBuild when no build is going on.

Flutter: widgets/framework.dart Element.didChangeDependencies

func (*ElementBase) Dirty

func (b *ElementBase) Dirty() bool

Dirty is whether the element needs to be rebuilt.

Flutter: widgets/framework.dart Element.dirty

func (*ElementBase) DoesDependOnInheritedElement

func (b *ElementBase) DoesDependOnInheritedElement(ancestor Element) bool

DoesDependOnInheritedElement is whether this element depends on the inherited element.

Flutter: widgets/framework.dart Element.doesDependOnInheritedElement

func (*ElementBase) FindRenderObject

func (b *ElementBase) FindRenderObject() rendering.RenderObject

FindRenderObject is the render object of this element or of the first descendant that has one. In debug builds it panics with the tag FindRenderObjectInactive when the element is not active.

Flutter: widgets/framework.dart Element.findRenderObject

func (*ElementBase) ForgetChild

func (b *ElementBase) ForgetChild(child Element)

ForgetChild is called on the old parent when the child, which has a global key, is given a new parent. The reservation of the key cannot be released here: the forgotten child is not removed from the tree until this element updates, and if it never does, the child is still a duplicate of the key.

Flutter: widgets/framework.dart Element.forgetChild

func (*ElementBase) InflateWidget

func (b *ElementBase) InflateWidget(newWidget Widget, newSlot any) Element

InflateWidget makes an element for the widget, mounts it as a child of this element and returns it. If the mount fails it cleans up on a best-effort basis and the panic goes on.

Flutter: widgets/framework.dart Element.inflateWidget

func (*ElementBase) MarkNeedsBuild

func (b *ElementBase) MarkNeedsBuild()

MarkNeedsBuild marks the element as dirty and adds it to the list of active elements that the owner will rebuild. In debug builds it panics with the tag MarkNeedsBuildDuringBuild when the element is not below the one being built, with MarkNeedsBuildWhileLocked while the tree is locked, and with MarkNeedsBuildOnDefunctElement for an element that has been unmounted.

Flutter: widgets/framework.dart Element.markNeedsBuild

func (*ElementBase) Mount

func (b *ElementBase) Mount(parent Element, newSlot any)

Mount adds the element to the tree as a child of parent, in the given slot. A root element has no parent and gets its owner from AssignOwner.

Flutter: widgets/framework.dart Element.mount

func (*ElementBase) Mounted

func (b *ElementBase) Mounted() bool

Mounted is whether the element is in the tree.

Flutter: widgets/framework.dart Element.mounted

func (*ElementBase) Owner

func (b *ElementBase) Owner() *BuildOwner

Owner is the build owner of the element; nil until it is mounted.

Flutter: widgets/framework.dart Element.owner

func (*ElementBase) Parent

func (b *ElementBase) Parent() Element

Parent is the parent element, or nil for the root and for an element that is not in the tree.

Flutter: widgets/framework.dart Element._parent

func (*ElementBase) PerformRebuild

func (b *ElementBase) PerformRebuild()

PerformRebuild clears the dirty flag; elements that build override it and call this one.

Flutter: widgets/framework.dart Element.performRebuild

func (*ElementBase) Reassemble

func (b *ElementBase) Reassemble()

Reassemble marks the element and its descendants dirty.

Flutter: widgets/framework.dart Element.reassemble

func (*ElementBase) Rebuild

func (b *ElementBase) Rebuild(opts ...RebuildOpts)

Rebuild builds the element if it is dirty (or always with Force) and clears the dirty flag.

Flutter: widgets/framework.dart Element.rebuild

func (*ElementBase) RenderObject

func (b *ElementBase) RenderObject() rendering.RenderObject

RenderObject is the render object of this element, or of its first descendant that has one. It is nil when there is none or the element is unmounted.

Flutter: widgets/framework.dart Element.renderObject

func (*ElementBase) RenderObjectAttachingChild

func (b *ElementBase) RenderObjectAttachingChild() Element

RenderObjectAttachingChild is the only child, found by visiting the children. An element with more than one child overrides it.

Flutter: widgets/framework.dart Element.renderObjectAttachingChild

func (*ElementBase) Size

func (b *ElementBase) Size() (ui.Size, bool)

Size is the size of the render box of this element, or false when the render object is not a box. In debug builds it panics when the size cannot be known: SizeOfInactiveElement, SizeDuringBuild, SizeWithoutRenderObject, SizeOfNonBox, SizeBeforeLayout and SizeOfDirtyLayout.

Flutter: widgets/framework.dart Element.size

func (*ElementBase) Slot

func (b *ElementBase) Slot() any

Slot is the location of the element in its parent's child model.

Flutter: widgets/framework.dart Element.slot

func (*ElementBase) String

func (b *ElementBase) String() string

String describes the element and its properties on one line.

Flutter: foundation/diagnostics.dart DiagnosticableTree.toString

func (*ElementBase) ToStringShort

func (b *ElementBase) ToStringShort() string

ToStringShort is the short description of the widget, or the identity of the element with "(DEFUNCT)" once the widget is gone.

Flutter: widgets/framework.dart Element.toStringShort

func (*ElementBase) Unmount

func (b *ElementBase) Unmount()

Unmount removes the element from the tree for good. It releases the widget, so that a retained element does not keep it alive.

Flutter: widgets/framework.dart Element.unmount

func (*ElementBase) Update

func (b *ElementBase) Update(newWidget Widget)

Update changes the configuration of the element to a new widget that CanUpdate the old one. Subclasses override it, update what depends on the widget and call this one.

Flutter: widgets/framework.dart Element.update

func (*ElementBase) UpdateChild

func (b *ElementBase) UpdateChild(child Element, newWidget Widget, newSlot any) Element

UpdateChild updates a child element to a new widget and slot, and returns the element that now stands for the child: the same element when the new widget CanUpdate it, a new one otherwise, or nil when newWidget is nil.

  • newWidget nil, child nil: nothing happens, the result is nil.
  • newWidget nil, child not nil: the child is removed (deactivated).
  • newWidget not nil, child nil: a new element is inflated.
  • newWidget not nil, child not nil: the child is updated when it can be and replaced with a new element when it cannot.

Flutter: widgets/framework.dart Element.updateChild

func (*ElementBase) UpdateChildren

func (b *ElementBase) UpdateChildren(oldChildren []Element, newWidgets []Widget, opts ...UpdateChildrenOpts) []Element

UpdateChildren updates the list of old child elements to the list of new widgets and returns the new list of elements. It syncs the lists from the top, then from the bottom, then matches keyed widgets in the middle, and removes the old children that are left over. A widget without a key might be synced with an old child but there is no guarantee. The caller is expected to update its render object accordingly.

Flutter: widgets/framework.dart Element.updateChildren

func (*ElementBase) UpdateSlot

func (b *ElementBase) UpdateSlot(newSlot any)

UpdateSlot changes the slot.

Flutter: widgets/framework.dart Element.updateSlot

func (*ElementBase) UpdateSlotForChild

func (b *ElementBase) UpdateSlotForChild(child Element, newSlot any)

UpdateSlotForChild changes the slot of the child and of the descendants that share its render object.

Flutter: widgets/framework.dart Element.updateSlotForChild

func (*ElementBase) VisitAncestorElements

func (b *ElementBase) VisitAncestorElements(visitor ConditionalElementVisitor)

VisitAncestorElements walks the ancestors from the closest to the root until the visitor returns false.

Flutter: widgets/framework.dart Element.visitAncestorElements

func (*ElementBase) VisitChildElements

func (b *ElementBase) VisitChildElements(visitor ElementVisitor)

VisitChildElements calls the visitor for each child. In debug builds it panics with the tag VisitChildElementsDuringBuild while the tree is locked.

Flutter: widgets/framework.dart Element.visitChildElements

func (*ElementBase) VisitChildren

func (b *ElementBase) VisitChildren(ElementVisitor)

VisitChildren has no children by default.

Flutter: widgets/framework.dart Element.visitChildren

func (*ElementBase) Widget

func (b *ElementBase) Widget() Widget

Widget is the current configuration of the element. It panics with the tag ElementWidgetUnmounted when the element has been unmounted.

Flutter: widgets/framework.dart Element.widget

type ElementCreator

type ElementCreator interface {
	Widget
	// CreateElement inflates this configuration to a concrete instance.
	//
	// Flutter: widgets/framework.dart Widget.createElement
	CreateElement() Element
}

ElementCreator is a widget that makes its own element. It takes priority over the element kinds the framework chooses from the other interfaces of the widget.

Flutter: widgets/framework.dart Widget.createElement

type ElementVisitor

type ElementVisitor func(element Element)

ElementVisitor is called for each element a visit reaches.

Flutter: widgets/framework.dart ElementVisitor

type EmptyTextSelectionControls

type EmptyTextSelectionControls struct{}

EmptyTextSelectionControls is a TextSelectionControls that does not build anything.

Flutter: widgets/text_selection.dart EmptyTextSelectionControls

func NewEmptyTextSelectionControls

func NewEmptyTextSelectionControls() EmptyTextSelectionControls

NewEmptyTextSelectionControls creates the controls that build nothing.

Flutter: widgets/text_selection.dart emptyTextSelectionControls

func (EmptyTextSelectionControls) BuildHandle

BuildHandle builds an empty box.

Flutter: widgets/text_selection.dart EmptyTextSelectionControls.buildHandle

func (EmptyTextSelectionControls) GetHandleAnchor

GetHandleAnchor is the zero offset.

Flutter: widgets/text_selection.dart EmptyTextSelectionControls.getHandleAnchor

func (EmptyTextSelectionControls) GetHandleSize

func (EmptyTextSelectionControls) GetHandleSize(float64) ui.Size

GetHandleSize is the zero size.

Flutter: widgets/text_selection.dart EmptyTextSelectionControls.getHandleSize

type EnsureVisibleOpts

type EnsureVisibleOpts struct {
	// Alignment is where in the viewport the object ends up: 0 for the leading
	// edge, 1 for the trailing edge, 0.5 for the middle.
	Alignment float64
	// Duration is the length of the animation; zero jumps.
	Duration time.Duration
	// Curve is the curve of the animation; the default is Curves.Ease.
	Curve animation.Curve
	// AlignmentPolicy is how the object is aligned.
	AlignmentPolicy ScrollPositionAlignmentPolicy
	// TargetRenderObject is the descendant of the object that is revealed, if it
	// is not the object itself.
	TargetRenderObject rendering.RenderObject
}

EnsureVisibleOpts are the optional parameters of ScrollPosition.EnsureVisible.

Flutter: widgets/scroll_position.dart ScrollPosition.ensureVisible

type ErrorBoundary

type ErrorBoundary struct {
	WidgetBase
	// contains filtered or unexported fields
}

ErrorBoundary takes over the build errors of its subtree. When a widget below it fails to build (a panic in Build, in the InitState, DidUpdateWidget or DidChangeDependencies of a state, in the builder of a LayoutBuilder, or in a lazily built child of a sliver such as the item of ListView.builder), the boundary is told first (ErrorBoundaryOpts.OnError), and it builds the fallback in place of its whole child, in the same frame: the failed subtree is unmounted (its states are disposed) and never reaches a painted frame. The application's ErrorReporter still gets every error, after the boundary.

A failed boundary stays failed: a rebuild of it, or a new child from its parent, builds the fallback again, and the old child is not tried again. A new Key makes a new boundary, which is the way to try again. The fallback gets the first error; the errors that come after are only reported.

Boundaries nest: the nearest one above the failing element takes the error. A panic in a fallback, or in anything the fallback builds, goes to the next boundary above, or to the application's ErrorReporter when there is none, as a panic in OnError does. Without a boundary nothing changes: the ErrorWidget takes the place of the widget that failed. Like the recovery points themselves (SPEC §14.2), a boundary acts only when the build owner has an error reporter, which the binding always sets.

The boundary needs no Flutter counterpart in the framework: Flutter shows the ErrorWidget in the place of the failing widget only (SPEC §12.10).

Flutter: no counterpart

func NewErrorBoundary

func NewErrorBoundary(fallback func(bc BuildContext, err error) Widget, child Widget, opts ...ErrorBoundaryOpts) *ErrorBoundary

NewErrorBoundary creates a boundary around the child. The fallback builds what is shown instead of the child once a widget below failed; it gets the first error. A nil fallback means the build owner's error widget (BuildOwner.ErrorWidgetBuilder, or ErrorWidget).

Flutter: no counterpart

func (*ErrorBoundary) Child

func (w *ErrorBoundary) Child() Widget

Child is the widget below this one in the tree.

Flutter: no counterpart

func (*ErrorBoundary) CreateElement

func (w *ErrorBoundary) CreateElement() Element

CreateElement creates the element of the boundary.

Flutter: no counterpart

type ErrorBoundaryOpts

type ErrorBoundaryOpts struct {
	// Key is the key of the widget. A new key makes a new boundary, which tries
	// its child again after the old one failed.
	Key foundation.Key
	// OnError is called with each error that a widget below the boundary
	// reported while it was built (a panic in Build, in InitState,
	// DidUpdateWidget or DidChangeDependencies of a state below, in the builder
	// of a LayoutBuilder, in a lazily built child of a sliver), before the
	// error goes to the application's ErrorReporter.
	//
	// It runs on the UI thread, inside the build pass (or the layout pass), so
	// it must not call SetState on an ancestor of the boundary; it may post
	// work with the binding's Post. A panic in it is an error of the boundary's
	// own element: the next boundary above takes it, or the application's
	// ErrorReporter when there is none.
	//
	// Flutter: no counterpart
	OnError func(err error)
}

ErrorBoundaryOpts are the optional parameters of NewErrorBoundary.

Flutter: no counterpart

type ErrorWidget

type ErrorWidget struct {
	LeafRenderObjectWidget
	// contains filtered or unexported fields
}

ErrorWidget is the widget that replaces a widget that failed to build: a box with the message of the error. In debug builds the box is dark red with the message in yellow monospace text; in release builds it is gray. ComponentElement.PerformRebuild puts one in place of a widget whose Build or update panicked, built by BuildOwner.ErrorWidgetBuilder (SPEC §14.2).

Flutter: widgets/framework.dart ErrorWidget

func NewErrorWidget

func NewErrorWidget(err error) *ErrorWidget

NewErrorWidget creates the widget for an error; the message is the text of the error. It has a unique key.

Flutter: widgets/framework.dart ErrorWidget.new

func NewErrorWidgetWithDetails

func NewErrorWidgetWithDetails(message string, err error) *ErrorWidget

NewErrorWidgetWithDetails creates the widget for a message and, optionally, the error behind it.

Flutter: widgets/framework.dart ErrorWidget.withDetails

func (*ErrorWidget) CreateRenderObject

func (w *ErrorWidget) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the red box. The text engine is the one of the binding that the context belongs to; a tree without a binding makes a box without text.

Flutter: widgets/framework.dart ErrorWidget.createRenderObject

func (*ErrorWidget) DebugFillProperties

func (w *ErrorWidget) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the message.

Flutter: widgets/framework.dart ErrorWidget.debugFillProperties

func (*ErrorWidget) Err

func (w *ErrorWidget) Err() error

Err is the error behind the message, or nil.

Flutter: widgets/framework.dart ErrorWidget._flutterError

func (*ErrorWidget) Message

func (w *ErrorWidget) Message() string

Message is the message the widget shows.

Flutter: widgets/framework.dart ErrorWidget.message

type ExcludeFocus

type ExcludeFocus struct {
	StatelessWidget
	// contains filtered or unexported fields
}

ExcludeFocus is a widget that excludes its subtree from the focus system: no node below it can take the focus.

Flutter: widgets/focus_scope.dart ExcludeFocus

func NewExcludeFocus

func NewExcludeFocus(child Widget, opts ...ExcludeFocusOpts) *ExcludeFocus

NewExcludeFocus creates the widget.

Flutter: widgets/focus_scope.dart ExcludeFocus.new

func (*ExcludeFocus) Build

func (w *ExcludeFocus) Build(BuildContext) Widget

Build makes a Focus that cannot be focused and does not let its descendants be.

Flutter: widgets/focus_scope.dart ExcludeFocus.build

func (*ExcludeFocus) Child

func (w *ExcludeFocus) Child() Widget

Child is the widget below.

Flutter: widgets/focus_scope.dart ExcludeFocus.child

func (*ExcludeFocus) Excluding

func (w *ExcludeFocus) Excluding() bool

Excluding is whether the subtree is excluded.

Flutter: widgets/focus_scope.dart ExcludeFocus.excluding

type ExcludeFocusOpts

type ExcludeFocusOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// NotExcluding turns the exclusion off (Flutter's excluding is true by
	// default).
	NotExcluding bool
}

ExcludeFocusOpts are the optional parameters of NewExcludeFocus.

Flutter: widgets/focus_scope.dart ExcludeFocus.new

type ExcludeFocusTraversal

type ExcludeFocusTraversal struct {
	StatelessWidget
	// contains filtered or unexported fields
}

ExcludeFocusTraversal excludes its subtree from focus traversal: its nodes can still take the focus, but traversal skips them.

Flutter: widgets/focus_traversal.dart ExcludeFocusTraversal

func NewExcludeFocusTraversal

func NewExcludeFocusTraversal(child Widget, opts ...ExcludeFocusTraversalOpts) *ExcludeFocusTraversal

NewExcludeFocusTraversal creates the widget.

Flutter: widgets/focus_traversal.dart ExcludeFocusTraversal.new

func (*ExcludeFocusTraversal) Build

Build makes a Focus that is skipped by traversal and has descendants that are not traversable.

Flutter: widgets/focus_traversal.dart ExcludeFocusTraversal.build

func (*ExcludeFocusTraversal) Child

func (w *ExcludeFocusTraversal) Child() Widget

Child is the widget below.

Flutter: widgets/focus_traversal.dart ExcludeFocusTraversal.child

func (*ExcludeFocusTraversal) Excluding

func (w *ExcludeFocusTraversal) Excluding() bool

Excluding is whether the subtree is excluded.

Flutter: widgets/focus_traversal.dart ExcludeFocusTraversal.excluding

type ExcludeFocusTraversalOpts

type ExcludeFocusTraversalOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// NotExcluding turns the exclusion off (Flutter's excluding is true by
	// default).
	NotExcluding bool
}

ExcludeFocusTraversalOpts are the optional parameters of NewExcludeFocusTraversal.

Flutter: widgets/focus_traversal.dart ExcludeFocusTraversal.new

type ExcludeSemantics

type ExcludeSemantics struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ExcludeSemantics drops all the semantics of its descendants.

Flutter: widgets/basic.dart ExcludeSemantics

func NewExcludeSemantics

func NewExcludeSemantics(child Widget, opts ...ExcludeSemanticsOpts) *ExcludeSemantics

NewExcludeSemantics creates a widget that drops the semantics of its subtree.

Flutter: widgets/basic.dart ExcludeSemantics.new

func (*ExcludeSemantics) CreateRenderObject

func (w *ExcludeSemantics) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ExcludeSemantics.createRenderObject

func (*ExcludeSemantics) Excluding

func (w *ExcludeSemantics) Excluding() bool

Excluding is whether the subtree is excluded.

Flutter: widgets/basic.dart ExcludeSemantics.excluding

func (*ExcludeSemantics) UpdateRenderObject

func (w *ExcludeSemantics) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ExcludeSemantics.updateRenderObject

type ExcludeSemanticsOpts

type ExcludeSemanticsOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Excluding is whether this widget excludes its subtree from the semantics
	// tree; the default is true.
	Excluding foundation.Opt[bool]
}

ExcludeSemanticsOpts are the optional parameters of NewExcludeSemantics.

Flutter: widgets/basic.dart ExcludeSemantics.new

type ExpandSelectionToDocumentBoundaryIntent

type ExpandSelectionToDocumentBoundaryIntent struct {
	DirectionalCaretMovementIntentBase
}

ExpandSelectionToDocumentBoundaryIntent is an intent that expands the selection to the start or end of the document.

Flutter: widgets/text_editing_intents.dart ExpandSelectionToDocumentBoundaryIntent

func NewExpandSelectionToDocumentBoundaryIntent

func NewExpandSelectionToDocumentBoundaryIntent(forward bool) ExpandSelectionToDocumentBoundaryIntent

NewExpandSelectionToDocumentBoundaryIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExpandSelectionToDocumentBoundaryIntent.new

type ExpandSelectionToLineBreakIntent

type ExpandSelectionToLineBreakIntent struct {
	DirectionalCaretMovementIntentBase
}

ExpandSelectionToLineBreakIntent is an intent that expands the selection to the next line break.

Flutter: widgets/text_editing_intents.dart ExpandSelectionToLineBreakIntent

func NewExpandSelectionToLineBreakIntent

func NewExpandSelectionToLineBreakIntent(forward bool) ExpandSelectionToLineBreakIntent

NewExpandSelectionToLineBreakIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExpandSelectionToLineBreakIntent.new

type Expanded

type Expanded struct{ Flexible }

Expanded expands a child of a Row, Column or Flex so that the child fills the available space.

Flutter: widgets/basic.dart Expanded

func NewExpanded

func NewExpanded(child Widget, opts ...ExpandedOpts) *Expanded

NewExpanded creates a widget that expands a child of a Row, Column or Flex.

Flutter: widgets/basic.dart Expanded.new

type ExpandedOpts

type ExpandedOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Flex is the flex factor to use for this child; the default is 1.
	Flex foundation.Opt[int]
}

ExpandedOpts are the optional parameters of NewExpanded.

Flutter: widgets/basic.dart Expanded.new

type Expansible

type Expansible struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Expansible is a widget that expands and collapses to show or hide a body under a header, without a look of its own: ExpansionTile gives it one.

Flutter: widgets/expansible.dart Expansible

func NewExpansible

func NewExpansible(controller *ExpansibleController, headerBuilder, bodyBuilder ExpansibleComponentBuilder, opts ...ExpansibleOpts) *Expansible

NewExpansible creates the widget.

Flutter: widgets/expansible.dart Expansible.new

func (*Expansible) CreateState

func (w *Expansible) CreateState() State

CreateState creates the state.

Flutter: widgets/expansible.dart Expansible.createState

type ExpansibleBuilder

type ExpansibleBuilder func(bc BuildContext, header, body Widget, animation animation.Animation[float64]) Widget

ExpansibleBuilder puts the header and the body of an Expansible together.

Flutter: widgets/expansible.dart ExpansibleBuilder

type ExpansibleComponentBuilder

type ExpansibleComponentBuilder func(bc BuildContext, animation animation.Animation[float64]) Widget

ExpansibleComponentBuilder builds the header or the body of an Expansible.

Flutter: widgets/expansible.dart ExpansibleComponentBuilder

type ExpansibleController

type ExpansibleController struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

ExpansibleController controls an Expansible: it expands and collapses it and tells whether it is expanded.

Flutter: widgets/expansible.dart ExpansibleController

func ExpansibleControllerMaybeOf

func ExpansibleControllerMaybeOf(bc BuildContext) *ExpansibleController

ExpansibleControllerMaybeOf is the controller of the closest Expansible above the context, or nil.

Flutter: widgets/expansible.dart ExpansibleController.maybeOf

func ExpansibleControllerOf

func ExpansibleControllerOf(bc BuildContext) *ExpansibleController

ExpansibleControllerOf is the controller of the closest Expansible above the context. In debug builds it panics with the tag ExpansibleControllerNoAncestor when there is none.

Flutter: widgets/expansible.dart ExpansibleController.of

func NewExpansibleController

func NewExpansibleController() *ExpansibleController

NewExpansibleController creates a controller that is collapsed.

Flutter: widgets/expansible.dart ExpansibleController.new

func (*ExpansibleController) Collapse

func (c *ExpansibleController) Collapse()

Collapse collapses the widget; it does nothing when it is collapsed already.

Flutter: widgets/expansible.dart ExpansibleController.collapse

func (*ExpansibleController) Expand

func (c *ExpansibleController) Expand()

Expand expands the widget; it does nothing when it is expanded already.

Flutter: widgets/expansible.dart ExpansibleController.expand

func (*ExpansibleController) IsExpanded

func (c *ExpansibleController) IsExpanded() bool

IsExpanded is whether the widget is expanded.

Flutter: widgets/expansible.dart ExpansibleController.isExpanded

func (*ExpansibleController) Toggle

func (c *ExpansibleController) Toggle()

Toggle expands a collapsed widget and collapses an expanded one.

Flutter: widgets/expansible.dart ExpansibleController.toggle

type ExpansibleOpts

type ExpansibleOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ExpansibleBuilder puts the header and the body together; the default is a
	// column of the two.
	ExpansibleBuilder ExpansibleBuilder
	// AnimationStyle overrides the duration and the curves of the expansion.
	AnimationStyle *animation.AnimationStyle
	// Duration is how long the expansion takes; the default is 200 milliseconds.
	//
	// Flutter: deprecated after v3.38, use AnimationStyle.
	Duration foundation.Opt[time.Duration]
	// Curve is the curve of the expansion; the default is Curves.ease.
	//
	// Flutter: deprecated after v3.38, use AnimationStyle.
	Curve animation.Curve
	// ReverseCurve is the curve of the collapse; the default is the curve.
	//
	// Flutter: deprecated after v3.38, use AnimationStyle.
	ReverseCurve animation.Curve
	// NoMaintainState drops the body from the tree while the widget is collapsed:
	// Flutter's maintainState is false.
	NoMaintainState bool
}

ExpansibleOpts are the optional parameters of NewExpansible.

Flutter: widgets/expansible.dart Expansible.new

type ExtendSelectionByCharacterIntent

type ExtendSelectionByCharacterIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionByCharacterIntent is an intent that extends or moves the selection by a character.

Flutter: widgets/text_editing_intents.dart ExtendSelectionByCharacterIntent

func NewExtendSelectionByCharacterIntent

func NewExtendSelectionByCharacterIntent(forward, collapseSelection bool) ExtendSelectionByCharacterIntent

NewExtendSelectionByCharacterIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionByCharacterIntent.new

type ExtendSelectionToDocumentBoundaryIntent

type ExtendSelectionToDocumentBoundaryIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionToDocumentBoundaryIntent is an intent that extends or moves the selection to the start or end of the document.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToDocumentBoundaryIntent

func NewExtendSelectionToDocumentBoundaryIntent

func NewExtendSelectionToDocumentBoundaryIntent(forward, collapseSelection bool) ExtendSelectionToDocumentBoundaryIntent

NewExtendSelectionToDocumentBoundaryIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToDocumentBoundaryIntent.new

type ExtendSelectionToLineBreakIntent

type ExtendSelectionToLineBreakIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionToLineBreakIntent is an intent that extends or moves the selection to the next line break.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToLineBreakIntent

func NewExtendSelectionToLineBreakIntent

func NewExtendSelectionToLineBreakIntent(forward, collapseSelection bool, opts ...ExtendSelectionToLineBreakIntentOpts) ExtendSelectionToLineBreakIntent

NewExtendSelectionToLineBreakIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToLineBreakIntent.new

type ExtendSelectionToLineBreakIntentOpts

type ExtendSelectionToLineBreakIntentOpts struct {
	// CollapseAtReversal collapses the selection when the direction reverses.
	CollapseAtReversal bool
	// ContinuesAtWrap continues the movement at a line wrap.
	ContinuesAtWrap bool
}

ExtendSelectionToLineBreakIntentOpts are the optional parameters of NewExtendSelectionToLineBreakIntent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToLineBreakIntent.new

type ExtendSelectionToNextParagraphBoundaryIntent

type ExtendSelectionToNextParagraphBoundaryIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionToNextParagraphBoundaryIntent is an intent that extends or moves the selection to the next paragraph boundary.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToNextParagraphBoundaryIntent

func NewExtendSelectionToNextParagraphBoundaryIntent

func NewExtendSelectionToNextParagraphBoundaryIntent(forward, collapseSelection bool) ExtendSelectionToNextParagraphBoundaryIntent

NewExtendSelectionToNextParagraphBoundaryIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToNextParagraphBoundaryIntent.new

type ExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent

type ExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent is an intent that extends the selection to the next paragraph boundary, or to the caret location when the direction reverses.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent

func NewExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent

func NewExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent(forward bool) ExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent

NewExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent.new

type ExtendSelectionToNextWordBoundaryIntent

type ExtendSelectionToNextWordBoundaryIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionToNextWordBoundaryIntent is an intent that extends or moves the selection to the next word boundary.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToNextWordBoundaryIntent

func NewExtendSelectionToNextWordBoundaryIntent

func NewExtendSelectionToNextWordBoundaryIntent(forward, collapseSelection bool) ExtendSelectionToNextWordBoundaryIntent

NewExtendSelectionToNextWordBoundaryIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToNextWordBoundaryIntent.new

type ExtendSelectionToNextWordBoundaryOrCaretLocationIntent

type ExtendSelectionToNextWordBoundaryOrCaretLocationIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionToNextWordBoundaryOrCaretLocationIntent is an intent that extends the selection to the next word boundary, or to the caret location when the direction reverses.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToNextWordBoundaryOrCaretLocationIntent

func NewExtendSelectionToNextWordBoundaryOrCaretLocationIntent

func NewExtendSelectionToNextWordBoundaryOrCaretLocationIntent(forward bool) ExtendSelectionToNextWordBoundaryOrCaretLocationIntent

NewExtendSelectionToNextWordBoundaryOrCaretLocationIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionToNextWordBoundaryOrCaretLocationIntent.new

type ExtendSelectionVerticallyToAdjacentLineIntent

type ExtendSelectionVerticallyToAdjacentLineIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionVerticallyToAdjacentLineIntent is an intent that extends or moves the selection to the adjacent line.

Flutter: widgets/text_editing_intents.dart ExtendSelectionVerticallyToAdjacentLineIntent

func NewExtendSelectionVerticallyToAdjacentLineIntent

func NewExtendSelectionVerticallyToAdjacentLineIntent(forward, collapseSelection bool) ExtendSelectionVerticallyToAdjacentLineIntent

NewExtendSelectionVerticallyToAdjacentLineIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionVerticallyToAdjacentLineIntent.new

type ExtendSelectionVerticallyToAdjacentPageIntent

type ExtendSelectionVerticallyToAdjacentPageIntent struct {
	DirectionalCaretMovementIntentBase
}

ExtendSelectionVerticallyToAdjacentPageIntent is an intent that extends or moves the selection to the adjacent page.

Flutter: widgets/text_editing_intents.dart ExtendSelectionVerticallyToAdjacentPageIntent

func NewExtendSelectionVerticallyToAdjacentPageIntent

func NewExtendSelectionVerticallyToAdjacentPageIntent(forward, collapseSelection bool) ExtendSelectionVerticallyToAdjacentPageIntent

NewExtendSelectionVerticallyToAdjacentPageIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ExtendSelectionVerticallyToAdjacentPageIntent.new

type ExternalDragData

type ExternalDragData struct {
	// Types are the MIME types the source offers, such as "text/uri-list" or
	// "text/plain".
	Types []string
	// Actions are the actions the source allows.
	Actions ui.DropActions
	// Text is the text of the drag, after the drop.
	Text string
	// URIs are the URIs of the drag, after the drop.
	URIs []string
	// Dropped is whether the content is there: the drag was dropped.
	Dropped bool
}

ExternalDragData is the data of a drag that comes from the platform: from another application, or from a Draggable with an Export. A DragTarget whose T accepts a *ExternalDragData (such as any) is offered these drags. While the drag is over the target, only Types is known; the content is there when it is dropped.

Flutter: no counterpart

func (*ExternalDragData) Files

func (d *ExternalDragData) Files() []string

Files are the paths of the file:// URIs of the drag, after the drop.

Flutter: no counterpart

func (*ExternalDragData) HasFiles

func (d *ExternalDragData) HasFiles() bool

HasFiles reports whether the source offers files (text/uri-list).

Flutter: no counterpart

func (*ExternalDragData) HasType

func (d *ExternalDragData) HasType(mime string) bool

HasType reports whether the source offers the MIME type.

Flutter: no counterpart

type FadeTransition

type FadeTransition struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

FadeTransition animates the opacity of a widget; the child is not rebuilt or repainted while the opacity changes.

Flutter: widgets/transitions.dart FadeTransition

func NewFadeTransition

func NewFadeTransition(opacity animation.Animation[float64], child Widget, opts ...FadeTransitionOpts) *FadeTransition

NewFadeTransition creates the widget.

Flutter: widgets/transitions.dart FadeTransition.new

func (*FadeTransition) AlwaysIncludeSemantics

func (w *FadeTransition) AlwaysIncludeSemantics() bool

AlwaysIncludeSemantics is whether the semantics of the child are included even when it is fully transparent.

Flutter: widgets/transitions.dart FadeTransition.alwaysIncludeSemantics

func (*FadeTransition) CreateRenderObject

func (w *FadeTransition) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/transitions.dart FadeTransition.createRenderObject

func (*FadeTransition) Opacity

func (w *FadeTransition) Opacity() animation.Animation[float64]

Opacity is the animation of the opacity.

Flutter: widgets/transitions.dart FadeTransition.opacity

func (*FadeTransition) UpdateRenderObject

func (w *FadeTransition) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/transitions.dart FadeTransition.updateRenderObject

type FadeTransitionOpts

type FadeTransitionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AlwaysIncludeSemantics is whether the semantics of the child are included
	// even when it is fully transparent.
	AlwaysIncludeSemantics bool
}

FadeTransitionOpts are the optional parameters of NewFadeTransition.

Flutter: widgets/transitions.dart FadeTransition.new

type FadeUpwardsPageTransitionsBuilder

type FadeUpwardsPageTransitionsBuilder struct{ PageTransitionsBuilderBase }

FadeUpwardsPageTransitionsBuilder is the transition of a page that slides up while it fades in, like the Android Oreo one.

Flutter: widgets/page_transitions_builder.dart FadeUpwardsPageTransitionsBuilder

func NewFadeUpwardsPageTransitionsBuilder

func NewFadeUpwardsPageTransitionsBuilder() FadeUpwardsPageTransitionsBuilder

NewFadeUpwardsPageTransitionsBuilder creates the builder.

Flutter: widgets/page_transitions_builder.dart FadeUpwardsPageTransitionsBuilder.new

func (FadeUpwardsPageTransitionsBuilder) BuildTransitions

BuildTransitions builds the slide up and fade in of the child.

Flutter: widgets/page_transitions_builder.dart FadeUpwardsPageTransitionsBuilder.buildTransitions

type FittedBox

type FittedBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

FittedBox scales and positions its child within itself according to fit.

Flutter: widgets/basic.dart FittedBox

func NewFittedBox

func NewFittedBox(child Widget, opts ...FittedBoxOpts) *FittedBox

NewFittedBox creates the widget.

Flutter: widgets/basic.dart FittedBox.new

func (*FittedBox) Alignment

func (w *FittedBox) Alignment() painting.AlignmentGeometry

Alignment is how to align the child within its parent's bounds; the default is Alignment.center.

Flutter: widgets/basic.dart FittedBox.alignment

func (*FittedBox) ClipBehavior

func (w *FittedBox) ClipBehavior() ui.Clip

ClipBehavior is the content will be clipped (or not) according to this option; the default is ClipHardEdge.

Flutter: widgets/basic.dart FittedBox.clipBehavior

func (*FittedBox) CreateRenderObject

func (w *FittedBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart FittedBox.createRenderObject

func (*FittedBox) Fit

func (w *FittedBox) Fit() painting.BoxFit

Fit is how to inscribe the child into the space allocated during layout; the default is BoxFitContain.

Flutter: widgets/basic.dart FittedBox.fit

func (*FittedBox) UpdateRenderObject

func (w *FittedBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart FittedBox.updateRenderObject

type FittedBoxOpts

type FittedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Fit is how to inscribe the child into the space allocated during layout; the default is BoxFitContain.
	Fit painting.BoxFit
	// Alignment is how to align the child within its parent's bounds; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
	// ClipBehavior is the content will be clipped (or not) according to this option; the default is ClipHardEdge.
	ClipBehavior ui.Clip
}

FittedBoxOpts are the optional parameters of NewFittedBox.

Flutter: widgets/basic.dart FittedBox.new

type FixedExtentMetrics

type FixedExtentMetrics interface {
	ScrollMetrics
	// ItemIndex is the index of the item in the center.
	//
	// Flutter: widgets/list_wheel_scroll_view.dart FixedExtentMetrics.itemIndex
	ItemIndex() int
}

FixedExtentMetrics are the scroll metrics of a ListWheelScrollView: they also say the index of the item in the center.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentMetrics

type FixedExtentMetricsSnapshot

type FixedExtentMetricsSnapshot struct {
	FixedScrollMetrics
	// contains filtered or unexported fields
}

FixedExtentMetricsSnapshot is an immutable snapshot of FixedExtentMetrics. The scroll notifications of a ListWheelScrollView carry one.

Deviation: Dart's FixedExtentMetrics is a class; here it is an interface that this snapshot and the position of the scroll view implement (SPEC §12.10).

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentMetrics

func NewFixedExtentMetricsSnapshot

func NewFixedExtentMetricsSnapshot(minScrollExtent, maxScrollExtent, pixels, viewportDimension foundation.Opt[float64], axisDirection painting.AxisDirection, itemIndex int, devicePixelRatio float64) *FixedExtentMetricsSnapshot

NewFixedExtentMetricsSnapshot creates a snapshot.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentMetrics.new

func (*FixedExtentMetricsSnapshot) CopyWith

CopyWith is a copy with the changes, and the same item index.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentMetrics.copyWith

func (*FixedExtentMetricsSnapshot) ItemIndex

func (m *FixedExtentMetricsSnapshot) ItemIndex() int

ItemIndex is the index of the item in the center.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentMetrics.itemIndex

type FixedExtentScrollController

type FixedExtentScrollController struct {
	ScrollControllerBase
	// contains filtered or unexported fields
}

FixedExtentScrollController is a controller for ListWheelScrollView: it works in items instead of pixels.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollController

func NewFixedExtentScrollController

func NewFixedExtentScrollController(opts ...FixedExtentScrollControllerOpts) *FixedExtentScrollController

NewFixedExtentScrollController creates a controller for a list wheel scroll view.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollController.new

func (*FixedExtentScrollController) AnimateToItem

func (c *FixedExtentScrollController) AnimateToItem(itemIndex int, duration time.Duration, curve animation.Curve) *scheduler.TickerFuture

AnimateToItem animates the controlled scroll views to the item. The future completes when the animations end.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollController.animateToItem

func (*FixedExtentScrollController) CreateScrollPosition

func (c *FixedExtentScrollController) CreateScrollPosition(physics ScrollPhysics, context ScrollContext, oldPosition ScrollPosition) ScrollPosition

CreateScrollPosition creates the position that counts in items.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollController.createScrollPosition

func (*FixedExtentScrollController) InitialItem

func (c *FixedExtentScrollController) InitialItem() int

InitialItem is the index of the item to start at.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollController.initialItem

func (*FixedExtentScrollController) JumpToItem

func (c *FixedExtentScrollController) JumpToItem(itemIndex int)

JumpToItem changes which item is in the center without animation.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollController.jumpToItem

func (*FixedExtentScrollController) SelectedItem

func (c *FixedExtentScrollController) SelectedItem() int

SelectedItem is the index of the item in the center. In debug builds it panics with the tag FixedExtentControllerNotAttached when no scroll view uses the controller, and with FixedExtentControllerMultipleViews when more than one does.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollController.selectedItem

type FixedExtentScrollControllerOpts

type FixedExtentScrollControllerOpts struct {
	// InitialItem is the index of the item to start at.
	InitialItem int
	// KeepScrollOffset is whether the positions save their offset in the
	// PageStorage; the default is true.
	KeepScrollOffset foundation.Opt[bool]
	// DebugLabel names the controller in debug output.
	DebugLabel string
	// OnAttach is called when a position is attached.
	OnAttach ScrollControllerCallback
	// OnDetach is called when a position is detached.
	OnDetach ScrollControllerCallback
}

FixedExtentScrollControllerOpts are the optional parameters of NewFixedExtentScrollController.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollController.new

type FixedExtentScrollPhysics

type FixedExtentScrollPhysics struct {
	ScrollPhysicsBase
}

FixedExtentScrollPhysics are the scroll physics of a ListWheelScrollView: they settle on an item.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollPhysics

func NewFixedExtentScrollPhysics

func NewFixedExtentScrollPhysics(parent ScrollPhysics) *FixedExtentScrollPhysics

NewFixedExtentScrollPhysics creates the physics with the parent (nil for none).

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollPhysics.new

func (*FixedExtentScrollPhysics) ApplyTo

ApplyTo returns a copy on top of the ancestor.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollPhysics.applyTo

func (*FixedExtentScrollPhysics) CreateBallisticSimulation

func (p *FixedExtentScrollPhysics) CreateBallisticSimulation(position ScrollMetrics, velocity float64) physics.Simulation

CreateBallisticSimulation is a spring or friction simulation that ends on an item. In debug builds it panics with the tag FixedExtentPhysicsWrongPosition when the position is not the one of a FixedExtentScrollController.

Flutter: widgets/list_wheel_scroll_view.dart FixedExtentScrollPhysics.createBallisticSimulation

type FixedPageMetrics

type FixedPageMetrics struct {
	FixedScrollMetrics
	// contains filtered or unexported fields
}

FixedPageMetrics is an immutable snapshot of PageMetrics. The scroll notifications of a PageView carry one.

Deviation: Dart's PageMetrics is a class; here it is an interface that FixedPageMetrics and the page view's position implement (SPEC §12.10).

Flutter: widgets/page_view.dart PageMetrics

func NewFixedPageMetrics

func NewFixedPageMetrics(minScrollExtent, maxScrollExtent, pixels, viewportDimension foundation.Opt[float64], axisDirection painting.AxisDirection, viewportFraction, devicePixelRatio float64) *FixedPageMetrics

NewFixedPageMetrics creates a snapshot. A value that is none is missing: reading it panics with the tag ScrollMetricsValueMissing.

Flutter: widgets/page_view.dart PageMetrics.new

func (*FixedPageMetrics) CopyWith

func (m *FixedPageMetrics) CopyWith(changes ...ScrollMetricsChanges) ScrollMetrics

CopyWith is a copy with the changes, and the same viewport fraction.

Flutter: widgets/page_view.dart PageMetrics.copyWith

func (*FixedPageMetrics) Page

Page is the current page.

Flutter: widgets/page_view.dart PageMetrics.page

func (*FixedPageMetrics) ViewportFraction

func (m *FixedPageMetrics) ViewportFraction() float64

ViewportFraction is the fraction of the viewport that each page occupies.

Flutter: widgets/page_view.dart PageMetrics.viewportFraction

type FixedScrollMetrics

type FixedScrollMetrics struct {
	ScrollMetricsMixin
	// contains filtered or unexported fields
}

FixedScrollMetrics is an immutable snapshot of ScrollMetrics. The scroll notifications carry one.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics

func NewFixedScrollMetrics

func NewFixedScrollMetrics(minScrollExtent, maxScrollExtent, pixels, viewportDimension foundation.Opt[float64], axisDirection painting.AxisDirection, devicePixelRatio float64) *FixedScrollMetrics

NewFixedScrollMetrics creates a snapshot. A value that is none is missing: reading it panics with the tag ScrollMetricsValueMissing.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.new

func (*FixedScrollMetrics) AxisDirection

func (m *FixedScrollMetrics) AxisDirection() painting.AxisDirection

AxisDirection is the direction in which the scroll offset increases.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.axisDirection

func (*FixedScrollMetrics) DevicePixelRatio

func (m *FixedScrollMetrics) DevicePixelRatio() float64

DevicePixelRatio is the device pixel ratio of the display.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.devicePixelRatio

func (*FixedScrollMetrics) HasContentDimensions

func (m *FixedScrollMetrics) HasContentDimensions() bool

HasContentDimensions is whether both scroll extents are known.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.hasContentDimensions

func (*FixedScrollMetrics) HasPixels

func (m *FixedScrollMetrics) HasPixels() bool

HasPixels is whether the scroll position is known.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.hasPixels

func (*FixedScrollMetrics) HasViewportDimension

func (m *FixedScrollMetrics) HasViewportDimension() bool

HasViewportDimension is whether the viewport extent is known.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.hasViewportDimension

func (*FixedScrollMetrics) MaxScrollExtent

func (m *FixedScrollMetrics) MaxScrollExtent() float64

MaxScrollExtent is the maximum in-range value for Pixels.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.maxScrollExtent

func (*FixedScrollMetrics) MinScrollExtent

func (m *FixedScrollMetrics) MinScrollExtent() float64

MinScrollExtent is the minimum in-range value for Pixels.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.minScrollExtent

func (*FixedScrollMetrics) Pixels

func (m *FixedScrollMetrics) Pixels() float64

Pixels is the scroll position.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.pixels

func (*FixedScrollMetrics) String

func (m *FixedScrollMetrics) String() string

String describes the extents before, inside and after the viewport.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.toString

func (*FixedScrollMetrics) ViewportDimension

func (m *FixedScrollMetrics) ViewportDimension() float64

ViewportDimension is the extent of the viewport.

Flutter: widgets/scroll_metrics.dart FixedScrollMetrics.viewportDimension

type Flex

type Flex struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

Flex displays its children in a one-dimensional array. Use Row or Column when the direction is known.

Flutter: widgets/basic.dart Flex

func NewFlex

func NewFlex(direction painting.Axis, children []Widget, opts ...FlexOpts) *Flex

NewFlex creates the widget.

Flutter: widgets/basic.dart Flex.new

func (*Flex) ClipBehavior

func (w *Flex) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped when it overflows; the default is ClipNone.

Flutter: widgets/basic.dart Flex.clipBehavior

func (*Flex) CreateRenderObject

func (w *Flex) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Flex.createRenderObject

func (*Flex) CrossAxisAlignment

func (w *Flex) CrossAxisAlignment() rendering.CrossAxisAlignment

CrossAxisAlignment is how the children are placed along the cross axis; the default is CrossAxisAlignmentCenter.

Flutter: widgets/basic.dart Flex.crossAxisAlignment

func (*Flex) Direction

func (w *Flex) Direction() painting.Axis

Direction is the direction to use as the main axis.

Flutter: widgets/basic.dart Flex.direction

func (*Flex) MainAxisAlignment

func (w *Flex) MainAxisAlignment() rendering.MainAxisAlignment

MainAxisAlignment is how the children are placed along the main axis; the default is MainAxisAlignmentStart.

Flutter: widgets/basic.dart Flex.mainAxisAlignment

func (*Flex) MainAxisSize

func (w *Flex) MainAxisSize() rendering.MainAxisSize

MainAxisSize is how much space is occupied along the main axis; the default is MainAxisSizeMax.

Flutter: widgets/basic.dart Flex.mainAxisSize

func (*Flex) Spacing

func (w *Flex) Spacing() float64

Spacing is the space between the children along the main axis.

Flutter: widgets/basic.dart Flex.spacing

func (*Flex) TextBaseline

func (w *Flex) TextBaseline() ui.TextBaseline

TextBaseline is the baseline to use when the cross axis alignment is baseline.

Flutter: widgets/basic.dart Flex.textBaseline

func (*Flex) TextDirection

func (w *Flex) TextDirection() ui.TextDirection

TextDirection is the order in which a horizontal flex lays out its children; the default is the one of the closest Directionality.

Flutter: widgets/basic.dart Flex.textDirection

func (*Flex) UpdateRenderObject

func (w *Flex) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Flex.updateRenderObject

func (*Flex) VerticalDirection

func (w *Flex) VerticalDirection() painting.VerticalDirection

VerticalDirection is the order in which a vertical flex lays out its children; the default is VerticalDirectionDown.

Flutter: widgets/basic.dart Flex.verticalDirection

type FlexOpts

type FlexOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// MainAxisAlignment is how the children are placed along the main axis; the default is MainAxisAlignmentStart.
	MainAxisAlignment rendering.MainAxisAlignment
	// MainAxisSize is how much space is occupied along the main axis; the default is MainAxisSizeMax.
	MainAxisSize rendering.MainAxisSize
	// CrossAxisAlignment is how the children are placed along the cross axis; the default is CrossAxisAlignmentCenter.
	CrossAxisAlignment rendering.CrossAxisAlignment
	// TextDirection is the order in which a horizontal flex lays out its children; the default is the one of the closest Directionality.
	TextDirection ui.TextDirection
	// VerticalDirection is the order in which a vertical flex lays out its children; the default is VerticalDirectionDown.
	VerticalDirection painting.VerticalDirection
	// TextBaseline is the baseline to use when the cross axis alignment is baseline.
	TextBaseline ui.TextBaseline
	// ClipBehavior is whether the content is clipped when it overflows; the default is ClipNone.
	ClipBehavior ui.Clip
	// Spacing is the space between the children along the main axis.
	Spacing float64
}

FlexOpts are the optional parameters of NewFlex.

Flutter: widgets/basic.dart Flex.new

type Flexible

type Flexible struct {
	ParentDataWidgetOf[*rendering.FlexParentData]
	// contains filtered or unexported fields
}

Flexible controls how a child of a Row, Column or Flex flexes.

Flutter: widgets/basic.dart Flexible

func NewFlexible

func NewFlexible(child Widget, opts ...FlexibleOpts) *Flexible

NewFlexible creates a widget that controls how a child of a Row, Column or Flex flexes.

Flutter: widgets/basic.dart Flexible.new

func (*Flexible) ApplyParentData

func (w *Flexible) ApplyParentData(renderObject rendering.RenderObject)

ApplyParentData writes the flex factor and the fit to the parent data of the render object.

Flutter: widgets/basic.dart Flexible.applyParentData

func (*Flexible) DebugTypicalAncestorWidgetClass

func (*Flexible) DebugTypicalAncestorWidgetClass() string

DebugTypicalAncestorWidgetClass is the name of the widget this one belongs in.

Flutter: widgets/basic.dart Flexible.debugTypicalAncestorWidgetClass

func (*Flexible) Fit

func (w *Flexible) Fit() rendering.FlexFit

Fit is how a flexible child is inscribed into the available space.

Flutter: widgets/basic.dart Flexible.fit

func (*Flexible) Flex

func (w *Flexible) Flex() int

Flex is the flex factor to use for this child.

Flutter: widgets/basic.dart Flexible.flex

type FlexibleOpts

type FlexibleOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Flex is the flex factor to use for this child; the default is 1. A child
	// with flex 0 is not flexible.
	Flex foundation.Opt[int]
	// Fit is how a flexible child is inscribed into the available space; the
	// default is FlexFitLoose.
	Fit rendering.FlexFit
}

FlexibleOpts are the optional parameters of NewFlexible.

Flutter: widgets/basic.dart Flexible.new

type Flow

type Flow struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

Flow implements the flow layout algorithm: a delegate positions and paints the children.

Flutter: widgets/basic.dart Flow

func NewFlow

func NewFlow(delegate rendering.FlowDelegate, children []Widget, opts ...FlowOpts) *Flow

NewFlow creates a flow whose children are wrapped in repaint boundaries, as Flow.new does.

Flutter: widgets/basic.dart Flow.new

func (*Flow) ClipBehavior

func (w *Flow) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped when it overflows; the default is ClipHardEdge.

Flutter: widgets/basic.dart Flow.clipBehavior

func (*Flow) CreateRenderObject

func (w *Flow) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Flow.createRenderObject

func (*Flow) Delegate

func (w *Flow) Delegate() rendering.FlowDelegate

Delegate controls the size of the flow and the layout of the children.

Flutter: widgets/basic.dart Flow.delegate

func (*Flow) UpdateRenderObject

func (w *Flow) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Flow.updateRenderObject

type FlowOpts

type FlowOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ClipBehavior is whether the content is clipped when it overflows; the default is ClipHardEdge.
	ClipBehavior ui.Clip
}

FlowOpts are the optional parameters of NewFlow.

Flutter: widgets/basic.dart Flow.new

type Focus

type Focus struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Focus manages the focus of a widget subtree: it owns a FocusNode (or uses the one given), puts it in the focus tree, and handles key events for it. The nearest Focus above a context is found with FocusOf.

Flutter: widgets/focus_scope.dart Focus

func NewFocus

func NewFocus(child Widget, opts ...FocusOpts) *Focus

NewFocus creates a Focus widget.

Flutter: widgets/focus_scope.dart Focus.new

func NewFocusWithExternalFocusNode

func NewFocusWithExternalFocusNode(focusNode *FocusNode, child Widget, opts ...FocusWithExternalFocusNodeOpts) *Focus

NewFocusWithExternalFocusNode creates a Focus widget that follows the node given: its properties (key handler, whether it can be focused, whether it is skipped) are the node's, and the widget never changes them.

Flutter: widgets/focus_scope.dart Focus.withExternalFocusNode

func (*Focus) Autofocus

func (w *Focus) Autofocus() bool

Autofocus is whether the widget asks for the focus when it is built.

Flutter: widgets/focus_scope.dart Focus.autofocus

func (*Focus) CanRequestFocus

func (w *Focus) CanRequestFocus() bool

CanRequestFocus is whether the node can take the focus: the widget's value, else the node's, else true.

Flutter: widgets/focus_scope.dart Focus.canRequestFocus

func (*Focus) Child

func (w *Focus) Child() Widget

Child is the widget below.

Flutter: widgets/focus_scope.dart Focus.child

func (*Focus) CreateState

func (w *Focus) CreateState() State

CreateState creates the state.

Flutter: widgets/focus_scope.dart Focus.createState

func (*Focus) DebugFillProperties

func (w *Focus) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the focus options of the widget.

Flutter: widgets/focus_scope.dart Focus.debugFillProperties

func (*Focus) DebugLabel

func (w *Focus) DebugLabel() string

DebugLabel is the name of the node: the widget's, else the node's.

Flutter: widgets/focus_scope.dart Focus.debugLabel

func (*Focus) DescendantsAreFocusable

func (w *Focus) DescendantsAreFocusable() bool

DescendantsAreFocusable is whether the descendants can take the focus.

Flutter: widgets/focus_scope.dart Focus.descendantsAreFocusable

func (*Focus) DescendantsAreTraversable

func (w *Focus) DescendantsAreTraversable() bool

DescendantsAreTraversable is whether focus traversal visits the descendants.

Flutter: widgets/focus_scope.dart Focus.descendantsAreTraversable

func (*Focus) FocusNode

func (w *Focus) FocusNode() *FocusNode

FocusNode is the node given to the widget, or nil.

Flutter: widgets/focus_scope.dart Focus.focusNode

func (*Focus) IncludeSemantics

func (w *Focus) IncludeSemantics() bool

IncludeSemantics is whether the widget adds a Semantics node for the focus.

Flutter: widgets/focus_scope.dart Focus.includeSemantics

func (*Focus) OnFocusChange

func (w *Focus) OnFocusChange() func(bool)

OnFocusChange is the function called when the focus changes.

Flutter: widgets/focus_scope.dart Focus.onFocusChange

func (*Focus) OnKeyEvent

func (w *Focus) OnKeyEvent() FocusOnKeyEventCallback

OnKeyEvent is the key handler of the widget: its own, or the node's.

Flutter: widgets/focus_scope.dart Focus.onKeyEvent

func (*Focus) ParentNode

func (w *Focus) ParentNode() *FocusNode

ParentNode is the node that becomes the parent of the widget's node, or nil.

Flutter: widgets/focus_scope.dart Focus.parentNode

func (*Focus) SkipTraversal

func (w *Focus) SkipTraversal() bool

SkipTraversal is whether focus traversal skips the node.

Flutter: widgets/focus_scope.dart Focus.skipTraversal

type FocusAttachment

type FocusAttachment struct {
	// contains filtered or unexported fields
}

FocusAttachment lets a widget attach a FocusNode to the focus tree and maintain the node's place in it: Focus and FocusScope do. The node's Attach makes one.

Flutter: widgets/focus_manager.dart FocusAttachment

func (*FocusAttachment) Detach

func (a *FocusAttachment) Detach()

Detach removes the node from the focus tree (unfocusing it first if it had the focus), so that it stops being notified.

Flutter: widgets/focus_manager.dart FocusAttachment.detach

func (*FocusAttachment) IsAttached

func (a *FocusAttachment) IsAttached() bool

IsAttached is whether the node is attached to this attachment.

Flutter: widgets/focus_manager.dart FocusAttachment.isAttached

func (*FocusAttachment) Reparent

func (a *FocusAttachment) Reparent(parent ...*FocusNode)

Reparent makes the node a child of the parent given, or of the nearest Focus or FocusScope above its context, or of the root scope. It does nothing for a detached attachment.

Flutter: widgets/focus_manager.dart FocusAttachment.reparent

type FocusHandlerHandle

type FocusHandlerHandle struct {
	// contains filtered or unexported fields
}

FocusHandlerHandle identifies a handler or a listener that was added to a FocusManager, to remove it (Go functions are not comparable).

Flutter: no counterpart

type FocusHighlightMode

type FocusHighlightMode int

FocusHighlightMode is how focus is shown: whether a focused widget should look focused when it has the focus after a pointer or a keyboard interaction.

Flutter: widgets/focus_manager.dart FocusHighlightMode

const (
	// FocusHighlightModeUnspecified is the zero value: no mode is known.
	//
	// Flutter: no counterpart
	FocusHighlightModeUnspecified FocusHighlightMode = iota
	// FocusHighlightModeTouch is for touch interaction: widgets that take the
	// focus do not show it, except for text fields.
	//
	// Flutter: widgets/focus_manager.dart FocusHighlightMode.touch
	FocusHighlightModeTouch
	// FocusHighlightModeTraditional is for mouse and keyboard interaction:
	// the focus is shown.
	//
	// Flutter: widgets/focus_manager.dart FocusHighlightMode.traditional
	FocusHighlightModeTraditional
)

The values of FocusHighlightMode follow Flutter's declaration order.

func (FocusHighlightMode) String

func (m FocusHighlightMode) String() string

String is the name of the mode, like Dart's enum toString.

Flutter: widgets/focus_manager.dart FocusHighlightMode

type FocusHighlightStrategy

type FocusHighlightStrategy int

FocusHighlightStrategy is how the FocusManager chooses the highlight mode.

Flutter: widgets/focus_manager.dart FocusHighlightStrategy

const (
	// FocusHighlightStrategyUnspecified is the zero value: automatic.
	//
	// Flutter: no counterpart
	FocusHighlightStrategyUnspecified FocusHighlightStrategy = iota
	// FocusHighlightStrategyAutomatic follows the last interaction: touch after a
	// touch, traditional after a key.
	//
	// Flutter: widgets/focus_manager.dart FocusHighlightStrategy.automatic
	FocusHighlightStrategyAutomatic
	// FocusHighlightStrategyAlwaysTouch is always touch.
	//
	// Flutter: widgets/focus_manager.dart FocusHighlightStrategy.alwaysTouch
	FocusHighlightStrategyAlwaysTouch
	// FocusHighlightStrategyAlwaysTraditional is always traditional.
	//
	// Flutter: widgets/focus_manager.dart FocusHighlightStrategy.alwaysTraditional
	FocusHighlightStrategyAlwaysTraditional
)

The values of FocusHighlightStrategy follow Flutter's declaration order.

func (FocusHighlightStrategy) String

func (s FocusHighlightStrategy) String() string

String is the name of the strategy, like Dart's enum toString.

Flutter: widgets/focus_manager.dart FocusHighlightStrategy

type FocusManager

type FocusManager struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

FocusManager keeps the focus tree of an app and the primary focus in it. The binding makes one (WidgetsBinding.FocusManager); a build owner reaches it with BuildOwner.FocusManager.

Deviation: Flutter reads FocusManager.instance; Glutter has no singletons, so the manager is reached through the binding or the build owner (SPEC §12.10).

Flutter: widgets/focus_manager.dart FocusManager

func NewFocusManager

func NewFocusManager(binding *WidgetsBinding) *FocusManager

NewFocusManager creates a manager with the root scope, and listens to the lifecycle of the app of the binding on the platforms where focus is suspended when the app is inactive. The binding makes its own; this is for a test of the manager alone.

Flutter: widgets/focus_manager.dart FocusManager.new

func (*FocusManager) AddEarlyKeyEventHandler

func (m *FocusManager) AddEarlyKeyEventHandler(handler OnKeyEventCallback) FocusHandlerHandle

AddEarlyKeyEventHandler adds a handler that sees key events before the focus nodes do. If it handles the event, no node sees it. It sees every key event, also when no node has the primary focus (Flutter ignores the key then).

Flutter: widgets/focus_manager.dart FocusManager.addEarlyKeyEventHandler

func (*FocusManager) AddHighlightModeListener

func (m *FocusManager) AddHighlightModeListener(listener func(FocusHighlightMode)) FocusHandlerHandle

AddHighlightModeListener adds a function that is called when the highlight mode changes.

Flutter: widgets/focus_manager.dart FocusManager.addHighlightModeListener

func (*FocusManager) AddLateKeyEventHandler

func (m *FocusManager) AddLateKeyEventHandler(handler OnKeyEventCallback) FocusHandlerHandle

AddLateKeyEventHandler adds a handler that sees the key events that no focus node handled. It also sees the key events that arrive when no node has the primary focus, unless an early handler stopped them (Flutter ignores the key then).

Flutter: widgets/focus_manager.dart FocusManager.addLateKeyEventHandler

func (*FocusManager) ApplyFocusChangesIfNeeded

func (m *FocusManager) ApplyFocusChangesIfNeeded()

ApplyFocusChangesIfNeeded resolves the requests for the focus that were made since the last time: the autofocus requests, the node marked for focus, and the nodes whose state changed are notified. It runs in a microtask after a change; it may be called to resolve the changes at once, but not during the build phase.

Flutter: widgets/focus_manager.dart FocusManager.applyFocusChangesIfNeeded

func (*FocusManager) DebugDescribe

func (m *FocusManager) DebugDescribe() string

DebugDescribe describes the focus tree, as DebugDumpFocusTree prints it.

Flutter: widgets/focus_manager.dart debugDescribeFocusTree

func (*FocusManager) DebugDescribeChildren

func (m *FocusManager) DebugDescribeChildren() []foundation.DiagnosticsNode

DebugDescribeChildren is the root scope, named "rootScope".

Flutter: widgets/focus_manager.dart FocusManager.debugDescribeChildren

func (*FocusManager) DebugFillProperties

func (m *FocusManager) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the primary focus and the next focus.

Flutter: widgets/focus_manager.dart FocusManager.debugFillProperties

func (*FocusManager) Dispose

func (m *FocusManager) Dispose()

Dispose stops listening and disposes the root scope.

Flutter: widgets/focus_manager.dart FocusManager.dispose

func (*FocusManager) HighlightMode

func (m *FocusManager) HighlightMode() FocusHighlightMode

HighlightMode is how focus is highlighted now.

Flutter: widgets/focus_manager.dart FocusManager.highlightMode

func (*FocusManager) HighlightStrategy

func (m *FocusManager) HighlightStrategy() FocusHighlightStrategy

HighlightStrategy is how the highlight mode is chosen.

Flutter: widgets/focus_manager.dart FocusManager.highlightStrategy

func (*FocusManager) PrimaryFocus

func (m *FocusManager) PrimaryFocus() *FocusNode

PrimaryFocus is the node that has the primary focus, or nil.

Flutter: widgets/focus_manager.dart FocusManager.primaryFocus

func (*FocusManager) RegisterGlobalHandlers

func (m *FocusManager) RegisterGlobalHandlers()

RegisterGlobalHandlers listens to the key events and the pointer events, so that the focus system handles keys and follows the interaction for the highlight mode. The binding calls it.

Flutter: widgets/focus_manager.dart FocusManager.registerGlobalHandlers

func (*FocusManager) RemoveEarlyKeyEventHandler

func (m *FocusManager) RemoveEarlyKeyEventHandler(handle FocusHandlerHandle)

RemoveEarlyKeyEventHandler removes an early handler.

Flutter: widgets/focus_manager.dart FocusManager.removeEarlyKeyEventHandler

func (*FocusManager) RemoveHighlightModeListener

func (m *FocusManager) RemoveHighlightModeListener(handle FocusHandlerHandle)

RemoveHighlightModeListener removes a listener.

Flutter: widgets/focus_manager.dart FocusManager.removeHighlightModeListener

func (*FocusManager) RemoveLateKeyEventHandler

func (m *FocusManager) RemoveLateKeyEventHandler(handle FocusHandlerHandle)

RemoveLateKeyEventHandler removes a late handler.

Flutter: widgets/focus_manager.dart FocusManager.removeLateKeyEventHandler

func (*FocusManager) RootScope

func (m *FocusManager) RootScope() *FocusScopeNode

RootScope is the scope at the root of the focus tree.

Flutter: widgets/focus_manager.dart FocusManager.rootScope

func (*FocusManager) SetHighlightStrategy

func (m *FocusManager) SetHighlightStrategy(s FocusHighlightStrategy)

SetHighlightStrategy sets how the highlight mode is chosen.

Flutter: widgets/focus_manager.dart FocusManager.highlightStrategy

type FocusNode

type FocusNode struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

FocusNode is an object that can be used by a stateful widget to obtain the keyboard focus and to handle keyboard events. A node is part of the focus tree once a widget attaches it with Attach; the FocusManager keeps one primary focus in the tree.

A FocusScopeNode is a FocusNode too: it embeds one, and AsScope turns a node back into its scope.

The listeners of a node (AddListener) are called when the focus changes. A node that leaves the focus tree while it has the focus (HasFocus) notifies its listeners once at the next focus update, with HasFocus false. To hear it from a Focus that leaves the tree, give the Focus a node you own and listen to it: Focus.OnFocusChange is not called then, since the widget is gone (SPEC §11.7).

Deviation: Flutter's FocusNode can be subclassed to override its getters; a node here is a plain struct (SPEC §12.10). A node is created with NewFocusNode, is disposed with Dispose, and the focus tree is reached through a FocusManager, never a global.

Flutter: widgets/focus_manager.dart FocusNode

func FocusMaybeOf

func FocusMaybeOf(bc BuildContext, opts ...FocusOfOpts) *FocusNode

FocusMaybeOf is FocusOf that returns nil instead of panicking.

Flutter: widgets/focus_scope.dart Focus.maybeOf

func FocusOf

func FocusOf(bc BuildContext, opts ...FocusOfOpts) *FocusNode

FocusOf is the focus node of the nearest Focus above the context, and the context depends on it by default. It panics with the tag FocusNotFound when there is none, and with FocusScopeFound when the nearest one is a FocusScope and ScopeOK is not set.

Flutter: widgets/focus_scope.dart Focus.of

func NewFocusNode

func NewFocusNode(opts ...FocusNodeOpts) *FocusNode

NewFocusNode creates a focus node.

Flutter: widgets/focus_manager.dart FocusNode.new

func PrimaryFocus

func PrimaryFocus(bc BuildContext) *FocusNode

PrimaryFocus is the node that has the primary focus in the app of the context, or nil.

Flutter: widgets/focus_manager.dart primaryFocus

func ReadingOrderSort

func ReadingOrderSort(nodes []*FocusNode) []*FocusNode

ReadingOrderSort sorts the nodes in reading order, with the directionality of the context of each node.

Flutter: widgets/focus_traversal.dart ReadingOrderTraversalPolicy.sort

func (*FocusNode) Ancestors

func (n *FocusNode) Ancestors() []*FocusNode

Ancestors are the nodes above, nearest first.

Flutter: widgets/focus_manager.dart FocusNode.ancestors

func (*FocusNode) AsScope

func (n *FocusNode) AsScope() *FocusScopeNode

AsScope is the scope that the node is the base of, or nil for a node that is not a scope (Dart's "node is FocusScopeNode").

Flutter: widgets/focus_manager.dart FocusScopeNode

func (*FocusNode) Attach

func (n *FocusNode) Attach(bc BuildContext, opts ...AttachOpts) *FocusAttachment

Attach gives the node its context and returns the attachment that the widget uses to put the node in the focus tree (Reparent) and take it out (Detach).

Flutter: widgets/focus_manager.dart FocusNode.attach

func (*FocusNode) CanRequestFocus

func (n *FocusNode) CanRequestFocus() bool

CanRequestFocus is whether the node can take the focus: it can when it says so and all its ancestors let their descendants be focusable.

Flutter: widgets/focus_manager.dart FocusNode.canRequestFocus

func (*FocusNode) Children

func (n *FocusNode) Children() []*FocusNode

Children are the nodes below, in the order they were attached.

Flutter: widgets/focus_manager.dart FocusNode.children

func (*FocusNode) ConsumeKeyboardToken

func (n *FocusNode) ConsumeKeyboardToken() bool

ConsumeKeyboardToken returns true once after the node requested the focus, telling the caller that the keyboard may be shown for it.

Flutter: widgets/focus_manager.dart FocusNode.consumeKeyboardToken

func (*FocusNode) Context

func (n *FocusNode) Context() BuildContext

Context is the context of the widget that attached the node, or nil.

Flutter: widgets/focus_manager.dart FocusNode.context

func (*FocusNode) DebugDescribeChildren

func (n *FocusNode) DebugDescribeChildren() []foundation.DiagnosticsNode

DebugDescribeChildren describes the children, named "Child 1", "Child 2", ….

Flutter: widgets/focus_manager.dart FocusNode.debugDescribeChildren

func (*FocusNode) DebugFillProperties

func (n *FocusNode) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the focus state of the node.

Flutter: widgets/focus_manager.dart FocusNode.debugFillProperties

func (*FocusNode) DebugLabel

func (n *FocusNode) DebugLabel() string

DebugLabel is the name of the node in debug output.

Flutter: widgets/focus_manager.dart FocusNode.debugLabel

func (*FocusNode) Descendants

func (n *FocusNode) Descendants() []*FocusNode

Descendants are all the nodes below, depth first, each node after its own descendants. A scope's descendants include the ones in nested scopes.

Flutter: widgets/focus_manager.dart FocusNode.descendants

func (*FocusNode) DescendantsAreFocusable

func (n *FocusNode) DescendantsAreFocusable() bool

DescendantsAreFocusable is whether the descendants of the node can take the focus. For a scope it also needs the scope itself to be focusable.

Flutter: widgets/focus_manager.dart FocusNode.descendantsAreFocusable

func (*FocusNode) DescendantsAreTraversable

func (n *FocusNode) DescendantsAreTraversable() bool

DescendantsAreTraversable is whether focus traversal visits the descendants.

Flutter: widgets/focus_manager.dart FocusNode.descendantsAreTraversable

func (*FocusNode) Dispose

func (n *FocusNode) Dispose()

Dispose detaches the node (unfocusing it) and releases its listeners.

Flutter: widgets/focus_manager.dart FocusNode.dispose

func (*FocusNode) EnclosingScope

func (n *FocusNode) EnclosingScope() *FocusScopeNode

EnclosingScope is the nearest scope above the node, or nil.

Flutter: widgets/focus_manager.dart FocusNode.enclosingScope

func (*FocusNode) FocusInDirection

func (n *FocusNode) FocusInDirection(direction TraversalDirection) bool

FocusInDirection moves the focus to the closest node in the direction. It returns whether the focus moved.

Flutter: widgets/focus_manager.dart FocusNode.focusInDirection

func (*FocusNode) HasFocus

func (n *FocusNode) HasFocus() bool

HasFocus is whether the node or a descendant has the primary focus.

Flutter: widgets/focus_manager.dart FocusNode.hasFocus

func (*FocusNode) HasPrimaryFocus

func (n *FocusNode) HasPrimaryFocus() bool

HasPrimaryFocus is whether the node is the primary focus.

Flutter: widgets/focus_manager.dart FocusNode.hasPrimaryFocus

func (*FocusNode) HighlightMode

func (n *FocusNode) HighlightMode() FocusHighlightMode

HighlightMode is how focus is highlighted now (see FocusHighlightMode). A node that is not attached to a manager gives the default for the platform.

Flutter: widgets/focus_manager.dart FocusNode.highlightMode

func (*FocusNode) NearestScope

func (n *FocusNode) NearestScope() *FocusScopeNode

NearestScope is the node's own scope if it is one, else the nearest scope above it; nil for a node outside any scope.

Flutter: widgets/focus_manager.dart FocusNode.nearestScope

func (*FocusNode) NextFocus

func (n *FocusNode) NextFocus() bool

NextFocus moves the focus to the next node in the focus traversal order, in the nearest FocusTraversalGroup. It returns whether the focus moved.

Flutter: widgets/focus_manager.dart FocusNode.nextFocus

func (*FocusNode) Offset

func (n *FocusNode) Offset() ui.Offset

Offset is the top left of the node's render object on the screen.

Flutter: widgets/focus_manager.dart FocusNode.offset

func (*FocusNode) OnKeyEvent

func (n *FocusNode) OnKeyEvent() FocusOnKeyEventCallback

OnKeyEvent is the function called for a key event when the node or a descendant has the focus.

Flutter: widgets/focus_manager.dart FocusNode.onKeyEvent

func (*FocusNode) Parent

func (n *FocusNode) Parent() *FocusNode

Parent is the node above in the focus tree, or nil.

Flutter: widgets/focus_manager.dart FocusNode.parent

func (*FocusNode) PreviousFocus

func (n *FocusNode) PreviousFocus() bool

PreviousFocus moves the focus to the previous node in the focus traversal order. It returns whether the focus moved.

Flutter: widgets/focus_manager.dart FocusNode.previousFocus

func (*FocusNode) Rect

func (n *FocusNode) Rect() ui.Rect

Rect is the bounds of the node's render object on the screen. It panics with the tag FocusNodeContextMissing when the node has no context yet.

Flutter: widgets/focus_manager.dart FocusNode.rect

func (*FocusNode) RequestFocus

func (n *FocusNode) RequestFocus(node ...*FocusNode)

RequestFocus requests the primary focus for the node, or for a descendant node that is given (a node that is not in the tree is attached to this one first). The focus changes when the manager next resolves the changes, usually a microtask later. A scope hands the focus to its focused child, down the tree.

Flutter: widgets/focus_manager.dart FocusNode.requestFocus

func (*FocusNode) SetCanRequestFocus

func (n *FocusNode) SetCanRequestFocus(value bool)

SetCanRequestFocus sets whether the node can take the focus. A node that has the focus and cannot any more loses it.

Flutter: widgets/focus_manager.dart FocusNode.canRequestFocus

func (*FocusNode) SetDebugLabel

func (n *FocusNode) SetDebugLabel(label string)

SetDebugLabel sets the name of the node; release builds ignore it.

Flutter: widgets/focus_manager.dart FocusNode.debugLabel

func (*FocusNode) SetDescendantsAreFocusable

func (n *FocusNode) SetDescendantsAreFocusable(value bool)

SetDescendantsAreFocusable sets whether the descendants can take the focus. The descendants that have the focus lose it.

Flutter: widgets/focus_manager.dart FocusNode.descendantsAreFocusable

func (*FocusNode) SetDescendantsAreTraversable

func (n *FocusNode) SetDescendantsAreTraversable(value bool)

SetDescendantsAreTraversable sets whether focus traversal visits the descendants.

Flutter: widgets/focus_manager.dart FocusNode.descendantsAreTraversable

func (*FocusNode) SetOnKeyEvent

func (n *FocusNode) SetOnKeyEvent(f FocusOnKeyEventCallback)

SetOnKeyEvent sets the function called for a key event.

Flutter: widgets/focus_manager.dart FocusNode.onKeyEvent

func (*FocusNode) SetSkipTraversal

func (n *FocusNode) SetSkipTraversal(value bool)

SetSkipTraversal sets whether focus traversal skips the node.

Flutter: widgets/focus_manager.dart FocusNode.skipTraversal

func (*FocusNode) Size

func (n *FocusNode) Size() ui.Size

Size is the size of the node's render object, from its context.

Flutter: widgets/focus_manager.dart FocusNode.size

func (*FocusNode) SkipTraversal

func (n *FocusNode) SkipTraversal() bool

SkipTraversal is whether the node is skipped by focus traversal: it is when it or one of its ancestors says so.

Flutter: widgets/focus_manager.dart FocusNode.skipTraversal

func (*FocusNode) String

func (n *FocusNode) String() string

String describes the node and its properties on one line.

Flutter: widgets/focus_manager.dart FocusNode.toString

func (*FocusNode) ToStringShort

func (n *FocusNode) ToStringShort() string

ToStringShort is the identity of the node with its label and focus state.

Flutter: widgets/focus_manager.dart FocusNode.toStringShort

func (*FocusNode) TraversalChildren

func (n *FocusNode) TraversalChildren() []*FocusNode

TraversalChildren are the children that focus traversal can visit.

Flutter: widgets/focus_manager.dart FocusNode.traversalChildren

func (*FocusNode) TraversalDescendants

func (n *FocusNode) TraversalDescendants() []*FocusNode

TraversalDescendants are the descendants that focus traversal can visit.

Flutter: widgets/focus_manager.dart FocusNode.traversalDescendants

func (*FocusNode) Unfocus

func (n *FocusNode) Unfocus(disposition ...UnfocusDisposition)

Unfocus removes the focus from the node or its descendants, if it has it. The disposition says where the focus goes; the default is the nearest scope.

Flutter: widgets/focus_manager.dart FocusNode.unfocus

type FocusNodeOpts

type FocusNodeOpts struct {
	// DebugLabel names the node in debug output.
	DebugLabel string
	// OnKeyEvent is called for a key event when the node or a descendant has the
	// focus.
	OnKeyEvent FocusOnKeyEventCallback
	// SkipTraversal makes focus traversal skip the node.
	SkipTraversal bool
	// CannotRequestFocus makes the node unable to take the focus (Flutter's
	// canRequestFocus is true by default).
	CannotRequestFocus bool
	// DescendantsAreNotFocusable makes the descendants unable to take the focus
	// (Flutter's descendantsAreFocusable is true by default).
	DescendantsAreNotFocusable bool
	// DescendantsAreNotTraversable makes focus traversal skip the descendants
	// (Flutter's descendantsAreTraversable is true by default).
	DescendantsAreNotTraversable bool
}

FocusNodeOpts are the optional parameters of NewFocusNode.

Flutter: widgets/focus_manager.dart FocusNode.new

type FocusOfOpts

type FocusOfOpts struct {
	// ScopeOK allows the node found to be a FocusScopeNode.
	ScopeOK bool
	// CreateDependency says whether the context depends on the node and is
	// rebuilt when its focus changes; the default is true.
	CreateDependency foundation.Opt[bool]
}

FocusOfOpts are the optional parameters of FocusOf and FocusMaybeOf.

Flutter: widgets/focus_scope.dart Focus.of

type FocusOnKeyEventCallback

type FocusOnKeyEventCallback func(node *FocusNode, event services.KeyEvent) KeyEventResult

FocusOnKeyEventCallback is the type of the function that a focus node calls for a key event, when it or a descendant has the focus.

Deviation: Flutter's deprecated FocusOnKeyCallback (RawKeyEvent) is not ported (SPEC §12.10).

Flutter: widgets/focus_manager.dart FocusOnKeyEventCallback

type FocusOpts

type FocusOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// FocusNode is the node the widget uses; without one the widget makes and
	// disposes its own. A node that is given is not disposed by the widget.
	FocusNode *FocusNode
	// ParentNode is the node that becomes the parent of the widget's node; the
	// default is the node of the nearest Focus or FocusScope above, or the root
	// scope.
	ParentNode *FocusNode
	// Autofocus asks for the focus when the widget is built, if nothing in the
	// scope has it.
	Autofocus bool
	// OnFocusChange is called with whether the node (or a descendant) has the
	// focus whenever that changes. It is not called when the widget leaves the
	// tree with the focus: to hear that, give the widget a FocusNode you own and
	// listen to it (see FocusNode, SPEC §11.7).
	OnFocusChange func(hasFocus bool)
	// OnKeyEvent is called for a key event when the node or a descendant has the
	// focus; the default is the one of FocusNode.
	OnKeyEvent FocusOnKeyEventCallback
	// CanRequestFocus is whether the node can take the focus; the default is the
	// one of FocusNode, or true.
	CanRequestFocus foundation.Opt[bool]
	// SkipTraversal is whether focus traversal skips the node; the default is the
	// one of FocusNode, or false.
	SkipTraversal foundation.Opt[bool]
	// DescendantsAreFocusable is whether the descendants can take the focus; the
	// default is the one of FocusNode, or true.
	DescendantsAreFocusable foundation.Opt[bool]
	// DescendantsAreTraversable is whether focus traversal visits the
	// descendants; the default is the one of FocusNode, or true.
	DescendantsAreTraversable foundation.Opt[bool]
	// ExcludeSemantics leaves out the Semantics node that tells the system the
	// widget is focusable and whether it has the focus (Flutter's
	// includeSemantics is true by default).
	ExcludeSemantics bool
	// DebugLabel names the node in debug output; the default is the one of
	// FocusNode.
	DebugLabel string
}

FocusOpts are the optional parameters of NewFocus.

Flutter: widgets/focus_scope.dart Focus.new

type FocusOrder

type FocusOrder interface {
	foundation.Diagnosticable
	// contains filtered or unexported methods
}

FocusOrder is the order of a node, for OrderedTraversalPolicy; the orders that are compared must be of the same kind.

Flutter: widgets/focus_traversal.dart FocusOrder

func FocusTraversalOrderMaybeOf

func FocusTraversalOrderMaybeOf(bc BuildContext) FocusOrder

FocusTraversalOrderMaybeOf is FocusTraversalOrderOf that returns nil instead of panicking.

Flutter: widgets/focus_traversal.dart FocusTraversalOrder.maybeOf

func FocusTraversalOrderOf

func FocusTraversalOrderOf(bc BuildContext) FocusOrder

FocusTraversalOrderOf is the order of the nearest FocusTraversalOrder above the context. It panics with the tag FocusTraversalOrderNotFound when there is none.

Flutter: widgets/focus_traversal.dart FocusTraversalOrder.of

type FocusScope

type FocusScope struct {
	Focus
}

FocusScope creates a FocusScopeNode that groups the focus nodes below it: they have the focus in turn, the scope remembers which one had it last, and focus traversal stays in the scope. FocusScopeOf finds the nearest one.

Flutter: widgets/focus_scope.dart FocusScope

func NewFocusScope

func NewFocusScope(child Widget, opts ...FocusScopeOpts) *FocusScope

NewFocusScope creates a FocusScope widget.

Flutter: widgets/focus_scope.dart FocusScope.new

func NewFocusScopeWithExternalFocusNode

func NewFocusScopeWithExternalFocusNode(focusScopeNode *FocusScopeNode, child Widget, opts ...FocusScopeWithExternalFocusNodeOpts) *FocusScope

NewFocusScopeWithExternalFocusNode creates a FocusScope widget that follows the scope node given, never changing its properties.

Flutter: widgets/focus_scope.dart FocusScope.withExternalFocusNode

func (*FocusScope) CreateState

func (w *FocusScope) CreateState() State

CreateState creates the state.

Flutter: widgets/focus_scope.dart FocusScope.createState

type FocusScopeNode

type FocusScopeNode struct {
	FocusNode
	// contains filtered or unexported fields
}

FocusScopeNode is a node that groups the focus nodes below it and remembers which of them had the focus last. Focus traversal stays inside the scope (see TraversalEdgeBehavior), and a Navigator route has one.

Flutter: widgets/focus_manager.dart FocusScopeNode

func FocusScopeOf

func FocusScopeOf(bc BuildContext, createDependency ...bool) *FocusScopeNode

FocusScopeOf is the nearest FocusScopeNode above the context, or the root scope of the focus tree when there is none; the context depends on it by default.

Flutter: widgets/focus_scope.dart FocusScope.of

func NewFocusScopeNode

func NewFocusScopeNode(opts ...FocusScopeNodeOpts) *FocusScopeNode

NewFocusScopeNode creates a focus scope node.

Flutter: widgets/focus_manager.dart FocusScopeNode.new

func (*FocusScopeNode) Autofocus

func (s *FocusScopeNode) Autofocus(node *FocusNode)

Autofocus requests the focus for the node when the scope has no focused child, when the manager next resolves focus changes (a node that is not in the tree is attached below the scope first).

Flutter: widgets/focus_manager.dart FocusScopeNode.autofocus

func (*FocusScopeNode) DirectionalTraversalEdgeBehavior

func (s *FocusScopeNode) DirectionalTraversalEdgeBehavior() TraversalEdgeBehavior

DirectionalTraversalEdgeBehavior is what directional focus does at the edge of the scope.

Flutter: widgets/focus_manager.dart FocusScopeNode.directionalTraversalEdgeBehavior

func (*FocusScopeNode) FocusedChild

func (s *FocusScopeNode) FocusedChild() *FocusNode

FocusedChild is the child that has the focus, or would have it when the scope gets it; nil if there is none.

Flutter: widgets/focus_manager.dart FocusScopeNode.focusedChild

func (*FocusScopeNode) IsFirstFocus

func (s *FocusScopeNode) IsFirstFocus() bool

IsFirstFocus is whether the scope is the focused child of its own enclosing scope.

Flutter: widgets/focus_manager.dart FocusScopeNode.isFirstFocus

func (*FocusScopeNode) Node

func (s *FocusScopeNode) Node() *FocusNode

Node is the scope as a FocusNode, for the APIs that take any node.

Flutter: widgets/focus_manager.dart FocusScopeNode

func (*FocusScopeNode) RequestScopeFocus

func (s *FocusScopeNode) RequestScopeFocus()

RequestScopeFocus requests the focus for the scope itself, not for its focused child.

Flutter: widgets/focus_manager.dart FocusScopeNode.requestScopeFocus

func (*FocusScopeNode) SetDirectionalTraversalEdgeBehavior

func (s *FocusScopeNode) SetDirectionalTraversalEdgeBehavior(b TraversalEdgeBehavior)

SetDirectionalTraversalEdgeBehavior sets what directional focus does at the edge.

Flutter: widgets/focus_manager.dart FocusScopeNode.directionalTraversalEdgeBehavior

func (*FocusScopeNode) SetFirstFocus

func (s *FocusScopeNode) SetFirstFocus(scope *FocusScopeNode)

SetFirstFocus makes the scope the one that takes the focus first when this scope gets it. A scope that is not in the tree is attached below this one.

Flutter: widgets/focus_manager.dart FocusScopeNode.setFirstFocus

func (*FocusScopeNode) SetTraversalEdgeBehavior

func (s *FocusScopeNode) SetTraversalEdgeBehavior(b TraversalEdgeBehavior)

SetTraversalEdgeBehavior sets what next and previous focus do at the edge.

Flutter: widgets/focus_manager.dart FocusScopeNode.traversalEdgeBehavior

func (*FocusScopeNode) TraversalEdgeBehavior

func (s *FocusScopeNode) TraversalEdgeBehavior() TraversalEdgeBehavior

TraversalEdgeBehavior is what next and previous focus do at the edge of the scope.

Flutter: widgets/focus_manager.dart FocusScopeNode.traversalEdgeBehavior

type FocusScopeNodeOpts

type FocusScopeNodeOpts struct {
	FocusNodeOpts
	// TraversalEdgeBehavior is what happens when next or previous focus reaches
	// the edge of the scope; the default is TraversalEdgeBehaviorClosedLoop.
	TraversalEdgeBehavior TraversalEdgeBehavior
	// DirectionalTraversalEdgeBehavior is what happens when directional focus
	// reaches the edge of the scope; the default is TraversalEdgeBehaviorStop.
	DirectionalTraversalEdgeBehavior TraversalEdgeBehavior
}

FocusScopeNodeOpts are the optional parameters of NewFocusScopeNode.

Flutter: widgets/focus_manager.dart FocusScopeNode.new

type FocusScopeOpts

type FocusScopeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Node is the scope node the widget uses; without one the widget makes and
	// disposes its own.
	Node *FocusScopeNode
	// ParentNode is the node that becomes the parent of the scope's node.
	ParentNode *FocusNode
	// Autofocus asks for the focus when the widget is built.
	Autofocus bool
	// OnFocusChange is called with whether the scope has the focus.
	OnFocusChange func(hasFocus bool)
	// CanRequestFocus is whether the scope can take the focus; the default is the
	// one of Node, or true.
	CanRequestFocus foundation.Opt[bool]
	// SkipTraversal is whether focus traversal skips the scope.
	SkipTraversal foundation.Opt[bool]
	// OnKeyEvent is called for a key event when a node of the scope has the focus.
	OnKeyEvent FocusOnKeyEventCallback
	// DebugLabel names the node in debug output.
	DebugLabel string
	// ExcludeSemantics leaves out the Semantics node.
	ExcludeSemantics bool
	// DescendantsAreFocusable is whether the nodes in the scope can take the
	// focus.
	DescendantsAreFocusable foundation.Opt[bool]
	// DescendantsAreTraversable is whether focus traversal visits the nodes in
	// the scope.
	DescendantsAreTraversable foundation.Opt[bool]
}

FocusScopeOpts are the optional parameters of NewFocusScope.

Flutter: widgets/focus_scope.dart FocusScope.new

type FocusScopeWithExternalFocusNodeOpts

type FocusScopeWithExternalFocusNodeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ParentNode is the node that becomes the parent of the scope's node.
	ParentNode *FocusNode
	// Autofocus asks for the focus when the widget is built.
	Autofocus bool
	// ExcludeSemantics leaves out the Semantics node.
	ExcludeSemantics bool
	// OnFocusChange is called with whether the scope has the focus.
	OnFocusChange func(hasFocus bool)
}

FocusScopeWithExternalFocusNodeOpts are the optional parameters of NewFocusScopeWithExternalFocusNode.

Flutter: widgets/focus_scope.dart FocusScope.withExternalFocusNode

type FocusTraversalGroup

type FocusTraversalGroup struct {
	StatefulWidget
	// contains filtered or unexported fields
}

FocusTraversalGroup establishes a policy for the focus traversal of the widgets below it, and groups them: traversal visits all the nodes of a group before it goes on to the next node.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup

func NewFocusTraversalGroup

func NewFocusTraversalGroup(child Widget, opts ...FocusTraversalGroupOpts) *FocusTraversalGroup

NewFocusTraversalGroup creates the widget.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.new

func (*FocusTraversalGroup) Child

func (w *FocusTraversalGroup) Child() Widget

Child is the widget below.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.child

func (*FocusTraversalGroup) CreateState

func (w *FocusTraversalGroup) CreateState() State

CreateState creates the state.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.createState

func (*FocusTraversalGroup) DebugFillProperties

func (w *FocusTraversalGroup) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the policy.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.debugFillProperties

func (*FocusTraversalGroup) Policy

Policy is the policy of the group.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.policy

type FocusTraversalGroupOpts

type FocusTraversalGroupOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Policy is the policy of the group; the default is
	// ReadingOrderTraversalPolicy.
	Policy FocusTraversalPolicy
	// DescendantsAreNotFocusable makes the descendants unable to take the focus
	// (Flutter's descendantsAreFocusable is true by default).
	DescendantsAreNotFocusable bool
	// DescendantsAreNotTraversable makes traversal skip the descendants (Flutter's
	// descendantsAreTraversable is true by default).
	DescendantsAreNotTraversable bool
	// OnFocusNodeCreated is called with the node the group makes.
	OnFocusNodeCreated func(*FocusNode)
	// ParentNode is the node that becomes the parent of the group's node.
	ParentNode *FocusNode
}

FocusTraversalGroupOpts are the optional parameters of NewFocusTraversalGroup.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.new

type FocusTraversalOrder

type FocusTraversalOrder struct {
	InheritedWidget
	// contains filtered or unexported fields
}

FocusTraversalOrder is a widget that describes the order of its descendant focus nodes in an OrderedTraversalPolicy.

Flutter: widgets/focus_traversal.dart FocusTraversalOrder

func NewFocusTraversalOrder

func NewFocusTraversalOrder(order FocusOrder, child Widget, opts ...WidgetOpts) *FocusTraversalOrder

NewFocusTraversalOrder creates the widget.

Flutter: widgets/focus_traversal.dart FocusTraversalOrder.new

func (*FocusTraversalOrder) DebugFillProperties

func (w *FocusTraversalOrder) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the order.

Flutter: widgets/focus_traversal.dart FocusTraversalOrder.debugFillProperties

func (*FocusTraversalOrder) Order

func (w *FocusTraversalOrder) Order() FocusOrder

Order is the order of the descendant nodes.

Flutter: widgets/focus_traversal.dart FocusTraversalOrder.order

func (*FocusTraversalOrder) UpdateShouldNotify

func (w *FocusTraversalOrder) UpdateShouldNotify(Widget) bool

UpdateShouldNotify is false: the order of traversal does not affect the display of anything, so nothing needs to rebuild.

Flutter: widgets/focus_traversal.dart FocusTraversalOrder.updateShouldNotify

type FocusTraversalPolicy

type FocusTraversalPolicy interface {
	foundation.Diagnosticable
	// RequestFocusCallback is the function that gives the focus to a node.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.requestFocusCallback
	RequestFocusCallback() TraversalRequestFocusCallback
	// FindFirstFocus is the node that gets the focus first when focus moves into
	// the scope of the node: the focused child of the scope, else the first of the
	// sorted descendants, else the node itself.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.findFirstFocus
	FindFirstFocus(currentNode *FocusNode, ignoreCurrentFocus ...bool) *FocusNode
	// FindLastFocus is like FindFirstFocus but picks the last node.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.findLastFocus
	FindLastFocus(currentNode *FocusNode, ignoreCurrentFocus ...bool) *FocusNode
	// FindFirstFocusInDirection is the node that gets the focus first when the
	// focus moves into the scope in the direction.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.findFirstFocusInDirection
	FindFirstFocusInDirection(currentNode *FocusNode, direction TraversalDirection) *FocusNode
	// InvalidateScopeData drops what the policy remembers about the scope.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.invalidateScopeData
	InvalidateScopeData(node *FocusScopeNode)
	// ChangedScope is called when a node moved from a scope to another.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.changedScope
	ChangedScope(node *FocusNode, oldScope *FocusScopeNode)
	// Next moves the focus to the next node and returns whether it moved.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.next
	Next(currentNode *FocusNode) bool
	// Previous moves the focus to the previous node and returns whether it moved.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.previous
	Previous(currentNode *FocusNode) bool
	// InDirection moves the focus to the closest node in the direction and
	// returns whether it moved.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.inDirection
	InDirection(currentNode *FocusNode, direction TraversalDirection) bool
	// SortDescendants returns the nodes in traversal order; currentNode is the
	// node being traversed from.
	//
	// Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.sortDescendants
	SortDescendants(descendants []*FocusNode, currentNode *FocusNode) []*FocusNode
}

FocusTraversalPolicy defines how the focus moves between the nodes of a FocusTraversalGroup: in what order Next and Previous visit them, and which node is next in a direction. Implement it by embedding FocusTraversalPolicyBase (InitFocusTraversalPolicyBase) and writing SortDescendants.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy

func FocusTraversalGroupMaybeOf

func FocusTraversalGroupMaybeOf(bc BuildContext) FocusTraversalPolicy

FocusTraversalGroupMaybeOf is FocusTraversalGroupOf that returns nil instead of panicking.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.maybeOf

func FocusTraversalGroupMaybeOfNode

func FocusTraversalGroupMaybeOfNode(node *FocusNode) FocusTraversalPolicy

FocusTraversalGroupMaybeOfNode is the policy of the group the node is in, or nil.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.maybeOfNode

func FocusTraversalGroupOf

func FocusTraversalGroupOf(bc BuildContext) FocusTraversalPolicy

FocusTraversalGroupOf is the policy of the nearest FocusTraversalGroup above the context. It panics with the tag FocusTraversalPolicyMissing when there is none.

Flutter: widgets/focus_traversal.dart FocusTraversalGroup.of

type FocusTraversalPolicyBase

type FocusTraversalPolicyBase struct {
	// contains filtered or unexported fields
}

FocusTraversalPolicyBase implements FocusTraversalPolicy but SortDescendants: embed it, call InitFocusTraversalPolicyBase with the outer value, and write SortDescendants.

Deviation: Flutter's DirectionalFocusTraversalPolicyMixin is the Directional option of the base (SPEC §12.10).

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy

func (*FocusTraversalPolicyBase) ChangedScope

func (b *FocusTraversalPolicyBase) ChangedScope(node *FocusNode, oldScope *FocusScopeNode)

ChangedScope forgets the node in the history of the scope it left.

Flutter: widgets/focus_traversal.dart DirectionalFocusTraversalPolicyMixin.changedScope

func (*FocusTraversalPolicyBase) DebugFillProperties

DebugFillProperties adds nothing.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy

func (*FocusTraversalPolicyBase) FindFirstFocus

func (b *FocusTraversalPolicyBase) FindFirstFocus(currentNode *FocusNode, ignoreCurrentFocus ...bool) *FocusNode

FindFirstFocus is the node that gets the focus first in the scope of the node.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.findFirstFocus

func (*FocusTraversalPolicyBase) FindFirstFocusInDirection

func (b *FocusTraversalPolicyBase) FindFirstFocusInDirection(currentNode *FocusNode, direction TraversalDirection) *FocusNode

FindFirstFocusInDirection is the node at the opposite edge of the scope from the direction.

Flutter: widgets/focus_traversal.dart DirectionalFocusTraversalPolicyMixin.findFirstFocusInDirection

func (*FocusTraversalPolicyBase) FindLastFocus

func (b *FocusTraversalPolicyBase) FindLastFocus(currentNode *FocusNode, ignoreCurrentFocus ...bool) *FocusNode

FindLastFocus is the node that gets the focus last in the scope of the node.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.findLastFocus

func (*FocusTraversalPolicyBase) InDirection

func (b *FocusTraversalPolicyBase) InDirection(currentNode *FocusNode, direction TraversalDirection) bool

InDirection moves the focus to the closest node in the direction; at the edge of the scope it does what the scope's directional edge behavior says.

Flutter: widgets/focus_traversal.dart DirectionalFocusTraversalPolicyMixin.inDirection

func (*FocusTraversalPolicyBase) InvalidateScopeData

func (b *FocusTraversalPolicyBase) InvalidateScopeData(node *FocusScopeNode)

InvalidateScopeData drops the traversal history of the scope.

Flutter: widgets/focus_traversal.dart DirectionalFocusTraversalPolicyMixin.invalidateScopeData

func (*FocusTraversalPolicyBase) Next

func (b *FocusTraversalPolicyBase) Next(currentNode *FocusNode) bool

Next moves the focus to the next node in traversal order.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.next

func (*FocusTraversalPolicyBase) Previous

func (b *FocusTraversalPolicyBase) Previous(currentNode *FocusNode) bool

Previous moves the focus to the previous node in traversal order.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.previous

func (*FocusTraversalPolicyBase) RequestFocusCallback

func (b *FocusTraversalPolicyBase) RequestFocusCallback() TraversalRequestFocusCallback

RequestFocusCallback is the function that gives the focus to a node.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.requestFocusCallback

func (*FocusTraversalPolicyBase) String

func (b *FocusTraversalPolicyBase) String() string

String describes the policy by its type and identity, as Dart's toString does.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy

type FocusTraversalPolicyBaseOpts

type FocusTraversalPolicyBaseOpts struct {
	// RequestFocusCallback replaces DefaultTraversalRequestFocusCallback.
	RequestFocusCallback TraversalRequestFocusCallback
	// Directional gives the policy the directional traversal of
	// DirectionalFocusTraversalPolicyMixin: FindFirstFocusInDirection, InDirection,
	// InvalidateScopeData and ChangedScope. Without it InDirection moves nothing.
	Directional bool
}

FocusTraversalPolicyBaseOpts are the optional parameters of InitFocusTraversalPolicyBase.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.new

type FocusTraversalPolicyOpts

type FocusTraversalPolicyOpts struct {
	// RequestFocusCallback replaces DefaultTraversalRequestFocusCallback.
	RequestFocusCallback TraversalRequestFocusCallback
}

FocusTraversalPolicyOpts are the optional parameters of the constructors of the traversal policies.

Flutter: widgets/focus_traversal.dart FocusTraversalPolicy.new

type FocusWithExternalFocusNodeOpts

type FocusWithExternalFocusNodeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ParentNode is the node that becomes the parent of the node.
	ParentNode *FocusNode
	// Autofocus asks for the focus when the widget is built.
	Autofocus bool
	// OnFocusChange is called when the focus of the node changes.
	OnFocusChange func(hasFocus bool)
	// ExcludeSemantics leaves out the Semantics node.
	ExcludeSemantics bool
}

FocusWithExternalFocusNodeOpts are the optional parameters of NewFocusWithExternalFocusNode.

Flutter: widgets/focus_scope.dart Focus.withExternalFocusNode

type FocusableActionDetector

type FocusableActionDetector struct {
	StatefulWidget
	// contains filtered or unexported fields
}

FocusableActionDetector is a widget that combines the functionality of Actions, Shortcuts, MouseRegion and a Focus widget to create a detector that defines actions and key bindings, and provides callbacks for handling focus and hover highlights.

Flutter: widgets/actions.dart FocusableActionDetector

func NewFocusableActionDetector

func NewFocusableActionDetector(child Widget, opts ...FocusableActionDetectorOpts) *FocusableActionDetector

NewFocusableActionDetector creates the widget.

Flutter: widgets/actions.dart FocusableActionDetector.new

func (*FocusableActionDetector) Autofocus

func (w *FocusableActionDetector) Autofocus() bool

Autofocus is whether the widget asks for the focus when it is built.

Flutter: widgets/actions.dart FocusableActionDetector.autofocus

func (*FocusableActionDetector) Child

func (w *FocusableActionDetector) Child() Widget

Child is the widget below.

Flutter: widgets/actions.dart FocusableActionDetector.child

func (*FocusableActionDetector) CreateState

func (w *FocusableActionDetector) CreateState() State

CreateState creates the state.

Flutter: widgets/actions.dart FocusableActionDetector.createState

func (*FocusableActionDetector) DescendantsAreFocusable

func (w *FocusableActionDetector) DescendantsAreFocusable() bool

DescendantsAreFocusable is whether the descendants can take the focus.

Flutter: widgets/actions.dart FocusableActionDetector.descendantsAreFocusable

func (*FocusableActionDetector) DescendantsAreTraversable

func (w *FocusableActionDetector) DescendantsAreTraversable() bool

DescendantsAreTraversable is whether traversal visits the descendants.

Flutter: widgets/actions.dart FocusableActionDetector.descendantsAreTraversable

func (*FocusableActionDetector) Enabled

func (w *FocusableActionDetector) Enabled() bool

Enabled is whether the widget handles the focus, actions and shortcuts.

Flutter: widgets/actions.dart FocusableActionDetector.enabled

func (*FocusableActionDetector) FocusNode

func (w *FocusableActionDetector) FocusNode() *FocusNode

FocusNode is the node of the widget, or nil.

Flutter: widgets/actions.dart FocusableActionDetector.focusNode

type FocusableActionDetectorOpts

type FocusableActionDetectorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Disabled makes the widget unable to take the focus and ignore the actions and
	// shortcuts (Flutter's enabled is true by default).
	Disabled bool
	// FocusNode is the node of the Focus widget it makes.
	FocusNode *FocusNode
	// Autofocus asks for the focus when the widget is built.
	Autofocus bool
	// DescendantsAreNotFocusable makes the descendants unable to take the focus
	// (Flutter's descendantsAreFocusable is true by default).
	DescendantsAreNotFocusable bool
	// DescendantsAreNotTraversable makes traversal skip the descendants (Flutter's
	// descendantsAreTraversable is true by default).
	DescendantsAreNotTraversable bool
	// Shortcuts are the shortcuts that are active while the widget is enabled.
	Shortcuts ShortcutMap
	// Actions are the actions that are active while the widget is enabled.
	Actions ActionMap
	// OnShowFocusHighlight is called when the focus highlight should be shown or
	// hidden.
	OnShowFocusHighlight func(show bool)
	// OnShowHoverHighlight is called when the hover highlight should be shown or
	// hidden.
	OnShowHoverHighlight func(show bool)
	// OnFocusChange is called when the focus of the widget changes.
	OnFocusChange func(focused bool)
	// MouseCursor is the cursor over the widget; the default is MouseCursorDefer.
	MouseCursor services.MouseCursor
	// ExcludeFocusSemantics leaves out the Semantics node of the Focus widget
	// (Flutter's includeFocusSemantics is true by default).
	ExcludeFocusSemantics bool
}

FocusableActionDetectorOpts are the optional parameters of NewFocusableActionDetector.

Flutter: widgets/actions.dart FocusableActionDetector.new

type FontSource

type FontSource struct {
	// Family is the family name that TextStyle.FontFamily and FontFamilyFallback
	// use. When empty, the family name inside the font is used. Several sources
	// with the same family make a family of regular, bold and italic fonts: each
	// font tells its own weight and slant.
	Family string
	// Data is the content of a TrueType or OpenType file.
	Data []byte
	// Asset is the key of the file in RunAppOpts.Assets.
	Asset string
}

FontSource is a font file that RunApp loads before the first frame, under a family name (RunAppOpts.Fonts). Give either Data or Asset.

Flutter: pubspec.yaml flutter: fonts: (family and asset)

type Form

type Form struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Form is an optional container for grouping together multiple form field widgets (e.g. TextField widgets).

Each individual form field should be wrapped in a FormField widget, with the Form widget as a common ancestor of all of those. Call methods on FormState to save, reset, or validate each FormField that is a descendant of this Form. To obtain the FormState, you may use FormOf with a context whose ancestor is the Form, or pass a GlobalKey to the Form constructor and call GlobalKey.CurrentState.

Flutter: widgets/form.dart Form

func NewForm

func NewForm(child Widget, opts ...FormOpts) *Form

NewForm creates a container for form fields.

Flutter: widgets/form.dart Form.new

func (*Form) AutovalidateMode

func (w *Form) AutovalidateMode() AutovalidateMode

AutovalidateMode is when the form fields validate.

Flutter: widgets/form.dart Form.autovalidateMode

func (*Form) Child

func (w *Form) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/form.dart Form.child

func (*Form) CreateState

func (w *Form) CreateState() State

CreateState creates the state.

Flutter: widgets/form.dart Form.createState

type FormField

type FormField[T any] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

FormField is a single form field.

This widget maintains the current state of the form field, so that updates and validation errors are visually reflected in the UI.

When used inside a Form, you can use methods on FormState to query or manipulate the form data as a whole.

Flutter: widgets/form.dart FormField

func NewFormField

func NewFormField[T any](builder FormFieldBuilder[T], opts ...FormFieldOpts[T]) *FormField[T]

NewFormField creates a single form field. The builder creates the widget of the field; it gets the state to read the value and the error, and to call DidChange.

Flutter: widgets/form.dart FormField.new

func (*FormField[T]) AutovalidateMode

func (w *FormField[T]) AutovalidateMode() AutovalidateMode

AutovalidateMode is when the field validates.

Flutter: widgets/form.dart FormField.autovalidateMode

func (*FormField[T]) CreateState

func (w *FormField[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/form.dart FormField.createState

func (*FormField[T]) Enabled

func (w *FormField[T]) Enabled() bool

Enabled is whether the field validates on its own.

Flutter: widgets/form.dart FormField.enabled

func (*FormField[T]) ErrorBuilder

func (w *FormField[T]) ErrorBuilder() FormFieldErrorBuilder

ErrorBuilder builds the widget that shows the error, or nil.

Flutter: widgets/form.dart FormField.errorBuilder

func (*FormField[T]) InitialValue

func (w *FormField[T]) InitialValue() foundation.Opt[T]

InitialValue is the initial value of the form field.

Flutter: widgets/form.dart FormField.initialValue

type FormFieldBuilder

type FormFieldBuilder[T any] func(field *FormFieldState[T]) Widget

FormFieldBuilder is the signature of a function that builds the widget of a form field.

Flutter: widgets/form.dart FormFieldBuilder

type FormFieldErrorBuilder

type FormFieldErrorBuilder func(bc BuildContext, errorText string) Widget

FormFieldErrorBuilder is the signature of a function that builds the widget that shows the error of a form field.

Flutter: widgets/form.dart FormFieldErrorBuilder

type FormFieldOpts

type FormFieldOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OnSaved is an optional method to call with the final value when the form
	// is saved via FormState.Save.
	OnSaved FormFieldSetter[T]
	// OnReset is an optional method to call when the form field is reset via
	// FormFieldState.Reset.
	OnReset foundation.VoidCallback
	// OnDidChange is called at the end of FormFieldState.DidChange with the new
	// value.
	//
	// Deviation: a subclass of FormFieldState overrides didChange in Flutter, as
	// Material's TextFormField does to update its controller; Go state types
	// cannot be extended, so this callback stands in for the override (SPEC
	// §12.10).
	OnDidChange func(value foundation.Opt[T])
	// ForceErrorText forces an error to be shown, and skips the validator.
	ForceErrorText foundation.Opt[string]
	// Validator is an optional method that validates an input; it returns the
	// error text, or none if the input is valid.
	Validator FormFieldValidator[T]
	// ErrorBuilder builds the widget that shows the error.
	ErrorBuilder FormFieldErrorBuilder
	// InitialValue is the initial value of the form field.
	InitialValue foundation.Opt[T]
	// Disabled makes the field not validate on its own (Flutter's enabled is
	// true by default).
	Disabled bool
	// AutovalidateMode is when the field validates; the default is disabled.
	AutovalidateMode AutovalidateMode
}

FormFieldOpts are the optional parameters of NewFormField.

Deviation: the restoration of the state (RestorationID) is not ported (SPEC §12.10).

Flutter: widgets/form.dart FormField.new

type FormFieldSetter

type FormFieldSetter[T any] func(newValue foundation.Opt[T])

FormFieldSetter is the signature of a function that is called with the value of a form field when the form is saved.

Flutter: widgets/form.dart FormFieldSetter

type FormFieldState

type FormFieldState[T any] struct {
	StateOf[*FormField[T]]
	// contains filtered or unexported fields
}

FormFieldState is the current state of a FormField. Passed to the FormFieldBuilder method for use in constructing the form field's widget.

Flutter: widgets/form.dart FormFieldState

func (*FormFieldState[T]) Build

func (s *FormFieldState[T]) Build(bc BuildContext) Widget

Build builds the field, validating as the mode says.

Flutter: widgets/form.dart FormFieldState.build

func (*FormFieldState[T]) ClearError

func (s *FormFieldState[T]) ClearError()

ClearError clears the error without validating.

Flutter: widgets/form.dart FormFieldState.clearError

func (*FormFieldState[T]) Deactivate

func (s *FormFieldState[T]) Deactivate()

Deactivate unregisters the field from the form.

Flutter: widgets/form.dart FormFieldState.deactivate

func (*FormFieldState[T]) DidChange

func (s *FormFieldState[T]) DidChange(value foundation.Opt[T])

DidChange updates this field's state to the new value. Useful for responding to child widget changes, e.g. Slider's onChanged argument.

Flutter: widgets/form.dart FormFieldState.didChange

func (*FormFieldState[T]) DidChangeDependencies

func (s *FormFieldState[T]) DidChangeDependencies()

DidChangeDependencies validates after the frame when the form always validates.

Flutter: widgets/form.dart FormFieldState.didChangeDependencies

func (*FormFieldState[T]) DidUpdateWidget

func (s *FormFieldState[T]) DidUpdateWidget(old *FormField[T])

DidUpdateWidget follows the forced error text.

Flutter: widgets/form.dart FormFieldState.didUpdateWidget

func (*FormFieldState[T]) Dispose

func (s *FormFieldState[T]) Dispose()

Dispose releases the focus node.

Flutter: widgets/form.dart FormFieldState.dispose

func (*FormFieldState[T]) ErrorText

func (s *FormFieldState[T]) ErrorText() foundation.Opt[string]

ErrorText is the current validation error returned by the validator, or none.

Flutter: widgets/form.dart FormFieldState.errorText

func (*FormFieldState[T]) HasError

func (s *FormFieldState[T]) HasError() bool

HasError is true if the validator returned a validation error.

Flutter: widgets/form.dart FormFieldState.hasError

func (*FormFieldState[T]) HasInteractedByUser

func (s *FormFieldState[T]) HasInteractedByUser() bool

HasInteractedByUser is true if this field has been interacted with by the user: DidChange was called, and the field has not been reset or its error cleared since.

Flutter: widgets/form.dart FormFieldState.hasInteractedByUser

func (*FormFieldState[T]) InitState

func (s *FormFieldState[T]) InitState()

InitState sets the initial value and the forced error.

Flutter: widgets/form.dart FormFieldState.initState

func (*FormFieldState[T]) IsValid

func (s *FormFieldState[T]) IsValid() bool

IsValid is true if the current value is valid, without setting the error.

Flutter: widgets/form.dart FormFieldState.isValid

func (*FormFieldState[T]) Reset

func (s *FormFieldState[T]) Reset()

Reset resets the field to its initial value.

Flutter: widgets/form.dart FormFieldState.reset

func (*FormFieldState[T]) Save

func (s *FormFieldState[T]) Save()

Save calls the OnSaved of the field with the current value.

Flutter: widgets/form.dart FormFieldState.save

func (*FormFieldState[T]) SetValue

func (s *FormFieldState[T]) SetValue(value foundation.Opt[T])

SetValue sets the value associated with this form field, without telling the form or rebuilding. Use DidChange for the effects.

Flutter: widgets/form.dart FormFieldState.setValue

func (*FormFieldState[T]) Validate

func (s *FormFieldState[T]) Validate() bool

Validate calls the validator with the current value and sets the error, and returns true if there is no error.

Flutter: widgets/form.dart FormFieldState.validate

func (*FormFieldState[T]) Value

func (s *FormFieldState[T]) Value() foundation.Opt[T]

Value is the current value of the form field.

Flutter: widgets/form.dart FormFieldState.value

type FormFieldStateBase

type FormFieldStateBase interface {
	// Save calls the OnSaved of the field.
	Save()
	// Reset resets the field to its initial value.
	Reset()
	// Validate validates the field and says whether it is valid.
	Validate() bool
	// ErrorText is the current validation error, if any.
	ErrorText() foundation.Opt[string]
	// HasError is whether the field has an error.
	HasError() bool
	// HasInteractedByUser is whether the user has interacted with the field.
	HasInteractedByUser() bool
	// contains filtered or unexported methods
}

FormFieldStateBase is what a FormState needs of a FormFieldState of any type.

Flutter: widgets/form.dart FormFieldState

type FormFieldValidator

type FormFieldValidator[T any] func(value foundation.Opt[T]) foundation.Opt[string]

FormFieldValidator is the signature of a function that validates the value of a form field and returns an error text, or none if the value is valid.

Flutter: widgets/form.dart FormFieldValidator

type FormOpts

type FormOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// CanPop enables the form to veto attempts by the user to dismiss the route
	// that contains the form; when set, the form has a PopScope.
	CanPop foundation.Opt[bool]
	// OnPopInvokedWithResult is called after a route pop was handled.
	OnPopInvokedWithResult PopInvokedWithResultCallback
	// OnChanged is called when one of the form fields changes.
	OnChanged foundation.VoidCallback
	// AutovalidateMode used to enable/disable auto validation and capture the
	// state of the form fields; the default is AutovalidateModeDisabled.
	AutovalidateMode AutovalidateMode
}

FormOpts are the optional parameters of NewForm.

Deviation: the deprecated OnWillPop and OnPopInvoked are not ported; use CanPop and OnPopInvokedWithResult (SPEC §12.10).

Flutter: widgets/form.dart Form.new

type FormState

type FormState struct {
	StateOf[*Form]
	// contains filtered or unexported fields
}

FormState maintains the current state of the form. Typically obtained by FormOf.

Flutter: widgets/form.dart FormState

func FormMaybeOf

func FormMaybeOf(bc BuildContext) *FormState

FormMaybeOf returns the closest FormState which encloses the given context, or nil if there is none. Calling it creates a dependency on the closest form.

Flutter: widgets/form.dart Form.maybeOf

func FormOf

func FormOf(bc BuildContext) *FormState

FormOf returns the closest FormState which encloses the given context. It panics with the tag FormNotFound when there is none.

Flutter: widgets/form.dart Form.of

func (*FormState) Build

func (s *FormState) Build(bc BuildContext) Widget

Build builds the form scope and validates the fields as the mode says.

Flutter: widgets/form.dart FormState.build

func (*FormState) ClearError

func (s *FormState) ClearError()

ClearError clears the error of every FormField that is a descendant of this Form without validating.

Flutter: widgets/form.dart FormState.clearError

func (*FormState) Fields

func (s *FormState) Fields() []FormFieldStateBase

Fields are the fields of the form, in the order they registered.

Flutter: widgets/form.dart FormState.fields

func (*FormState) Reset

func (s *FormState) Reset()

Reset resets every FormField that is a descendant of this Form back to its FormField initial value.

Flutter: widgets/form.dart FormState.reset

func (*FormState) Save

func (s *FormState) Save()

Save saves every FormField that is a descendant of this Form.

Flutter: widgets/form.dart FormState.save

func (*FormState) Validate

func (s *FormState) Validate() bool

Validate validates every FormField that is a descendant of this Form, and returns true if there are no errors.

Flutter: widgets/form.dart FormState.validate

func (*FormState) ValidateGranularly

func (s *FormState) ValidateGranularly() []FormFieldStateBase

ValidateGranularly validates every FormField that is a descendant of this Form, and returns the fields that are invalid.

Flutter: widgets/form.dart FormState.validateGranularly

type FractionalTranslation

type FractionalTranslation struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

FractionalTranslation applies a translation expressed as a fraction of the box size before painting its child.

Flutter: widgets/basic.dart FractionalTranslation

func NewFractionalTranslation

func NewFractionalTranslation(translation ui.Offset, child Widget, opts ...FractionalTranslationOpts) *FractionalTranslation

NewFractionalTranslation creates the widget.

Flutter: widgets/basic.dart FractionalTranslation.new

func (*FractionalTranslation) CreateRenderObject

func (w *FractionalTranslation) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart FractionalTranslation.createRenderObject

func (*FractionalTranslation) TransformHitTests

func (w *FractionalTranslation) TransformHitTests() foundation.Opt[bool]

TransformHitTests is whether to apply the translation when performing hit tests; the default is true.

Flutter: widgets/basic.dart FractionalTranslation.transformHitTests

func (*FractionalTranslation) Translation

func (w *FractionalTranslation) Translation() ui.Offset

Translation is the offset by which to translate the child, as a multiple of its size.

Flutter: widgets/basic.dart FractionalTranslation.translation

func (*FractionalTranslation) UpdateRenderObject

func (w *FractionalTranslation) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart FractionalTranslation.updateRenderObject

type FractionalTranslationOpts

type FractionalTranslationOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TransformHitTests is whether to apply the translation when performing hit tests; the default is true.
	TransformHitTests foundation.Opt[bool]
}

FractionalTranslationOpts are the optional parameters of NewFractionalTranslation.

Flutter: widgets/basic.dart FractionalTranslation.new

type FractionallySizedBox

type FractionallySizedBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

FractionallySizedBox sizes its child to a fraction of the total available space.

Flutter: widgets/basic.dart FractionallySizedBox

func NewFractionallySizedBox

func NewFractionallySizedBox(child Widget, opts ...FractionallySizedBoxOpts) *FractionallySizedBox

NewFractionallySizedBox creates the widget.

Flutter: widgets/basic.dart FractionallySizedBox.new

func (*FractionallySizedBox) Alignment

Alignment is how to align the child; the default is Alignment.center.

Flutter: widgets/basic.dart FractionallySizedBox.alignment

func (*FractionallySizedBox) CreateRenderObject

func (w *FractionallySizedBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart FractionallySizedBox.createRenderObject

func (*FractionallySizedBox) HeightFactor

func (w *FractionallySizedBox) HeightFactor() foundation.Opt[float64]

HeightFactor is the fraction of the available height to give the child; null passes the parent's height.

Flutter: widgets/basic.dart FractionallySizedBox.heightFactor

func (*FractionallySizedBox) UpdateRenderObject

func (w *FractionallySizedBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart FractionallySizedBox.updateRenderObject

func (*FractionallySizedBox) WidthFactor

func (w *FractionallySizedBox) WidthFactor() foundation.Opt[float64]

WidthFactor is the fraction of the available width to give the child; null passes the parent's width.

Flutter: widgets/basic.dart FractionallySizedBox.widthFactor

type FractionallySizedBoxOpts

type FractionallySizedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment is how to align the child; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
	// WidthFactor is the fraction of the available width to give the child; null passes the parent's width.
	WidthFactor foundation.Opt[float64]
	// HeightFactor is the fraction of the available height to give the child; null passes the parent's height.
	HeightFactor foundation.Opt[float64]
}

FractionallySizedBoxOpts are the optional parameters of NewFractionallySizedBox.

Flutter: widgets/basic.dart FractionallySizedBox.new

type FuncLocalizationsDelegate

type FuncLocalizationsDelegate[T any] struct {
	// Supported says whether a locale is supported; nil means all of them.
	Supported func(locale ui.Locale) bool
	// LoadFunc loads the resources.
	LoadFunc func(ctx context.Context, locale ui.Locale) (T, error)
	// Reload says whether the resources are loaded again when the delegate
	// replaces the old one; nil means never.
	Reload func(old LocalizationsDelegate) bool
	// Name is the text of String.
	Name string
}

FuncLocalizationsDelegate is a LocalizationsDelegate made of functions, for resources of type T.

Flutter: widgets/localizations.dart LocalizationsDelegate

func (*FuncLocalizationsDelegate[T]) IsSupported

func (d *FuncLocalizationsDelegate[T]) IsSupported(locale ui.Locale) bool

IsSupported is whether the locale is supported.

Flutter: widgets/localizations.dart LocalizationsDelegate.isSupported

func (*FuncLocalizationsDelegate[T]) Load

func (d *FuncLocalizationsDelegate[T]) Load(ctx context.Context, locale ui.Locale) (any, error)

Load loads the resources.

Flutter: widgets/localizations.dart LocalizationsDelegate.load

func (*FuncLocalizationsDelegate[T]) ResourceType

func (d *FuncLocalizationsDelegate[T]) ResourceType() reflect.Type

ResourceType is the type T.

Flutter: widgets/localizations.dart LocalizationsDelegate.type

func (*FuncLocalizationsDelegate[T]) ShouldReload

func (d *FuncLocalizationsDelegate[T]) ShouldReload(old LocalizationsDelegate) bool

ShouldReload is whether the resources are loaded again.

Flutter: widgets/localizations.dart LocalizationsDelegate.shouldReload

func (*FuncLocalizationsDelegate[T]) String

func (d *FuncLocalizationsDelegate[T]) String() string

String names the delegate.

Flutter: widgets/localizations.dart LocalizationsDelegate.toString

type Future

type Future[T any] struct {
	// contains filtered or unexported fields
}

Future is the value of an asynchronous operation of the framework's navigation: a route information parser's result, or the end of a router delegate's route setting. It stands for the Future of dart:async where the Router needs one; the callbacks run on the UI thread, through the post function that Then gets, so a goroutine can complete a Future without touching the framework. The zero value is not usable: make one with NewFuture, NewFutureValue or NewSynchronousFuture.

Flutter: no counterpart (dart:async Future and Completer; SynchronousFuture from foundation/synchronous_future.dart)

func FutureMap

func FutureMap[T, U any](f *Future[T], post func(func()), fn func(T) U) *Future[U]

FutureMap returns a future of fn applied to the value of this one, with the same kind of completion: a synchronous future gives a synchronous one.

Flutter: no counterpart (dart:async Future.then)

func NewFuture

func NewFuture[T any]() *Future[T]

NewFuture makes a future that is not complete yet; Complete completes it, once. It is Completer.future in Dart.

Flutter: no counterpart (dart:async Completer)

func NewFutureValue

func NewFutureValue[T any](value T) *Future[T]

NewFutureValue makes a future that is complete with the value already; its callbacks run in a later turn of the UI thread, as the callbacks of Future.value do in a microtask.

Flutter: no counterpart (dart:async Future.value)

func NewSynchronousFuture

func NewSynchronousFuture[T any](value T) *Future[T]

NewSynchronousFuture makes a future that is complete with the value, and whose callbacks run at once, when Then is called.

Flutter: foundation/synchronous_future.dart SynchronousFuture

func (*Future[T]) Complete

func (f *Future[T]) Complete(value T)

Complete completes the future with the value and posts the callbacks that wait for it. Completing a future twice is ignored. It is safe to call from any goroutine.

Flutter: no counterpart (dart:async Completer.complete)

func (*Future[T]) IsCompleted

func (f *Future[T]) IsCompleted() bool

IsCompleted is whether the future has a value.

Flutter: no counterpart (dart:async Completer.isCompleted)

func (*Future[T]) Then

func (f *Future[T]) Then(post func(func()), fn func(T))

Then calls fn with the value of the future: at once for a synchronous future, through post (a later turn of the UI thread) for a complete one, and when the future completes for a pending one. post is how the callback gets to the UI thread, typically WidgetsBinding.Post.

Flutter: no counterpart (dart:async Future.then)

type FutureBuilder

type FutureBuilder[T any] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

FutureBuilder is a widget that builds itself based on the latest snapshot of interaction with a function that runs in a goroutine.

Deviation: the function is started with State.Go, and Identity stands for the identity of Flutter's Future (SPEC §12.10).

Flutter: widgets/async.dart FutureBuilder

func NewFutureBuilder

func NewFutureBuilder[T any](future func(ctx context.Context) (T, error), builder AsyncWidgetBuilder[T], opts ...FutureBuilderOpts[T]) *FutureBuilder[T]

NewFutureBuilder creates a widget that runs the function, with a context that is cancelled when the widget leaves the tree or the function is replaced, and builds with its result. The function may be nil, for no computation.

Flutter: widgets/async.dart FutureBuilder.new

func (*FutureBuilder[T]) Builder

func (w *FutureBuilder[T]) Builder() AsyncWidgetBuilder[T]

Builder is the function that builds the widget for a snapshot.

Flutter: widgets/async.dart FutureBuilder.builder

func (*FutureBuilder[T]) CreateState

func (w *FutureBuilder[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/async.dart FutureBuilder.createState

func (*FutureBuilder[T]) Future

func (w *FutureBuilder[T]) Future() func(ctx context.Context) (T, error)

Future is the function that computes the data; nil for none.

Flutter: widgets/async.dart FutureBuilder.future

func (*FutureBuilder[T]) InitialData

func (w *FutureBuilder[T]) InitialData() foundation.Opt[T]

InitialData is the data of the initial snapshot, if any.

Flutter: widgets/async.dart FutureBuilder.initialData

type FutureBuilderOpts

type FutureBuilderOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// InitialData is the data that will be used to create the initial snapshot.
	InitialData foundation.Opt[T]
	// Identity says which computation the function is: when it changes, compared
	// with ==, the old one is forgotten and the function is started again. Flutter
	// starts again when the Future object changes; function values cannot be
	// compared in Go, so give the value that the result depends on. The default
	// (nil) starts the function once, and again only when the function becomes
	// nil and then non-nil.
	Identity any
}

FutureBuilderOpts are the optional parameters of NewFutureBuilder.

Flutter: widgets/async.dart FutureBuilder.new

type GenerateAppTitle

type GenerateAppTitle func(bc BuildContext) string

GenerateAppTitle makes the title of an app from its context, which is below the Localizations of the app.

Flutter: widgets/app.dart GenerateAppTitle

type GestureDetector

type GestureDetector struct {
	StatelessWidget
	// contains filtered or unexported fields
}

GestureDetector is a widget that detects gestures.

Deviation: there is no force press recognizer yet, and the multitouch drag strategy is the recognizers' default instead of the one of a ScrollConfiguration (SPEC §12.10).

Flutter: widgets/gesture_detector.dart GestureDetector

func NewGestureDetector

func NewGestureDetector(child Widget, opts ...GestureDetectorOpts) *GestureDetector

NewGestureDetector creates the widget; the child may be nil. In debug builds it panics with the tag GestureDetectorConflict when there are both pan and scale callbacks, or vertical, horizontal and pan or scale callbacks together.

Flutter: widgets/gesture_detector.dart GestureDetector.new

func (*GestureDetector) Build

func (w *GestureDetector) Build(bc BuildContext) Widget

Build makes a RawGestureDetector with a recognizer for each kind of gesture that has a callback.

Flutter: widgets/gesture_detector.dart GestureDetector.build

func (*GestureDetector) Child

func (w *GestureDetector) Child() Widget

Child is the widget below this one in the tree, or nil.

Flutter: widgets/gesture_detector.dart GestureDetector.child

type GestureDetectorOpts

type GestureDetectorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key

	// OnTapDown is called when a pointer that might cause a tap has contacted
	// the screen at a particular location.
	OnTapDown gestures.GestureTapDownCallback
	// OnTapUp is called when a pointer that will trigger a tap has stopped
	// contacting the screen.
	OnTapUp gestures.GestureTapUpCallback
	// OnTap is called when a tap with a primary button has occurred.
	OnTap gestures.GestureTapCallback
	// OnTapMove is called when the pointer moves while a tap is possible.
	OnTapMove gestures.GestureTapMoveCallback
	// OnTapCancel is called when the pointer that previously triggered OnTapDown
	// will not end up causing a tap.
	OnTapCancel gestures.GestureTapCancelCallback
	// OnSecondaryTap is called when a tap with a secondary button has occurred.
	OnSecondaryTap gestures.GestureTapCallback
	// OnSecondaryTapDown is called when a pointer that might cause a tap with a
	// secondary button has contacted the screen.
	OnSecondaryTapDown gestures.GestureTapDownCallback
	// OnSecondaryTapUp is called when a pointer that will trigger a tap with a
	// secondary button has stopped contacting the screen.
	OnSecondaryTapUp gestures.GestureTapUpCallback
	// OnSecondaryTapCancel is called when the pointer that previously triggered
	// OnSecondaryTapDown will not end up causing a tap.
	OnSecondaryTapCancel gestures.GestureTapCancelCallback
	// OnTertiaryTapDown is called when a pointer that might cause a tap with a
	// tertiary button has contacted the screen.
	OnTertiaryTapDown gestures.GestureTapDownCallback
	// OnTertiaryTapUp is called when a pointer that will trigger a tap with a
	// tertiary button has stopped contacting the screen.
	OnTertiaryTapUp gestures.GestureTapUpCallback
	// OnTertiaryTapCancel is called when the pointer that previously triggered
	// OnTertiaryTapDown will not end up causing a tap.
	OnTertiaryTapCancel gestures.GestureTapCancelCallback

	// OnDoubleTapDown is called when a pointer that might cause a double tap has
	// contacted the screen.
	OnDoubleTapDown gestures.GestureTapDownCallback
	// OnDoubleTap is called when the user has tapped the screen at the same
	// location twice in quick succession.
	OnDoubleTap gestures.GestureDoubleTapCallback
	// OnDoubleTapCancel is called when the pointer that previously triggered
	// OnDoubleTapDown will not end up causing a double tap.
	OnDoubleTapCancel gestures.GestureTapCancelCallback

	// OnLongPressDown is called when a pointer that might cause a long press has
	// contacted the screen.
	OnLongPressDown gestures.GestureLongPressDownCallback
	// OnLongPressCancel is called when the pointer that previously triggered
	// OnLongPressDown will not end up causing a long press.
	OnLongPressCancel gestures.GestureLongPressCancelCallback
	// OnLongPress is called when a long press gesture with a primary button has
	// been recognized.
	OnLongPress gestures.GestureLongPressCallback
	// OnLongPressStart is called when a long press gesture with a primary button
	// has been recognized.
	OnLongPressStart gestures.GestureLongPressStartCallback
	// OnLongPressMoveUpdate is called when moving after the long press.
	OnLongPressMoveUpdate gestures.GestureLongPressMoveUpdateCallback
	// OnLongPressUp is called when the pointer is lifted after the long press.
	OnLongPressUp gestures.GestureLongPressUpCallback
	// OnLongPressEnd is called when the pointer is lifted after the long press.
	OnLongPressEnd gestures.GestureLongPressEndCallback
	// OnSecondaryLongPressDown is OnLongPressDown for the secondary button.
	OnSecondaryLongPressDown gestures.GestureLongPressDownCallback
	// OnSecondaryLongPressCancel is OnLongPressCancel for the secondary button.
	OnSecondaryLongPressCancel gestures.GestureLongPressCancelCallback
	// OnSecondaryLongPress is OnLongPress for the secondary button.
	OnSecondaryLongPress gestures.GestureLongPressCallback
	// OnSecondaryLongPressStart is OnLongPressStart for the secondary button.
	OnSecondaryLongPressStart gestures.GestureLongPressStartCallback
	// OnSecondaryLongPressMoveUpdate is OnLongPressMoveUpdate for the secondary
	// button.
	OnSecondaryLongPressMoveUpdate gestures.GestureLongPressMoveUpdateCallback
	// OnSecondaryLongPressUp is OnLongPressUp for the secondary button.
	OnSecondaryLongPressUp gestures.GestureLongPressUpCallback
	// OnSecondaryLongPressEnd is OnLongPressEnd for the secondary button.
	OnSecondaryLongPressEnd gestures.GestureLongPressEndCallback
	// OnTertiaryLongPressDown is OnLongPressDown for the tertiary button.
	OnTertiaryLongPressDown gestures.GestureLongPressDownCallback
	// OnTertiaryLongPressCancel is OnLongPressCancel for the tertiary button.
	OnTertiaryLongPressCancel gestures.GestureLongPressCancelCallback
	// OnTertiaryLongPress is OnLongPress for the tertiary button.
	OnTertiaryLongPress gestures.GestureLongPressCallback
	// OnTertiaryLongPressStart is OnLongPressStart for the tertiary button.
	OnTertiaryLongPressStart gestures.GestureLongPressStartCallback
	// OnTertiaryLongPressMoveUpdate is OnLongPressMoveUpdate for the tertiary
	// button.
	OnTertiaryLongPressMoveUpdate gestures.GestureLongPressMoveUpdateCallback
	// OnTertiaryLongPressUp is OnLongPressUp for the tertiary button.
	OnTertiaryLongPressUp gestures.GestureLongPressUpCallback
	// OnTertiaryLongPressEnd is OnLongPressEnd for the tertiary button.
	OnTertiaryLongPressEnd gestures.GestureLongPressEndCallback

	// OnVerticalDragDown is called when a pointer has contacted the screen and
	// might begin to move vertically.
	OnVerticalDragDown gestures.GestureDragDownCallback
	// OnVerticalDragStart is called when a pointer has contacted the screen and
	// has begun to move vertically.
	OnVerticalDragStart gestures.GestureDragStartCallback
	// OnVerticalDragUpdate is called when a pointer that is in contact with the
	// screen and moving vertically has moved in the vertical direction.
	OnVerticalDragUpdate gestures.GestureDragUpdateCallback
	// OnVerticalDragEnd is called when a pointer that was previously in contact
	// with the screen and moving vertically is no longer in contact.
	OnVerticalDragEnd gestures.GestureDragEndCallback
	// OnVerticalDragCancel is called when the pointer that previously triggered
	// OnVerticalDragDown did not complete.
	OnVerticalDragCancel gestures.GestureDragCancelCallback
	// OnHorizontalDragDown is called when a pointer has contacted the screen and
	// might begin to move horizontally.
	OnHorizontalDragDown gestures.GestureDragDownCallback
	// OnHorizontalDragStart is called when a pointer has contacted the screen
	// and has begun to move horizontally.
	OnHorizontalDragStart gestures.GestureDragStartCallback
	// OnHorizontalDragUpdate is called when a pointer that is in contact with the
	// screen and moving horizontally has moved in the horizontal direction.
	OnHorizontalDragUpdate gestures.GestureDragUpdateCallback
	// OnHorizontalDragEnd is called when a pointer that was previously in contact
	// with the screen and moving horizontally is no longer in contact.
	OnHorizontalDragEnd gestures.GestureDragEndCallback
	// OnHorizontalDragCancel is called when the pointer that previously triggered
	// OnHorizontalDragDown did not complete.
	OnHorizontalDragCancel gestures.GestureDragCancelCallback
	// OnPanDown is called when a pointer has contacted the screen and might begin
	// to move.
	OnPanDown gestures.GestureDragDownCallback
	// OnPanStart is called when a pointer has contacted the screen and has begun
	// to move.
	OnPanStart gestures.GestureDragStartCallback
	// OnPanUpdate is called when a pointer that is in contact with the screen and
	// moving has moved again.
	OnPanUpdate gestures.GestureDragUpdateCallback
	// OnPanEnd is called when a pointer that was previously in contact with the
	// screen and moving is no longer in contact.
	OnPanEnd gestures.GestureDragEndCallback
	// OnPanCancel is called when the pointer that previously triggered OnPanDown
	// did not complete.
	OnPanCancel gestures.GestureDragCancelCallback

	// OnScaleStart is called when the pointers in contact with the screen have
	// established a focal point and initial scale of 1.0.
	OnScaleStart gestures.GestureScaleStartCallback
	// OnScaleUpdate is called when the pointers in contact with the screen have
	// indicated a new focal point and/or scale.
	OnScaleUpdate gestures.GestureScaleUpdateCallback
	// OnScaleEnd is called when the pointers are no longer in contact with the
	// screen.
	OnScaleEnd gestures.GestureScaleEndCallback

	// Behavior is how this gesture detector behaves during hit testing; the
	// default is deferToChild when there is a child, and translucent otherwise.
	Behavior rendering.HitTestBehavior
	// ExcludeFromSemantics is whether to exclude these gestures from the
	// semantics tree.
	ExcludeFromSemantics bool
	// DragStartBehavior is how the drags start; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// TrackpadScrollCausesScale is whether scrolling up/down on a trackpad
	// scales the child.
	TrackpadScrollCausesScale bool
	// TrackpadScrollToScaleFactor is how trackpad scrolling turns into scaling.
	TrackpadScrollToScaleFactor foundation.Opt[ui.Offset]
	// SupportedDevices are the kinds of pointer that trigger the gestures; nil
	// for all.
	SupportedDevices []ui.PointerDeviceKind
}

GestureDetectorOpts are the optional parameters of NewGestureDetector.

Flutter: widgets/gesture_detector.dart GestureDetector.new

type GestureRecognizerFactory

type GestureRecognizerFactory interface {
	// Constructor makes a new recognizer.
	//
	// Flutter: widgets/gesture_detector.dart GestureRecognizerFactory.constructor
	Constructor() gestures.GestureRecognizer
	// Initializer configures the recognizer, which Constructor made or a
	// previous build did.
	//
	// Flutter: widgets/gesture_detector.dart GestureRecognizerFactory.initializer
	Initializer(instance gestures.GestureRecognizer)
	// RecognizerType is the type of the recognizers that the factory makes: the
	// key it is registered under.
	RecognizerType() reflect.Type
}

GestureRecognizerFactory is the interface for a factory that makes and configures a gesture recognizer of one type.

Flutter: widgets/gesture_detector.dart GestureRecognizerFactory

type GestureRecognizerFactoryWithHandlers

type GestureRecognizerFactoryWithHandlers[T gestures.GestureRecognizer] struct {
	// contains filtered or unexported fields
}

GestureRecognizerFactoryWithHandlers is a GestureRecognizerFactory that calls two functions to make and configure a recognizer of type T.

Flutter: widgets/gesture_detector.dart GestureRecognizerFactoryWithHandlers

func NewGestureRecognizerFactoryWithHandlers

func NewGestureRecognizerFactoryWithHandlers[T gestures.GestureRecognizer](constructor func() T, initializer func(instance T)) *GestureRecognizerFactoryWithHandlers[T]

NewGestureRecognizerFactoryWithHandlers creates the factory.

Flutter: widgets/gesture_detector.dart GestureRecognizerFactoryWithHandlers.new

func (*GestureRecognizerFactoryWithHandlers[T]) Constructor

Constructor makes a recognizer.

Flutter: widgets/gesture_detector.dart GestureRecognizerFactoryWithHandlers.constructor

func (*GestureRecognizerFactoryWithHandlers[T]) Initializer

Initializer configures a recognizer.

Flutter: widgets/gesture_detector.dart GestureRecognizerFactoryWithHandlers.initializer

func (*GestureRecognizerFactoryWithHandlers[T]) RecognizerType

func (f *GestureRecognizerFactoryWithHandlers[T]) RecognizerType() reflect.Type

RecognizerType is the type T.

Flutter: widgets/gesture_detector.dart GestureRecognizerFactory._debugAssertTypeMatches

type GlobalKey

type GlobalKey[S State] struct {
	foundation.KeyBase
	// contains filtered or unexported fields
}

GlobalKey is a key that is unique across the app, and from which the element, the widget and the state of the widget that has it can be reached. S is the type of the state of the widget, or State when it does not matter.

Deviation: the key remembers the BuildOwner that registered it and looks the element up there, where Flutter reaches the owner through WidgetsBinding.instance (SPEC §12.10).

Flutter: widgets/framework.dart GlobalKey, LabeledGlobalKey

func NewGlobalKey

func NewGlobalKey[S State](opts ...GlobalKeyOpts) *GlobalKey[S]

NewGlobalKey creates a key that is equal only to itself.

Flutter: widgets/framework.dart GlobalKey.new

func (*GlobalKey[S]) CurrentContext

func (k *GlobalKey[S]) CurrentContext() BuildContext

CurrentContext is the build context of the widget that has this key, or nil when no widget in the tree has it.

Flutter: widgets/framework.dart GlobalKey.currentContext

func (*GlobalKey[S]) CurrentElement

func (k *GlobalKey[S]) CurrentElement() Element

CurrentElement is the element of the widget that has this key, or nil.

Flutter: widgets/framework.dart GlobalKey._currentElement

func (*GlobalKey[S]) CurrentState

func (k *GlobalKey[S]) CurrentState() (S, bool)

CurrentState is the state of the stateful widget that has this key. It returns false when no such widget is in the tree or its state is not an S.

Flutter: widgets/framework.dart GlobalKey.currentState

func (*GlobalKey[S]) CurrentWidget

func (k *GlobalKey[S]) CurrentWidget() Widget

CurrentWidget is the widget that has this key, or nil.

Flutter: widgets/framework.dart GlobalKey.currentWidget

func (*GlobalKey[S]) String

func (k *GlobalKey[S]) String() string

String describes the key, such as "[GlobalKey#1a2b3 label]".

Flutter: widgets/framework.dart LabeledGlobalKey.toString

type GlobalKeyOpts

type GlobalKeyOpts struct {
	// DebugLabel is a label for debug output.
	DebugLabel string
}

GlobalKeyOpts are the optional parameters of NewGlobalKey.

Flutter: widgets/framework.dart GlobalKey.new

type GlobalObjectKey

type GlobalObjectKey[S State] struct {
	foundation.KeyBase
	// contains filtered or unexported fields
}

GlobalObjectKey is a global key that takes its identity from an object: two GlobalObjectKeys are equal when they hold the same object (the same pointer, or equal values of a type that is not a pointer).

Deviation: it has no CurrentState; look the element up with CurrentElementIn, because the registry is per BuildOwner and a key that is a plain value cannot remember its owner (SPEC §12.10).

Flutter: widgets/framework.dart GlobalObjectKey

func NewGlobalObjectKey

func NewGlobalObjectKey[S State](value any) GlobalObjectKey[S]

NewGlobalObjectKey creates a key from an object. The object's type must be comparable, or it panics with the tag GlobalObjectKeyNotComparable.

Flutter: widgets/framework.dart GlobalObjectKey.new

func (GlobalObjectKey[S]) CurrentElement

func (k GlobalObjectKey[S]) CurrentElement() Element

CurrentElement is always nil: a GlobalObjectKey does not know its owner. Use CurrentElementIn.

Flutter: widgets/framework.dart GlobalKey._currentElement

func (GlobalObjectKey[S]) CurrentElementIn

func (k GlobalObjectKey[S]) CurrentElementIn(owner *BuildOwner) Element

CurrentElementIn is the element of the widget that has this key in the tree of the owner, or nil.

Flutter: widgets/framework.dart GlobalKey._currentElement

func (GlobalObjectKey[S]) CurrentStateIn

func (k GlobalObjectKey[S]) CurrentStateIn(owner *BuildOwner) (S, bool)

CurrentStateIn is the state of the stateful widget that has this key in the tree of the owner.

Flutter: widgets/framework.dart GlobalKey.currentState

func (GlobalObjectKey[S]) String

func (k GlobalObjectKey[S]) String() string

String describes the key, such as "[GlobalObjectKey<FooState> int#00003]".

Flutter: widgets/framework.dart GlobalObjectKey.toString

func (GlobalObjectKey[S]) Value

func (k GlobalObjectKey[S]) Value() any

Value is the object the key was made from.

Flutter: widgets/framework.dart GlobalObjectKey.value

type GlowingOverscrollIndicator

type GlowingOverscrollIndicator struct {
	StatefulWidget
	// contains filtered or unexported fields
}

GlowingOverscrollIndicator is a visual indication that a scroll view has overscrolled.

It listens for ScrollNotifications in order to control the overscroll indication. These notifications are typically generated by a ScrollView, such as a ListView or a GridView.

It dispatches an OverscrollIndicatorNotification before showing an overscroll indication. To prevent the indicator from showing the indication, call OverscrollIndicatorNotification.DisallowIndicator on the notification.

ScrollBehavior.BuildOverscrollIndicator creates it on the platforms (Android and Fuchsia) that commonly use this type of overscroll indication. In a MaterialApp, the edge glow color is the ColorScheme.secondary color of the theme.

When it is built for a CustomScrollView, the indicator applies to the entire scrollable area, whatever the slivers are. To move the glow, listen for the OverscrollIndicatorNotification and set its PaintOffset, or use a NestedScrollView.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator

func NewGlowingOverscrollIndicator

func NewGlowingOverscrollIndicator(axisDirection painting.AxisDirection, color ui.Color, child Widget, opts ...GlowingOverscrollIndicatorOpts) *GlowingOverscrollIndicator

NewGlowingOverscrollIndicator creates a visual indication that a scroll view has overscrolled. In order for the widget to display an overscroll indication, the child must contain a widget that generates a ScrollNotification, such as a ListView or a GridView. The child may be nil.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.new

func (*GlowingOverscrollIndicator) Axis

Axis is the axis along which scrolling occurs in the Scrollable whose overscrolls are to be visualized.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.axis

func (*GlowingOverscrollIndicator) AxisDirection

AxisDirection is the direction of positive scroll offsets in the Scrollable whose overscrolls are to be visualized.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.axisDirection

func (*GlowingOverscrollIndicator) Child

Child is the widget below this widget in the tree. The overscroll indicator paints on top of it. It may be nil.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.child

func (*GlowingOverscrollIndicator) Color

func (w *GlowingOverscrollIndicator) Color() ui.Color

Color is the color of the glow. The alpha channel is ignored.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.color

func (*GlowingOverscrollIndicator) CreateState

func (w *GlowingOverscrollIndicator) CreateState() State

CreateState creates the state.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.createState

func (*GlowingOverscrollIndicator) NotificationPredicate

func (w *GlowingOverscrollIndicator) NotificationPredicate() ScrollNotificationPredicate

NotificationPredicate is the check that specifies whether a ScrollNotification should be handled by this widget.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.notificationPredicate

func (*GlowingOverscrollIndicator) ShowLeading

func (w *GlowingOverscrollIndicator) ShowLeading() bool

ShowLeading is whether to show the overscroll glow on the side with negative scroll offsets. For a vertical downwards viewport, this is the top side.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.showLeading

func (*GlowingOverscrollIndicator) ShowTrailing

func (w *GlowingOverscrollIndicator) ShowTrailing() bool

ShowTrailing is whether to show the overscroll glow on the side with positive scroll offsets. For a vertical downwards viewport, this is the bottom side.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.showTrailing

type GlowingOverscrollIndicatorOpts

type GlowingOverscrollIndicatorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ShowLeading is whether to show the overscroll glow on the side with
	// negative scroll offsets (for a vertical downwards viewport, the top
	// side); the default is true.
	ShowLeading foundation.Opt[bool]
	// ShowTrailing is whether to show the overscroll glow on the side with
	// positive scroll offsets (for a vertical downwards viewport, the bottom
	// side); the default is true.
	ShowTrailing foundation.Opt[bool]
	// NotificationPredicate is a check that specifies whether a
	// ScrollNotification should be handled by this widget; the default is
	// DefaultScrollNotificationPredicate (the depth is 0).
	NotificationPredicate ScrollNotificationPredicate
}

GlowingOverscrollIndicatorOpts are the optional parameters of NewGlowingOverscrollIndicator.

Flutter: widgets/overscroll_indicator.dart GlowingOverscrollIndicator.new

type GridView

type GridView struct {
	BoxScrollView
	// contains filtered or unexported fields
}

GridView is a scrollable, 2D array of widgets.

Flutter: widgets/scroll_view.dart GridView

func NewGridView

func NewGridView(gridDelegate rendering.SliverGridDelegate, children []Widget, opts ...GridViewOpts) *GridView

NewGridView creates a scrollable, 2D array of widgets with a custom grid delegate, from an explicit list.

Flutter: widgets/scroll_view.dart GridView.new

func NewGridViewBuilder

func NewGridViewBuilder(gridDelegate rendering.SliverGridDelegate, itemBuilder NullableIndexedWidgetBuilder, opts ...GridViewOpts) *GridView

NewGridViewBuilder creates a scrollable, 2D array of widgets that are created on demand.

Flutter: widgets/scroll_view.dart GridView.builder

func NewGridViewCount

func NewGridViewCount(crossAxisCount int, children []Widget, opts ...GridViewOpts) *GridView

NewGridViewCount creates a scrollable, 2D array of widgets with a fixed number of tiles in the cross axis.

Flutter: widgets/scroll_view.dart GridView.count

func NewGridViewCustom

func NewGridViewCustom(gridDelegate rendering.SliverGridDelegate, childrenDelegate SliverChildDelegate, opts ...GridViewOpts) *GridView

NewGridViewCustom creates a scrollable, 2D array of widgets with both a custom grid delegate and a custom child model.

Flutter: widgets/scroll_view.dart GridView.custom

func NewGridViewExtent

func NewGridViewExtent(maxCrossAxisExtent float64, children []Widget, opts ...GridViewOpts) *GridView

NewGridViewExtent creates a scrollable, 2D array of widgets with tiles that each have a maximum cross axis extent.

Flutter: widgets/scroll_view.dart GridView.extent

func (*GridView) BuildChildLayout

func (v *GridView) BuildChildLayout(BuildContext) Widget

BuildChildLayout builds the sliver grid.

Flutter: widgets/scroll_view.dart GridView.buildChildLayout

func (*GridView) ChildrenDelegate

func (v *GridView) ChildrenDelegate() SliverChildDelegate

ChildrenDelegate supplies the children.

Flutter: widgets/scroll_view.dart GridView.childrenDelegate

func (*GridView) GridDelegate

func (v *GridView) GridDelegate() rendering.SliverGridDelegate

GridDelegate lays out the tiles.

Flutter: widgets/scroll_view.dart GridView.gridDelegate

type GridViewOpts

type GridViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ScrollDirection is the axis along which the view scrolls; the default is
	// AxisVertical.
	ScrollDirection painting.Axis
	// Reverse is whether the view scrolls against the reading direction.
	Reverse bool
	// Controller reads and controls the scroll position. A view that has one is
	// not primary.
	Controller ScrollController
	// Primary is whether this is the primary scroll view that uses the
	// PrimaryScrollController above; the default is true for a vertical view
	// with no controller.
	Primary foundation.Opt[bool]
	// Physics is how the view responds to the user; the default is the one of the
	// ScrollBehavior (always scrollable for a primary view).
	Physics ScrollPhysics
	// ShrinkWrap is whether the extent of the view along the main axis is the
	// extent of its content.
	ShrinkWrap bool
	// ScrollCacheExtent is how far beyond the viewport the view builds children;
	// the default is 250 logical pixels.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// KeyboardDismissBehavior is how the view dismisses the keyboard; the default
	// is the one of the ScrollBehavior.
	KeyboardDismissBehavior ScrollViewKeyboardDismissBehavior
	// RestorationID is the identifier for restoring the scroll offset; it has no
	// effect until state restoration is ported.
	RestorationID string
	// ClipBehavior is how the view clips its content; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the view behaves during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
	// Padding is the amount of space by which to inset the children; nil lets the
	// MediaQuery padding apply.
	Padding painting.EdgeInsetsGeometry
	// SemanticChildCount is the number of children that contribute semantic
	// information; the default is the number of items.
	SemanticChildCount foundation.Opt[int]
	// AddAutomaticKeepAlives is whether to wrap each child in an AutomaticKeepAlive;
	// the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
	// AddRepaintBoundaries is whether to wrap each child in a RepaintBoundary; the
	// default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddSemanticIndexes is whether to wrap each child in an IndexedSemantics; the
	// default is true.
	AddSemanticIndexes foundation.Opt[bool]
	// FindChildIndexCallback finds the index of the child that has a key
	// (NewGridViewBuilder).
	FindChildIndexCallback ChildIndexGetter
	// ItemCount is the number of items; none means unbounded (NewGridViewBuilder).
	ItemCount foundation.Opt[int]
	// MainAxisSpacing is the number of logical pixels between each child along the
	// main axis (NewGridViewCount, NewGridViewExtent).
	MainAxisSpacing float64
	// CrossAxisSpacing is the number of logical pixels between each child along
	// the cross axis (NewGridViewCount, NewGridViewExtent).
	CrossAxisSpacing float64
	// ChildAspectRatio is the ratio of the cross axis to the main axis extent of
	// each child; the default is 1 (NewGridViewCount, NewGridViewExtent).
	ChildAspectRatio foundation.Opt[float64]
	// MainAxisExtent is the extent of each tile in the main axis, instead of the
	// aspect ratio (NewGridViewCount, NewGridViewExtent).
	MainAxisExtent foundation.Opt[float64]
}

GridViewOpts are the optional parameters of NewGridView and its named constructors. Some fields apply to one of them, as the comments say.

Flutter: widgets/scroll_view.dart GridView.new

type Hero

type Hero struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Hero marks its child as a candidate for hero animations: when a route is pushed or popped, the heroes with the same tag in the two routes fly from one to the other.

Flutter: widgets/heroes.dart Hero

func NewHero

func NewHero(tag any, child Widget, opts ...HeroOpts) *Hero

NewHero creates a hero with the tag; heroes with equal tags are paired. The tag must be comparable.

Flutter: widgets/heroes.dart Hero.new

func (*Hero) Child

func (w *Hero) Child() Widget

Child is the widget below.

Flutter: widgets/heroes.dart Hero.child

func (*Hero) CreateRectTween

func (w *Hero) CreateRectTween() CreateRectTween

CreateRectTween creates the tween of the flight, or nil.

Flutter: widgets/heroes.dart Hero.createRectTween

func (*Hero) CreateState

func (w *Hero) CreateState() State

CreateState creates the state.

Flutter: widgets/heroes.dart Hero.createState

func (*Hero) Curve

func (w *Hero) Curve() animation.Curve

Curve is the curve of the flight.

Flutter: widgets/heroes.dart Hero.curve

func (*Hero) FlightShuttleBuilder

func (w *Hero) FlightShuttleBuilder() HeroFlightShuttleBuilder

FlightShuttleBuilder builds the widget that flies, or nil.

Flutter: widgets/heroes.dart Hero.flightShuttleBuilder

func (*Hero) PlaceholderBuilder

func (w *Hero) PlaceholderBuilder() HeroPlaceholderBuilder

PlaceholderBuilder builds the placeholder of the hero, or nil.

Flutter: widgets/heroes.dart Hero.placeholderBuilder

func (*Hero) ReverseCurve

func (w *Hero) ReverseCurve() animation.Curve

ReverseCurve is the curve of the flight on pop, or nil.

Flutter: widgets/heroes.dart Hero.reverseCurve

func (*Hero) Tag

func (w *Hero) Tag() any

Tag identifies the hero.

Flutter: widgets/heroes.dart Hero.tag

func (*Hero) TransitionOnUserGestures

func (w *Hero) TransitionOnUserGestures() bool

TransitionOnUserGestures is whether the hero flies during user gestures.

Flutter: widgets/heroes.dart Hero.transitionOnUserGestures

type HeroController

type HeroController struct {
	NavigatorObserverBase
	// contains filtered or unexported fields
}

HeroController manages the hero transitions of a navigator: it is a navigator observer that starts the flights when the top route changes.

Flutter: widgets/heroes.dart HeroController

func HeroControllerScopeMaybeOf

func HeroControllerScopeMaybeOf(bc BuildContext) *HeroController

HeroControllerScopeMaybeOf returns the controller of the closest scope above the context, or nil.

Flutter: widgets/navigator.dart HeroControllerScope.maybeOf

func HeroControllerScopeOf

func HeroControllerScopeOf(bc BuildContext) *HeroController

HeroControllerScopeOf returns the controller of the closest scope above the context. In debug builds it panics with the tag HeroControllerScopeMissing when there is none.

Flutter: widgets/navigator.dart HeroControllerScope.of

func NewHeroController

func NewHeroController(createRectTween ...CreateRectTween) *HeroController

NewHeroController creates a controller; createRectTween creates the tween of the flights unless the hero says otherwise (the default is a RectTween).

Flutter: widgets/heroes.dart HeroController.new

func (*HeroController) AsObserver

func (c *HeroController) AsObserver() NavigatorObserver

AsObserver is the observer that the navigator notifies: the outer value if the controller is embedded in another type, and the controller otherwise.

func (*HeroController) CreateRectTween

func (c *HeroController) CreateRectTween() CreateRectTween

CreateRectTween creates the tween of the flights unless the hero says otherwise; nil means a RectTween.

Flutter: widgets/heroes.dart HeroController.createRectTween

func (*HeroController) DidChangeTop

func (c *HeroController) DidChangeTop(topRoute, previousTopRoute Route)

DidChangeTop starts a hero transition from the previous top route to the new one.

Flutter: widgets/heroes.dart HeroController.didChangeTop

func (*HeroController) DidStartUserGesture

func (c *HeroController) DidStartUserGesture(route, previousRoute Route)

DidStartUserGesture starts a hero transition for the user gesture.

Flutter: widgets/heroes.dart HeroController.didStartUserGesture

func (*HeroController) DidStopUserGesture

func (c *HeroController) DidStopUserGesture()

DidStopUserGesture invalidates the flights of a gesture that did not move towards the pop direction at all.

Flutter: widgets/heroes.dart HeroController.didStopUserGesture

func (*HeroController) Dispose

func (c *HeroController) Dispose()

Dispose disposes the flights in progress.

Flutter: widgets/heroes.dart HeroController.dispose

type HeroControllerScope

type HeroControllerScope struct {
	InheritedWidget
	// contains filtered or unexported fields
}

HeroControllerScope provides the HeroController that the navigators below it use, unless a nearer scope hides it.

Flutter: widgets/navigator.dart HeroControllerScope

func NewHeroControllerScope

func NewHeroControllerScope(controller *HeroController, child Widget, opts ...WidgetOpts) *HeroControllerScope

NewHeroControllerScope creates a scope with the controller.

Flutter: widgets/navigator.dart HeroControllerScope.new

func NewHeroControllerScopeNone

func NewHeroControllerScopeNone(child Widget, opts ...WidgetOpts) *HeroControllerScope

NewHeroControllerScopeNone creates a scope that tells the navigators below it not to use a HeroController.

Flutter: widgets/navigator.dart HeroControllerScope.none

func (*HeroControllerScope) Controller

func (w *HeroControllerScope) Controller() *HeroController

Controller is the controller of the scope, or nil.

Flutter: widgets/navigator.dart HeroControllerScope.controller

func (*HeroControllerScope) UpdateShouldNotify

func (w *HeroControllerScope) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the controller changed.

Flutter: widgets/navigator.dart HeroControllerScope.updateShouldNotify

type HeroFlightDirection

type HeroFlightDirection int

HeroFlightDirection is the direction of a hero flight: push when a route is pushed onto the navigator, and pop when it is popped.

Flutter: widgets/heroes.dart HeroFlightDirection

const (
	// HeroFlightDirectionUnspecified is no flight.
	HeroFlightDirectionUnspecified HeroFlightDirection = iota
	// HeroFlightDirectionPush is the flight of a route that is pushed.
	//
	// Flutter: widgets/heroes.dart HeroFlightDirection.push
	HeroFlightDirectionPush
	// HeroFlightDirectionPop is the flight of a route that is popped.
	//
	// Flutter: widgets/heroes.dart HeroFlightDirection.pop
	HeroFlightDirectionPop
)

func (HeroFlightDirection) String

func (d HeroFlightDirection) String() string

String names the direction.

type HeroFlightShuttleBuilder

type HeroFlightShuttleBuilder func(flightContext BuildContext, animation animation.Animation[float64], flightDirection HeroFlightDirection, fromHeroContext, toHeroContext BuildContext) Widget

HeroFlightShuttleBuilder builds the widget that flies between two heroes.

Flutter: widgets/heroes.dart HeroFlightShuttleBuilder

type HeroMode

type HeroMode struct {
	StatelessWidget
	// contains filtered or unexported fields
}

HeroMode controls whether Hero widgets in its subtree take part in hero transitions.

Flutter: widgets/heroes.dart HeroMode

func NewHeroMode

func NewHeroMode(child Widget, opts ...HeroModeOpts) *HeroMode

NewHeroMode creates the widget.

Flutter: widgets/heroes.dart HeroMode.new

func (*HeroMode) Build

func (w *HeroMode) Build(bc BuildContext) Widget

Build returns the child.

Flutter: widgets/heroes.dart HeroMode.build

func (*HeroMode) Child

func (w *HeroMode) Child() Widget

Child is the widget below.

Flutter: widgets/heroes.dart HeroMode.child

func (*HeroMode) Enabled

func (w *HeroMode) Enabled() bool

Enabled is whether the heroes below take part in transitions.

Flutter: widgets/heroes.dart HeroMode.enabled

type HeroModeOpts

type HeroModeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Enabled is whether the heroes below take part in transitions; the default
	// is true.
	Enabled foundation.Opt[bool]
}

HeroModeOpts are the optional parameters of NewHeroMode.

Flutter: widgets/heroes.dart HeroMode.new

type HeroOpts

type HeroOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// CreateRectTween creates the tween of the flight of the hero; the default
	// is a RectTween.
	CreateRectTween CreateRectTween
	// FlightShuttleBuilder builds the widget that flies; the default shows the
	// child of the destination hero.
	FlightShuttleBuilder HeroFlightShuttleBuilder
	// PlaceholderBuilder builds the widget that stays in the place of the hero
	// during the flight; the default is an empty box of the size of the hero.
	PlaceholderBuilder HeroPlaceholderBuilder
	// TransitionOnUserGestures makes the hero fly during a user gesture that pops
	// the route, such as the iOS back swipe.
	TransitionOnUserGestures bool
	// Curve is the curve of the flight; the default is Curves.FastOutSlowIn.
	Curve animation.Curve
	// ReverseCurve is the curve of the flight on pop; the default is the flipped
	// Curve.
	ReverseCurve animation.Curve
}

HeroOpts are the optional parameters of NewHero.

Flutter: widgets/heroes.dart Hero.new

type HeroPlaceholderBuilder

type HeroPlaceholderBuilder func(bc BuildContext, heroSize ui.Size, child Widget) Widget

HeroPlaceholderBuilder builds the widget that is in the place of a hero while it is in flight: heroSize is the size of the hero and child is its child.

Flutter: widgets/heroes.dart HeroPlaceholderBuilder

type HoldScrollActivity

type HoldScrollActivity struct {
	ScrollActivityBase
	// contains filtered or unexported fields
}

HoldScrollActivity is the activity of a position that the user holds with a finger down, before the drag starts.

Flutter: widgets/scroll_activity.dart HoldScrollActivity

func NewHoldScrollActivity

func NewHoldScrollActivity(delegate ScrollActivityDelegate, onHoldCanceled func()) *HoldScrollActivity

NewHoldScrollActivity creates the activity; onHoldCanceled may be nil and is called when the activity is disposed.

Flutter: widgets/scroll_activity.dart HoldScrollActivity.new

func (*HoldScrollActivity) Cancel

func (a *HoldScrollActivity) Cancel()

Cancel releases the hold.

Flutter: widgets/scroll_activity.dart HoldScrollActivity.cancel

func (*HoldScrollActivity) Dispose

func (a *HoldScrollActivity) Dispose()

Dispose calls the hold canceled callback.

Flutter: widgets/scroll_activity.dart HoldScrollActivity.dispose

func (*HoldScrollActivity) IsScrolling

func (a *HoldScrollActivity) IsScrolling() bool

IsScrolling is false.

Flutter: widgets/scroll_activity.dart HoldScrollActivity.isScrolling

func (*HoldScrollActivity) ShouldIgnorePointer

func (a *HoldScrollActivity) ShouldIgnorePointer() bool

ShouldIgnorePointer is false.

Flutter: widgets/scroll_activity.dart HoldScrollActivity.shouldIgnorePointer

func (*HoldScrollActivity) Velocity

func (a *HoldScrollActivity) Velocity() float64

Velocity is zero.

Flutter: widgets/scroll_activity.dart HoldScrollActivity.velocity

type Icon

type Icon struct {
	StatelessWidget
	// contains filtered or unexported fields
}

Icon is a graphical icon widget drawn with a glyph from a font.

Flutter: widgets/icon.dart Icon

func NewIcon

func NewIcon(icon IconData, opts ...IconOpts) *Icon

NewIcon creates an icon. The zero IconData makes an empty box of the icon's size. In debug builds it panics with the tag IconInvalid when the fill is outside 0 to 1 or the weight or the optical size is not greater than zero.

Flutter: widgets/icon.dart Icon.new

func (*Icon) Build

func (w *Icon) Build(bc BuildContext) Widget

Build makes the box with the glyph.

Flutter: widgets/icon.dart Icon.build

func (*Icon) Color

func (w *Icon) Color() foundation.Opt[ui.Color]

Color is the color of the icon; the default comes from the icon theme.

Flutter: widgets/icon.dart Icon.color

func (*Icon) Fill

func (w *Icon) Fill() foundation.Opt[float64]

Fill is the fill of the icon; the default comes from the icon theme.

Flutter: widgets/icon.dart Icon.fill

func (*Icon) Grade

func (w *Icon) Grade() foundation.Opt[float64]

Grade is the grade of the icon; the default comes from the icon theme.

Flutter: widgets/icon.dart Icon.grade

func (*Icon) Icon

func (w *Icon) Icon() IconData

Icon is the icon to display.

Flutter: widgets/icon.dart Icon.icon

func (*Icon) IconValue

func (w *Icon) IconValue() any

IconValue is the icon, for the finders of gluttertest.

Flutter: no counterpart (used by finders)

func (*Icon) OpticalSize

func (w *Icon) OpticalSize() foundation.Opt[float64]

OpticalSize is the optical size of the icon; the default comes from the icon theme.

Flutter: widgets/icon.dart Icon.opticalSize

func (*Icon) SemanticLabel

func (w *Icon) SemanticLabel() foundation.Opt[string]

SemanticLabel is the semantics label of the icon.

Flutter: widgets/icon.dart Icon.semanticLabel

func (*Icon) Shadows

func (w *Icon) Shadows() []ui.Shadow

Shadows is the shadows of the icon; the default comes from the icon theme.

Flutter: widgets/icon.dart Icon.shadows

func (*Icon) Size

func (w *Icon) Size() foundation.Opt[float64]

Size is the size of the icon; the default comes from the icon theme.

Flutter: widgets/icon.dart Icon.size

func (*Icon) Weight

func (w *Icon) Weight() foundation.Opt[float64]

Weight is the weight of the icon; the default comes from the icon theme.

Flutter: widgets/icon.dart Icon.weight

type IconData

type IconData struct {
	// CodePoint is the Unicode code point of the glyph in the font.
	//
	// Flutter: widgets/icon_data.dart IconData.codePoint
	CodePoint int
	// FontFamily is the font family of the glyph; empty for the default.
	//
	// Flutter: widgets/icon_data.dart IconData.fontFamily
	FontFamily string
	// FontPackage is the package that holds the font, or empty.
	//
	// Flutter: widgets/icon_data.dart IconData.fontPackage
	FontPackage string
	// MatchTextDirection is whether the glyph is mirrored in right to left text.
	//
	// Flutter: widgets/icon_data.dart IconData.matchTextDirection
	MatchTextDirection bool
	// Font is the font file of the glyph when the app has not loaded it: the Icon
	// widget loads it into the text engine of its binding the first time it builds
	// an icon with this field, under IconFont.Family, which is FontFamily with
	// "packages/<FontPackage>/" in front when there is a package. The icons of a
	// font that the binary does not otherwise need (CupertinoIcons) use it, so the
	// font is in the binary only when the app imports the package that has the
	// icons. nil for the icons of a font the engine already has.
	//
	// Flutter: no counterpart (Flutter loads the fonts of the pubspec at startup)
	Font *IconFont
	// contains filtered or unexported fields
}

IconData is a description of an icon fulfilled by a font glyph. It is comparable. The zero IconData stands for Dart's null icon.

Flutter: widgets/icon_data.dart IconData

func NewIconData

func NewIconData(codePoint int, opts ...IconDataOpts) IconData

NewIconData creates an icon for the code point.

Flutter: widgets/icon_data.dart IconData.new

func (IconData) FontFamilyFallback

func (d IconData) FontFamilyFallback() []string

FontFamilyFallback are the families to try when the glyph is not in the font family.

Flutter: widgets/icon_data.dart IconData.fontFamilyFallback

func (IconData) IsZero

func (d IconData) IsZero() bool

IsZero is whether this is the zero IconData, which stands for no icon.

Flutter: no counterpart

func (IconData) String

func (d IconData) String() string

String describes the icon by its code point.

Flutter: widgets/icon_data.dart IconData.toString

type IconDataOpts

type IconDataOpts struct {
	// FontFamily is the font family of the glyph.
	FontFamily string
	// FontPackage is the package that holds the font.
	FontPackage string
	// MatchTextDirection is whether the glyph is mirrored in right to left text.
	MatchTextDirection bool
	// FontFamilyFallback are the families to try when the glyph is not in the
	// font family.
	FontFamilyFallback []string
}

IconDataOpts are the optional parameters of NewIconData.

Flutter: widgets/icon_data.dart IconData.new

type IconFont

type IconFont struct {
	// Family is the family name the font is loaded under: the name a TextStyle
	// resolves for the icons, "packages/<package>/<family>" for the icons of a package.
	Family string
	// Data returns the content of the TrueType or OpenType file. The caller must not
	// change the bytes.
	Data func() []byte
}

IconFont is a font file that an Icon loads when it first builds an icon that names it (IconData.Font). It is a read-only value, usually a package variable of the package that holds the icons.

Flutter: no counterpart (Flutter loads the fonts of the pubspec at startup)

type IconOpts

type IconOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Size is the size of the icon in logical pixels; the default comes from the
	// icon theme.
	Size foundation.Opt[float64]
	// Fill is the fill of the glyph, from 0 to 1.
	Fill foundation.Opt[float64]
	// Weight is the stroke weight of the glyph; it must be greater than zero.
	Weight foundation.Opt[float64]
	// Grade is the grade of the glyph.
	Grade foundation.Opt[float64]
	// OpticalSize is the optical size of the glyph; it must be greater than zero.
	OpticalSize foundation.Opt[float64]
	// Color is the color of the icon; the default comes from the icon theme.
	Color foundation.Opt[ui.Color]
	// Shadows are the shadows painted behind the icon.
	Shadows []ui.Shadow
	// SemanticLabel is the label that describes the icon in the semantics tree.
	SemanticLabel foundation.Opt[string]
	// TextDirection is the direction of the icon; the default is the one of the
	// closest Directionality.
	TextDirection ui.TextDirection
	// ApplyTextScaling is whether the size is scaled with the text scaler.
	ApplyTextScaling foundation.Opt[bool]
	// BlendMode is the blend mode of the glyph when it is painted.
	BlendMode ui.BlendMode
	// FontWeight is the weight of the font used for the glyph.
	FontWeight ui.FontWeight
}

IconOpts are the optional parameters of NewIcon.

Flutter: widgets/icon.dart Icon.new

type IconTheme

type IconTheme struct {
	InheritedTheme
	// contains filtered or unexported fields
}

IconTheme controls the default properties of icons in a widget subtree.

Flutter: widgets/icon_theme.dart IconTheme

func NewIconTheme

func NewIconTheme(data IconThemeData, child Widget, opts ...WidgetOpts) *IconTheme

NewIconTheme creates the widget.

Flutter: widgets/icon_theme.dart IconTheme.new

func (*IconTheme) Data

func (w *IconTheme) Data() IconThemeData

Data is the properties for descendant icons.

Flutter: widgets/icon_theme.dart IconTheme.data

func (*IconTheme) DebugFillProperties

func (w *IconTheme) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the data.

Flutter: widgets/icon_theme.dart IconTheme.debugFillProperties

func (*IconTheme) UpdateShouldNotify

func (w *IconTheme) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the data changed.

Flutter: widgets/icon_theme.dart IconTheme.updateShouldNotify

func (*IconTheme) Wrap

func (w *IconTheme) Wrap(_ BuildContext, child Widget) Widget

Wrap makes an IconTheme with the same data around the child.

Flutter: widgets/icon_theme.dart IconTheme.wrap

type IconThemeData

type IconThemeData struct {
	// contains filtered or unexported fields
}

IconThemeData defines the size, font variations, color, opacity and shadows of icons. Any property can be unset, and it then comes from an ancestor.

Flutter: widgets/icon_theme_data.dart IconThemeData

func IconThemeDataLerp

func IconThemeDataLerp(a, b *IconThemeData, t float64) IconThemeData

IconThemeDataLerp linearly interpolates between two icon themes. Either may be nil.

Flutter: widgets/icon_theme_data.dart IconThemeData.lerp

func IconThemeOf

func IconThemeOf(bc BuildContext) IconThemeData

IconThemeOf is the icon theme of the closest IconTheme above the context, with the properties that it leaves out taken from the fallback. The context depends on it.

Flutter: widgets/icon_theme.dart IconTheme.of

func NewIconThemeData

func NewIconThemeData(opts ...IconThemeDataOpts) IconThemeData

NewIconThemeData creates the data. In debug builds it panics with the tag IconThemeDataInvalid when the fill is outside 0 to 1 or the weight or the optical size is not greater than zero.

Flutter: widgets/icon_theme_data.dart IconThemeData.new

func NewIconThemeDataFallback

func NewIconThemeDataFallback() IconThemeData

NewIconThemeDataFallback creates the data that is used when there is no theme: 24 pixels, black, fully opaque, with the default font variations.

Flutter: widgets/icon_theme_data.dart IconThemeData.fallback

func (IconThemeData) ApplyTextScaling

func (d IconThemeData) ApplyTextScaling() foundation.Opt[bool]

ApplyTextScaling is whether the size is scaled with the text scaler.

Flutter: widgets/icon_theme_data.dart IconThemeData.applyTextScaling

func (IconThemeData) Color

func (d IconThemeData) Color() foundation.Opt[ui.Color]

Color is the default color of icons.

Flutter: widgets/icon_theme_data.dart IconThemeData.color

func (IconThemeData) CopyWith

CopyWith is a copy of the data in which the set properties are replaced.

Flutter: widgets/icon_theme_data.dart IconThemeData.copyWith

func (IconThemeData) DebugFillProperties

func (d IconThemeData) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties that are set.

Flutter: widgets/icon_theme_data.dart IconThemeData.debugFillProperties

func (IconThemeData) Equal

func (d IconThemeData) Equal(o IconThemeData) bool

Equal is Dart's == on icon theme data.

Flutter: widgets/icon_theme_data.dart IconThemeData.operator ==

func (IconThemeData) Fill

func (d IconThemeData) Fill() foundation.Opt[float64]

Fill is the fill of the glyph.

Flutter: widgets/icon_theme_data.dart IconThemeData.fill

func (IconThemeData) Grade

func (d IconThemeData) Grade() foundation.Opt[float64]

Grade is the grade of the glyph.

Flutter: widgets/icon_theme_data.dart IconThemeData.grade

func (IconThemeData) IsConcrete

func (d IconThemeData) IsConcrete() bool

IsConcrete is whether every property is set (the shadows may be absent).

Flutter: widgets/icon_theme_data.dart IconThemeData.isConcrete

func (IconThemeData) Merge

func (d IconThemeData) Merge(other *IconThemeData) IconThemeData

Merge is a copy of the data in which the properties that other sets replace the ones here.

Flutter: widgets/icon_theme_data.dart IconThemeData.merge

func (IconThemeData) Opacity

func (d IconThemeData) Opacity() foundation.Opt[float64]

Opacity is the opacity applied to the color, clamped to 0 to 1.

Flutter: widgets/icon_theme_data.dart IconThemeData.opacity

func (IconThemeData) OpticalSize

func (d IconThemeData) OpticalSize() foundation.Opt[float64]

OpticalSize is the optical size of the glyph.

Flutter: widgets/icon_theme_data.dart IconThemeData.opticalSize

func (IconThemeData) Resolve

Resolve is the data with the color that depends on the context (ColorValue) resolved in it; without one it is the data itself. Flutter's CupertinoIconThemeData is the subclass that does it for a CupertinoDynamicColor.

Flutter: widgets/icon_theme_data.dart IconThemeData.resolve

func (IconThemeData) Shadows

func (d IconThemeData) Shadows() []ui.Shadow

Shadows are the shadows painted behind icons.

Flutter: widgets/icon_theme_data.dart IconThemeData.shadows

func (IconThemeData) Size

func (d IconThemeData) Size() foundation.Opt[float64]

Size is the size of icons.

Flutter: widgets/icon_theme_data.dart IconThemeData.size

func (IconThemeData) Weight

func (d IconThemeData) Weight() foundation.Opt[float64]

Weight is the stroke weight of the glyph.

Flutter: widgets/icon_theme_data.dart IconThemeData.weight

type IconThemeDataOpts

type IconThemeDataOpts struct {
	// Size is the size of icons in logical pixels.
	Size foundation.Opt[float64]
	// Fill is the fill of the glyph, from 0 to 1.
	Fill foundation.Opt[float64]
	// Weight is the stroke weight of the glyph; it must be greater than zero.
	Weight foundation.Opt[float64]
	// Grade is the grade of the glyph.
	Grade foundation.Opt[float64]
	// OpticalSize is the optical size of the glyph; it must be greater than zero.
	OpticalSize foundation.Opt[float64]
	// Color is the default color of icons.
	Color foundation.Opt[ui.Color]
	// ColorValue is the default color of icons when it depends on the context (a
	// ResolvableColor such as a CupertinoDynamicColor); it takes the place of Color, and
	// Resolve gives the color it has in a context. This is the Color of
	// CupertinoIconThemeData, which is a Color in Dart.
	ColorValue ui.ColorValue
	// Opacity is the opacity applied to the color, clamped to 0 to 1.
	Opacity foundation.Opt[float64]
	// Shadows are the shadows painted behind icons.
	Shadows []ui.Shadow
	// ApplyTextScaling is whether the size is scaled with the text scaler.
	ApplyTextScaling foundation.Opt[bool]
}

IconThemeDataOpts are the optional parameters of NewIconThemeData and the fields that CopyWith replaces.

Flutter: widgets/icon_theme_data.dart IconThemeData.new

type IdleScrollActivity

type IdleScrollActivity struct {
	ScrollActivityBase
}

IdleScrollActivity is the activity of a scroll position that is not scrolling.

Flutter: widgets/scroll_activity.dart IdleScrollActivity

func NewIdleScrollActivity

func NewIdleScrollActivity(delegate ScrollActivityDelegate) *IdleScrollActivity

NewIdleScrollActivity creates the activity.

Flutter: widgets/scroll_activity.dart IdleScrollActivity.new

func (*IdleScrollActivity) ApplyNewDimensions

func (a *IdleScrollActivity) ApplyNewDimensions()

ApplyNewDimensions starts a ballistic activity with no velocity, so that a position that is out of range goes back.

Flutter: widgets/scroll_activity.dart IdleScrollActivity.applyNewDimensions

func (*IdleScrollActivity) IsScrolling

func (a *IdleScrollActivity) IsScrolling() bool

IsScrolling is false.

Flutter: widgets/scroll_activity.dart IdleScrollActivity.isScrolling

func (*IdleScrollActivity) ShouldIgnorePointer

func (a *IdleScrollActivity) ShouldIgnorePointer() bool

ShouldIgnorePointer is false.

Flutter: widgets/scroll_activity.dart IdleScrollActivity.shouldIgnorePointer

func (*IdleScrollActivity) Velocity

func (a *IdleScrollActivity) Velocity() float64

Velocity is zero.

Flutter: widgets/scroll_activity.dart IdleScrollActivity.velocity

type IgnoreBaseline

type IgnoreBaseline struct {
	SingleChildRenderObjectWidget
}

IgnoreBaseline makes its child's baselines invisible to its ancestors.

Flutter: widgets/basic.dart IgnoreBaseline

func NewIgnoreBaseline

func NewIgnoreBaseline(child Widget, opts ...IgnoreBaselineOpts) *IgnoreBaseline

NewIgnoreBaseline creates the widget.

Flutter: widgets/basic.dart IgnoreBaseline.new

func (*IgnoreBaseline) CreateRenderObject

func (w *IgnoreBaseline) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart IgnoreBaseline.createRenderObject

type IgnoreBaselineOpts

type IgnoreBaselineOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

IgnoreBaselineOpts are the optional parameters of NewIgnoreBaseline.

Flutter: widgets/basic.dart IgnoreBaseline.new

type IgnorePointer

type IgnorePointer struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

IgnorePointer is invisible to hit testing.

Flutter: widgets/basic.dart IgnorePointer

func NewIgnorePointer

func NewIgnorePointer(child Widget, opts ...IgnorePointerOpts) *IgnorePointer

NewIgnorePointer creates the widget.

Flutter: widgets/basic.dart IgnorePointer.new

func (*IgnorePointer) CreateRenderObject

func (w *IgnorePointer) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart IgnorePointer.createRenderObject

func (*IgnorePointer) Ignoring

func (w *IgnorePointer) Ignoring() foundation.Opt[bool]

Ignoring is whether this widget is ignored during hit testing; the default is true.

Flutter: widgets/basic.dart IgnorePointer.ignoring

func (*IgnorePointer) UpdateRenderObject

func (w *IgnorePointer) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart IgnorePointer.updateRenderObject

type IgnorePointerOpts

type IgnorePointerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Ignoring is whether this widget is ignored during hit testing; the default is true.
	Ignoring foundation.Opt[bool]
}

IgnorePointerOpts are the optional parameters of NewIgnorePointer.

Flutter: widgets/basic.dart IgnorePointer.new

type Image

type Image struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Image is a widget that displays an image.

Deviation: the image provider is not wrapped in a ScrollAwareImageProvider, there is no TickerMode to pause animated images, and web images are not supported (SPEC §12.10).

Flutter: widgets/image.dart Image

func NewImage

func NewImage(image painting.ImageProvider, opts ...ImageOpts) *Image

NewImage creates a widget that displays an image from the provider. In debug builds it panics with the tag ImageInvalid when the cache width or height is not greater than zero.

Flutter: widgets/image.dart Image.new

func NewImageAsset

func NewImageAsset(name string, opts ...ImageAssetOpts) *Image

NewImageAsset creates a widget that displays the asset.

Flutter: widgets/image.dart Image.asset

func NewImageFile

func NewImageFile(path string, opts ...ImageFileOpts) *Image

NewImageFile creates a widget that displays the image in the file.

Flutter: widgets/image.dart Image.file

func NewImageMemory

func NewImageMemory(bytes []byte, opts ...ImageMemoryOpts) *Image

NewImageMemory creates a widget that displays the image in the bytes.

Flutter: widgets/image.dart Image.memory

func NewImageNetwork

func NewImageNetwork(src string, opts ...ImageNetworkOpts) *Image

NewImageNetwork creates a widget that displays the image at the URL.

Flutter: widgets/image.dart Image.network

func (*Image) CreateState

func (w *Image) CreateState() State

CreateState creates the state.

Flutter: widgets/image.dart Image.createState

func (*Image) Fit

func (w *Image) Fit() painting.BoxFit

Fit is how the image is inscribed into the box.

Flutter: widgets/image.dart Image.fit

func (*Image) Height

func (w *Image) Height() foundation.Opt[float64]

Height is the height the image is given, if any.

Flutter: widgets/image.dart Image.height

func (*Image) Image

func (w *Image) Image() painting.ImageProvider

Image is the image provider.

Flutter: widgets/image.dart Image.image

func (*Image) Width

func (w *Image) Width() foundation.Opt[float64]

Width is the width the image is given, if any.

Flutter: widgets/image.dart Image.width

type ImageAssetOpts

type ImageAssetOpts struct {
	ImageOpts
	// Bundle is the bundle to load the asset from; the default is the root bundle
	// of the binding.
	Bundle services.AssetBundle
	// Scale is the scale of the image; when set, the asset is not resolved to a
	// variant by the pixel ratio of the device.
	Scale foundation.Opt[float64]
	// Package is the package that holds the asset.
	Package string
	// CacheWidth resizes the image to this width when decoding it.
	CacheWidth foundation.Opt[int]
	// CacheHeight resizes the image to this height when decoding it.
	CacheHeight foundation.Opt[int]
}

ImageAssetOpts are the optional parameters of NewImageAsset.

Flutter: widgets/image.dart Image.asset

type ImageErrorWidgetBuilder

type ImageErrorWidgetBuilder func(bc BuildContext, err error) Widget

ImageErrorWidgetBuilder builds the widget shown when the image fails to load.

Flutter: widgets/image.dart ImageErrorWidgetBuilder

type ImageFileOpts

type ImageFileOpts struct {
	ImageOpts
	// Scale is the scale of the image; the default is 1.
	Scale foundation.Opt[float64]
	// CacheWidth resizes the image to this width when decoding it.
	CacheWidth foundation.Opt[int]
	// CacheHeight resizes the image to this height when decoding it.
	CacheHeight foundation.Opt[int]
}

ImageFileOpts are the optional parameters of NewImageFile.

Flutter: widgets/image.dart Image.file

type ImageFrameBuilder

type ImageFrameBuilder func(bc BuildContext, child Widget, frame foundation.Opt[int], wasSynchronouslyLoaded bool) Widget

ImageFrameBuilder builds an image frame. The child is the image, frame is the number of the frame (none until the first one) and wasSynchronouslyLoaded says whether the image was available at once.

Flutter: widgets/image.dart ImageFrameBuilder

type ImageIcon

type ImageIcon struct {
	StatelessWidget
	// contains filtered or unexported fields
}

ImageIcon is an icon that is drawn from an image.

Flutter: widgets/image_icon.dart ImageIcon

func NewImageIcon

func NewImageIcon(image painting.ImageProvider, opts ...ImageIconOpts) *ImageIcon

NewImageIcon creates the icon; the image may be nil. In debug builds it panics with the tag ImageIconColorAndOriginal when there is a color and UseOriginalColors.

Flutter: widgets/image_icon.dart ImageIcon.new

func (*ImageIcon) Build

func (w *ImageIcon) Build(bc BuildContext) Widget

Build makes the image.

Flutter: widgets/image_icon.dart ImageIcon.build

type ImageIconOpts

type ImageIconOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Size is the size of the icon; the default comes from the icon theme.
	Size foundation.Opt[float64]
	// Color is the color of the icon; the default comes from the icon theme.
	Color foundation.Opt[ui.Color]
	// SemanticLabel is the label that describes the icon in the semantics tree.
	SemanticLabel foundation.Opt[string]
	// UseOriginalColors is whether to show the image in its own colors.
	UseOriginalColors bool
}

ImageIconOpts are the optional parameters of NewImageIcon.

Flutter: widgets/image_icon.dart ImageIcon.new

type ImageLoadingBuilder

type ImageLoadingBuilder func(bc BuildContext, child Widget, loadingProgress foundation.Opt[painting.ImageChunkEvent]) Widget

ImageLoadingBuilder builds the widget shown while the image loads. The loadingProgress is none until the first chunk.

Flutter: widgets/image.dart ImageLoadingBuilder

type ImageMemoryOpts

type ImageMemoryOpts struct {
	ImageOpts
	// Scale is the scale of the image; the default is 1.
	Scale foundation.Opt[float64]
	// CacheWidth resizes the image to this width when decoding it.
	CacheWidth foundation.Opt[int]
	// CacheHeight resizes the image to this height when decoding it.
	CacheHeight foundation.Opt[int]
}

ImageMemoryOpts are the optional parameters of NewImageMemory.

Flutter: widgets/image.dart Image.memory

type ImageNetworkOpts

type ImageNetworkOpts struct {
	ImageOpts
	// Scale is the scale of the image; the default is 1.
	Scale foundation.Opt[float64]
	// Headers are the HTTP headers of the request.
	Headers map[string]string
	// CacheWidth resizes the image to this width when decoding it.
	CacheWidth foundation.Opt[int]
	// CacheHeight resizes the image to this height when decoding it.
	CacheHeight foundation.Opt[int]
}

ImageNetworkOpts are the optional parameters of NewImageNetwork.

Flutter: widgets/image.dart Image.network

type ImageOpts

type ImageOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// FrameBuilder builds the widget around each frame of the image.
	FrameBuilder ImageFrameBuilder
	// LoadingBuilder builds the widget shown while the image loads.
	LoadingBuilder ImageLoadingBuilder
	// ErrorBuilder builds the widget shown when the image fails to load.
	ErrorBuilder ImageErrorWidgetBuilder
	// SemanticLabel is the label that describes the image in the semantics tree.
	SemanticLabel foundation.Opt[string]
	// ExcludeFromSemantics is whether to exclude the image from the semantics
	// tree.
	ExcludeFromSemantics bool
	// Width is the width to give the image, if the constraints allow it.
	Width foundation.Opt[float64]
	// Height is the height to give the image, if the constraints allow it.
	Height foundation.Opt[float64]
	// Color is blended with the image using ColorBlendMode.
	Color foundation.Opt[ui.Color]
	// Opacity is the opacity of the image, as an animation or other listenable.
	Opacity foundation.ValueListenable[float64]
	// ColorBlendMode is how Color is blended; the default is srcIn.
	ColorBlendMode ui.BlendMode
	// Fit is how the image is inscribed into the box.
	Fit painting.BoxFit
	// Alignment is how the image is aligned within its bounds; the default is
	// AlignmentCenter.
	Alignment painting.AlignmentGeometry
	// Repeat is how the image is repeated in the area it does not cover; the
	// default is ImageRepeatNoRepeat.
	Repeat painting.ImageRepeat
	// CenterSlice is the center slice for a nine-patch image.
	CenterSlice foundation.Opt[ui.Rect]
	// MatchTextDirection is whether the image is flipped in right to left text.
	MatchTextDirection bool
	// GaplessPlayback is whether to keep showing the old image while the new one
	// loads.
	GaplessPlayback bool
	// IsAntiAlias is whether to paint the image with anti-aliasing.
	IsAntiAlias bool
	// FilterQuality is the quality of image sampling; the default is
	// FilterQualityMedium.
	FilterQuality ui.FilterQuality
}

ImageOpts are the optional parameters of NewImage and the named constructors.

Flutter: widgets/image.dart Image.new

type ImplicitlyAnimated

type ImplicitlyAnimated interface {
	Widget
	// Curve is the curve of the animation.
	Curve() animation.Curve
	// Duration is the length of the animation.
	Duration() time.Duration
	// OnEnd is called every time an animation completes, or nil.
	OnEnd() func()
}

ImplicitlyAnimated is what an implicitly animated widget implements: the embedded ImplicitlyAnimatedWidget gives Curve, Duration and OnEnd.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidget

type ImplicitlyAnimatedWidget

type ImplicitlyAnimatedWidget struct {
	StatefulWidget
	// contains filtered or unexported fields
}

ImplicitlyAnimatedWidget is the embedded base of a widget that animates its properties implicitly: whenever the widget is rebuilt with new values, its state animates from the old value to the new one. The widget type embeds it; its state type embeds ImplicitlyAnimatedWidgetState or AnimatedWidgetBaseState.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidget

func NewImplicitlyAnimatedWidgetBase

func NewImplicitlyAnimatedWidgetBase(duration time.Duration, opts ...ImplicitlyAnimatedWidgetOpts) ImplicitlyAnimatedWidget

NewImplicitlyAnimatedWidgetBase creates the embedded base.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidget.new

func (*ImplicitlyAnimatedWidget) Curve

Curve is the curve to apply when animating the parameters of this widget.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidget.curve

func (*ImplicitlyAnimatedWidget) Duration

func (w *ImplicitlyAnimatedWidget) Duration() time.Duration

Duration is the duration over which to animate the parameters of this widget.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidget.duration

func (*ImplicitlyAnimatedWidget) OnEnd

func (w *ImplicitlyAnimatedWidget) OnEnd() func()

OnEnd is called every time an animation completes.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidget.onEnd

type ImplicitlyAnimatedWidgetOpts

type ImplicitlyAnimatedWidgetOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve to apply when animating the parameters of this widget;
	// the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes. It can be useful to
	// trigger another animation after the previous one ends.
	OnEnd func()
}

ImplicitlyAnimatedWidgetOpts are the optional parameters of NewImplicitlyAnimatedWidgetBase.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidget.new

type ImplicitlyAnimatedWidgetState

type ImplicitlyAnimatedWidgetState[W ImplicitlyAnimated] struct {
	StateOf[W]
	SingleTickerProvider
	// contains filtered or unexported fields
}

ImplicitlyAnimatedWidgetState is the embedded base of the state of an implicitly animated widget. The state type embeds it, implements ForEachTween (calling VisitTween for each tween), Build, and optionally DidUpdateTweens.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidgetState

func (*ImplicitlyAnimatedWidgetState[W]) Animation

Animation is the animation of the state, with the curve of the widget.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidgetState.animation

func (*ImplicitlyAnimatedWidgetState[W]) Controller

Controller is the animation controller that runs the animations of the state.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidgetState.controller

func (*ImplicitlyAnimatedWidgetState[W]) DidUpdateWidget

func (s *ImplicitlyAnimatedWidgetState[W]) DidUpdateWidget(old W)

DidUpdateWidget starts an animation when a target changed.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidgetState.didUpdateWidget

func (*ImplicitlyAnimatedWidgetState) DisableAnimations

func (h *ImplicitlyAnimatedWidgetState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*ImplicitlyAnimatedWidgetState[W]) Dispose

func (s *ImplicitlyAnimatedWidgetState[W]) Dispose()

Dispose releases the animation and the controller.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidgetState.dispose

func (*ImplicitlyAnimatedWidgetState) ErrorReporter

func (h *ImplicitlyAnimatedWidgetState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*ImplicitlyAnimatedWidgetState[W]) InitState

func (s *ImplicitlyAnimatedWidgetState[W]) InitState()

InitState creates the controller and the tweens.

Flutter: widgets/implicit_animations.dart ImplicitlyAnimatedWidgetState.initState

type IndexedSemantics

type IndexedSemantics struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

IndexedSemantics annotates a child of a scrollable with its index, so that assistive technologies know its place in the list.

Flutter: widgets/basic.dart IndexedSemantics

func NewIndexedSemantics

func NewIndexedSemantics(index int, child Widget, opts ...WidgetOpts) *IndexedSemantics

NewIndexedSemantics creates a widget that gives the child its index.

Flutter: widgets/basic.dart IndexedSemantics.new

func (*IndexedSemantics) CreateRenderObject

func (w *IndexedSemantics) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart IndexedSemantics.createRenderObject

func (*IndexedSemantics) Index

func (w *IndexedSemantics) Index() int

Index is the index of the child.

Flutter: widgets/basic.dart IndexedSemantics.index

func (*IndexedSemantics) UpdateRenderObject

func (w *IndexedSemantics) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the index to the render object.

Flutter: widgets/basic.dart IndexedSemantics.updateRenderObject

type IndexedSlot

type IndexedSlot struct {
	// Index is the position of the element in the list.
	//
	// Flutter: widgets/framework.dart IndexedSlot.index
	Index int
	// Value is the previous sibling, or nil for the first.
	//
	// Flutter: widgets/framework.dart IndexedSlot.value
	Value Element
}

IndexedSlot is the slot of an element whose parent keeps its children in a list: the index of the element and the element before it. It is a value, so two slots are equal when both parts are.

Flutter: widgets/framework.dart IndexedSlot

type IndexedStack

type IndexedStack struct {
	StatelessWidget
	// contains filtered or unexported fields
}

IndexedStack is a Stack that shows a single child from a list of children.

Deviation: index: null is NoIndex (SPEC §12.10).

Flutter: widgets/indexed_stack.dart IndexedStack

func NewIndexedStack

func NewIndexedStack(children []Widget, opts ...IndexedStackOpts) *IndexedStack

NewIndexedStack creates a stack that shows one of the children.

Flutter: widgets/indexed_stack.dart IndexedStack.new

func (*IndexedStack) Alignment

func (w *IndexedStack) Alignment() painting.AlignmentGeometry

Alignment is how to align the non-positioned children.

Flutter: widgets/indexed_stack.dart IndexedStack.alignment

func (*IndexedStack) Build

func (w *IndexedStack) Build(BuildContext) Widget

Build builds the stack, with each child in a scope that tells Visibility.of whether the child is the shown one.

Flutter: widgets/indexed_stack.dart IndexedStack.build

func (*IndexedStack) Children

func (w *IndexedStack) Children() []Widget

Children are the child widgets of the stack.

Flutter: widgets/indexed_stack.dart IndexedStack.children

func (*IndexedStack) ClipBehavior

func (w *IndexedStack) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped when it overflows.

Flutter: widgets/indexed_stack.dart IndexedStack.clipBehavior

func (*IndexedStack) Index

func (w *IndexedStack) Index() foundation.Opt[int]

Index is the index of the child to show, if any.

Flutter: widgets/indexed_stack.dart IndexedStack.index

func (*IndexedStack) Sizing

func (w *IndexedStack) Sizing() rendering.StackFit

Sizing is how to size the non-positioned children.

Flutter: widgets/indexed_stack.dart IndexedStack.sizing

func (*IndexedStack) TextDirection

func (w *IndexedStack) TextDirection() ui.TextDirection

TextDirection is the direction used to resolve a directional alignment.

Flutter: widgets/indexed_stack.dart IndexedStack.textDirection

type IndexedStackOpts

type IndexedStackOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment is how to align the non-positioned children; the default is
	// AlignmentDirectional.topStart.
	Alignment painting.AlignmentGeometry
	// TextDirection is the direction used to resolve a directional alignment.
	TextDirection ui.TextDirection
	// ClipBehavior is whether the content is clipped when it overflows; the
	// default is ClipHardEdge.
	ClipBehavior ui.Clip
	// Sizing is how to size the non-positioned children; the default is
	// StackFitLoose.
	Sizing rendering.StackFit
	// Index is the index of the child to show; the default is 0.
	Index foundation.Opt[int]
	// NoIndex shows no child at all (Flutter's index: null); it wins over Index.
	NoIndex bool
}

IndexedStackOpts are the optional parameters of NewIndexedStack.

Flutter: widgets/indexed_stack.dart IndexedStack.new

type IndexedWidgetBuilder

type IndexedWidgetBuilder func(bc BuildContext, index int) Widget

IndexedWidgetBuilder builds the widget at an index.

Flutter: widgets/framework.dart IndexedWidgetBuilder

type InheritedElement

type InheritedElement struct {
	ProxyElement
	// contains filtered or unexported fields
}

InheritedElement is the element of an InheritedWidget. It keeps the elements that depend on its widget.

Flutter: widgets/framework.dart InheritedElement

func NewInheritedElement

func NewInheritedElement(w InheritedWidgetInterface) *InheritedElement

NewInheritedElement creates the element of an inherited widget.

Flutter: widgets/framework.dart InheritedElement.new

func (*InheritedElement) GetDependencies

func (e *InheritedElement) GetDependencies(dependent Element) any

GetDependencies is what the dependent keeps about its dependency.

Flutter: widgets/framework.dart InheritedElement.getDependencies

func (*InheritedElement) NotifyClients

func (e *InheritedElement) NotifyClients(oldWidget Widget)

NotifyClients tells every dependent that the widget changed.

Flutter: widgets/framework.dart InheritedElement.notifyClients

func (*InheritedElement) NotifyDependent

func (e *InheritedElement) NotifyDependent(_ Widget, dependent Element)

NotifyDependent calls DidChangeDependencies on the dependent.

Flutter: widgets/framework.dart InheritedElement.notifyDependent

func (*InheritedElement) RemoveDependent

func (e *InheritedElement) RemoveDependent(dependent Element)

RemoveDependent forgets the dependent.

Flutter: widgets/framework.dart InheritedElement.removeDependent

func (*InheritedElement) SetDependencies

func (e *InheritedElement) SetDependencies(dependent Element, value any)

SetDependencies sets what the dependent keeps about its dependency.

Flutter: widgets/framework.dart InheritedElement.setDependencies

func (*InheritedElement) UpdateDependencies

func (e *InheritedElement) UpdateDependencies(dependent Element, _ any)

UpdateDependencies records a dependent with no aspect.

Flutter: widgets/framework.dart InheritedElement.updateDependencies

func (*InheritedElement) Updated

func (e *InheritedElement) Updated(oldWidget Widget)

Updated tells the clients only if the widget says they should hear about it.

Flutter: widgets/framework.dart InheritedElement.updated

type InheritedElementSelf

type InheritedElementSelf interface {
	ProxyElementSelf
	// GetDependencies is the information the dependent keeps about what it
	// depends on (an aspect, for models); nil for none.
	//
	// Flutter: widgets/framework.dart InheritedElement.getDependencies
	GetDependencies(dependent Element) any
	// SetDependencies sets that information.
	//
	// Flutter: widgets/framework.dart InheritedElement.setDependencies
	SetDependencies(dependent Element, value any)
	// UpdateDependencies is called when the dependent starts to depend on this
	// element, with the aspect it asked for.
	//
	// Flutter: widgets/framework.dart InheritedElement.updateDependencies
	UpdateDependencies(dependent Element, aspect any)
	// NotifyDependent tells one dependent that the widget changed.
	//
	// Flutter: widgets/framework.dart InheritedElement.notifyDependent
	NotifyDependent(oldWidget Widget, dependent Element)
	// RemoveDependent forgets the dependent.
	//
	// Flutter: widgets/framework.dart InheritedElement.removeDependent
	RemoveDependent(dependent Element)
	// contains filtered or unexported methods
}

InheritedElementSelf is what an inherited element needs from the outer type; InheritedElement implements all of it, so an element that embeds it overrides only the hooks it changes (InheritedModel and InheritedNotifier do).

Flutter: no counterpart

func GetElementForInheritedWidget

func GetElementForInheritedWidget[T InheritedWidgetInterface](bc BuildContext) InheritedElementSelf

GetElementForInheritedWidget returns the closest inherited element for widgets of type T above the context, or nil, without registering a dependency.

Flutter: widgets/framework.dart BuildContext.getElementForInheritedWidgetOfExactType

func LookupBoundaryGetElementForInheritedWidgetOfExactType

func LookupBoundaryGetElementForInheritedWidgetOfExactType[T InheritedWidgetInterface](bc BuildContext) InheritedElementSelf

LookupBoundaryGetElementForInheritedWidgetOfExactType is GetElementForInheritedWidget that does not look past a LookupBoundary. It returns nil when there is no such element, or when a boundary is closer.

Flutter: widgets/lookup_boundary.dart LookupBoundary.getElementForInheritedWidgetOfExactType

type InheritedModel

type InheritedModel struct{ InheritedWidget }

InheritedModel is an inherited widget whose dependents depend on parts of it, the aspects: a dependent is rebuilt only when an aspect it asked for changed. Aspects are comparable values of any type. Embed it, implement UpdateShouldNotifyDependent, and optionally IsSupportedAspect.

Flutter: widgets/inherited_model.dart InheritedModel

func NewInheritedModelBase

func NewInheritedModelBase(child Widget, opts ...WidgetOpts) InheritedModel

NewInheritedModelBase creates the embedded base of an inherited model.

Flutter: widgets/inherited_model.dart InheritedModel.new

func (*InheritedModel) IsSupportedAspect

func (*InheritedModel) IsSupportedAspect(any) bool

IsSupportedAspect is whether the model has the aspect; it is true by default. When it is false, the lookup goes on to the next model of the same type above.

Flutter: widgets/inherited_model.dart InheritedModel.isSupportedAspect

type InheritedModelElement

type InheritedModelElement struct {
	InheritedElement
}

InheritedModelElement is the element of an InheritedModel: it keeps the aspects each dependent depends on.

Flutter: widgets/inherited_model.dart InheritedModelElement

func NewInheritedModelElement

func NewInheritedModelElement(w modelWidget) *InheritedModelElement

NewInheritedModelElement creates the element of an inherited model.

Flutter: widgets/inherited_model.dart InheritedModelElement.new

func (*InheritedModelElement) NotifyDependent

func (e *InheritedModelElement) NotifyDependent(oldWidget Widget, dependent Element)

NotifyDependent rebuilds the dependent if it depends on the whole model or on an aspect that the widget says changed.

Flutter: widgets/inherited_model.dart InheritedModelElement.notifyDependent

func (*InheritedModelElement) UpdateDependencies

func (e *InheritedModelElement) UpdateDependencies(dependent Element, aspect any)

UpdateDependencies adds the aspect to the aspects of the dependent; a dependent with no aspect depends on the whole model.

Flutter: widgets/inherited_model.dart InheritedModelElement.updateDependencies

type InheritedNotifier

type InheritedNotifier struct {
	InheritedWidget
	// contains filtered or unexported fields
}

InheritedNotifier is an inherited widget whose dependents are rebuilt when a Listenable (such as a ChangeNotifier) notifies, not only when the widget is replaced. Embed it and use DependOn to look the outer widget up.

Flutter: widgets/inherited_notifier.dart InheritedNotifier

func NewInheritedNotifierBase

func NewInheritedNotifierBase(notifier foundation.Listenable, child Widget, opts ...WidgetOpts) InheritedNotifier

NewInheritedNotifierBase creates the embedded base. The notifier may be nil.

Flutter: widgets/inherited_notifier.dart InheritedNotifier.new

func (*InheritedNotifier) Notifier

func (n *InheritedNotifier) Notifier() foundation.Listenable

Notifier is the object the dependents listen to, or nil.

Flutter: widgets/inherited_notifier.dart InheritedNotifier.notifier

func (*InheritedNotifier) UpdateShouldNotify

func (n *InheritedNotifier) UpdateShouldNotify(oldWidget Widget) bool

UpdateShouldNotify is whether the notifier is another one.

Flutter: widgets/inherited_notifier.dart InheritedNotifier.updateShouldNotify

type InheritedNotifierElement

type InheritedNotifierElement struct {
	InheritedElement
	// contains filtered or unexported fields
}

InheritedNotifierElement is the element of an InheritedNotifier: it listens to the notifier and rebuilds its dependents when it notifies.

Flutter: widgets/inherited_notifier.dart _InheritedNotifierElement

func NewInheritedNotifierElement

func NewInheritedNotifierElement(w notifierWidget) *InheritedNotifierElement

NewInheritedNotifierElement creates the element of an inherited notifier.

Flutter: widgets/inherited_notifier.dart _InheritedNotifierElement.new

func (*InheritedNotifierElement) Build

func (e *InheritedNotifierElement) Build() Widget

Build tells the dependents first if the notifier notified.

Flutter: widgets/inherited_notifier.dart _InheritedNotifierElement.build

func (*InheritedNotifierElement) NotifyClients

func (e *InheritedNotifierElement) NotifyClients(oldWidget Widget)

NotifyClients tells the dependents and clears the flag.

Flutter: widgets/inherited_notifier.dart _InheritedNotifierElement.notifyClients

func (*InheritedNotifierElement) Unmount

func (e *InheritedNotifierElement) Unmount()

Unmount stops listening.

Flutter: widgets/inherited_notifier.dart _InheritedNotifierElement.unmount

func (*InheritedNotifierElement) Update

func (e *InheritedNotifierElement) Update(newWidget Widget)

Update moves the listener to the new notifier.

Flutter: widgets/inherited_notifier.dart _InheritedNotifierElement.update

type InheritedTheme

type InheritedTheme struct{ InheritedWidget }

InheritedTheme is an inherited widget that can be copied to another place in the tree, such as a dialog or a route that is built outside the theme's subtree. Embed it and implement Wrap.

Flutter: widgets/inherited_theme.dart InheritedTheme

func NewInheritedThemeBase

func NewInheritedThemeBase(child Widget, opts ...WidgetOpts) InheritedTheme

NewInheritedThemeBase creates the embedded base of an inherited theme.

Flutter: widgets/inherited_theme.dart InheritedTheme.new

type InheritedWidget

type InheritedWidget struct{ ProxyWidget }

InheritedWidget is a widget that passes information down the tree: the widgets below it can look it up with DependOn[T](bc) and are rebuilt when it changes. Embed it in a widget type and implement UpdateShouldNotify:

type AppConfig struct {
	widgets.InheritedWidget
	color Color
}

func (c *AppConfig) UpdateShouldNotify(old widgets.Widget) bool {
	return old.(*AppConfig).color != c.color
}

Flutter: widgets/framework.dart InheritedWidget

func NewInheritedWidgetBase

func NewInheritedWidgetBase(child Widget, opts ...WidgetOpts) InheritedWidget

NewInheritedWidgetBase creates the embedded base of an inherited widget.

Flutter: widgets/framework.dart InheritedWidget.new

type InheritedWidgetInterface

type InheritedWidgetInterface interface {

	// UpdateShouldNotify is whether the widgets that depend on this one are
	// rebuilt after the widget is replaced by this one. oldWidget has the same
	// type.
	//
	// Flutter: widgets/framework.dart InheritedWidget.updateShouldNotify
	UpdateShouldNotify(oldWidget Widget) bool
	// contains filtered or unexported methods
}

InheritedWidgetInterface is what an inherited widget implements: the embedded InheritedWidget and UpdateShouldNotify. It is the constraint of DependOn.

Flutter: widgets/framework.dart InheritedWidget

type InitialRouteListFactory

type InitialRouteListFactory func(initialRoute string) []Route

InitialRouteListFactory makes the routes to start the navigator with, from the name of the initial route.

Flutter: widgets/app.dart InitialRouteListFactory

type Intent

type Intent interface {
	// IsIntent marks the type as an intent.
	IsIntent()
}

Intent is a description of an action that the user wants to do, such as moving the focus to the next widget or dismissing a dialog. Shortcuts map key events to intents, and Actions map the types of intents to the Action that carries them out.

An intent is a value: embed IntentBase in a struct, and pass the struct itself (not a pointer) to Actions and Shortcuts. The type of the value, as IntentTypeOf gives it, is the key that finds the Action.

Deviation: Flutter's Intent is an abstract class; Glutter's is this interface with the embeddable IntentBase (SPEC §12.10).

Flutter: widgets/actions.dart Intent

func IntentForMacOSSelector

func IntentForMacOSSelector(selectorName string) Intent

IntentForMacOSSelector maps the selector of NSStandardKeyBindingResponding (what the Cocoa text system asks of a text field for a key it does not insert: "moveLeft:", "deleteWordBackward:") to the intent of the framework. It returns nil for a selector that is not known.

Flutter: widgets/default_text_editing_shortcuts.dart intentForMacOSSelector

type IntentBase

type IntentBase struct{}

IntentBase is embedded in a struct to make it an Intent.

Flutter: widgets/actions.dart Intent

func (IntentBase) DebugFillProperties

func (IntentBase) DebugFillProperties(*foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds nothing: an intent has no properties of its own.

Flutter: widgets/actions.dart Intent

func (IntentBase) IsIntent

func (IntentBase) IsIntent()

IsIntent marks the type as an intent.

Flutter: widgets/actions.dart Intent

type InteractiveViewer

type InteractiveViewer struct {
	StatefulWidget
	// contains filtered or unexported fields
}

InteractiveViewer is a widget that enables pan and zoom interactions with its child.

Flutter: widgets/interactive_viewer.dart InteractiveViewer

func NewInteractiveViewer

func NewInteractiveViewer(child Widget, opts ...InteractiveViewerOpts) *InteractiveViewer

NewInteractiveViewer creates a viewer of the child that pans and zooms.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.new

func NewInteractiveViewerBuilder

func NewInteractiveViewerBuilder(builder InteractiveViewerWidgetBuilder, opts ...InteractiveViewerOpts) *InteractiveViewer

NewInteractiveViewerBuilder creates a viewer whose child the builder builds for the visible part of the scene.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.builder

func (*InteractiveViewer) Child

func (w *InteractiveViewer) Child() Widget

Child is the widget that is panned and zoomed, or nil for the builder.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.child

func (*InteractiveViewer) CreateState

func (w *InteractiveViewer) CreateState() State

CreateState creates the state.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.createState

func (*InteractiveViewer) MaxScale

func (w *InteractiveViewer) MaxScale() float64

MaxScale is the maximum scale.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.maxScale

func (*InteractiveViewer) MinScale

func (w *InteractiveViewer) MinScale() float64

MinScale is the minimum scale.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.minScale

func (*InteractiveViewer) TransformationController

func (w *InteractiveViewer) TransformationController() *TransformationController

TransformationController is the controller of the transformation, or nil.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.transformationController

type InteractiveViewerOpts

type InteractiveViewerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ClipBehavior is how the child is clipped; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// PanAxis is the axes along which the child pans; the default is PanAxisFree.
	PanAxis PanAxis
	// BoundaryMargin is the margin around the child that the viewport can pan
	// into; the default is none.
	BoundaryMargin painting.EdgeInsets
	// Constrained is whether the child gets the constraints of the viewer (true)
	// or unbounded ones; the default is true. It is false for the builder.
	Constrained foundation.Opt[bool]
	// MaxScale is the maximum scale; the default is 2.5.
	MaxScale foundation.Opt[float64]
	// MinScale is the minimum scale; the default is 0.8.
	MinScale foundation.Opt[float64]
	// InteractionEndFrictionCoefficient is the drag of the inertia after an
	// interaction; the default is 0.0000135.
	InteractionEndFrictionCoefficient foundation.Opt[float64]
	// OnInteractionEnd is called when the user ends an interaction.
	OnInteractionEnd gestures.GestureScaleEndCallback
	// OnInteractionStart is called when the user starts an interaction.
	OnInteractionStart gestures.GestureScaleStartCallback
	// OnInteractionUpdate is called when the user updates an interaction.
	OnInteractionUpdate gestures.GestureScaleUpdateCallback
	// PanEnabled is whether panning is enabled; the default is true.
	PanEnabled foundation.Opt[bool]
	// ScaleEnabled is whether scaling is enabled; the default is true.
	ScaleEnabled foundation.Opt[bool]
	// ScaleFactor is how many pixels of mouse scroll make a scale of e; the
	// default is 200.
	ScaleFactor foundation.Opt[float64]
	// TransformationController is the controller of the transformation; the
	// default is one the viewer makes.
	TransformationController *TransformationController
	// Alignment is the alignment of the origin of the transformation.
	Alignment painting.AlignmentGeometry
	// TrackpadScrollCausesScale is whether a trackpad scroll scales (true) or pans
	// (false, the default).
	TrackpadScrollCausesScale bool
}

InteractiveViewerOpts are the optional parameters of NewInteractiveViewer and NewInteractiveViewerBuilder.

Flutter: widgets/interactive_viewer.dart InteractiveViewer.new

type InteractiveViewerWidgetBuilder

type InteractiveViewerWidgetBuilder func(bc BuildContext, viewport ui.Quad) Widget

InteractiveViewerWidgetBuilder builds the child of an InteractiveViewer for the part of the scene that is visible: the viewport as a quad in scene coordinates.

Flutter: widgets/interactive_viewer.dart InteractiveViewerWidgetBuilder

type IntrinsicHeight

type IntrinsicHeight struct {
	SingleChildRenderObjectWidget
}

IntrinsicHeight sizes its child to the child's intrinsic height.

Flutter: widgets/basic.dart IntrinsicHeight

func NewIntrinsicHeight

func NewIntrinsicHeight(child Widget, opts ...IntrinsicHeightOpts) *IntrinsicHeight

NewIntrinsicHeight creates the widget.

Flutter: widgets/basic.dart IntrinsicHeight.new

func (*IntrinsicHeight) CreateRenderObject

func (w *IntrinsicHeight) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart IntrinsicHeight.createRenderObject

type IntrinsicHeightOpts

type IntrinsicHeightOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

IntrinsicHeightOpts are the optional parameters of NewIntrinsicHeight.

Flutter: widgets/basic.dart IntrinsicHeight.new

type IntrinsicWidth

type IntrinsicWidth struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

IntrinsicWidth sizes its child to the child's maximum intrinsic width.

Flutter: widgets/basic.dart IntrinsicWidth

func NewIntrinsicWidth

func NewIntrinsicWidth(child Widget, opts ...IntrinsicWidthOpts) *IntrinsicWidth

NewIntrinsicWidth creates the widget.

Flutter: widgets/basic.dart IntrinsicWidth.new

func (*IntrinsicWidth) CreateRenderObject

func (w *IntrinsicWidth) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart IntrinsicWidth.createRenderObject

func (*IntrinsicWidth) StepHeight

func (w *IntrinsicWidth) StepHeight() foundation.Opt[float64]

StepHeight makes the height a multiple of this value when it is given.

Flutter: widgets/basic.dart IntrinsicWidth.stepHeight

func (*IntrinsicWidth) StepWidth

func (w *IntrinsicWidth) StepWidth() foundation.Opt[float64]

StepWidth makes the width a multiple of this value when it is given.

Flutter: widgets/basic.dart IntrinsicWidth.stepWidth

func (*IntrinsicWidth) UpdateRenderObject

func (w *IntrinsicWidth) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart IntrinsicWidth.updateRenderObject

type IntrinsicWidthOpts

type IntrinsicWidthOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// StepWidth makes the width a multiple of this value when it is given.
	StepWidth foundation.Opt[float64]
	// StepHeight makes the height a multiple of this value when it is given.
	StepHeight foundation.Opt[float64]
}

IntrinsicWidthOpts are the optional parameters of NewIntrinsicWidth.

Flutter: widgets/basic.dart IntrinsicWidth.new

type KeepAlive

type KeepAlive struct {
	ParentDataWidgetOf[rendering.KeepAliveParentData]
	// contains filtered or unexported fields
}

KeepAlive marks a child of a sliver list (or of a two-dimensional viewport) as one to keep alive when it scrolls out of view. It is the parent data widget that AutomaticKeepAlive builds.

Flutter: widgets/sliver.dart KeepAlive

func NewKeepAlive

func NewKeepAlive(keepAlive bool, child Widget, opts ...KeepAliveOpts) *KeepAlive

NewKeepAlive creates a widget that tells the parent whether to keep the child alive.

Flutter: widgets/sliver.dart KeepAlive.new

func (*KeepAlive) ApplyParentData

func (w *KeepAlive) ApplyParentData(renderObject rendering.RenderObject)

ApplyParentData writes the flag to the parent data. When the flag is turned off, the parent lays out again, so that it can let the child go.

Flutter: widgets/sliver.dart KeepAlive.applyParentData

func (*KeepAlive) DebugCanApplyOutOfTurn

func (w *KeepAlive) DebugCanApplyOutOfTurn() bool

DebugCanApplyOutOfTurn is whether the widget keeps the child alive: only that can be applied without a rebuild.

Flutter: widgets/sliver.dart KeepAlive.debugCanApplyOutOfTurn

func (*KeepAlive) DebugTypicalAncestorWidgetClass

func (w *KeepAlive) DebugTypicalAncestorWidgetClass() string

DebugTypicalAncestorWidgetClass is not used: DebugTypicalAncestorWidgetDescription names the ancestors.

Flutter: widgets/sliver.dart KeepAlive.debugTypicalAncestorWidgetClass

func (*KeepAlive) DebugTypicalAncestorWidgetDescription

func (w *KeepAlive) DebugTypicalAncestorWidgetDescription() string

DebugTypicalAncestorWidgetDescription names the widgets that KeepAlive goes inside.

Flutter: widgets/sliver.dart KeepAlive.debugTypicalAncestorWidgetDescription

func (*KeepAlive) KeepAlive

func (w *KeepAlive) KeepAlive() bool

KeepAlive is whether the child is kept alive.

Flutter: widgets/sliver.dart KeepAlive.keepAlive

type KeepAliveHandle

type KeepAliveHandle struct {
	foundation.ChangeNotifier
}

KeepAliveHandle is the Listenable that a client keeps alive with: disposing it tells the AutomaticKeepAlive that the client is done.

Flutter: widgets/automatic_keep_alive.dart KeepAliveHandle

func NewKeepAliveHandle

func NewKeepAliveHandle() *KeepAliveHandle

NewKeepAliveHandle creates a handle.

Flutter: widgets/automatic_keep_alive.dart KeepAliveHandle.new

func (*KeepAliveHandle) Dispose

func (h *KeepAliveHandle) Dispose()

Dispose notifies the listeners, then drops them.

Flutter: widgets/automatic_keep_alive.dart KeepAliveHandle.dispose

type KeepAliveNotification

type KeepAliveNotification struct {
	// Handle is notified when the client no longer wants to be kept alive.
	//
	// Flutter: widgets/automatic_keep_alive.dart KeepAliveNotification.handle
	Handle foundation.Listenable
}

KeepAliveNotification is dispatched by a widget that wants its subtree kept alive; the handle tells the AutomaticKeepAlive above when it does not any more.

Flutter: widgets/automatic_keep_alive.dart KeepAliveNotification

type KeepAliveOpts

type KeepAliveOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

KeepAliveOpts are the optional parameters of NewKeepAlive.

Flutter: widgets/sliver.dart KeepAlive.new

type KeyEventResult

type KeyEventResult int

KeyEventResult is what a key event handler says about the event. The zero value, KeyEventResultUnspecified, counts as KeyEventResultIgnored.

Flutter: widgets/focus_manager.dart KeyEventResult

const (
	// KeyEventResultUnspecified is the zero value; it is treated as ignored.
	//
	// Flutter: no counterpart
	KeyEventResultUnspecified KeyEventResult = iota
	// KeyEventResultHandled says the handler used the event: nothing else sees it.
	//
	// Flutter: widgets/focus_manager.dart KeyEventResult.handled
	KeyEventResultHandled
	// KeyEventResultIgnored says the handler did not use the event: the next
	// handler sees it.
	//
	// Flutter: widgets/focus_manager.dart KeyEventResult.ignored
	KeyEventResultIgnored
	// KeyEventResultSkipRemainingHandlers says the handler did not use the event
	// but no other focus node sees it: it goes on to the platform.
	//
	// Flutter: widgets/focus_manager.dart KeyEventResult.skipRemainingHandlers
	KeyEventResultSkipRemainingHandlers
)

The values of KeyEventResult follow Flutter's declaration order.

func CombineKeyEventResults

func CombineKeyEventResults(results []KeyEventResult) KeyEventResult

CombineKeyEventResults combines the results of several handlers: handled if any handled, else skipRemainingHandlers if any said so, else ignored.

Flutter: widgets/focus_manager.dart combineKeyEventResults

func (KeyEventResult) String

func (r KeyEventResult) String() string

String is the name of the result, like Dart's enum toString.

Flutter: widgets/focus_manager.dart KeyEventResult

type KeyedSubtree

type KeyedSubtree struct {
	StatelessWidget
	// contains filtered or unexported fields
}

KeyedSubtree is a widget that builds its child; it exists to give the child a key, so that a list of children can be told apart.

Flutter: widgets/framework.dart KeyedSubtree

func NewKeyedSubtree

func NewKeyedSubtree(child Widget, opts ...WidgetOpts) *KeyedSubtree

NewKeyedSubtree creates a widget that builds the child.

Flutter: widgets/framework.dart KeyedSubtree.new

func NewKeyedSubtreeWrap

func NewKeyedSubtreeWrap(childIndex int, child Widget) *KeyedSubtree

NewKeyedSubtreeWrap wraps the child in a KeyedSubtree with a ValueKey of the child's key, or of the index when it has none.

Flutter: widgets/framework.dart KeyedSubtree.wrap

func (*KeyedSubtree) Build

func (w *KeyedSubtree) Build(BuildContext) Widget

Build returns the child.

Flutter: widgets/framework.dart KeyedSubtree.build

func (*KeyedSubtree) Child

func (w *KeyedSubtree) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/framework.dart KeyedSubtree.child

type LayoutBuilder

type LayoutBuilder struct {
	RenderObjectWidget
	// contains filtered or unexported fields
}

LayoutBuilder builds a widget tree that can depend on the parent widget's size: the builder is called with the constraints the parent gives, at layout time, whenever they change or the widget is updated.

Flutter: widgets/layout_builder.dart LayoutBuilder

func NewLayoutBuilder

func NewLayoutBuilder(builder LayoutWidgetBuilder, opts ...LayoutBuilderOpts) *LayoutBuilder

NewLayoutBuilder creates a widget that builds its child with the constraints of its parent.

Flutter: widgets/layout_builder.dart LayoutBuilder.new

func (*LayoutBuilder) Builder

func (w *LayoutBuilder) Builder() LayoutWidgetBuilder

Builder is the function that builds the child.

Flutter: widgets/layout_builder.dart ConstrainedLayoutBuilder.builder

func (*LayoutBuilder) CreateElement

func (w *LayoutBuilder) CreateElement() Element

CreateElement creates the element, which builds the child during layout.

Flutter: widgets/layout_builder.dart AbstractLayoutBuilder.createElement

func (*LayoutBuilder) CreateRenderObject

func (w *LayoutBuilder) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/layout_builder.dart LayoutBuilder.createRenderObject

type LayoutBuilderOpts

type LayoutBuilderOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Extra, when set, is called at layout time, and the builder runs again when
	// its value (a comparable value) differs from the one of the last build, even
	// if the constraints did not change. It takes the place of the extra fields of
	// the BoxConstraints subclass that Flutter's Scaffold passes to its body
	// builder, which Go's BoxConstraints cannot carry (SPEC §12.10). The function
	// of the first widget that creates the render object stays.
	Extra func() any
}

LayoutBuilderOpts are the optional parameters of NewLayoutBuilder.

Flutter: widgets/layout_builder.dart LayoutBuilder.new

type LayoutChangedNotification

type LayoutChangedNotification struct{}

LayoutChangedNotification indicates that the layout of a subtree changed.

Flutter: widgets/notification_listener.dart LayoutChangedNotification

type LayoutId

type LayoutId struct {
	ParentDataWidgetOf[*rendering.MultiChildLayoutParentData]
	// contains filtered or unexported fields
}

LayoutId is a widget that provides the id of a child of a CustomMultiChildLayout to its delegate.

Flutter: widgets/basic.dart LayoutId

func NewLayoutId

func NewLayoutId(id any, child Widget) *LayoutId

NewLayoutId creates a widget that identifies the child to the layout delegate; the key of the widget is a ValueKey of the id.

Flutter: widgets/basic.dart LayoutId.new

func (*LayoutId) ApplyParentData

func (w *LayoutId) ApplyParentData(renderObject rendering.RenderObject)

ApplyParentData writes the id to the parent data of the render object.

Flutter: widgets/basic.dart LayoutId.applyParentData

func (*LayoutId) DebugTypicalAncestorWidgetClass

func (*LayoutId) DebugTypicalAncestorWidgetClass() string

DebugTypicalAncestorWidgetClass is the name of the widget this one belongs in.

Flutter: widgets/basic.dart LayoutId.debugTypicalAncestorWidgetClass

func (*LayoutId) ID

func (w *LayoutId) ID() any

ID is the identity of the child.

Flutter: widgets/basic.dart LayoutId.id

type LayoutWidgetBuilder

type LayoutWidgetBuilder func(bc BuildContext, constraints rendering.BoxConstraints) Widget

LayoutWidgetBuilder builds a widget for the constraints that the parent gives.

Flutter: widgets/layout_builder.dart LayoutWidgetBuilder

type LeafRenderObjectElement

type LeafRenderObjectElement struct {
	RenderObjectElement
}

LeafRenderObjectElement is the element of a LeafRenderObjectWidget.

Flutter: widgets/framework.dart LeafRenderObjectElement

func NewLeafRenderObjectElement

func NewLeafRenderObjectElement(w leafRenderObjectWidget) *LeafRenderObjectElement

NewLeafRenderObjectElement creates the element of a leaf render object widget.

Flutter: widgets/framework.dart LeafRenderObjectElement.new

func (*LeafRenderObjectElement) ForgetChild

func (e *LeafRenderObjectElement) ForgetChild(Element)

ForgetChild panics: a leaf has no children.

Flutter: widgets/framework.dart LeafRenderObjectElement.forgetChild

func (*LeafRenderObjectElement) InsertRenderObjectChild

func (e *LeafRenderObjectElement) InsertRenderObjectChild(rendering.RenderObject, any)

InsertRenderObjectChild panics: a leaf has no children.

Flutter: widgets/framework.dart LeafRenderObjectElement.insertRenderObjectChild

func (*LeafRenderObjectElement) MoveRenderObjectChild

func (e *LeafRenderObjectElement) MoveRenderObjectChild(rendering.RenderObject, any, any)

MoveRenderObjectChild panics: a leaf has no children.

Flutter: widgets/framework.dart LeafRenderObjectElement.moveRenderObjectChild

func (*LeafRenderObjectElement) RemoveRenderObjectChild

func (e *LeafRenderObjectElement) RemoveRenderObjectChild(rendering.RenderObject, any)

RemoveRenderObjectChild panics: a leaf has no children.

Flutter: widgets/framework.dart LeafRenderObjectElement.removeRenderObjectChild

type LeafRenderObjectWidget

type LeafRenderObjectWidget struct{ RenderObjectWidget }

LeafRenderObjectWidget is a render object widget that has no children.

Flutter: widgets/framework.dart LeafRenderObjectWidget

func NewLeafRenderObjectWidgetBase

func NewLeafRenderObjectWidgetBase(opts ...WidgetOpts) LeafRenderObjectWidget

NewLeafRenderObjectWidgetBase creates the base of a leaf render object widget.

Flutter: widgets/framework.dart LeafRenderObjectWidget.new

type LexicalFocusOrder

type LexicalFocusOrder struct {
	// Order is the string; the lowest comes first.
	Order string
}

LexicalFocusOrder is a focus order given by a string, compared lexically.

Flutter: widgets/focus_traversal.dart LexicalFocusOrder

func NewLexicalFocusOrder

func NewLexicalFocusOrder(order string) *LexicalFocusOrder

NewLexicalFocusOrder creates the order.

Flutter: widgets/focus_traversal.dart LexicalFocusOrder.new

func (*LexicalFocusOrder) DebugFillProperties

func (o *LexicalFocusOrder) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the order.

Flutter: widgets/focus_traversal.dart LexicalFocusOrder.debugFillProperties

type LimitedBox

type LimitedBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

LimitedBox limits its size only when it is unconstrained.

Flutter: widgets/basic.dart LimitedBox

func NewLimitedBox

func NewLimitedBox(child Widget, opts ...LimitedBoxOpts) *LimitedBox

NewLimitedBox creates the widget.

Flutter: widgets/basic.dart LimitedBox.new

func (*LimitedBox) CreateRenderObject

func (w *LimitedBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart LimitedBox.createRenderObject

func (*LimitedBox) MaxHeight

func (w *LimitedBox) MaxHeight() foundation.Opt[float64]

MaxHeight is the maximum height limit to apply in the absence of a maxHeight constraint; the default is infinity.

Flutter: widgets/basic.dart LimitedBox.maxHeight

func (*LimitedBox) MaxWidth

func (w *LimitedBox) MaxWidth() foundation.Opt[float64]

MaxWidth is the maximum width limit to apply in the absence of a maxWidth constraint; the default is infinity.

Flutter: widgets/basic.dart LimitedBox.maxWidth

func (*LimitedBox) UpdateRenderObject

func (w *LimitedBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart LimitedBox.updateRenderObject

type LimitedBoxOpts

type LimitedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// MaxWidth is the maximum width limit to apply in the absence of a maxWidth constraint; the default is infinity.
	MaxWidth foundation.Opt[float64]
	// MaxHeight is the maximum height limit to apply in the absence of a maxHeight constraint; the default is infinity.
	MaxHeight foundation.Opt[float64]
}

LimitedBoxOpts are the optional parameters of NewLimitedBox.

Flutter: widgets/basic.dart LimitedBox.new

type ListBody

type ListBody struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

ListBody displays its children sequentially along a given axis, forcing them to the dimensions of the parent in the other axis.

Flutter: widgets/basic.dart ListBody

func NewListBody

func NewListBody(children []Widget, opts ...ListBodyOpts) *ListBody

NewListBody creates the widget.

Flutter: widgets/basic.dart ListBody.new

func (*ListBody) CreateRenderObject

func (w *ListBody) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ListBody.createRenderObject

func (*ListBody) MainAxis

func (w *ListBody) MainAxis() painting.Axis

MainAxis is the direction to use as the main axis; the default is AxisVertical.

Flutter: widgets/basic.dart ListBody.mainAxis

func (*ListBody) Reverse

func (w *ListBody) Reverse() bool

Reverse is whether the children are laid out from the end of the axis.

Flutter: widgets/basic.dart ListBody.reverse

func (*ListBody) UpdateRenderObject

func (w *ListBody) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ListBody.updateRenderObject

type ListBodyOpts

type ListBodyOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// MainAxis is the direction to use as the main axis; the default is AxisVertical.
	MainAxis painting.Axis
	// Reverse is whether the children are laid out from the end of the axis.
	Reverse bool
}

ListBodyOpts are the optional parameters of NewListBody.

Flutter: widgets/basic.dart ListBody.new

type ListView

type ListView struct {
	BoxScrollView
	// contains filtered or unexported fields
}

ListView is a scrollable list of widgets arranged linearly.

Flutter: widgets/scroll_view.dart ListView

func NewListView

func NewListView(children []Widget, opts ...ListViewOpts) *ListView

NewListView creates a scrollable, linear array of widgets from an explicit list.

Flutter: widgets/scroll_view.dart ListView.new

func NewListViewBuilder

func NewListViewBuilder(itemBuilder NullableIndexedWidgetBuilder, opts ...ListViewOpts) *ListView

NewListViewBuilder creates a scrollable, linear array of widgets that are created on demand.

Flutter: widgets/scroll_view.dart ListView.builder

func NewListViewCustom

func NewListViewCustom(childrenDelegate SliverChildDelegate, opts ...ListViewOpts) *ListView

NewListViewCustom creates a scrollable, linear array of widgets with a custom child model.

Flutter: widgets/scroll_view.dart ListView.custom

func NewListViewSeparated

func NewListViewSeparated(itemBuilder, separatorBuilder NullableIndexedWidgetBuilder, itemCount int, opts ...ListViewOpts) *ListView

NewListViewSeparated creates a scrollable, linear array of widgets with a separator between each pair of items.

Flutter: widgets/scroll_view.dart ListView.separated

func (*ListView) BuildChildLayout

func (v *ListView) BuildChildLayout(BuildContext) Widget

BuildChildLayout builds the sliver list that matches the extent options.

Flutter: widgets/scroll_view.dart ListView.buildChildLayout

func (*ListView) ChildrenDelegate

func (v *ListView) ChildrenDelegate() SliverChildDelegate

ChildrenDelegate supplies the children.

Flutter: widgets/scroll_view.dart ListView.childrenDelegate

func (*ListView) ItemExtent

func (v *ListView) ItemExtent() foundation.Opt[float64]

ItemExtent is the extent the children are forced to have, or none.

Flutter: widgets/scroll_view.dart ListView.itemExtent

func (*ListView) ItemExtentBuilder

func (v *ListView) ItemExtentBuilder() rendering.ItemExtentBuilder

ItemExtentBuilder gives the extent of each child, or nil.

Flutter: widgets/scroll_view.dart ListView.itemExtentBuilder

func (*ListView) PrototypeItem

func (v *ListView) PrototypeItem() Widget

PrototypeItem is the widget that gives the extent of the children, or nil.

Flutter: widgets/scroll_view.dart ListView.prototypeItem

type ListViewOpts

type ListViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ScrollDirection is the axis along which the view scrolls; the default is
	// AxisVertical.
	ScrollDirection painting.Axis
	// Reverse is whether the view scrolls against the reading direction.
	Reverse bool
	// Controller reads and controls the scroll position. A view that has one is
	// not primary.
	Controller ScrollController
	// Primary is whether this is the primary scroll view that uses the
	// PrimaryScrollController above; the default is true for a vertical view
	// with no controller.
	Primary foundation.Opt[bool]
	// Physics is how the view responds to the user; the default is the one of the
	// ScrollBehavior (always scrollable for a primary view).
	Physics ScrollPhysics
	// ShrinkWrap is whether the extent of the view along the main axis is the
	// extent of its content.
	ShrinkWrap bool
	// ScrollCacheExtent is how far beyond the viewport the view builds children;
	// the default is 250 logical pixels.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// KeyboardDismissBehavior is how the view dismisses the keyboard; the default
	// is the one of the ScrollBehavior.
	KeyboardDismissBehavior ScrollViewKeyboardDismissBehavior
	// RestorationID is the identifier for restoring the scroll offset; it has no
	// effect until state restoration is ported.
	RestorationID string
	// ClipBehavior is how the view clips its content; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the view behaves during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
	// Padding is the amount of space by which to inset the children; nil lets the
	// MediaQuery padding apply.
	Padding painting.EdgeInsetsGeometry
	// SemanticChildCount is the number of children that contribute semantic
	// information; the default is the number of items.
	SemanticChildCount foundation.Opt[int]
	// ItemExtent forces the children to have the given extent in the scroll
	// direction; it is more efficient. At most one of ItemExtent, ItemExtentBuilder
	// and PrototypeItem can be given.
	ItemExtent foundation.Opt[float64]
	// ItemExtentBuilder gives the extent of each child in the scroll direction.
	ItemExtentBuilder rendering.ItemExtentBuilder
	// PrototypeItem is a widget whose extent in the scroll direction is the one of
	// all the children.
	PrototypeItem Widget
	// AddAutomaticKeepAlives is whether to wrap each child in an AutomaticKeepAlive;
	// the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
	// AddRepaintBoundaries is whether to wrap each child in a RepaintBoundary; the
	// default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddSemanticIndexes is whether to wrap each child in an IndexedSemantics; the
	// default is true.
	AddSemanticIndexes foundation.Opt[bool]
	// FindChildIndexCallback finds the index of the child that has a key
	// (NewListViewBuilder).
	FindChildIndexCallback ChildIndexGetter
	// FindItemIndexCallback finds the index of the item, not counting the
	// separators, that has a key (NewListViewSeparated).
	FindItemIndexCallback ChildIndexGetter
	// ItemCount is the number of items; none means unbounded
	// (NewListViewBuilder).
	ItemCount foundation.Opt[int]
	// MaintainVisibleContentPosition keeps the items that the user reads where
	// they are on the screen when items are inserted before them, as long as the
	// list is not at its start; at its start the list follows the new items, as in
	// Flutter. A live log (a reverse list whose newest item is at offset 0) can
	// then show new items while the user reads an older one. It works for the
	// items whose element moves to a new index by its key: with
	// FindChildIndexCallback (or FindItemIndexCallback) and a key on each item, or
	// with the keys of the children of NewListView. Without keys it does nothing.
	// The name is the one of React Native's FlatList.
	//
	// Flutter: no counterpart
	MaintainVisibleContentPosition bool
	// EstimateItemOffsets lets a jump into a long list of items of different
	// extents (a click on the scroll bar, a JumpTo) lay out only the items near
	// the new offset. When the offset is more than the viewport and the cache
	// extent away from the items the list has, it does not build the items in
	// between: it builds the item at the index that the average extent of the
	// items it has measured gives for the offset, at the offset that the average
	// gives, and goes on from there. The offsets far from the window shown are
	// estimates, which the list corrects as the user scrolls back: at item 0 the
	// scroll offset is corrected so that the item starts at 0. It applies to
	// SliverList and to a ListView without ItemExtent, ItemExtentBuilder and
	// PrototypeItem (lists with those find an index at once), not to grids.
	//
	// Flutter: no counterpart
	EstimateItemOffsets bool
}

ListViewOpts are the optional parameters of NewListView and its named constructors. Some fields apply to one of them, as the comments say.

Flutter: widgets/scroll_view.dart ListView.new

type ListWheelChildBuilderDelegate

type ListWheelChildBuilderDelegate struct {
	// contains filtered or unexported fields
}

ListWheelChildBuilderDelegate supplies the children with a builder.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildBuilderDelegate

func NewListWheelChildBuilderDelegate

func NewListWheelChildBuilderDelegate(builder NullableIndexedWidgetBuilder, opts ...ListWheelChildBuilderDelegateOpts) *ListWheelChildBuilderDelegate

NewListWheelChildBuilderDelegate creates a delegate that builds the children.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildBuilderDelegate.new

func (*ListWheelChildBuilderDelegate) Build

Build builds the child at the index, with its semantic index.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildBuilderDelegate.build

func (*ListWheelChildBuilderDelegate) ChildCount

ChildCount is the number of children, or none.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildBuilderDelegate.childCount

func (*ListWheelChildBuilderDelegate) EstimatedChildCount

func (d *ListWheelChildBuilderDelegate) EstimatedChildCount() foundation.Opt[int]

EstimatedChildCount is the child count.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildBuilderDelegate.estimatedChildCount

func (*ListWheelChildBuilderDelegate) ShouldRebuild

ShouldRebuild is true: Go functions can not be compared.

Deviation: Dart compares the builder; Go functions are not comparable, so the children are always built again (SPEC §12.10).

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildBuilderDelegate.shouldRebuild

func (*ListWheelChildBuilderDelegate) TrueIndexOf

func (d *ListWheelChildBuilderDelegate) TrueIndexOf(index int) int

TrueIndexOf is the index itself.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildDelegate.trueIndexOf

type ListWheelChildBuilderDelegateOpts

type ListWheelChildBuilderDelegateOpts struct {
	// ChildCount is the number of children; none means unbounded, until the
	// builder returns nil.
	ChildCount foundation.Opt[int]
}

ListWheelChildBuilderDelegateOpts are the optional parameters of NewListWheelChildBuilderDelegate.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildBuilderDelegate.new

type ListWheelChildDelegate

type ListWheelChildDelegate interface {
	// Build returns the child at the index, or nil if there is none.
	//
	// Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildDelegate.build
	Build(bc BuildContext, index int) Widget
	// EstimatedChildCount is the number of children, or none if it is not known.
	//
	// Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildDelegate.estimatedChildCount
	EstimatedChildCount() foundation.Opt[int]
	// TrueIndexOf is the index of the item in the list that the index of a looping
	// delegate stands for.
	//
	// Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildDelegate.trueIndexOf
	TrueIndexOf(index int) int
	// ShouldRebuild is whether the children must be built again, as this delegate
	// replaces the old one.
	//
	// Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildDelegate.shouldRebuild
	ShouldRebuild(oldDelegate ListWheelChildDelegate) bool
}

ListWheelChildDelegate supplies the children of a ListWheelScrollView.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildDelegate

type ListWheelChildListDelegate

type ListWheelChildListDelegate struct {
	// contains filtered or unexported fields
}

ListWheelChildListDelegate supplies the children from an explicit list.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildListDelegate

func NewListWheelChildListDelegate

func NewListWheelChildListDelegate(children []Widget) *ListWheelChildListDelegate

NewListWheelChildListDelegate creates a delegate for the children.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildListDelegate.new

func (*ListWheelChildListDelegate) Build

Build returns the child at the index, with its semantic index.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildListDelegate.build

func (*ListWheelChildListDelegate) Children

func (d *ListWheelChildListDelegate) Children() []Widget

Children are the children.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildListDelegate.children

func (*ListWheelChildListDelegate) EstimatedChildCount

func (d *ListWheelChildListDelegate) EstimatedChildCount() foundation.Opt[int]

EstimatedChildCount is the number of children.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildListDelegate.estimatedChildCount

func (*ListWheelChildListDelegate) ShouldRebuild

func (d *ListWheelChildListDelegate) ShouldRebuild(oldDelegate ListWheelChildDelegate) bool

ShouldRebuild is whether the list of children is not the same one.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildListDelegate.shouldRebuild

func (*ListWheelChildListDelegate) TrueIndexOf

func (d *ListWheelChildListDelegate) TrueIndexOf(index int) int

TrueIndexOf is the index itself.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildDelegate.trueIndexOf

type ListWheelChildLoopingListDelegate

type ListWheelChildLoopingListDelegate struct {
	// contains filtered or unexported fields
}

ListWheelChildLoopingListDelegate supplies the children from an explicit list, over and over: the list is looped.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildLoopingListDelegate

func NewListWheelChildLoopingListDelegate

func NewListWheelChildLoopingListDelegate(children []Widget) *ListWheelChildLoopingListDelegate

NewListWheelChildLoopingListDelegate creates a delegate for the children.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildLoopingListDelegate.new

func (*ListWheelChildLoopingListDelegate) Build

Build returns the child that the index stands for, or nil for an empty list.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildLoopingListDelegate.build

func (*ListWheelChildLoopingListDelegate) Children

func (d *ListWheelChildLoopingListDelegate) Children() []Widget

Children are the children.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildLoopingListDelegate.children

func (*ListWheelChildLoopingListDelegate) EstimatedChildCount

func (d *ListWheelChildLoopingListDelegate) EstimatedChildCount() foundation.Opt[int]

EstimatedChildCount is none: the list is infinite.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildLoopingListDelegate.estimatedChildCount

func (*ListWheelChildLoopingListDelegate) ShouldRebuild

func (d *ListWheelChildLoopingListDelegate) ShouldRebuild(oldDelegate ListWheelChildDelegate) bool

ShouldRebuild is whether the list of children is not the same one.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildLoopingListDelegate.shouldRebuild

func (*ListWheelChildLoopingListDelegate) TrueIndexOf

func (d *ListWheelChildLoopingListDelegate) TrueIndexOf(index int) int

TrueIndexOf wraps the index around the list.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelChildLoopingListDelegate.trueIndexOf

type ListWheelElement

type ListWheelElement struct {
	RenderObjectElement
	// contains filtered or unexported fields
}

ListWheelElement is the element of a ListWheelViewport: it builds the children that the render object asks for.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelElement

func (*ListWheelElement) ChildCount

func (e *ListWheelElement) ChildCount() foundation.Opt[int]

ChildCount is the number of children that the delegate says.

func (*ListWheelElement) ChildExistsAt

func (e *ListWheelElement) ChildExistsAt(index int) bool

ChildExistsAt is whether the delegate has a child at the index.

func (*ListWheelElement) CreateChild

func (e *ListWheelElement) CreateChild(index int, after rendering.Box)

CreateChild builds the child at the index.

func (*ListWheelElement) ForgetChild

func (e *ListWheelElement) ForgetChild(child Element)

ForgetChild drops the child.

func (*ListWheelElement) InsertRenderObjectChild

func (e *ListWheelElement) InsertRenderObjectChild(child rendering.RenderObject, slot any)

InsertRenderObjectChild inserts the child after the one before it.

func (*ListWheelElement) MoveRenderObjectChild

func (e *ListWheelElement) MoveRenderObjectChild(rendering.RenderObject, any, any)

MoveRenderObjectChild panics: the list is kept in contiguous increasing order, so moving children around is not allowed.

func (*ListWheelElement) PerformRebuild

func (e *ListWheelElement) PerformRebuild()

PerformRebuild builds the children again.

func (*ListWheelElement) RemoveChild

func (e *ListWheelElement) RemoveChild(child rendering.Box)

RemoveChild removes the child that the render object gives up.

func (*ListWheelElement) RemoveRenderObjectChild

func (e *ListWheelElement) RemoveRenderObjectChild(child rendering.RenderObject, _ any)

RemoveRenderObjectChild removes the child.

func (*ListWheelElement) Update

func (e *ListWheelElement) Update(newWidget Widget)

Update rebuilds the children when the delegate says it must.

func (*ListWheelElement) UpdateChild

func (e *ListWheelElement) UpdateChild(child Element, newWidget Widget, newSlot any) Element

UpdateChild updates the child, and gives its parent data the index and the offset of the old child.

func (*ListWheelElement) VisitChildren

func (e *ListWheelElement) VisitChildren(visitor ElementVisitor)

VisitChildren visits the children in order of index.

type ListWheelScrollView

type ListWheelScrollView struct {
	StatefulWidget
	// contains filtered or unexported fields
}

ListWheelScrollView is a box in which children are on a wheel that can be rotated.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelScrollView

func NewListWheelScrollView

func NewListWheelScrollView(itemExtent float64, children []Widget, opts ...ListWheelScrollViewOpts) *ListWheelScrollView

NewListWheelScrollView creates a wheel of the children, each with the item extent.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelScrollView.new

func NewListWheelScrollViewUseDelegate

func NewListWheelScrollViewUseDelegate(itemExtent float64, childDelegate ListWheelChildDelegate, opts ...ListWheelScrollViewOpts) *ListWheelScrollView

NewListWheelScrollViewUseDelegate creates a wheel whose children the delegate supplies.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelScrollView.useDelegate

func (*ListWheelScrollView) ChildDelegate

func (w *ListWheelScrollView) ChildDelegate() ListWheelChildDelegate

ChildDelegate supplies the children.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelScrollView.childDelegate

func (*ListWheelScrollView) Controller

func (w *ListWheelScrollView) Controller() ScrollController

Controller reads and controls the scroll position, or nil.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelScrollView.controller

func (*ListWheelScrollView) CreateState

func (w *ListWheelScrollView) CreateState() State

CreateState creates the state.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelScrollView.createState

func (*ListWheelScrollView) ItemExtent

func (w *ListWheelScrollView) ItemExtent() float64

ItemExtent is the extent of every child along the main axis.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelScrollView.itemExtent

type ListWheelScrollViewOpts

type ListWheelScrollViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Controller reads and controls the scroll position; the default is a
	// FixedExtentScrollController.
	Controller ScrollController
	// Physics is how the wheel responds to the user.
	Physics ScrollPhysics
	// DiameterRatio is the ratio of the diameter of the cylinder to the viewport
	// extent; the default is 2.
	DiameterRatio foundation.Opt[float64]
	// Perspective is how much the cylinder is distorted by the perspective; the
	// default is 0.003.
	Perspective foundation.Opt[float64]
	// OffAxisFraction is how far the cylinder is off the center of the viewport
	// horizontally.
	OffAxisFraction float64
	// UseMagnifier is whether to magnify the item in the center.
	UseMagnifier bool
	// Magnification is how much the center item is magnified; the default is 1.
	Magnification foundation.Opt[float64]
	// OverAndUnderCenterOpacity is the opacity of the items outside of the center
	// magnifier; the default is 1.
	OverAndUnderCenterOpacity foundation.Opt[float64]
	// Squeeze is how tightly the children are packed on the cylinder; the default
	// is 1.
	Squeeze foundation.Opt[float64]
	// OnSelectedItemChanged is called with the index of the item in the center when
	// it changes.
	OnSelectedItemChanged func(index int)
	// RenderChildrenOutsideViewport is whether to build and paint children outside
	// of the viewport.
	RenderChildrenOutsideViewport bool
	// ClipBehavior is how the wheel clips; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the wheel behaves during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
	// RestorationID is the identifier for restoring the scroll offset; it has no
	// effect until state restoration is ported.
	RestorationID string
	// ScrollBehavior describes how the wheel scrolls; the default is the one of the
	// ScrollConfiguration above, without scrollbars.
	ScrollBehavior ScrollBehavior
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// ChangeReportingBehavior is when the selected item is reported; the default is
	// ChangeReportingBehaviorOnScrollUpdate.
	ChangeReportingBehavior ChangeReportingBehavior
}

ListWheelScrollViewOpts are the optional parameters of NewListWheelScrollView and NewListWheelScrollViewUseDelegate.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelScrollView.new

type ListWheelViewport

type ListWheelViewport struct {
	RenderObjectWidget
	// contains filtered or unexported fields
}

ListWheelViewport is the widget of a viewport that shows its children on a cylinder; a ListWheelScrollView builds one.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport

func NewListWheelViewport

func NewListWheelViewport(offset rendering.ViewportOffset, itemExtent float64, childDelegate ListWheelChildDelegate, opts ...ListWheelViewportOpts) *ListWheelViewport

NewListWheelViewport creates a viewport of the children that the delegate supplies, at the offset.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport.new

func (*ListWheelViewport) ChildDelegate

func (w *ListWheelViewport) ChildDelegate() ListWheelChildDelegate

ChildDelegate supplies the children.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport.childDelegate

func (*ListWheelViewport) CreateElement

func (w *ListWheelViewport) CreateElement() Element

CreateElement creates the element, which is the child manager of the render object.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport.createElement

func (*ListWheelViewport) CreateRenderObject

func (w *ListWheelViewport) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport.createRenderObject

func (*ListWheelViewport) ItemExtent

func (w *ListWheelViewport) ItemExtent() float64

ItemExtent is the extent of every child along the main axis.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport.itemExtent

func (*ListWheelViewport) Offset

Offset is the offset of the viewport.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport.offset

func (*ListWheelViewport) UpdateRenderObject

func (w *ListWheelViewport) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport.updateRenderObject

type ListWheelViewportOpts

type ListWheelViewportOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// DiameterRatio is the ratio of the diameter of the cylinder to the viewport
	// extent; the default is 2.
	DiameterRatio foundation.Opt[float64]
	// Perspective is how much the cylinder is distorted by the perspective; the
	// default is 0.003.
	Perspective foundation.Opt[float64]
	// OffAxisFraction is how far the cylinder is off the center of the viewport
	// horizontally.
	OffAxisFraction float64
	// UseMagnifier is whether to magnify the item in the center.
	UseMagnifier bool
	// Magnification is how much the center item is magnified; the default is 1.
	Magnification foundation.Opt[float64]
	// OverAndUnderCenterOpacity is the opacity of the items outside of the center
	// magnifier; the default is 1.
	OverAndUnderCenterOpacity foundation.Opt[float64]
	// Squeeze is how tightly the children are packed on the cylinder; the default
	// is 1.
	Squeeze foundation.Opt[float64]
	// RenderChildrenOutsideViewport is whether to build and paint children outside
	// of the viewport.
	RenderChildrenOutsideViewport bool
	// ClipBehavior is how the viewport clips; the default is ClipHardEdge.
	ClipBehavior ui.Clip
}

ListWheelViewportOpts are the optional parameters of NewListWheelViewport.

Flutter: widgets/list_wheel_scroll_view.dart ListWheelViewport.new

type ListenableBuilder

type ListenableBuilder struct {
	StatefulWidget
	// contains filtered or unexported fields
}

ListenableBuilder is a widget that rebuilds when a Listenable notifies, such as a ChangeNotifier or an animation.

Flutter: widgets/transitions.dart ListenableBuilder

func NewListenableBuilder

func NewListenableBuilder(listenable foundation.Listenable, builder TransitionBuilder, child Widget, opts ...ListenableBuilderOpts) *ListenableBuilder

NewListenableBuilder creates a widget that builds again each time the listenable notifies. The child, which may be nil, is the part of the subtree that does not depend on the listenable.

Flutter: widgets/transitions.dart ListenableBuilder.new

func (*ListenableBuilder) Builder

func (w *ListenableBuilder) Builder() TransitionBuilder

Builder is the function that builds the widget.

Flutter: widgets/transitions.dart ListenableBuilder.builder

func (*ListenableBuilder) Child

func (w *ListenableBuilder) Child() Widget

Child is the part of the subtree that does not depend on the listenable.

Flutter: widgets/transitions.dart ListenableBuilder.child

func (*ListenableBuilder) CreateState

func (w *ListenableBuilder) CreateState() State

CreateState creates the state.

Flutter: widgets/transitions.dart AnimatedWidget.createState

func (*ListenableBuilder) Listenable

func (w *ListenableBuilder) Listenable() foundation.Listenable

Listenable is the object that the widget listens to.

Flutter: widgets/transitions.dart AnimatedWidget.listenable

type ListenableBuilderOpts

type ListenableBuilderOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

ListenableBuilderOpts are the optional parameters of NewListenableBuilder.

Flutter: widgets/transitions.dart ListenableBuilder.new

type Listener

type Listener struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

Listener calls callbacks in response to common pointer events. It listens to the events that reach it; it does not take part in the gesture arena.

Flutter: widgets/basic.dart Listener

func NewListener

func NewListener(child Widget, opts ...ListenerOpts) *Listener

NewListener creates a widget that calls the callbacks for the pointer events that hit its child.

Flutter: widgets/basic.dart Listener.new

func (*Listener) Behavior

func (w *Listener) Behavior() rendering.HitTestBehavior

Behavior is how the widget behaves during hit testing.

Flutter: widgets/basic.dart Listener.behavior

func (*Listener) CreateRenderObject

func (w *Listener) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Listener.createRenderObject

func (*Listener) OnPointerCancel

func (w *Listener) OnPointerCancel() rendering.PointerCancelEventListener

OnPointerCancel is called when the input from a pointer is cancelled.

Flutter: widgets/basic.dart Listener.onPointerCancel

func (*Listener) OnPointerDown

func (w *Listener) OnPointerDown() rendering.PointerDownEventListener

OnPointerDown is called when a pointer comes into contact with the screen.

Flutter: widgets/basic.dart Listener.onPointerDown

func (*Listener) OnPointerHover

func (w *Listener) OnPointerHover() services.PointerHoverEventListener

OnPointerHover is called when a pointer that is not in contact changes.

Flutter: widgets/basic.dart Listener.onPointerHover

func (*Listener) OnPointerMove

func (w *Listener) OnPointerMove() rendering.PointerMoveEventListener

OnPointerMove is called when a pointer in contact with the screen moves.

Flutter: widgets/basic.dart Listener.onPointerMove

func (*Listener) OnPointerSignal

func (w *Listener) OnPointerSignal() rendering.PointerSignalEventListener

OnPointerSignal is called when a pointer signal occurs over the widget.

Flutter: widgets/basic.dart Listener.onPointerSignal

func (*Listener) OnPointerUp

func (w *Listener) OnPointerUp() rendering.PointerUpEventListener

OnPointerUp is called when a pointer stops being in contact with the screen.

Flutter: widgets/basic.dart Listener.onPointerUp

func (*Listener) UpdateRenderObject

func (w *Listener) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the callbacks and the behavior to the render object.

Flutter: widgets/basic.dart Listener.updateRenderObject

type ListenerOpts

type ListenerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OnPointerDown is called when a pointer comes into contact with the screen
	// at this widget.
	OnPointerDown rendering.PointerDownEventListener
	// OnPointerMove is called when a pointer that is in contact with the screen
	// and started at this widget moves.
	OnPointerMove rendering.PointerMoveEventListener
	// OnPointerUp is called when a pointer that started at this widget stops
	// being in contact with the screen.
	OnPointerUp rendering.PointerUpEventListener
	// OnPointerHover is called when a pointer that has not triggered a pointer
	// down changes.
	OnPointerHover services.PointerHoverEventListener
	// OnPointerCancel is called when the input from a pointer is no longer
	// directed towards this widget.
	OnPointerCancel rendering.PointerCancelEventListener
	// OnPointerPanZoomStart is called when a pan/zoom begins.
	OnPointerPanZoomStart rendering.PointerPanZoomStartEventListener
	// OnPointerPanZoomUpdate is called when a pan/zoom is updated.
	OnPointerPanZoomUpdate rendering.PointerPanZoomUpdateEventListener
	// OnPointerPanZoomEnd is called when a pan/zoom ends.
	OnPointerPanZoomEnd rendering.PointerPanZoomEndEventListener
	// OnPointerSignal is called when a pointer signal occurs over this widget.
	OnPointerSignal rendering.PointerSignalEventListener
	// Behavior is how to behave during hit testing; the default is
	// HitTestBehaviorDeferToChild.
	Behavior rendering.HitTestBehavior
}

ListenerOpts are the optional parameters of NewListener.

Flutter: widgets/basic.dart Listener.new

type LocalHistoryEntry

type LocalHistoryEntry struct {
	// contains filtered or unexported fields
}

LocalHistoryEntry is an entry in the local history of a route. When the user pops the route, the entries are removed one at a time before the route itself.

Flutter: widgets/routes.dart LocalHistoryEntry

func NewLocalHistoryEntry

func NewLocalHistoryEntry(opts ...LocalHistoryEntryOpts) *LocalHistoryEntry

NewLocalHistoryEntry creates an entry.

Flutter: widgets/routes.dart LocalHistoryEntry.new

func (*LocalHistoryEntry) ImpliesAppBarDismissal

func (e *LocalHistoryEntry) ImpliesAppBarDismissal() bool

ImpliesAppBarDismissal is whether an app bar shows a close button while the entry is in the history.

Flutter: widgets/routes.dart LocalHistoryEntry.impliesAppBarDismissal

func (*LocalHistoryEntry) Remove

func (e *LocalHistoryEntry) Remove()

Remove removes the entry from the history of its route.

Flutter: widgets/routes.dart LocalHistoryEntry.remove

type LocalHistoryEntryOpts

type LocalHistoryEntryOpts struct {
	// OnRemove is called when the entry is removed from the history of its route.
	OnRemove func()
	// ImpliesAppBarDismissal is whether an app bar shows a close button while the
	// entry is there; the default is true.
	ImpliesAppBarDismissal foundation.Opt[bool]
}

LocalHistoryEntryOpts are the optional parameters of NewLocalHistoryEntry.

Flutter: widgets/routes.dart LocalHistoryEntry.new

type LocalHistoryRoute

type LocalHistoryRoute interface {
	Route
	// AddLocalHistoryEntry adds a local history entry; popping the route removes
	// the entries first.
	//
	// Flutter: widgets/routes.dart LocalHistoryRoute.addLocalHistoryEntry
	AddLocalHistoryEntry(entry *LocalHistoryEntry)
	// RemoveLocalHistoryEntry removes a local history entry.
	//
	// Flutter: widgets/routes.dart LocalHistoryRoute.removeLocalHistoryEntry
	RemoveLocalHistoryEntry(entry *LocalHistoryEntry)
}

LocalHistoryRoute is a route that can handle pops itself, with a stack of local history entries.

Flutter: widgets/routes.dart LocalHistoryRoute

type LocalHistoryRouteBase

type LocalHistoryRouteBase struct {
	RouteBase
	// contains filtered or unexported fields
}

LocalHistoryRouteBase is a RouteBase with a local history: embed it, and call InitLocalHistoryRouteBase, in a route that is not a ModalRoute but can handle pops itself (the modal routes have a local history already).

Flutter: widgets/routes.dart LocalHistoryRoute

func (*LocalHistoryRouteBase) AddLocalHistoryEntry

func (b *LocalHistoryRouteBase) AddLocalHistoryEntry(entry *LocalHistoryEntry)

AddLocalHistoryEntry adds a local history entry; popping the route removes the entries first.

Flutter: widgets/routes.dart LocalHistoryRoute.addLocalHistoryEntry

func (*LocalHistoryRouteBase) DidPop

func (b *LocalHistoryRouteBase) DidPop(result any) bool

DidPop removes the last local history entry, and does not pop the route, while there are some.

Flutter: widgets/routes.dart LocalHistoryRoute.didPop

func (*LocalHistoryRouteBase) PopDisposition

func (b *LocalHistoryRouteBase) PopDisposition() RoutePopDisposition

PopDisposition is pop while there are local history entries, else the disposition of the route.

Flutter: widgets/routes.dart LocalHistoryRoute.popDisposition

func (*LocalHistoryRouteBase) RemoveLocalHistoryEntry

func (b *LocalHistoryRouteBase) RemoveLocalHistoryEntry(entry *LocalHistoryEntry)

RemoveLocalHistoryEntry removes a local history entry.

Flutter: widgets/routes.dart LocalHistoryRoute.removeLocalHistoryEntry

func (*LocalHistoryRouteBase) WillHandlePopInternally

func (b *LocalHistoryRouteBase) WillHandlePopInternally() bool

WillHandlePopInternally is whether the route has local history entries.

Flutter: widgets/routes.dart LocalHistoryRoute.willHandlePopInternally

type LocaleListResolutionCallback

type LocaleListResolutionCallback func(locales []ui.Locale, supportedLocales []ui.Locale) (ui.Locale, bool)

LocaleListResolutionCallback resolves the locale of an app from the list of the locales the user prefers and the locales the app supports. Returning false as the second result falls back to LocaleResolutionCallback and then to BasicLocaleListResolution.

Deviation: Flutter's returns a nullable Locale; Go returns the second result (SPEC §12.10).

Flutter: widgets/app.dart LocaleListResolutionCallback

type LocaleResolutionCallback

type LocaleResolutionCallback func(locale ui.Locale, hasLocale bool, supportedLocales []ui.Locale) (ui.Locale, bool)

LocaleResolutionCallback resolves the locale of an app from the first locale the user prefers (false when there is none) and the locales the app supports. Returning false as the second result falls back to BasicLocaleListResolution.

Deviation: Flutter's takes and returns a nullable Locale; Go uses a second result for the presence of the argument and of the answer (SPEC §12.10).

Flutter: widgets/app.dart LocaleResolutionCallback

type Localizations

type Localizations struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Localizations defines the Locale for its child and the localized resources that the child depends on.

Flutter: widgets/localizations.dart Localizations

func NewLocalizations

func NewLocalizations(locale ui.Locale, delegates []LocalizationsDelegate, child Widget, opts ...LocalizationsOpts) *Localizations

NewLocalizations creates the widget. The child may be nil. In debug builds it panics with the tag LocalizationsNoWidgetsDelegate when no delegate loads WidgetsLocalizations.

Flutter: widgets/localizations.dart Localizations.new

func NewLocalizationsOverride

func NewLocalizationsOverride(bc BuildContext, locale foundation.Opt[ui.Locale], delegates []LocalizationsDelegate, child Widget, opts ...LocalizationsOpts) *Localizations

NewLocalizationsOverride creates a Localizations that has the delegates of the closest one above the context, preceded by the given delegates, and the given locale, or the one above when it is Zero.

Flutter: widgets/localizations.dart Localizations.override

func (*Localizations) CreateState

func (w *Localizations) CreateState() State

CreateState creates the state.

Flutter: widgets/localizations.dart Localizations.createState

func (*Localizations) Delegates

func (w *Localizations) Delegates() []LocalizationsDelegate

Delegates are the factories of the localized resources.

Flutter: widgets/localizations.dart Localizations.delegates

func (*Localizations) IsApplicationLevel

func (w *Localizations) IsApplicationLevel() bool

IsApplicationLevel is whether this is the Localizations of the app.

Flutter: widgets/localizations.dart Localizations.isApplicationLevel

func (*Localizations) Locale

func (w *Localizations) Locale() ui.Locale

Locale is the locale of the child.

Flutter: widgets/localizations.dart Localizations.locale

type LocalizationsDelegate

type LocalizationsDelegate interface {
	// IsSupported is whether the resources are available for the locale.
	//
	// Flutter: widgets/localizations.dart LocalizationsDelegate.isSupported
	IsSupported(locale ui.Locale) bool
	// Load makes the resources for the locale.
	//
	// Flutter: widgets/localizations.dart LocalizationsDelegate.load
	Load(ctx context.Context, locale ui.Locale) (any, error)
	// ShouldReload is whether the resources must be loaded again when this
	// delegate replaces old, an earlier delegate of the same kind.
	//
	// Flutter: widgets/localizations.dart LocalizationsDelegate.shouldReload
	ShouldReload(old LocalizationsDelegate) bool
	// ResourceType is the type of the resources that the delegate loads: the
	// key of the Localizations widget's map.
	//
	// Flutter: widgets/localizations.dart LocalizationsDelegate.type
	ResourceType() reflect.Type
}

LocalizationsDelegate is a factory for a set of localized resources of type T, to be loaded by a Localizations widget.

Deviation: Load runs on the UI thread and returns the resources at once, so the resources of a locale are always there in the first build; Flutter's load returns a Future and the widget builds nothing until it completes (SPEC §12.10).

Flutter: widgets/localizations.dart LocalizationsDelegate

var DefaultWidgetsLocalizationsDelegate LocalizationsDelegate = &FuncLocalizationsDelegate[WidgetsLocalizations]{
	LoadFunc: func(context.Context, ui.Locale) (WidgetsLocalizations, error) {
		return DefaultWidgetsLocalizations{}, nil
	},
	Name: "DefaultWidgetsLocalizations.delegate(en_US)",
}

DefaultWidgetsLocalizationsDelegate is the delegate that loads DefaultWidgetsLocalizations for every locale. It is a read-only value.

Flutter: widgets/localizations.dart DefaultWidgetsLocalizations.delegate

type LocalizationsOpts

type LocalizationsOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// IsApplicationLevel is whether this is the Localizations of the app, which
	// does not mark its semantics subtree with the locale.
	IsApplicationLevel bool
}

LocalizationsOpts are the optional parameters of NewLocalizations.

Flutter: widgets/localizations.dart Localizations.new

type LocalizationsResolver

type LocalizationsResolver struct {
	foundation.ChangeNotifier
	WidgetsBindingObserverBase
	// contains filtered or unexported fields
}

LocalizationsResolver resolves the locale of an app from the locales of the system, its supported locales and the callbacks, and tells its listeners when the system locales change the result. WidgetsApp keeps one.

Flutter: widgets/localizations.dart LocalizationsResolver

func NewLocalizationsResolver

func NewLocalizationsResolver(binding *WidgetsBinding, supportedLocales []ui.Locale, opts ...LocalizationsResolverOpts) *LocalizationsResolver

NewLocalizationsResolver creates the resolver and starts to listen to the locales of the system through the binding. supportedLocales must not be empty.

Flutter: widgets/localizations.dart LocalizationsResolver.new

func (*LocalizationsResolver) DidChangeLocales

func (r *LocalizationsResolver) DidChangeLocales(locales []ui.Locale)

DidChangeLocales resolves the locale again.

Flutter: widgets/localizations.dart LocalizationsResolver.didChangeLocales

func (*LocalizationsResolver) Dispose

func (r *LocalizationsResolver) Dispose()

Dispose stops listening to the system locales. The resolver can not be used afterwards.

Flutter: widgets/localizations.dart LocalizationsResolver.dispose

func (*LocalizationsResolver) Locale

func (r *LocalizationsResolver) Locale() ui.Locale

Locale is the locale of the app: the forced one, resolved against the supported locales, or the one resolved from the system locales. In debug builds a locale that some delegate does not support is reported once with the tag LocaleNotSupported.

Flutter: widgets/localizations.dart LocalizationsResolver.locale

func (*LocalizationsResolver) LocalizationsDelegates

func (r *LocalizationsResolver) LocalizationsDelegates() []LocalizationsDelegate

LocalizationsDelegates are the delegates of the app followed by the default delegate of the widgets. Only the first delegate of a resource type is loaded, so the delegates of the app can override the default one.

Flutter: widgets/localizations.dart LocalizationsResolver.localizationsDelegates

func (*LocalizationsResolver) String

func (r *LocalizationsResolver) String() string

String names the resolver.

Flutter: widgets/localizations.dart LocalizationsResolver.toString

func (*LocalizationsResolver) SupportedLocales

func (r *LocalizationsResolver) SupportedLocales() []ui.Locale

SupportedLocales are the locales the app supports.

Flutter: widgets/localizations.dart LocalizationsResolver.supportedLocales

func (*LocalizationsResolver) Update

func (r *LocalizationsResolver) Update(supportedLocales []ui.Locale, opts LocalizationsResolverOpts)

Update replaces the configuration of the resolver, and resolves the locale again when the supported locales changed.

Flutter: widgets/localizations.dart LocalizationsResolver.update

type LocalizationsResolverOpts

type LocalizationsResolverOpts struct {
	// Locale forces the locale of the app, still resolved against the supported
	// locales.
	Locale foundation.Opt[ui.Locale]
	// LocaleListResolutionCallback resolves the locale from the preferred ones.
	LocaleListResolutionCallback LocaleListResolutionCallback
	// LocaleResolutionCallback resolves the locale from the first preferred one.
	LocaleResolutionCallback LocaleResolutionCallback
	// LocalizationsDelegates are the delegates of the app; the default widgets
	// delegate is always added after them.
	LocalizationsDelegates []LocalizationsDelegate
}

LocalizationsResolverOpts are the optional parameters of NewLocalizationsResolver.

Flutter: widgets/localizations.dart LocalizationsResolver.new

type LockState

type LockState int

LockState is the requirement of a SingleActivator for a lock key such as Num Lock.

Flutter: widgets/shortcuts.dart LockState

const (
	// LockStateUnspecified is the zero value; it means LockStateIgnored.
	//
	// Flutter: no counterpart
	LockStateUnspecified LockState = iota
	// LockStateIgnored means that the lock key is not considered.
	//
	// Flutter: widgets/shortcuts.dart LockState.ignored
	LockStateIgnored
	// LockStateLocked requires the lock mode to be on.
	//
	// Flutter: widgets/shortcuts.dart LockState.locked
	LockStateLocked
	// LockStateUnlocked requires the lock mode to be off.
	//
	// Flutter: widgets/shortcuts.dart LockState.unlocked
	LockStateUnlocked
)

The values of LockState follow Flutter's declaration order.

func (LockState) String

func (s LockState) String() string

String is the name of the state, like Dart's enum toString.

Flutter: widgets/shortcuts.dart LockState

type LogicalKeySet

type LogicalKeySet struct {
	// contains filtered or unexported fields
}

LogicalKeySet is a set of keys that must all be pressed, in any order, for the shortcut to trigger: the last one pressed triggers it. A key such as Shift is satisfied by either of its sides. It is a comparable value: two sets with the same keys are the same map key.

Flutter: widgets/shortcuts.dart LogicalKeySet

func NewLogicalKeySet

NewLogicalKeySet creates a set of up to four keys. In debug builds it panics with the tag KeySetDuplicateKey when a key appears twice.

Flutter: widgets/shortcuts.dart LogicalKeySet.new

func NewLogicalKeySetFromSet

func NewLogicalKeySetFromSet(keys services.KeySet[services.LogicalKeyboardKey]) LogicalKeySet

NewLogicalKeySetFromSet creates a set of the keys. In debug builds it panics with the tag KeySetEmpty when there are none.

Flutter: widgets/shortcuts.dart LogicalKeySet.fromSet

func (LogicalKeySet) Accepts

func (s LogicalKeySet) Accepts(event services.KeyEvent, state *services.HardwareKeyboard) bool

Accepts is whether the event is a press of one of the triggers while exactly the keys of the set are pressed.

Flutter: widgets/shortcuts.dart LogicalKeySet.accepts

func (LogicalKeySet) DebugDescribeKeys

func (s LogicalKeySet) DebugDescribeKeys() string

DebugDescribeKeys is the keys, the modifiers first, joined by " + ".

Flutter: widgets/shortcuts.dart LogicalKeySet.debugDescribeKeys

func (LogicalKeySet) DebugFillProperties

func (s LogicalKeySet) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the keys.

Flutter: widgets/shortcuts.dart LogicalKeySet.debugFillProperties

func (LogicalKeySet) Keys

Keys are the keys of the set.

Flutter: widgets/shortcuts.dart KeySet.keys

func (LogicalKeySet) Triggers

func (s LogicalKeySet) Triggers() []services.LogicalKeyboardKey

Triggers are the keys of the set, with each pseudo-key such as Shift replaced by its two sides.

Flutter: widgets/shortcuts.dart LogicalKeySet.triggers

type LongPressDraggable

type LongPressDraggable[T any] = Draggable[T]

LongPressDraggable is a Draggable that starts a drag after a long press. It is the same type as Draggable (Deviation: SPEC §12.10).

Flutter: widgets/drag_target.dart LongPressDraggable

func NewLongPressDraggable

func NewLongPressDraggable[T any](feedback, child Widget, opts ...LongPressDraggableOpts[T]) *LongPressDraggable[T]

NewLongPressDraggable creates a draggable that starts a drag after a long press.

Flutter: widgets/drag_target.dart LongPressDraggable.new

type LongPressDraggableOpts

type LongPressDraggableOpts[T any] struct {
	DraggableOpts[T]
	// NoHapticFeedbackOnStart turns off the haptic feedback when the drag starts.
	// The desktop has no haptic feedback, so it changes nothing there.
	NoHapticFeedbackOnStart bool
	// Delay is how long the pointer must stay down before the drag starts; the
	// default is gestures.LongPressTimeout.
	Delay foundation.Opt[time.Duration]
}

LongPressDraggableOpts are the optional parameters of NewLongPressDraggable.

Flutter: widgets/drag_target.dart LongPressDraggable.new

type LookupBoundary

type LookupBoundary struct {
	InheritedWidget
}

LookupBoundary hides the widgets above it from the lookups of the widgets below it that go through the LookupBoundary functions. A widget that is hidden by a boundary cannot be found by them, so a subtree can be kept apart from the ancestors it is built under. The ordinary lookups (DependOn, FindAncestorWidgetOfExactType, ...) ignore it.

Flutter: widgets/lookup_boundary.dart LookupBoundary

func NewLookupBoundary

func NewLookupBoundary(child Widget, opts ...WidgetOpts) *LookupBoundary

NewLookupBoundary creates a boundary around the child.

Flutter: widgets/lookup_boundary.dart LookupBoundary.new

func (*LookupBoundary) UpdateShouldNotify

func (w *LookupBoundary) UpdateShouldNotify(Widget) bool

UpdateShouldNotify is false: the boundary has no data to notify about.

Flutter: widgets/lookup_boundary.dart LookupBoundary.updateShouldNotify

type MagnifierBuilder

type MagnifierBuilder func(bc BuildContext, controller *MagnifierController, magnifierInfo *foundation.ValueNotifier[MagnifierInfo]) Widget

MagnifierBuilder builds a widget with a MagnifierController. It returns nil (Dart's null) when it builds no magnifier.

The builder is called exactly once per magnifier.

If the AnimationController of the controller is set (by the builder) to an AnimationController, the MagnifierController drives the animation during entry and exit.

The magnifierInfo is updated with new MagnifierInfo values during the lifetime of the built magnifier, e.g. as the user moves their finger around the text field.

Flutter: widgets/magnifier.dart MagnifierBuilder

type MagnifierController

type MagnifierController struct {
	// contains filtered or unexported fields
}

MagnifierController is a controller for a magnifier.

MagnifierController's main benefit over holding a raw OverlayEntry is that MagnifierController will handle logic around waiting for a magnifier to animate in or out.

If a magnifier chooses to have an entry / exit animation, it should provide the animation controller to SetAnimationController. MagnifierController will then drive the AnimationController and wait for it to be complete before removing it from the Overlay.

To check the status of the magnifier, see Shown.

Flutter: widgets/magnifier.dart MagnifierController

func NewMagnifierController

func NewMagnifierController(opts ...MagnifierControllerOpts) *MagnifierController

NewMagnifierController creates a controller. If there is no in / out animation for the magnifier, the animation controller should be left nil.

Flutter: widgets/magnifier.dart MagnifierController.new

func (*MagnifierController) AnimationController

func (c *MagnifierController) AnimationController() *animation.AnimationController

AnimationController is the controller that will be driven in / out when show / hide is triggered, respectively.

Flutter: widgets/magnifier.dart MagnifierController.animationController

func (*MagnifierController) Hide

Hide schedules a hide of the magnifier.

If this MagnifierController has an AnimationController, then Hide reverses the animation controller and waits for the animation to complete. Then, unless KeepInOverlay is set, it removes the magnifier from the overlay. The returned future completes when that is done (it never completes if the reverse animation is canceled, as Dart's TickerFuture does not).

In general, the magnifier should be removed from the overlay, unless the magnifier needs to preserve states between shows / hides.

Flutter: widgets/magnifier.dart MagnifierController.hide

func (*MagnifierController) OverlayEntry

func (c *MagnifierController) OverlayEntry() *OverlayEntry

OverlayEntry is the magnifier's OverlayEntry, if currently in the overlay, else nil.

This is exposed so that other overlay entries can be positioned above or below this overlay entry. Anything in the paint order after the RawMagnifier in this OverlayEntry will not be displayed in the magnifier; if it is desired for an overlay entry to be displayed in the magnifier, it must be positioned below the magnifier.

To check if a magnifier is in the overlay, use Shown. The overlay entry may be non-nil even when the magnifier is not visible.

Flutter: widgets/magnifier.dart MagnifierController.overlayEntry

func (*MagnifierController) RemoveFromOverlay

func (c *MagnifierController) RemoveFromOverlay()

RemoveFromOverlay removes the OverlayEntry from the Overlay.

This method removes the OverlayEntry synchronously, regardless of exit animation: this leads to abrupt removals of OverlayEntries with animations.

To allow the OverlayEntry to play its exit animation, consider calling Hide instead.

Flutter: widgets/magnifier.dart MagnifierController.removeFromOverlay

func (*MagnifierController) SetAnimationController

func (c *MagnifierController) SetAnimationController(controller *animation.AnimationController)

SetAnimationController sets the controller that will be driven in / out when show / hide is triggered, respectively.

Flutter: widgets/magnifier.dart MagnifierController.animationController

func (*MagnifierController) Show

Show displays the magnifier.

It returns a future that completes when the magnifier is fully shown, i.e. done with its entry animation (a completed one when there is no animation).

To control what overlays are shown in the magnifier, use Below. See OverlayEntry for more details on how to utilize Below.

If the magnifier already exists (i.e. OverlayEntry is not nil), then Show will replace the old overlay without playing an exit animation. Consider hiding it first, to animate from the old magnifier to the new one.

Flutter: widgets/magnifier.dart MagnifierController.show

func (*MagnifierController) Shown

func (c *MagnifierController) Shown() bool

Shown is whether the magnifier is currently being shown.

This is false when nothing is in the overlay, when the animation controller is in the dismissed state, or when the animation controller is animating out (i.e. in the reverse state).

It is true in the opposite cases, i.e. when the overlay is not empty, and either the animation controller is nil, in the completed state, or in the forward state.

Flutter: widgets/magnifier.dart MagnifierController.shown

type MagnifierControllerHideOpts

type MagnifierControllerHideOpts struct {
	// KeepInOverlay keeps the magnifier in the overlay once it is hidden, for a
	// magnifier that needs to preserve states between shows / hides (Flutter's
	// removeFromOverlay is true by default).
	KeepInOverlay bool
}

MagnifierControllerHideOpts are the optional parameters of MagnifierController.Hide.

Flutter: widgets/magnifier.dart MagnifierController.hide

type MagnifierControllerOpts

type MagnifierControllerOpts struct {
	// AnimationController is the controller that will be driven in / out when
	// show / hide is triggered, respectively. If there is no in / out animation
	// for the magnifier, leave it nil.
	AnimationController *animation.AnimationController
}

MagnifierControllerOpts are the optional parameters of NewMagnifierController.

Flutter: widgets/magnifier.dart MagnifierController.new

type MagnifierControllerShowOpts

type MagnifierControllerShowOpts struct {
	// DebugRequiredFor is the widget that requires the overlay, named in the
	// error when there is none.
	DebugRequiredFor Widget
	// Below is the entry the magnifier is inserted below, to control what
	// overlays are shown in the magnifier. See OverlayEntry.
	Below *OverlayEntry
}

MagnifierControllerShowOpts are the optional parameters of MagnifierController.Show.

Flutter: widgets/magnifier.dart MagnifierController.show

type MagnifierDecoration

type MagnifierDecoration struct {
	// contains filtered or unexported fields
}

MagnifierDecoration is the decorations to put around the loupe in a RawMagnifier.

Flutter: widgets/magnifier.dart MagnifierDecoration

func NewMagnifierDecoration

func NewMagnifierDecoration(opts ...MagnifierDecorationOpts) *MagnifierDecoration

NewMagnifierDecoration constructs a MagnifierDecoration.

By default, MagnifierDecoration is a rectangular magnifier with no shadows, and fully opaque.

Flutter: widgets/magnifier.dart MagnifierDecoration.new

func (*MagnifierDecoration) Equal

func (d *MagnifierDecoration) Equal(other *MagnifierDecoration) bool

Equal reports whether the other decoration has the same opacity, shadows and shape (Dart's ==).

Flutter: widgets/magnifier.dart MagnifierDecoration.==

func (*MagnifierDecoration) Opacity

func (d *MagnifierDecoration) Opacity() float64

Opacity is the opacity of the magnifier and decorations around the magnifier.

When this is 1.0, the magnified image shows in the shape of the magnifier. When this is less than 1.0, the magnified image is transparent and shows through the unmagnified background.

Generally this is only useful for animating the magnifier in and out, as a transparent magnifier looks quite confusing.

Flutter: widgets/magnifier.dart MagnifierDecoration.opacity

func (*MagnifierDecoration) Shadows

func (d *MagnifierDecoration) Shadows() []painting.BoxShadow

Shadows is a list of shadows cast by the shape (nil for none).

If the shadows are offset, consider setting RawMagnifier's clip behavior to ClipHardEdge (or similar) to ensure the shadow does not occlude the magnifier (the shadow is drawn above the magnifier).

If the shadows are not offset, consider using the outer blur style in the shadows instead, to avoid having to introduce a clip.

In the event that the shape consists of a stack of borders, the shadow is drawn using the bounds of the last one.

Flutter: widgets/magnifier.dart MagnifierDecoration.shadows

func (*MagnifierDecoration) Shape

Shape is the shape of the magnifier and the outline (border) around it.

Shapes can be stacked. In that case, the magnifier and shadow are drawn according to the outside edge of the last shape, with the borders painted on top.

Flutter: widgets/magnifier.dart MagnifierDecoration.shape

type MagnifierDecorationOpts

type MagnifierDecorationOpts struct {
	// Opacity is the opacity of the magnifier and decorations around the
	// magnifier; the default is 1.
	Opacity foundation.Opt[float64]
	// Shadows is a list of shadows cast by the shape.
	Shadows []painting.BoxShadow
	// Shape is the shape of the magnifier and the outline (border) around it;
	// the default is a RoundedRectangleBorder.
	Shape painting.ShapeBorder
}

MagnifierDecorationOpts are the optional parameters of NewMagnifierDecoration.

Flutter: widgets/magnifier.dart MagnifierDecoration.new

type MagnifierInfo

type MagnifierInfo struct {
	// GlobalGesturePosition is the offset of the gesture position that the
	// magnifier should be shown at.
	//
	// Flutter: widgets/magnifier.dart MagnifierInfo.globalGesturePosition
	GlobalGesturePosition ui.Offset
	// CurrentLineBoundaries is the rect of the current line the magnifier
	// should be shown at, without taking into account any padding of the field;
	// only the position of the first and last character.
	//
	// Flutter: widgets/magnifier.dart MagnifierInfo.currentLineBoundaries
	CurrentLineBoundaries ui.Rect
	// CaretRect is the rect of the handle that the magnifier should follow.
	//
	// Flutter: widgets/magnifier.dart MagnifierInfo.caretRect
	CaretRect ui.Rect
	// FieldBounds are the bounds of the entire text field that the magnifier is
	// bound to.
	//
	// Flutter: widgets/magnifier.dart MagnifierInfo.fieldBounds
	FieldBounds ui.Rect
}

MagnifierInfo is a data class that contains the geometry information of text layouts and selection gestures, used to position magnifiers. Its fields are all the parameters of Flutter's constructor (use NewMagnifierInfo or a literal).

Flutter: widgets/magnifier.dart MagnifierInfo

func NewMagnifierInfo

func NewMagnifierInfo(globalGesturePosition ui.Offset, caretRect, fieldBounds, currentLineBoundaries ui.Rect) MagnifierInfo

NewMagnifierInfo constructs a MagnifierInfo from provided geometry values.

Flutter: widgets/magnifier.dart MagnifierInfo.new

func (MagnifierInfo) String

func (m MagnifierInfo) String() string

String describes the info, such as "MagnifierInfo(position: Offset(0.0, 0.0), line: ..., caret: ..., field: ...)".

Flutter: widgets/magnifier.dart MagnifierInfo.toString

type MatrixTransition

type MatrixTransition struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

MatrixTransition animates the matrix of a Transform with a callback.

Flutter: widgets/transitions.dart MatrixTransition

func NewMatrixTransition

func NewMatrixTransition(animation animation.Animation[float64], onTransform TransformCallback, child Widget, opts ...MatrixTransitionOpts) *MatrixTransition

NewMatrixTransition creates the widget.

Flutter: widgets/transitions.dart MatrixTransition.new

func (*MatrixTransition) Alignment

Alignment is the origin of the transform.

Flutter: widgets/transitions.dart MatrixTransition.alignment

func (*MatrixTransition) Animation

func (w *MatrixTransition) Animation() animation.Animation[float64]

Animation is the animation that drives the transform.

Flutter: widgets/transitions.dart MatrixTransition.animation

func (*MatrixTransition) Build

Build transforms the child by the matrix of the current value.

Flutter: widgets/transitions.dart MatrixTransition.build

func (*MatrixTransition) Child

func (w *MatrixTransition) Child() Widget

Child is the widget below this one.

Flutter: widgets/transitions.dart MatrixTransition.child

func (*MatrixTransition) FilterQuality

func (w *MatrixTransition) FilterQuality() foundation.Opt[ui.FilterQuality]

FilterQuality is the filter quality of the child while the animation runs.

Flutter: widgets/transitions.dart MatrixTransition.filterQuality

func (*MatrixTransition) OnTransform

func (w *MatrixTransition) OnTransform() TransformCallback

OnTransform is the callback that computes the matrix.

Flutter: widgets/transitions.dart MatrixTransition.onTransform

type MatrixTransitionOpts

type MatrixTransitionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment is the origin of the transform, relative to the size of the
	// child; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
	// FilterQuality is the filter quality of the child while the animation runs.
	FilterQuality foundation.Opt[ui.FilterQuality]
}

MatrixTransitionOpts are the optional parameters of NewMatrixTransition.

Flutter: widgets/transitions.dart MatrixTransition.new

type MaximizableWindowController

type MaximizableWindowController interface {
	WindowController
	// SetMaximized asks for the window to be maximized, or restored.
	//
	// Flutter: widgets/_window.dart RegularWindowController.setMaximized
	SetMaximized(maximized bool)
	// IsMaximized is whether the window is maximized.
	//
	// Flutter: widgets/_window.dart RegularWindowController.isMaximized
	IsMaximized() bool
	// SetFullscreen asks for the window to be fullscreen, or to go back.
	//
	// Flutter: widgets/_window.dart RegularWindowController.setFullscreen
	SetFullscreen(fullscreen bool)
	// IsFullscreen is whether the window is fullscreen.
	//
	// Flutter: widgets/_window.dart RegularWindowController.isFullscreen
	IsFullscreen() bool
}

MaximizableWindowController is a WindowController that can be maximized and made fullscreen: the regular windows. A dialog is not one.

Flutter: no counterpart

type MediaQuery

type MediaQuery struct {
	InheritedModel
	// contains filtered or unexported fields
}

MediaQuery establishes a subtree in which media queries resolve to the given data. Widgets below depend on the whole data (MediaQueryOf) or on one aspect of it (MediaQuerySizeOf and the like), and are rebuilt only when what they depend on changed.

Flutter: widgets/media_query.dart MediaQuery

func NewMediaQuery

func NewMediaQuery(data MediaQueryData, child Widget, opts ...WidgetOpts) *MediaQuery

NewMediaQuery creates a MediaQuery that gives the data to the widgets below.

Flutter: widgets/media_query.dart MediaQuery.new

func NewMediaQueryRemovePadding

func NewMediaQueryRemovePadding(bc BuildContext, sides RemoveSides, child Widget, opts ...WidgetOpts) *MediaQuery

NewMediaQueryRemovePadding creates a MediaQuery whose data is the one of the context with the sides of the padding removed. It depends on the whole data of the MediaQuery above.

Flutter: widgets/media_query.dart MediaQuery.removePadding

func NewMediaQueryRemoveViewInsets

func NewMediaQueryRemoveViewInsets(bc BuildContext, sides RemoveSides, child Widget, opts ...WidgetOpts) *MediaQuery

NewMediaQueryRemoveViewInsets creates a MediaQuery whose data is the one of the context with the sides of the view insets removed.

Flutter: widgets/media_query.dart MediaQuery.removeViewInsets

func NewMediaQueryRemoveViewPadding

func NewMediaQueryRemoveViewPadding(bc BuildContext, sides RemoveSides, child Widget, opts ...WidgetOpts) *MediaQuery

NewMediaQueryRemoveViewPadding creates a MediaQuery whose data is the one of the context with the sides of the view padding removed.

Flutter: widgets/media_query.dart MediaQuery.removeViewPadding

func (*MediaQuery) Data

func (w *MediaQuery) Data() MediaQueryData

Data is the data the widget gives.

Flutter: widgets/media_query.dart MediaQuery.data

func (*MediaQuery) DebugFillProperties

func (w *MediaQuery) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the data.

Flutter: widgets/media_query.dart MediaQuery.debugFillProperties

func (*MediaQuery) UpdateShouldNotify

func (w *MediaQuery) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the data changed.

Flutter: widgets/media_query.dart MediaQuery.updateShouldNotify

func (*MediaQuery) UpdateShouldNotifyDependent

func (w *MediaQuery) UpdateShouldNotifyDependent(old Widget, dependencies *AspectSet) bool

UpdateShouldNotifyDependent is whether one of the aspects the dependent asked for changed.

Flutter: widgets/media_query.dart MediaQuery.updateShouldNotifyDependent

type MediaQueryClampedTextScalingOpts

type MediaQueryClampedTextScalingOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// MinScaleFactor is the smallest scale factor; the default is 0.
	MinScaleFactor float64
	// MaxScaleFactor is the biggest scale factor; 0 means no limit.
	MaxScaleFactor float64
}

MediaQueryClampedTextScalingOpts are the optional parameters of NewMediaQueryWithClampedTextScaling.

Flutter: widgets/media_query.dart MediaQuery.withClampedTextScaling

type MediaQueryData

type MediaQueryData struct {
	// Size is the size of the media in logical pixels (not physical pixels).
	//
	// Flutter: widgets/media_query.dart MediaQueryData.size
	Size ui.Size
	// DevicePixelRatio is the number of device pixels for each logical pixel.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.devicePixelRatio
	DevicePixelRatio float64
	// TextScaler is the font scaling strategy to use for the text in the app;
	// never nil.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.textScaler
	TextScaler painting.TextScaler
	// PlatformBrightness is the brightness of the system's color scheme.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.platformBrightness
	PlatformBrightness ui.Brightness
	// ViewInsets are the parts of the display that are completely obscured by
	// system UI, such as an on-screen keyboard.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.viewInsets
	ViewInsets painting.EdgeInsets
	// Padding are the parts of the display that are partially obscured by system
	// UI, and that SafeArea avoids; the view padding minus the view insets.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.padding
	Padding painting.EdgeInsets
	// ViewPadding are the parts of the display that are partially obscured by
	// system UI, whether or not the insets cover them.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.viewPadding
	ViewPadding painting.EdgeInsets
	// SystemGestureInsets are the areas along the edges where the system
	// consumes certain input events.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.systemGestureInsets
	SystemGestureInsets painting.EdgeInsets
	// AlwaysUse24HourFormat is whether to use 24-hour format when formatting
	// time.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.alwaysUse24HourFormat
	AlwaysUse24HourFormat bool
	// AccessibleNavigation is whether the user is using an accessibility
	// service, such as a screen reader.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.accessibleNavigation
	AccessibleNavigation bool
	// InvertColors is whether the platform is inverting the colors.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.invertColors
	InvertColors bool
	// HighContrast is whether the user requested a high contrast.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.highContrast
	HighContrast bool
	// OnOffSwitchLabels is whether the user requested labels on switches.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.onOffSwitchLabels
	OnOffSwitchLabels bool
	// ReduceTransparency is whether the user asked for less transparency and blur. The Cupertino bars and sheets draw opaque
	// when it is on.
	//
	// Deviation: Flutter has no such setting (SPEC §12.10).
	//
	// Flutter: no counterpart
	ReduceTransparency bool
	// DifferentiateWithoutColor is whether the user asked that color is not the only way things are told apart.
	//
	// Deviation: Flutter has no such setting (SPEC §12.10).
	//
	// Flutter: no counterpart
	DifferentiateWithoutColor bool
	// DisableAnimations is whether the platform is requesting that animations be
	// disabled or reduced as much as possible.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.disableAnimations
	DisableAnimations bool
	// BoldText is whether the user requested bold text.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.boldText
	BoldText bool
	// NavigationMode is the navigation mode of the app.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.navigationMode
	NavigationMode NavigationMode
	// GestureSettings are the gesture thresholds of the device.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.gestureSettings
	GestureSettings gestures.DeviceGestureSettings
	// SupportsShowingSystemContextMenu is whether the platform can show the
	// system context menu.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.supportsShowingSystemContextMenu
	SupportsShowingSystemContextMenu bool
	// DisplayCornerRadii are the radii of the corners of the display in logical
	// pixels; None when the corners are not known.
	//
	// Flutter: widgets/media_query.dart MediaQueryData.displayCornerRadii
	DisplayCornerRadii foundation.Opt[painting.BorderRadius]
}

MediaQueryData holds the information about a piece of media, such as a window: its size, the pixel density, the text scale, the insets the system covers and the accessibility settings. A MediaQuery widget makes it available to the widgets below. Make one with NewMediaQueryData or NewMediaQueryDataFromView; it is a value, copy it with CopyWith.

Deviation: the fields Glutter has no source for are left out: display features, supportsAnnounce, and the text style overrides (SPEC §12.10). DisplayCornerRadii is there, but no view reports the corners of the display, so NewMediaQueryDataFromView leaves it None; it is set with ApplyDisplayCornerRadii.

Flutter: widgets/media_query.dart MediaQueryData

func MediaQueryMaybeOf

func MediaQueryMaybeOf(bc BuildContext) (MediaQueryData, bool)

MediaQueryMaybeOf is MediaQueryOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeOf

func MediaQueryOf

func MediaQueryOf(bc BuildContext) MediaQueryData

MediaQueryOf is the data of the closest MediaQuery above the context; the context depends on all of it, so prefer the functions for one aspect. It panics with the tag MediaQueryMissing when there is none.

Flutter: widgets/media_query.dart MediaQuery.of

func NewMediaQueryData

func NewMediaQueryData(opts ...MediaQueryDataOpts) MediaQueryData

NewMediaQueryData creates the data from the options.

Flutter: widgets/media_query.dart MediaQueryData.new

func NewMediaQueryDataFromView

func NewMediaQueryDataFromView(view *ui.View, platformData *MediaQueryData) MediaQueryData

NewMediaQueryDataFromView creates the data from the view and the dispatcher it belongs to. The data of a MediaQuery above (platformData, which may be nil) overrides the settings of the platform, as it does for a MediaQuery made with MediaQueryFromView: the brightness, the text scaler, the accessibility settings, the 24-hour format, the navigation mode and the system context menu support.

Flutter: widgets/media_query.dart MediaQueryData.fromView

func (MediaQueryData) ApplyDisplayCornerRadii

func (d MediaQueryData) ApplyDisplayCornerRadii(displayCornerRadii foundation.Opt[painting.BorderRadius]) MediaQueryData

ApplyDisplayCornerRadii returns a copy with the display corner radii replaced; None makes them unknown (CopyWith cannot do that).

Flutter: widgets/media_query.dart MediaQueryData.applyDisplayCornerRadii

func (MediaQueryData) CopyWith

CopyWith returns a copy with the fields in the options replaced.

Flutter: widgets/media_query.dart MediaQueryData.copyWith

func (MediaQueryData) Equal

func (d MediaQueryData) Equal(o MediaQueryData) bool

Equal is whether the two data are the same, field by field. The text scalers are equal when they scale the same way.

Flutter: widgets/media_query.dart MediaQueryData.operator ==

func (MediaQueryData) Orientation

func (d MediaQueryData) Orientation() Orientation

Orientation is whether the size is wider than it is tall.

Flutter: widgets/media_query.dart MediaQueryData.orientation

func (MediaQueryData) RemovePadding

func (d MediaQueryData) RemovePadding(sides RemoveSides) MediaQueryData

RemovePadding returns a copy with the sides of the padding removed (set to zero) and the same amount taken from the view padding.

Flutter: widgets/media_query.dart MediaQueryData.removePadding

func (MediaQueryData) RemoveViewInsets

func (d MediaQueryData) RemoveViewInsets(sides RemoveSides) MediaQueryData

RemoveViewInsets returns a copy with the sides of the view insets removed and the same amount taken from the view padding.

Flutter: widgets/media_query.dart MediaQueryData.removeViewInsets

func (MediaQueryData) RemoveViewPadding

func (d MediaQueryData) RemoveViewPadding(sides RemoveSides) MediaQueryData

RemoveViewPadding returns a copy with the sides of the padding and of the view padding removed.

Flutter: widgets/media_query.dart MediaQueryData.removeViewPadding

func (MediaQueryData) String

func (d MediaQueryData) String() string

String describes the data, such as "MediaQueryData(size: Size(800.0, 600.0), devicePixelRatio: 1.0, ...)".

Flutter: widgets/media_query.dart MediaQueryData.toString

type MediaQueryDataCopyOpts

type MediaQueryDataCopyOpts struct {
	Size                             foundation.Opt[ui.Size]
	DevicePixelRatio                 foundation.Opt[float64]
	TextScaler                       foundation.Opt[painting.TextScaler]
	PlatformBrightness               foundation.Opt[ui.Brightness]
	Padding                          foundation.Opt[painting.EdgeInsets]
	ViewPadding                      foundation.Opt[painting.EdgeInsets]
	ViewInsets                       foundation.Opt[painting.EdgeInsets]
	SystemGestureInsets              foundation.Opt[painting.EdgeInsets]
	AlwaysUse24HourFormat            foundation.Opt[bool]
	HighContrast                     foundation.Opt[bool]
	OnOffSwitchLabels                foundation.Opt[bool]
	ReduceTransparency               foundation.Opt[bool]
	DifferentiateWithoutColor        foundation.Opt[bool]
	DisableAnimations                foundation.Opt[bool]
	InvertColors                     foundation.Opt[bool]
	AccessibleNavigation             foundation.Opt[bool]
	BoldText                         foundation.Opt[bool]
	NavigationMode                   foundation.Opt[NavigationMode]
	GestureSettings                  foundation.Opt[gestures.DeviceGestureSettings]
	SupportsShowingSystemContextMenu foundation.Opt[bool]
	DisplayCornerRadii               foundation.Opt[painting.BorderRadius]
}

MediaQueryDataCopyOpts are the fields CopyWith replaces; a field left None keeps the value of the data.

Flutter: widgets/media_query.dart MediaQueryData.copyWith

type MediaQueryDataOpts

type MediaQueryDataOpts struct {
	// Size is the size in logical pixels.
	Size ui.Size
	// DevicePixelRatio is the number of device pixels per logical pixel; 0 means 1.
	DevicePixelRatio float64
	// TextScaler is the text scaling; nil means no scaling.
	TextScaler painting.TextScaler
	// PlatformBrightness defaults to the light brightness.
	PlatformBrightness ui.Brightness
	// Padding is the partially obscured area.
	Padding painting.EdgeInsets
	// ViewInsets is the completely obscured area.
	ViewInsets painting.EdgeInsets
	// SystemGestureInsets is the area where the system takes the gestures.
	SystemGestureInsets painting.EdgeInsets
	// ViewPadding is the partially obscured area, ignoring the view insets.
	ViewPadding painting.EdgeInsets
	// AlwaysUse24HourFormat says to use the 24-hour format.
	AlwaysUse24HourFormat bool
	// AccessibleNavigation says that an accessibility service is in use.
	AccessibleNavigation bool
	// InvertColors says that the platform inverts the colors.
	InvertColors bool
	// HighContrast says that the user asked for a high contrast.
	HighContrast bool
	// OnOffSwitchLabels says that the user asked for labels on switches.
	OnOffSwitchLabels bool
	// ReduceTransparency says that the user asked for less transparency and blur.
	ReduceTransparency bool
	// DifferentiateWithoutColor says that the user asked that color is not the only way things are told apart.
	DifferentiateWithoutColor bool
	// DisableAnimations says that animations should be off or reduced.
	DisableAnimations bool
	// BoldText says that the user asked for bold text.
	BoldText bool
	// NavigationMode defaults to the traditional mode.
	NavigationMode NavigationMode
	// GestureSettings defaults to a touch slop of gestures.TouchSlop.
	GestureSettings foundation.Opt[gestures.DeviceGestureSettings]
	// SupportsShowingSystemContextMenu says that the platform can show the
	// system context menu.
	SupportsShowingSystemContextMenu bool
	// DisplayCornerRadii are the radii of the corners of the display; the default is
	// None, unknown.
	DisplayCornerRadii foundation.Opt[painting.BorderRadius]
}

MediaQueryDataOpts are the optional parameters of NewMediaQueryData. The zero value of each field is Flutter's default: no size, a pixel ratio of 1, no text scaling, the light brightness, no insets, a touch slop of 18 and the traditional navigation mode.

Flutter: widgets/media_query.dart MediaQueryData.new

type MenuController struct {
	// contains filtered or unexported fields
}

MenuController is the controller of a RawMenuAnchor or RawMenuAnchorGroup: it opens and closes the menu of the anchor it is attached to.

Flutter: widgets/raw_menu_anchor.dart MenuController

func MenuControllerMaybeOf(bc BuildContext) *MenuController

MenuControllerMaybeOf returns the MenuController of the closest anchor that encloses the context, or nil. It doesn't create a dependency.

Flutter: widgets/raw_menu_anchor.dart MenuController.maybeOf

func NewMenuController

func NewMenuController() *MenuController

NewMenuController creates a controller.

Flutter: widgets/raw_menu_anchor.dart MenuController.new

func (c *MenuController) Close()

Close requests that the menu and its submenus close. It does nothing when the controller isn't attached.

Flutter: widgets/raw_menu_anchor.dart MenuController.close

func (c *MenuController) CloseChildren()

CloseChildren requests that the submenus of the menu close.

Flutter: widgets/raw_menu_anchor.dart MenuController.closeChildren

func (c *MenuController) IsOpen() bool

IsOpen is whether the menu is open: the anchor's overlay is showing, or for a group, any of its anchors'.

Flutter: widgets/raw_menu_anchor.dart MenuController.isOpen

func (c *MenuController) Open(position ...ui.Offset)

Open requests that the menu open, at the position relative to the anchor if given. It panics with the tag MenuControllerNotAttached in debug builds when the controller isn't attached to an anchor.

Flutter: widgets/raw_menu_anchor.dart MenuController.open

type MenuItemSerializableIDGenerator func(item PlatformMenuItem) int

MenuItemSerializableIDGenerator gives the id that an item has in the data that goes to the platform.

Flutter: widgets/platform_menu_bar.dart MenuItemSerializableIdGenerator

type MenuSerializableShortcut interface {
	ShortcutActivator
	// SerializeForMenu is the shortcut as a trigger or a character with its
	// modifiers.
	//
	// Flutter: widgets/platform_menu_bar.dart MenuSerializableShortcut.serializeForMenu
	SerializeForMenu() ShortcutSerialization
}

MenuSerializableShortcut is a ShortcutActivator that a menu can show: a SingleActivator or a CharacterActivator, or another that can be reduced to one of the two.

Flutter: widgets/platform_menu_bar.dart MenuSerializableShortcut

type MergeSemantics

type MergeSemantics struct{ SingleChildRenderObjectWidget }

MergeSemantics merges the semantics of its descendants into one node.

Flutter: widgets/basic.dart MergeSemantics

func NewMergeSemantics

func NewMergeSemantics(child Widget, opts ...WidgetOpts) *MergeSemantics

NewMergeSemantics creates a widget that merges the semantics of its subtree.

Flutter: widgets/basic.dart MergeSemantics.new

func (*MergeSemantics) CreateRenderObject

func (w *MergeSemantics) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart MergeSemantics.createRenderObject

type MetaData

type MetaData struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

MetaData holds meta data in the render tree: a hit test finds it, and the code that walks the hit test path reads it. A DragTarget is found this way.

Flutter: widgets/basic.dart MetaData

func NewMetaData

func NewMetaData(child Widget, opts ...MetaDataOpts) *MetaData

NewMetaData creates a widget that holds the meta data.

Flutter: widgets/basic.dart MetaData.new

func (*MetaData) Behavior

func (w *MetaData) Behavior() rendering.HitTestBehavior

Behavior is how the widget behaves during hit testing.

Flutter: widgets/basic.dart MetaData.behavior

func (*MetaData) CreateRenderObject

func (w *MetaData) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart MetaData.createRenderObject

func (*MetaData) MetaData

func (w *MetaData) MetaData() any

MetaData is the meta data that the widget holds.

Flutter: widgets/basic.dart MetaData.metaData

func (*MetaData) UpdateRenderObject

func (w *MetaData) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart MetaData.updateRenderObject

type MetaDataOpts

type MetaDataOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// MetaData is the meta data to hold in the render tree.
	MetaData any
	// Behavior is how to behave during hit testing; the default is
	// HitTestBehaviorDeferToChild.
	Behavior rendering.HitTestBehavior
}

MetaDataOpts are the optional parameters of NewMetaData.

Flutter: widgets/basic.dart MetaData.new

type ModalBarrier

type ModalBarrier struct {
	StatelessWidget
	// contains filtered or unexported fields
}

ModalBarrier is a widget that prevents the user from interacting with widgets behind itself.

Flutter: widgets/modal_barrier.dart ModalBarrier

func NewModalBarrier

func NewModalBarrier(opts ...ModalBarrierOpts) *ModalBarrier

NewModalBarrier creates the widget.

Flutter: widgets/modal_barrier.dart ModalBarrier.new

func (*ModalBarrier) BarrierSemanticsDismissible

func (w *ModalBarrier) BarrierSemanticsDismissible() foundation.Opt[bool]

BarrierSemanticsDismissible is whether assistive technology can dismiss the barrier.

Flutter: widgets/modal_barrier.dart ModalBarrier.barrierSemanticsDismissible

func (*ModalBarrier) Build

func (w *ModalBarrier) Build(bc BuildContext) Widget

Build builds the barrier: a semantics node, an opaque area that is filled with the color, and a detector of taps of any button.

Flutter: widgets/modal_barrier.dart ModalBarrier.build

func (*ModalBarrier) ClipDetailsNotifier

func (w *ModalBarrier) ClipDetailsNotifier() *foundation.ValueNotifier[painting.EdgeInsets]

ClipDetailsNotifier notifies the insets that clip the semantics, or nil.

Flutter: widgets/modal_barrier.dart ModalBarrier.clipDetailsNotifier

func (*ModalBarrier) Color

func (w *ModalBarrier) Color() foundation.Opt[ui.Color]

Color is the color of the barrier, or none.

Flutter: widgets/modal_barrier.dart ModalBarrier.color

func (*ModalBarrier) Dismissible

func (w *ModalBarrier) Dismissible() bool

Dismissible is whether tapping the barrier dismisses it.

Flutter: widgets/modal_barrier.dart ModalBarrier.dismissible

func (*ModalBarrier) OnDismiss

func (w *ModalBarrier) OnDismiss() func()

OnDismiss is called when the barrier is tapped, or nil.

Flutter: widgets/modal_barrier.dart ModalBarrier.onDismiss

func (*ModalBarrier) SemanticsLabel

func (w *ModalBarrier) SemanticsLabel() string

SemanticsLabel is the semantic label of the barrier.

Flutter: widgets/modal_barrier.dart ModalBarrier.semanticsLabel

func (*ModalBarrier) SemanticsOnTapHint

func (w *ModalBarrier) SemanticsOnTapHint() string

SemanticsOnTapHint is the hint of the tap action of the barrier.

Flutter: widgets/modal_barrier.dart ModalBarrier.semanticsOnTapHint

type ModalBarrierOpts

type ModalBarrierOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Color is the color to fill the barrier with; none for transparent.
	Color foundation.Opt[ui.Color]
	// Dismissible is whether tapping the barrier calls OnDismiss; the default is
	// true.
	Dismissible foundation.Opt[bool]
	// OnDismiss is called when the barrier is tapped and Dismissible is true; the
	// default pops the route of the Navigator.
	OnDismiss func()
	// SemanticsLabel is the semantic label of the barrier.
	SemanticsLabel string
	// BarrierSemanticsDismissible is whether the barrier is a semantic target
	// that assistive technology can dismiss; the default follows Dismissible
	// on the platforms that support it.
	BarrierSemanticsDismissible foundation.Opt[bool]
	// ClipDetailsNotifier notifies the insets that clip the semantics of the
	// barrier.
	ClipDetailsNotifier *foundation.ValueNotifier[painting.EdgeInsets]
	// SemanticsOnTapHint is the hint of the tap action of the barrier.
	SemanticsOnTapHint string
}

ModalBarrierOpts are the optional parameters of NewModalBarrier.

Flutter: widgets/modal_barrier.dart ModalBarrier.new

type ModalRoute

type ModalRoute interface {
	TransitionRoute
	LocalHistoryRoute
	// BuildPage builds the primary contents of the route, once.
	//
	// Flutter: widgets/routes.dart ModalRoute.buildPage
	BuildPage(bc BuildContext, animation, secondaryAnimation animation.Animation[float64]) Widget
	// BuildTransitions builds the transition of the page; it is called every
	// time the animation changes.
	//
	// Flutter: widgets/routes.dart ModalRoute.buildTransitions
	BuildTransitions(bc BuildContext, animation, secondaryAnimation animation.Animation[float64], child Widget) Widget
	// DelegatedTransition is the transition that this route builds for the route
	// below it, or nil.
	//
	// Flutter: widgets/routes.dart ModalRoute.delegatedTransition
	DelegatedTransition() DelegatedTransitionBuilder
	// BarrierDismissible is whether tapping the barrier pops the route.
	//
	// Flutter: widgets/routes.dart ModalRoute.barrierDismissible
	BarrierDismissible() bool
	// SemanticsDismissible is whether the barrier can be dismissed by assistive
	// technology.
	//
	// Flutter: widgets/routes.dart ModalRoute.semanticsDismissible
	SemanticsDismissible() bool
	// BarrierColor is the color of the barrier, if any.
	//
	// Flutter: widgets/routes.dart ModalRoute.barrierColor
	BarrierColor() foundation.Opt[ui.Color]
	// BarrierLabel is the semantic label of the barrier.
	//
	// Flutter: widgets/routes.dart ModalRoute.barrierLabel
	BarrierLabel() string
	// BarrierCurve is the curve of the barrier color's fade.
	//
	// Flutter: widgets/routes.dart ModalRoute.barrierCurve
	BarrierCurve() animation.Curve
	// MaintainState is whether the route keeps its state while it is not on top.
	//
	// Flutter: widgets/routes.dart ModalRoute.maintainState
	MaintainState() bool
	// BuildModalBarrier builds the barrier of the route.
	//
	// Flutter: widgets/routes.dart ModalRoute.buildModalBarrier
	BuildModalBarrier() Widget
	// Offstage is whether the route is built but not shown.
	//
	// Flutter: widgets/routes.dart ModalRoute.offstage
	Offstage() bool
	// SetOffstage changes whether the route is built but not shown.
	//
	// Flutter: widgets/routes.dart ModalRoute.offstage
	SetOffstage(value bool)
	// TraversalEdgeBehavior is what the focus does at the edges of the focus scope
	// of the route, or Unspecified to use the navigator's.
	//
	// Flutter: widgets/routes.dart ModalRoute.traversalEdgeBehavior
	TraversalEdgeBehavior() TraversalEdgeBehavior
	// DirectionalTraversalEdgeBehavior is what the directional focus does at the
	// edges of the focus scope of the route, or Unspecified to use the navigator's.
	//
	// Flutter: widgets/routes.dart ModalRoute.directionalTraversalEdgeBehavior
	DirectionalTraversalEdgeBehavior() TraversalEdgeBehavior
	// SubtreeContext is the context of the subtree of the page, or nil.
	//
	// Flutter: widgets/routes.dart ModalRoute.subtreeContext
	SubtreeContext() BuildContext
	// CanPop is whether the route can be popped: there is an active route below
	// or it handles the pop itself.
	//
	// Flutter: widgets/routes.dart ModalRoute.canPop
	CanPop() bool
	// ImpliesAppBarDismissal is whether an app bar shows a close button.
	//
	// Flutter: widgets/routes.dart ModalRoute.impliesAppBarDismissal
	ImpliesAppBarDismissal() bool
	// PopGestureInProgress is whether a user gesture that may pop the route is
	// going on.
	//
	// Flutter: widgets/routes.dart ModalRoute.popGestureInProgress
	PopGestureInProgress() bool
	// FullscreenDialog is whether the route is a fullscreen dialog.
	//
	// Flutter: widgets/routes.dart ModalRoute.fullscreenDialog
	FullscreenDialog() bool
	// RegisterPopEntry adds a pop scope to the route.
	//
	// Flutter: widgets/routes.dart ModalRoute.registerPopEntry
	RegisterPopEntry(popEntry PopEntry)
	// UnregisterPopEntry removes a pop scope from the route.
	//
	// Flutter: widgets/routes.dart ModalRoute.unregisterPopEntry
	UnregisterPopEntry(popEntry PopEntry)
	// contains filtered or unexported methods
}

ModalRoute is a route that blocks interaction with previous routes: it has a barrier below its page, can be dismissed by tapping the barrier, and can hold the state of PopScopes.

Flutter: widgets/routes.dart ModalRoute

func ModalRouteOf

func ModalRouteOf(bc BuildContext) ModalRoute

ModalRouteOf returns the modal route that the context is in, or nil. The context depends on the route, so it is rebuilt whenever the route changes.

Flutter: widgets/routes.dart ModalRoute.of

type ModalRouteBase

type ModalRouteBase struct {
	TransitionRouteBase
	// contains filtered or unexported fields
}

ModalRouteBase implements the parts of ModalRoute that are shared. Embed it and call InitModalRouteBase; implement BuildPage, BarrierDismissible, BarrierColor, BarrierLabel, MaintainState, Opaque and TransitionDuration.

Flutter: widgets/routes.dart ModalRoute

func (*ModalRouteBase) AddLocalHistoryEntry

func (b *ModalRouteBase) AddLocalHistoryEntry(entry *LocalHistoryEntry)

AddLocalHistoryEntry adds a local history entry; popping the route removes the entries first.

Flutter: widgets/routes.dart LocalHistoryRoute.addLocalHistoryEntry

func (*ModalRouteBase) Animation

func (b *ModalRouteBase) Animation() animation.Animation[float64]

Animation is the proxy of the animation of the route; it is the same animation, except while the route is offstage.

Flutter: widgets/routes.dart ModalRoute.animation

func (*ModalRouteBase) BarrierCurve

func (b *ModalRouteBase) BarrierCurve() animation.Curve

BarrierCurve is Curves.ease.

Flutter: widgets/routes.dart ModalRoute.barrierCurve

func (*ModalRouteBase) BuildModalBarrier

func (b *ModalRouteBase) BuildModalBarrier() Widget

BuildModalBarrier builds the barrier: a ModalBarrier, or an AnimatedModalBarrier when the route has a barrier color.

Flutter: widgets/routes.dart ModalRoute.buildModalBarrier

func (*ModalRouteBase) BuildTransitions

func (b *ModalRouteBase) BuildTransitions(bc BuildContext, animation, secondaryAnimation animation.Animation[float64], child Widget) Widget

BuildTransitions returns the child.

Flutter: widgets/routes.dart ModalRoute.buildTransitions

func (*ModalRouteBase) CanPop

func (b *ModalRouteBase) CanPop() bool

CanPop is whether there is an active route below or the route handles the pop itself.

Flutter: widgets/routes.dart ModalRoute.canPop

func (*ModalRouteBase) ChangedExternalState

func (b *ModalRouteBase) ChangedExternalState()

ChangedExternalState rebuilds the barrier and the page.

Flutter: widgets/routes.dart ModalRoute.changedExternalState

func (*ModalRouteBase) ChangedInternalState

func (b *ModalRouteBase) ChangedInternalState()

ChangedInternalState rebuilds the scope and the barrier.

Flutter: widgets/routes.dart ModalRoute.changedInternalState

func (*ModalRouteBase) CreateOverlayEntries

func (b *ModalRouteBase) CreateOverlayEntries() []*OverlayEntry

CreateOverlayEntries creates the barrier entry and the entry of the page.

Flutter: widgets/routes.dart ModalRoute.createOverlayEntries

func (*ModalRouteBase) DelegatedTransition

func (b *ModalRouteBase) DelegatedTransition() DelegatedTransitionBuilder

DelegatedTransition is nil.

Flutter: widgets/routes.dart ModalRoute.delegatedTransition

func (*ModalRouteBase) DidAdd

func (b *ModalRouteBase) DidAdd()

DidAdd makes the focus scope of the route the first focus of the navigator, as DidPush does.

Flutter: widgets/routes.dart ModalRoute.didAdd

func (*ModalRouteBase) DidChangeNext

func (b *ModalRouteBase) DidChangeNext(nextRoute Route)

DidChangeNext receives the delegated transition of the next route.

Flutter: widgets/routes.dart ModalRoute.didChangeNext

func (*ModalRouteBase) DidChangePrevious

func (b *ModalRouteBase) DidChangePrevious(previousRoute Route)

DidChangePrevious tells the scope that the state changed.

Flutter: widgets/routes.dart ModalRoute.didChangePrevious

func (*ModalRouteBase) DidPop

func (b *ModalRouteBase) DidPop(result any) bool

DidPop removes the last local history entry, and does not pop the route, while there are some.

Flutter: widgets/routes.dart LocalHistoryRoute.didPop

func (*ModalRouteBase) DidPopNext

func (b *ModalRouteBase) DidPopNext(nextRoute Route)

DidPopNext receives the delegated transition of the next route.

Flutter: widgets/routes.dart ModalRoute.didPopNext

func (*ModalRouteBase) DidPush

func (b *ModalRouteBase) DidPush() *scheduler.TickerFuture

DidPush makes the focus scope of the route the first focus of the navigator, when the scope exists and the navigator requests focus.

Flutter: widgets/routes.dart ModalRoute.didPush

func (*ModalRouteBase) DirectionalTraversalEdgeBehavior

func (b *ModalRouteBase) DirectionalTraversalEdgeBehavior() TraversalEdgeBehavior

DirectionalTraversalEdgeBehavior controls the directional transfer of focus beyond the first and the last items of the focus scope of the route; Unspecified (Flutter's null) uses Navigator.RouteDirectionalTraversalEdgeBehavior.

Flutter: widgets/routes.dart ModalRoute.directionalTraversalEdgeBehavior

func (*ModalRouteBase) Filter

func (b *ModalRouteBase) Filter() ui.ImageFilter

Filter is applied to everything below the route, or nil.

Flutter: widgets/routes.dart ModalRoute.filter

func (*ModalRouteBase) FullscreenDialog

func (b *ModalRouteBase) FullscreenDialog() bool

FullscreenDialog is false.

Flutter: widgets/routes.dart ModalRoute.fullscreenDialog

func (*ModalRouteBase) ImpliesAppBarDismissal

func (b *ModalRouteBase) ImpliesAppBarDismissal() bool

ImpliesAppBarDismissal is whether an app bar shows a close button.

Flutter: widgets/routes.dart ModalRoute.impliesAppBarDismissal

func (*ModalRouteBase) Install

func (b *ModalRouteBase) Install()

Install creates the proxies of the animations.

Flutter: widgets/routes.dart ModalRoute.install

func (*ModalRouteBase) Offstage

func (b *ModalRouteBase) Offstage() bool

Offstage is whether the route is built but not shown.

Flutter: widgets/routes.dart ModalRoute.offstage

func (*ModalRouteBase) OnPopInvokedWithResult

func (b *ModalRouteBase) OnPopInvokedWithResult(didPop bool, result any)

OnPopInvokedWithResult tells the pop scopes.

Flutter: widgets/routes.dart ModalRoute.onPopInvokedWithResult

func (*ModalRouteBase) PopDisposition

func (b *ModalRouteBase) PopDisposition() RoutePopDisposition

PopDisposition is do-not-pop when a pop scope blocks pops, else the disposition of the local history route.

Flutter: widgets/routes.dart ModalRoute.popDisposition

func (*ModalRouteBase) PopGestureEnabled

func (b *ModalRouteBase) PopGestureEnabled() bool

PopGestureEnabled is whether a back gesture may pop the route: it is not the first, does not handle pops itself, cannot be vetoed, and is not animating.

Flutter: widgets/routes.dart ModalRoute.popGestureEnabled

func (*ModalRouteBase) PopGestureInProgress

func (b *ModalRouteBase) PopGestureInProgress() bool

PopGestureInProgress is whether a user gesture that may pop the route is going on.

Flutter: widgets/routes.dart ModalRoute.popGestureInProgress

func (*ModalRouteBase) ReceivedTransition

func (b *ModalRouteBase) ReceivedTransition() DelegatedTransitionBuilder

ReceivedTransition is the transition that the route above delegated to this one, or nil.

Flutter: widgets/routes.dart ModalRoute.receivedTransition

func (*ModalRouteBase) RegisterPopEntry

func (b *ModalRouteBase) RegisterPopEntry(popEntry PopEntry)

RegisterPopEntry adds a pop scope to the route.

Flutter: widgets/routes.dart ModalRoute.registerPopEntry

func (*ModalRouteBase) RemoveLocalHistoryEntry

func (b *ModalRouteBase) RemoveLocalHistoryEntry(entry *LocalHistoryEntry)

RemoveLocalHistoryEntry removes a local history entry.

Flutter: widgets/routes.dart LocalHistoryRoute.removeLocalHistoryEntry

func (*ModalRouteBase) SecondaryAnimation

func (b *ModalRouteBase) SecondaryAnimation() animation.Animation[float64]

SecondaryAnimation is the proxy of the secondary animation of the route.

Flutter: widgets/routes.dart ModalRoute.secondaryAnimation

func (*ModalRouteBase) SemanticsDismissible

func (b *ModalRouteBase) SemanticsDismissible() bool

SemanticsDismissible is true.

Flutter: widgets/routes.dart ModalRoute.semanticsDismissible

func (*ModalRouteBase) SetOffstage

func (b *ModalRouteBase) SetOffstage(value bool)

SetOffstage builds the route without showing it, with its animations at the end (animation complete, secondary animation dismissed).

Flutter: widgets/routes.dart ModalRoute.offstage

func (*ModalRouteBase) SetReceivedTransition

func (b *ModalRouteBase) SetReceivedTransition(t DelegatedTransitionBuilder)

SetReceivedTransition sets the transition that the route above delegated to this one. It is for tests.

Flutter: widgets/routes.dart ModalRoute.receivedTransition

func (*ModalRouteBase) SetState

func (b *ModalRouteBase) SetState(fn func())

SetState runs fn and rebuilds the scope of the route, if it is in the tree.

Flutter: widgets/routes.dart ModalRoute.setState

func (*ModalRouteBase) String

func (b *ModalRouteBase) String() string

String describes the route.

Flutter: widgets/routes.dart ModalRoute.toString

func (*ModalRouteBase) SubtreeContext

func (b *ModalRouteBase) SubtreeContext() BuildContext

SubtreeContext is the context of the subtree of the page, or nil.

Flutter: widgets/routes.dart ModalRoute.subtreeContext

func (*ModalRouteBase) TraversalEdgeBehavior

func (b *ModalRouteBase) TraversalEdgeBehavior() TraversalEdgeBehavior

TraversalEdgeBehavior controls the transfer of focus beyond the first and the last items of the focus scope of the route; Unspecified (Flutter's null) uses Navigator.RouteTraversalEdgeBehavior.

Flutter: widgets/routes.dart ModalRoute.traversalEdgeBehavior

func (*ModalRouteBase) UnregisterPopEntry

func (b *ModalRouteBase) UnregisterPopEntry(popEntry PopEntry)

UnregisterPopEntry removes a pop scope from the route.

Flutter: widgets/routes.dart ModalRoute.unregisterPopEntry

func (*ModalRouteBase) WillHandlePopInternally

func (b *ModalRouteBase) WillHandlePopInternally() bool

WillHandlePopInternally is whether the route has local history entries.

Flutter: widgets/routes.dart LocalHistoryRoute.willHandlePopInternally

type ModalRouteOpts

type ModalRouteOpts struct {
	RouteOpts
	// Filter is applied to everything below the route, behind the barrier.
	Filter ui.ImageFilter
	// TraversalEdgeBehavior controls the transfer of focus beyond the first and the
	// last items of the focus scope of the route; Unspecified uses
	// Navigator.RouteTraversalEdgeBehavior.
	TraversalEdgeBehavior TraversalEdgeBehavior
	// DirectionalTraversalEdgeBehavior controls the directional transfer of focus
	// beyond the first and the last items of the focus scope of the route;
	// Unspecified uses Navigator.RouteDirectionalTraversalEdgeBehavior.
	DirectionalTraversalEdgeBehavior TraversalEdgeBehavior
}

ModalRouteOpts are the optional parameters of the modal route bases.

Flutter: widgets/routes.dart ModalRoute.new

type MouseRegion

type MouseRegion struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

MouseRegion tracks mouse pointers entering, hovering over and leaving its child, and sets the cursor over it.

Flutter: widgets/basic.dart MouseRegion

func NewMouseRegion

func NewMouseRegion(child Widget, opts ...MouseRegionOpts) *MouseRegion

NewMouseRegion creates a widget that tracks mouse pointers over its child.

Flutter: widgets/basic.dart MouseRegion.new

func (*MouseRegion) CreateRenderObject

func (w *MouseRegion) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart MouseRegion.createRenderObject

func (*MouseRegion) Cursor

func (w *MouseRegion) Cursor() services.MouseCursor

Cursor is the mouse cursor over the region.

Flutter: widgets/basic.dart MouseRegion.cursor

func (*MouseRegion) HitTestBehavior

func (w *MouseRegion) HitTestBehavior() rendering.HitTestBehavior

HitTestBehavior is how the region behaves during hit testing.

Flutter: widgets/basic.dart MouseRegion.hitTestBehavior

func (*MouseRegion) OnEnter

OnEnter is called when a mouse pointer enters the region.

Flutter: widgets/basic.dart MouseRegion.onEnter

func (*MouseRegion) OnExit

OnExit is called when a mouse pointer leaves the region.

Flutter: widgets/basic.dart MouseRegion.onExit

func (*MouseRegion) OnHover

OnHover is called when a mouse pointer moves inside the region.

Flutter: widgets/basic.dart MouseRegion.onHover

func (*MouseRegion) Opaque

func (w *MouseRegion) Opaque() bool

Opaque is whether the region hides the regions behind it.

Flutter: widgets/basic.dart MouseRegion.opaque

func (*MouseRegion) UpdateRenderObject

func (w *MouseRegion) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart MouseRegion.updateRenderObject

type MouseRegionOpts

type MouseRegionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OnEnter is called when a mouse pointer enters the region.
	OnEnter services.PointerEnterEventListener
	// OnExit is called when a mouse pointer leaves the region.
	OnExit services.PointerExitEventListener
	// OnHover is called when a mouse pointer moves inside the region.
	OnHover services.PointerHoverEventListener
	// Cursor is the mouse cursor while a mouse pointer is over the region; the
	// default is MouseCursorDefer.
	Cursor services.MouseCursor
	// Opaque is whether this region hides the regions behind it from mouse
	// pointers; the default is true.
	Opaque foundation.Opt[bool]
	// HitTestBehavior is how to behave during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
	// HoldCursorWhilePressed keeps the cursor of this region, for a mouse that was
	// pressed inside it, until the button is released, whatever the pointer moves over:
	// the sash of a split view keeps its resize cursor while the pointer outruns it. The
	// cursor changes if the cursor of the region does, and the hold ends if the region
	// leaves the tree. OnEnter, OnExit and OnHover are not affected.
	//
	// Deviation: Flutter's cursor follows the regions under the pointer while a button
	// is held too (SPEC §12.10).
	HoldCursorWhilePressed bool
}

MouseRegionOpts are the optional parameters of NewMouseRegion.

Flutter: widgets/basic.dart MouseRegion.new

type MultiChildRenderObjectElement

type MultiChildRenderObjectElement struct {
	RenderObjectElement
	// contains filtered or unexported fields
}

MultiChildRenderObjectElement is the element of a MultiChildRenderObjectWidget.

Flutter: widgets/framework.dart MultiChildRenderObjectElement

func NewMultiChildRenderObjectElement

func NewMultiChildRenderObjectElement(w multiChildRenderObjectWidget) *MultiChildRenderObjectElement

NewMultiChildRenderObjectElement creates the element of a render object widget with children. In debug builds it panics with the tag ChildrenHaveDuplicateKeys when two children have the same key.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.new

func (*MultiChildRenderObjectElement) Children

func (e *MultiChildRenderObjectElement) Children() []Element

Children are the child elements, except the ones that were forgotten.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.children

func (*MultiChildRenderObjectElement) ForgetChild

func (e *MultiChildRenderObjectElement) ForgetChild(child Element)

ForgetChild remembers that the child went to another parent.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.forgetChild

func (*MultiChildRenderObjectElement) InflateWidget

func (e *MultiChildRenderObjectElement) InflateWidget(newWidget Widget, newSlot any) Element

InflateWidget inflates the child, and in debug builds reports the error MultiChildNeedsRenderObject when it has no render object.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.inflateWidget

func (*MultiChildRenderObjectElement) InsertRenderObjectChild

func (e *MultiChildRenderObjectElement) InsertRenderObjectChild(child rendering.RenderObject, slot any)

InsertRenderObjectChild inserts the child after the render object of the previous sibling.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.insertRenderObjectChild

func (*MultiChildRenderObjectElement) Mount

func (e *MultiChildRenderObjectElement) Mount(parent Element, newSlot any)

Mount creates the render object and inflates the children.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.mount

func (*MultiChildRenderObjectElement) MoveRenderObjectChild

func (e *MultiChildRenderObjectElement) MoveRenderObjectChild(child rendering.RenderObject, _, newSlot any)

MoveRenderObjectChild moves the child after the render object of the new previous sibling.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.moveRenderObjectChild

func (*MultiChildRenderObjectElement) RemoveRenderObjectChild

func (e *MultiChildRenderObjectElement) RemoveRenderObjectChild(child rendering.RenderObject, _ any)

RemoveRenderObjectChild removes the child.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.removeRenderObjectChild

func (*MultiChildRenderObjectElement) Update

func (e *MultiChildRenderObjectElement) Update(newWidget Widget)

Update updates the render object and the children.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.update

func (*MultiChildRenderObjectElement) VisitChildren

func (e *MultiChildRenderObjectElement) VisitChildren(visitor ElementVisitor)

VisitChildren visits the children that were not forgotten.

Flutter: widgets/framework.dart MultiChildRenderObjectElement.visitChildren

type MultiChildRenderObjectWidget

type MultiChildRenderObjectWidget struct {
	RenderObjectWidget
	// contains filtered or unexported fields
}

MultiChildRenderObjectWidget is a render object widget that has a list of children.

Flutter: widgets/framework.dart MultiChildRenderObjectWidget

func NewMultiChildRenderObjectWidgetBase

func NewMultiChildRenderObjectWidgetBase(children []Widget, opts ...WidgetOpts) MultiChildRenderObjectWidget

NewMultiChildRenderObjectWidgetBase creates the base of a render object widget with children.

Flutter: widgets/framework.dart MultiChildRenderObjectWidget.new

func (*MultiChildRenderObjectWidget) Children

func (w *MultiChildRenderObjectWidget) Children() []Widget

Children are the widgets below this one in the tree, in order.

Flutter: widgets/framework.dart MultiChildRenderObjectWidget.children

type MultiSelectableDelegate

type MultiSelectableDelegate interface {
	SelectionContainerDelegate
	// NotifyListeners notifies the listeners of the delegate.
	//
	// Flutter: foundation/change_notifier.dart ChangeNotifier.notifyListeners
	NotifyListeners()
	// CompareOrder is the compare function this delegate uses for determining
	// the selection order of the selectables; it defaults to the screen order.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.compareOrder
	CompareOrder(a, b rendering.Selectable) int
	// DidChangeSelectables is called when this delegate finishes updating the
	// selectables.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.didChangeSelectables
	DidChangeSelectables()
	// EnsureChildUpdated ensures the selectable child has received up to date
	// selection events. It is called when a new selectable is added to the
	// delegate, and its screen location falls into the previous selection.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.ensureChildUpdated
	EnsureChildUpdated(selectable rendering.Selectable)
	// DispatchSelectionEventToChild dispatches a selection event to a specific
	// selectable.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.dispatchSelectionEventToChild
	DispatchSelectionEventToChild(selectable rendering.Selectable, event rendering.SelectionEvent) rendering.SelectionResult
	// HandleSelectAll selects all contents of all selectables.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleSelectAll
	HandleSelectAll(event rendering.SelectAllSelectionEvent) rendering.SelectionResult
	// HandleSelectWord selects a word in a selectable at the event's location.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleSelectWord
	HandleSelectWord(event rendering.SelectWordSelectionEvent) rendering.SelectionResult
	// HandleSelectParagraph selects a paragraph in a selectable at the event's
	// location.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleSelectParagraph
	HandleSelectParagraph(event rendering.SelectParagraphSelectionEvent) rendering.SelectionResult
	// HandleClearSelection removes the selection of all selectables.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleClearSelection
	HandleClearSelection(event rendering.ClearSelectionEvent) rendering.SelectionResult
	// HandleGranularlyExtendSelection extends the current selection in a
	// certain granularity.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleGranularlyExtendSelection
	HandleGranularlyExtendSelection(event rendering.GranularlyExtendSelectionEvent) rendering.SelectionResult
	// HandleDirectionallyExtendSelection extends the current selection in a
	// direction.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleDirectionallyExtendSelection
	HandleDirectionallyExtendSelection(event rendering.DirectionallyExtendSelectionEvent) rendering.SelectionResult
	// HandleSelectionEdgeUpdate updates the selection edges.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleSelectionEdgeUpdate
	HandleSelectionEdgeUpdate(event rendering.SelectionEdgeUpdateEvent) rendering.SelectionResult
}

MultiSelectableDelegate is what MultiSelectableSelectionContainerDelegate calls on the delegate that embeds it, so the delegate can override the behaviors that Flutter's subclasses override (SPEC §12.5, the self pattern).

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate

type MultiSelectableSelectionContainerDelegate

type MultiSelectableSelectionContainerDelegate struct {
	SelectionContainerDelegateBase
	foundation.ChangeNotifier

	// Selectables is the list of selectables this delegate is managing.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.selectables
	Selectables []rendering.Selectable
	// CurrentSelectionEndIndex is the current selectable that contains the
	// selection end edge, or -1.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.currentSelectionEndIndex
	CurrentSelectionEndIndex int
	// CurrentSelectionStartIndex is the current selectable that contains the
	// selection start edge, or -1.
	//
	// Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.currentSelectionStartIndex
	CurrentSelectionStartIndex int
	// contains filtered or unexported fields
}

MultiSelectableSelectionContainerDelegate is a delegate that handles events and updates for multiple Selectable children.

Updates are optimized by tracking which Selectables reside on the edges of a selection. Delegates that embed it implement EnsureChildUpdated to describe how a Selectable should behave when added to a selection, and call InitMultiSelectableSelectionContainerDelegate with themselves.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate

func (*MultiSelectableSelectionContainerDelegate) Add

Add adds the selectable; it takes part in the selection after the next frame.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.add

func (*MultiSelectableSelectionContainerDelegate) CompareOrder

CompareOrder compares the selectables in the screen order.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.compareOrder

func (*MultiSelectableSelectionContainerDelegate) ContentLength

ContentLength is the total length of the content under this delegate: the sum of the content length of each selectable it manages.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.contentLength

func (*MultiSelectableSelectionContainerDelegate) DidChangeSelectables

func (m *MultiSelectableSelectionContainerDelegate) DidChangeSelectables()

DidChangeSelectables is called when this delegate finishes updating the selectables.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.didChangeSelectables

func (*MultiSelectableSelectionContainerDelegate) DispatchSelectionEvent

DispatchSelectionEvent handles the event by dispatching it to the selectables.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.dispatchSelectionEvent

func (*MultiSelectableSelectionContainerDelegate) DispatchSelectionEventToChild

DispatchSelectionEventToChild dispatches a selection event to a specific selectable. Override it if the delegate needs to generate additional events or treatments prior to sending the event.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.dispatchSelectionEventToChild

func (*MultiSelectableSelectionContainerDelegate) Dispose

Dispose releases the selectables and the listeners.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.dispose

func (*MultiSelectableSelectionContainerDelegate) GetSelectedContent

GetSelectedContent copies the selected contents of all selectables.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.getSelectedContent

func (*MultiSelectableSelectionContainerDelegate) GetSelection

GetSelection returns a SelectedContentRange considering the range from each selectable child managed under this delegate. When nothing is selected or either selection edge has not been set, it returns nil.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.getSelection

func (*MultiSelectableSelectionContainerDelegate) GetSelectionGeometry

GetSelectionGeometry gets the combined SelectionGeometry for child selectables.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.getSelectionGeometry

func (*MultiSelectableSelectionContainerDelegate) HandleClearSelection

HandleClearSelection removes the selection of all selectables this delegate manages.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleClearSelection

func (*MultiSelectableSelectionContainerDelegate) HandleDirectionallyExtendSelection

HandleDirectionallyExtendSelection extends the current selection in a direction.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleDirectionallyExtendSelection

func (*MultiSelectableSelectionContainerDelegate) HandleGranularlyExtendSelection

HandleGranularlyExtendSelection extends the current selection in a certain granularity.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleGranularlyExtendSelection

func (*MultiSelectableSelectionContainerDelegate) HandleSelectAll

HandleSelectAll selects all contents of all selectables.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleSelectAll

func (*MultiSelectableSelectionContainerDelegate) HandleSelectParagraph

HandleSelectParagraph selects a paragraph in a selectable at the location of the event.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleSelectParagraph

func (*MultiSelectableSelectionContainerDelegate) HandleSelectWord

HandleSelectWord selects a word in a selectable at the location of the event.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleSelectWord

func (*MultiSelectableSelectionContainerDelegate) HandleSelectionEdgeUpdate

HandleSelectionEdgeUpdate updates the selection edges.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.handleSelectionEdgeUpdate

func (*MultiSelectableSelectionContainerDelegate) LayoutDidChange

func (m *MultiSelectableSelectionContainerDelegate) LayoutDidChange()

LayoutDidChange notifies this delegate that layout of the container has changed.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.layoutDidChange

func (*MultiSelectableSelectionContainerDelegate) PushHandleLayers

func (m *MultiSelectableSelectionContainerDelegate) PushHandleLayers(startHandle, endHandle *rendering.LayerLink)

PushHandleLayers gives the layer links that the selection handles follow.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.pushHandleLayers

func (*MultiSelectableSelectionContainerDelegate) Remove

Remove removes the selectable.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.remove

func (*MultiSelectableSelectionContainerDelegate) Value

Value is the geometry of the selection of all the selectables.

Flutter: widgets/selectable_region.dart MultiSelectableSelectionContainerDelegate.value

type NavigationMode int

NavigationMode describes the navigation mode to be set by a MediaQuery widget: traditional (touch and pointer) or directional (arrow keys move the focus).

Flutter: widgets/media_query.dart NavigationMode

const (
	// NavigationModeUnspecified is the zero value; it counts as traditional.
	//
	// Flutter: no counterpart
	NavigationModeUnspecified NavigationMode = iota
	// NavigationModeTraditional uses a pointer or touch; the default.
	//
	// Flutter: widgets/media_query.dart NavigationMode.traditional
	NavigationModeTraditional
	// NavigationModeDirectional uses directional input to move the focus.
	//
	// Flutter: widgets/media_query.dart NavigationMode.directional
	NavigationModeDirectional
)

The values of NavigationMode follow Flutter's declaration order.

func MediaQueryMaybeNavigationModeOf

func MediaQueryMaybeNavigationModeOf(bc BuildContext) (NavigationMode, bool)

MediaQueryMaybeNavigationModeOf is MediaQueryNavigationModeOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeNavigationModeOf

func MediaQueryNavigationModeOf

func MediaQueryNavigationModeOf(bc BuildContext) NavigationMode

MediaQueryNavigationModeOf is the navigation mode of the app.

Flutter: widgets/media_query.dart MediaQuery.navigationModeOf

func (m NavigationMode) String() string

String returns the Flutter name of the value, such as "traditional".

Flutter: widgets/media_query.dart NavigationMode

type NavigationNotification struct {
	// CanHandlePop is whether the originator can handle a pop: a PopScope that
	// blocks pops, or a navigator that has routes to pop.
	//
	// Flutter: widgets/navigator.dart NavigationNotification.canHandlePop
	CanHandlePop bool
}

NavigationNotification tells the ancestors whether the navigator or a pop scope below can handle a pop.

Flutter: widgets/navigator.dart NavigationNotification

func (n NavigationNotification) String() string

String describes the notification.

Flutter: widgets/navigator.dart NavigationNotification.toString

type NavigationToolbar struct {
	StatelessWidget
	// contains filtered or unexported fields
}

NavigationToolbar is a horizontal layout of a leading widget, a middle widget and a trailing widget, as in the toolbar of an AppBar.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar

func NewNavigationToolbar

func NewNavigationToolbar(opts ...NavigationToolbarOpts) *NavigationToolbar

NewNavigationToolbar creates the toolbar.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.new

func (w *NavigationToolbar) Build(bc BuildContext) Widget

Build lays the three widgets out with a CustomMultiChildLayout.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.build

func (w *NavigationToolbar) CenterMiddle() bool

CenterMiddle says whether the middle widget is centered within the toolbar.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.centerMiddle

func (w *NavigationToolbar) Leading() Widget

Leading is the widget at the start of the toolbar.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.leading

func (w *NavigationToolbar) Middle() Widget

Middle is the widget between the leading and the trailing widgets.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.middle

func (w *NavigationToolbar) MiddleSpacing() float64

MiddleSpacing is the spacing around the middle widget.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.middleSpacing

func (w *NavigationToolbar) Trailing() Widget

Trailing is the widget at the end of the toolbar.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.trailing

type NavigationToolbarOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Leading is the widget at the start of the toolbar; it is as high as the
	// toolbar.
	Leading Widget
	// Middle is the widget between the leading and the trailing widgets.
	Middle Widget
	// Trailing is the widget at the end of the toolbar.
	Trailing Widget
	// NoCenterMiddle says that the middle widget is start-justified within the
	// space between the leading and trailing widgets, instead of centered within
	// the toolbar (the default, Flutter's centerMiddle).
	NoCenterMiddle bool
	// MiddleSpacing is the spacing around the middle widget on the sides that
	// have a leading or trailing widget; the default is
	// NavigationToolbarMiddleSpacing.
	MiddleSpacing foundation.Opt[float64]
}

NavigationToolbarOpts are the optional parameters of NewNavigationToolbar.

Flutter: widgets/navigation_toolbar.dart NavigationToolbar.new

type Navigator struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Navigator manages a stack of Route objects and offers methods for managing the stack. The Navigator keeps the routes in an Overlay.

Flutter: widgets/navigator.dart Navigator

func NewNavigator

func NewNavigator(opts ...NavigatorOpts) *Navigator

NewNavigator creates a navigator.

Flutter: widgets/navigator.dart Navigator.new

func (w *Navigator) ClipBehavior() ui.Clip

ClipBehavior is how the overlay of the navigator clips.

Flutter: widgets/navigator.dart Navigator.clipBehavior

func (w *Navigator) CreateState() State

CreateState creates the state.

Flutter: widgets/navigator.dart Navigator.createState

func (w *Navigator) InitialRoute() string

InitialRoute is the name of the first route, or empty.

Flutter: widgets/navigator.dart Navigator.initialRoute

func (w *Navigator) Observers() []NavigatorObserver

Observers are the observers of the navigator.

Flutter: widgets/navigator.dart Navigator.observers

func (w *Navigator) OnDidRemovePage() DidRemovePageCallback

OnDidRemovePage is called after the route of a page was removed.

Flutter: widgets/navigator.dart Navigator.onDidRemovePage

func (w *Navigator) OnGenerateInitialRoutes() RouteListFactory

OnGenerateInitialRoutes creates the routes to start with.

Flutter: widgets/navigator.dart Navigator.onGenerateInitialRoutes

func (w *Navigator) OnGenerateRoute() RouteFactory

OnGenerateRoute creates the routes of the named pushes, or nil.

Flutter: widgets/navigator.dart Navigator.onGenerateRoute

func (w *Navigator) OnPopPage() PopPageCallback

OnPopPage is the callback that decides whether a page-based route may pop.

Flutter: widgets/navigator.dart Navigator.onPopPage

func (w *Navigator) OnUnknownRoute() RouteFactory

OnUnknownRoute creates the route when OnGenerateRoute returns nil, or is nil.

Flutter: widgets/navigator.dart Navigator.onUnknownRoute

func (w *Navigator) Pages() []Page

Pages is the list of pages that the history follows, or nil.

Flutter: widgets/navigator.dart Navigator.pages

func (w *Navigator) RequestFocus() bool

RequestFocus is whether the routes request the focus by default.

Flutter: widgets/navigator.dart Navigator.requestFocus

func (w *Navigator) RouteDirectionalTraversalEdgeBehavior() TraversalEdgeBehavior

RouteDirectionalTraversalEdgeBehavior controls the directional transfer of focus beyond the first and the last items of the focus scope of a route.

Flutter: widgets/navigator.dart Navigator.routeDirectionalTraversalEdgeBehavior

func (w *Navigator) RouteTraversalEdgeBehavior() TraversalEdgeBehavior

RouteTraversalEdgeBehavior controls the transfer of focus beyond the first and the last items of the focus scope of a route.

Flutter: widgets/navigator.dart Navigator.routeTraversalEdgeBehavior

func (w *Navigator) TransitionDelegate() TransitionDelegate

TransitionDelegate decides how the routes of new and removed pages transition.

Flutter: widgets/navigator.dart Navigator.transitionDelegate

type NavigatorObserver interface {
	// Navigator is the navigator the observer is observing, or nil.
	//
	// Flutter: widgets/navigator.dart NavigatorObserver.navigator
	Navigator() *NavigatorState

	// DidPush is called when a route was pushed onto the navigator.
	//
	// Flutter: widgets/navigator.dart NavigatorObserver.didPush
	DidPush(route, previousRoute Route)
	// DidPop is called when a route was popped off the navigator.
	//
	// Flutter: widgets/navigator.dart NavigatorObserver.didPop
	DidPop(route, previousRoute Route)
	// DidRemove is called when a route was removed from the navigator.
	//
	// Flutter: widgets/navigator.dart NavigatorObserver.didRemove
	DidRemove(route, previousRoute Route)
	// DidReplace is called when a route was replaced in the navigator.
	//
	// Flutter: widgets/navigator.dart NavigatorObserver.didReplace
	DidReplace(newRoute, oldRoute Route)
	// DidChangeTop is called when the top route of the navigator changed.
	//
	// Flutter: widgets/navigator.dart NavigatorObserver.didChangeTop
	DidChangeTop(topRoute, previousTopRoute Route)
	// DidStartUserGesture is called when the user starts a gesture that may pop
	// the route, for instance a swipe to go back.
	//
	// Flutter: widgets/navigator.dart NavigatorObserver.didStartUserGesture
	DidStartUserGesture(route, previousRoute Route)
	// DidStopUserGesture is called when the user stopped the gesture.
	//
	// Flutter: widgets/navigator.dart NavigatorObserver.didStopUserGesture
	DidStopUserGesture()
	// contains filtered or unexported methods
}

NavigatorObserver watches the changes of a Navigator: a route pushed, popped, removed or replaced, the top route changed, and a user gesture started or stopped. Embed NavigatorObserverBase and override the methods of interest.

Flutter: widgets/navigator.dart NavigatorObserver

type NavigatorObserverBase struct {
	// contains filtered or unexported fields
}

NavigatorObserverBase implements NavigatorObserver with methods that do nothing. Embed it.

Flutter: widgets/navigator.dart NavigatorObserver

func (o *NavigatorObserverBase) DidChangeTop(topRoute, previousTopRoute Route)

DidChangeTop does nothing.

Flutter: widgets/navigator.dart NavigatorObserver.didChangeTop

func (o *NavigatorObserverBase) DidPop(route, previousRoute Route)

DidPop does nothing.

Flutter: widgets/navigator.dart NavigatorObserver.didPop

func (o *NavigatorObserverBase) DidPush(route, previousRoute Route)

DidPush does nothing.

Flutter: widgets/navigator.dart NavigatorObserver.didPush

func (o *NavigatorObserverBase) DidRemove(route, previousRoute Route)

DidRemove does nothing.

Flutter: widgets/navigator.dart NavigatorObserver.didRemove

func (o *NavigatorObserverBase) DidReplace(newRoute, oldRoute Route)

DidReplace does nothing.

Flutter: widgets/navigator.dart NavigatorObserver.didReplace

func (o *NavigatorObserverBase) DidStartUserGesture(route, previousRoute Route)

DidStartUserGesture does nothing.

Flutter: widgets/navigator.dart NavigatorObserver.didStartUserGesture

func (o *NavigatorObserverBase) DidStopUserGesture()

DidStopUserGesture does nothing.

Flutter: widgets/navigator.dart NavigatorObserver.didStopUserGesture

func (o *NavigatorObserverBase) Navigator() *NavigatorState

Navigator is the navigator that the observer observes, or nil.

Flutter: widgets/navigator.dart NavigatorObserver.navigator

type NavigatorOfOpts struct {
	// RootNavigator makes the lookup return the root navigator: the farthest
	// one above the context.
	RootNavigator bool
}

NavigatorOfOpts are the optional parameters of NavigatorOf and NavigatorMaybeOf.

Flutter: widgets/navigator.dart Navigator.of

type NavigatorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// InitialRoute is the name of the first route to show; empty means "/".
	InitialRoute string
	// OnGenerateInitialRoutes creates the routes to start with; the default is
	// NavigatorDefaultGenerateInitialRoutes.
	OnGenerateInitialRoutes RouteListFactory
	// OnGenerateRoute creates a route for the settings (a name and arguments)
	// that PushNamed and friends were called with.
	OnGenerateRoute RouteFactory
	// OnUnknownRoute is used when OnGenerateRoute returns nil.
	OnUnknownRoute RouteFactory
	// ClipBehavior is how the overlay of the navigator clips; the default is
	// ClipHardEdge.
	ClipBehavior ui.Clip
	// Pages is the declarative history of the navigator: when the list changes, the
	// navigator updates its routes to match it, and the TransitionDelegate decides
	// how the new and the removed routes transition. A nil list means the
	// imperative API only; a list that is not nil must have at least one page and
	// either OnDidRemovePage or OnPopPage (not both).
	Pages []Page
	// OnPopPage is called when a page-based route is popped; it must remove the
	// page from Pages and return true to let the pop continue. It is deprecated in
	// favor of OnDidRemovePage.
	OnPopPage PopPageCallback
	// OnDidRemovePage is called when the route of a page was removed with an
	// imperative call; the page must be removed from Pages.
	OnDidRemovePage DidRemovePageCallback
	// TransitionDelegate decides how the routes of new and removed pages
	// transition; the default is DefaultTransitionDelegate.
	TransitionDelegate TransitionDelegate
	// Observers are told about the changes of the history.
	Observers []NavigatorObserver
	// RequestFocus is whether the routes request the focus when they become the
	// top one, unless the route says otherwise; the default is true.
	RequestFocus foundation.Opt[bool]
	// RouteTraversalEdgeBehavior controls the transfer of focus beyond the first and
	// the last items of the focus scope of a route; a route can override it. The
	// default is TraversalEdgeBehaviorParentScope.
	RouteTraversalEdgeBehavior TraversalEdgeBehavior
	// RouteDirectionalTraversalEdgeBehavior controls the directional transfer of
	// focus beyond the first and the last items of the focus scope of a route; a
	// route can override it. The default is TraversalEdgeBehaviorStop.
	RouteDirectionalTraversalEdgeBehavior TraversalEdgeBehavior
	// ReportsRouteUpdateToEngine is whether the navigator tells the system the
	// name of the top route, through SystemNavigator.RouteInformationUpdated,
	// each time it changes. It also selects the single-entry history.
	ReportsRouteUpdateToEngine bool
}

NavigatorOpts are the optional parameters of NewNavigator.

Flutter: widgets/navigator.dart Navigator.new

type NavigatorPopHandler struct {
	StatefulWidget
	// contains filtered or unexported fields
}

NavigatorPopHandler enables the handling of system back gestures for a nested Navigator: the pops go to the nested one first, and to onPop when it can't handle them.

Flutter: widgets/navigator_pop_handler.dart NavigatorPopHandler

func NewNavigatorPopHandler

func NewNavigatorPopHandler(child Widget, opts ...NavigatorPopHandlerOpts) *NavigatorPopHandler

NewNavigatorPopHandler creates the widget.

Flutter: widgets/navigator_pop_handler.dart NavigatorPopHandler.new

func (w *NavigatorPopHandler) Child() Widget

Child is the widget below.

Flutter: widgets/navigator_pop_handler.dart NavigatorPopHandler.child

func (w *NavigatorPopHandler) CreateState() State

CreateState creates the state.

Flutter: widgets/navigator_pop_handler.dart NavigatorPopHandler.createState

func (w *NavigatorPopHandler) Enabled() bool

Enabled is whether the handler takes the pops.

Flutter: widgets/navigator_pop_handler.dart NavigatorPopHandler.enabled

type NavigatorPopHandlerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OnPopWithResult is called when a pop is invoked but not handled by the
	// navigator below.
	OnPopWithResult PopResultCallback
	// Disabled makes the handler let pops through; it is enabled by default.
	Disabled bool
}

NavigatorPopHandlerOpts are the optional parameters of NewNavigatorPopHandler.

Flutter: widgets/navigator_pop_handler.dart NavigatorPopHandler.new

type NavigatorPushNamedOpts struct {
	// Arguments are passed to OnGenerateRoute in the settings of the route.
	Arguments any
	// Result is the result of the route that is replaced or popped by the call.
	Result any
}

NavigatorPushNamedOpts are the optional parameters of the named pushes.

Flutter: widgets/navigator.dart NavigatorState.pushNamed

type NavigatorPushReplacementOpts struct {
	// Result is the result of the route that is replaced.
	Result any
}

NavigatorPushReplacementOpts are the optional parameters of PushReplacement.

Flutter: widgets/navigator.dart NavigatorState.pushReplacement

type NavigatorState struct {
	StateOf[*Navigator]
	TickerProvider
	// contains filtered or unexported fields
}

NavigatorState is the state of a Navigator: it holds the history of routes, the overlay they live in, and the methods that change the history.

Flutter: widgets/navigator.dart NavigatorState

func NavigatorMaybeOf(bc BuildContext, opts ...NavigatorOfOpts) *NavigatorState

NavigatorMaybeOf returns the state of the closest navigator that contains the context, or nil.

Flutter: widgets/navigator.dart Navigator.maybeOf

func NavigatorOf(bc BuildContext, opts ...NavigatorOfOpts) *NavigatorState

NavigatorOf returns the state of the closest navigator that contains the context, or the root one with RootNavigator. In debug builds it panics with the tag NavigatorMissing when there is none.

Flutter: widgets/navigator.dart Navigator.of

func (s *NavigatorState) Activate()

Activate takes the observers again.

Flutter: widgets/navigator.dart NavigatorState.activate

func (s *NavigatorState) Build(bc BuildContext) Widget

Build builds the overlay of the routes.

Flutter: widgets/navigator.dart NavigatorState.build

func (s *NavigatorState) CanPop() bool

CanPop is whether the navigator has more than one active route, or the first one handles pops itself.

Flutter: widgets/navigator.dart NavigatorState.canPop

func (s *NavigatorState) Deactivate()

Deactivate lets the observers go.

Flutter: widgets/navigator.dart NavigatorState.deactivate

func (s *NavigatorState) DidChangeDependencies()

DidChangeDependencies creates the initial history the first time, then updates the hero controller and tells the routes.

Flutter: widgets/navigator.dart NavigatorState.didChangeDependencies

func (s *NavigatorState) DidStartUserGesture()

DidStartUserGesture is called when a gesture that may pop the route starts, for instance a swipe to go back.

Flutter: widgets/navigator.dart NavigatorState.didStartUserGesture

func (s *NavigatorState) DidStopUserGesture()

DidStopUserGesture is called when the gesture stopped.

Flutter: widgets/navigator.dart NavigatorState.didStopUserGesture

func (s *NavigatorState) DidUpdateWidget(old *Navigator)

DidUpdateWidget moves the observers when they changed and tells the routes.

Flutter: widgets/navigator.dart NavigatorState.didUpdateWidget

func (h *NavigatorState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (s *NavigatorState) Dispose()

Dispose disposes every route.

Flutter: widgets/navigator.dart NavigatorState.dispose

func (h *NavigatorState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (s *NavigatorState) FinalizeRoute(route Route)

FinalizeRoute is called by a route that was popped when it is done and can be removed from the history and disposed.

Flutter: widgets/navigator.dart NavigatorState.finalizeRoute

func (s *NavigatorState) FocusNode() *FocusNode

FocusNode is the node of the focus of the navigator: the routes are in its enclosing scope.

Flutter: widgets/navigator.dart NavigatorState.focusNode

func (s *NavigatorState) InitState()

InitState subscribes to the observers and the hero controller.

Flutter: widgets/navigator.dart NavigatorState.initState

func (s *NavigatorState) MaybePop(result ...any) bool

MaybePop pops the top route unless it wants to stay (a PopScope that blocks pops, for example). It returns false when the route bubbles the pop up to the parent, and true when the pop was handled, even if the route stayed.

Deviation: Flutter's maybePop is asynchronous because of the deprecated Route.willPop, which Glutter does not port (SPEC §12.10).

Flutter: widgets/navigator.dart NavigatorState.maybePop

func (s *NavigatorState) Overlay() *OverlayState

Overlay is the overlay of the navigator, or nil before it is built.

Flutter: widgets/navigator.dart NavigatorState.overlay

func (s *NavigatorState) Pop(result ...any)

Pop removes the top route of the history; the result is passed to the channel that Push returned. The route may keep animating out.

Flutter: widgets/navigator.dart NavigatorState.pop

func (s *NavigatorState) PopAndPushNamed(routeName string, opts ...NavigatorPushNamedOpts) <-chan any

PopAndPushNamed pops the current route (with the Result of the options) and pushes the named one in its place.

Flutter: widgets/navigator.dart NavigatorState.popAndPushNamed

func (s *NavigatorState) PopUntil(predicate RoutePredicate)

PopUntil calls Pop repeatedly until the predicate returns true.

Flutter: widgets/navigator.dart NavigatorState.popUntil

func (s *NavigatorState) PopUntilWithResult(predicate RoutePredicate, result any)

PopUntilWithResult calls Pop repeatedly until the predicate returns true; the last route popped completes with the result.

Flutter: widgets/navigator.dart NavigatorState.popUntilWithResult

func (s *NavigatorState) Push(route Route) <-chan any

Push adds the route to the top of the history; the channel gets the result of the route when it is popped.

Flutter: widgets/navigator.dart NavigatorState.push

func (s *NavigatorState) PushAndRemoveUntil(newRoute Route, predicate RoutePredicate) <-chan any

PushAndRemoveUntil pushes the route and removes the routes below it until the predicate returns true for a route, which stays.

Flutter: widgets/navigator.dart NavigatorState.pushAndRemoveUntil

func (s *NavigatorState) PushNamed(routeName string, opts ...NavigatorPushNamedOpts) <-chan any

PushNamed pushes the route that OnGenerateRoute creates for the name; the channel gets the result of the route. In debug builds it panics with the tags NavigatorOnGenerateRouteMissing, NavigatorOnGenerateRouteReturnedNull and NavigatorOnUnknownRouteReturnedNull when the route can't be created.

Flutter: widgets/navigator.dart NavigatorState.pushNamed

func (s *NavigatorState) PushNamedAndRemoveUntil(newRouteName string, predicate RoutePredicate, opts ...NavigatorPushNamedOpts) <-chan any

PushNamedAndRemoveUntil pushes the named route and removes the routes below it until the predicate is true.

Flutter: widgets/navigator.dart NavigatorState.pushNamedAndRemoveUntil

func (s *NavigatorState) PushReplacement(newRoute Route, opts ...NavigatorPushReplacementOpts) <-chan any

PushReplacement replaces the current route by pushing the new one: the old route completes with the Result of the options once the transition is done.

Flutter: widgets/navigator.dart NavigatorState.pushReplacement

func (s *NavigatorState) PushReplacementNamed(routeName string, opts ...NavigatorPushNamedOpts) <-chan any

PushReplacementNamed replaces the current route by the named one: the new route is pushed, and the old one completes with the Result of the options once the transition is done.

Flutter: widgets/navigator.dart NavigatorState.pushReplacementNamed

func (s *NavigatorState) RemoveRoute(route Route, result ...any)

RemoveRoute removes the route from the history without animating it; the route completes with the result.

Flutter: widgets/navigator.dart NavigatorState.removeRoute

func (s *NavigatorState) RemoveRouteBelow(anchorRoute Route, result ...any)

RemoveRouteBelow removes the route below the anchor without animating it.

Flutter: widgets/navigator.dart NavigatorState.removeRouteBelow

func (s *NavigatorState) Replace(oldRoute, newRoute Route)

Replace replaces a route of the history by a new one without animating: the new one goes above the old one, which completes and is removed. In debug builds it panics with the tags NavigatorRouteMissing and NavigatorRouteRemoved when the old route is not in the history or was removed.

Flutter: widgets/navigator.dart NavigatorState.replace

func (s *NavigatorState) ReplaceRouteBelow(anchorRoute, newRoute Route)

ReplaceRouteBelow replaces the route below the anchor by a new one without animating.

Flutter: widgets/navigator.dart NavigatorState.replaceRouteBelow

func (s *NavigatorState) String() string

String describes the navigator.

func (s *NavigatorState) UserGestureInProgress() bool

UserGestureInProgress is whether a user gesture that may pop the route is going on.

Flutter: widgets/navigator.dart NavigatorState.userGestureInProgress

func (s *NavigatorState) UserGestureInProgressNotifier() *foundation.ValueNotifier[bool]

UserGestureInProgressNotifier tells its listeners when a user gesture that may pop the route starts or stops.

Flutter: widgets/navigator.dart NavigatorState.userGestureInProgressNotifier

type NestedScrollView

type NestedScrollView struct {
	StatefulWidget
	// contains filtered or unexported fields
}

NestedScrollView is a scrolling view inside of which can be nested other scrolling views, with their scroll positions being intrinsically linked.

Flutter: widgets/nested_scroll_view.dart NestedScrollView

func NewNestedScrollView

func NewNestedScrollView(headerSliverBuilder NestedScrollViewHeaderSliversBuilder, body Widget, opts ...NestedScrollViewOpts) *NestedScrollView

NewNestedScrollView creates a scroll view of the header slivers, with the body under them.

Flutter: widgets/nested_scroll_view.dart NestedScrollView.new

func (*NestedScrollView) Body

func (w *NestedScrollView) Body() Widget

Body is the widget below the header.

Flutter: widgets/nested_scroll_view.dart NestedScrollView.body

func (*NestedScrollView) Controller

func (w *NestedScrollView) Controller() ScrollController

Controller is the controller of the outer scroll view, or nil.

Flutter: widgets/nested_scroll_view.dart NestedScrollView.controller

func (*NestedScrollView) CreateState

func (w *NestedScrollView) CreateState() State

CreateState creates the state.

Flutter: widgets/nested_scroll_view.dart NestedScrollView.createState

func (*NestedScrollView) FloatHeaderSlivers

func (w *NestedScrollView) FloatHeaderSlivers() bool

FloatHeaderSlivers is whether the header slivers float.

Flutter: widgets/nested_scroll_view.dart NestedScrollView.floatHeaderSlivers

type NestedScrollViewHeaderSliversBuilder

type NestedScrollViewHeaderSliversBuilder func(bc BuildContext, innerBoxIsScrolled bool) []Widget

NestedScrollViewHeaderSliversBuilder builds the slivers of the header of a NestedScrollView; innerBoxIsScrolled is whether the body is scrolled.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewHeaderSliversBuilder

type NestedScrollViewOpts

type NestedScrollViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Controller is the controller of the outer scroll view (the header).
	Controller ScrollController
	// ScrollDirection is the axis along which the view scrolls; the default is
	// AxisVertical.
	ScrollDirection painting.Axis
	// Reverse is whether the view scrolls against the reading direction.
	Reverse bool
	// Physics is how the view responds to the user.
	Physics ScrollPhysics
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// FloatHeaderSlivers is whether the header slivers float, that is, whether
	// they are scrolled back in when the user scrolls the body back.
	FloatHeaderSlivers bool
	// ClipBehavior is how the view clips its content; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the view behaves during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
	// RestorationID is the identifier for restoring the scroll offset; it has no
	// effect until state restoration is ported.
	RestorationID string
	// ScrollBehavior describes how the view scrolls; the default is the one of the
	// ScrollConfiguration above, without scrollbars.
	ScrollBehavior ScrollBehavior
}

NestedScrollViewOpts are the optional parameters of NewNestedScrollView.

Flutter: widgets/nested_scroll_view.dart NestedScrollView.new

type NestedScrollViewState

type NestedScrollViewState struct {
	StateOf[*NestedScrollView]
	// contains filtered or unexported fields
}

NestedScrollViewState is the state of a NestedScrollView.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewState

func (*NestedScrollViewState) Build

Build builds the outer scroll view.

func (*NestedScrollViewState) DidChangeDependencies

func (s *NestedScrollViewState) DidChangeDependencies()

DidChangeDependencies gives the coordinator the parent controller.

func (*NestedScrollViewState) DidUpdateWidget

func (s *NestedScrollViewState) DidUpdateWidget(oldWidget *NestedScrollView)

DidUpdateWidget gives the coordinator the new parent controller.

func (*NestedScrollViewState) Dispose

func (s *NestedScrollViewState) Dispose()

Dispose disposes the coordinator.

func (*NestedScrollViewState) InitState

func (s *NestedScrollViewState) InitState()

InitState creates the coordinator.

func (*NestedScrollViewState) InnerController

func (s *NestedScrollViewState) InnerController() ScrollController

InnerController is the controller of the body.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewState.innerController

func (*NestedScrollViewState) OuterController

func (s *NestedScrollViewState) OuterController() ScrollController

OuterController is the controller of the header.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewState.outerController

type NestedScrollViewViewport

type NestedScrollViewViewport struct {
	Viewport
	// contains filtered or unexported fields
}

NestedScrollViewViewport is a Viewport that talks to a SliverOverlapAbsorberHandle: it tells it to lay out the absorber again when it lays out.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewViewport

func NewNestedScrollViewViewport

func NewNestedScrollViewViewport(offset rendering.ViewportOffset, handle *SliverOverlapAbsorberHandle, slivers []Widget, opts ...ViewportOpts) *NestedScrollViewViewport

NewNestedScrollViewViewport creates a viewport of the slivers at the offset.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewViewport.new

func (*NestedScrollViewViewport) CreateElement

func (w *NestedScrollViewViewport) CreateElement() Element

CreateElement creates the element.

func (*NestedScrollViewViewport) CreateRenderObject

func (w *NestedScrollViewViewport) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewViewport.createRenderObject

func (*NestedScrollViewViewport) Handle

Handle talks to the sliver overlap absorber.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewViewport.handle

func (*NestedScrollViewViewport) UpdateRenderObject

func (w *NestedScrollViewViewport) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/nested_scroll_view.dart NestedScrollViewViewport.updateRenderObject

type NeverScrollableScrollPhysics

type NeverScrollableScrollPhysics struct {
	ScrollPhysicsBase
}

NeverScrollableScrollPhysics does not let the user scroll; the scrollable can still be moved by a controller.

Flutter: widgets/scroll_physics.dart NeverScrollableScrollPhysics

func NewNeverScrollableScrollPhysics

func NewNeverScrollableScrollPhysics(parent ScrollPhysics) *NeverScrollableScrollPhysics

NewNeverScrollableScrollPhysics creates the physics with the parent (nil for none).

Flutter: widgets/scroll_physics.dart NeverScrollableScrollPhysics.new

func (*NeverScrollableScrollPhysics) AllowImplicitScrolling

func (p *NeverScrollableScrollPhysics) AllowImplicitScrolling() bool

AllowImplicitScrolling is false.

Flutter: widgets/scroll_physics.dart NeverScrollableScrollPhysics.allowImplicitScrolling

func (*NeverScrollableScrollPhysics) AllowUserScrolling

func (p *NeverScrollableScrollPhysics) AllowUserScrolling() bool

AllowUserScrolling is false.

Flutter: widgets/scroll_physics.dart NeverScrollableScrollPhysics.allowUserScrolling

func (*NeverScrollableScrollPhysics) ApplyTo

ApplyTo returns a copy on top of the ancestor.

Flutter: widgets/scroll_physics.dart NeverScrollableScrollPhysics.applyTo

type NextFocusAction

type NextFocusAction struct{ ContextActionBase }

NextFocusAction is the action that handles a NextFocusIntent: the primary focus moves to the next node. It results in handled if a node was found, else in skipRemainingHandlers.

Deviation: it is a ContextAction, because the primary focus is found through the context (there is no FocusManager.instance) (SPEC §12.10).

Flutter: widgets/focus_traversal.dart NextFocusAction

func NewNextFocusAction

func NewNextFocusAction() *NextFocusAction

NewNextFocusAction creates the action.

Flutter: widgets/focus_traversal.dart NextFocusAction.new

func (*NextFocusAction) IntentType

func (a *NextFocusAction) IntentType() reflect.Type

IntentType is NextFocusIntent.

Flutter: widgets/actions.dart Action.intentType

func (*NextFocusAction) InvokeWithContext

func (a *NextFocusAction) InvokeWithContext(_ Intent, bc BuildContext) any

InvokeWithContext moves the primary focus to the next node and says whether it found one.

Flutter: widgets/focus_traversal.dart NextFocusAction.invoke

func (*NextFocusAction) ToKeyEventResult

func (a *NextFocusAction) ToKeyEventResult(_ Intent, invokeResult any) KeyEventResult

ToKeyEventResult is handled when a node was found, else skipRemainingHandlers.

Flutter: widgets/focus_traversal.dart NextFocusAction.toKeyEventResult

type NextFocusIntent

type NextFocusIntent struct{ IntentBase }

NextFocusIntent is an intent that moves the focus to the next node (Tab by default).

Flutter: widgets/focus_traversal.dart NextFocusIntent

type NotifiableElement

type NotifiableElement interface {
	Element
	// OnNotification is called when a notification reaches the element, and
	// returns whether it is handled, which stops it from bubbling further.
	//
	// Flutter: widgets/framework.dart NotifiableElementMixin.onNotification
	OnNotification(notification Notification) bool
}

NotifiableElement is an element that listens to the notifications dispatched below it. NotificationListener makes one; implement it on a custom element to receive notifications too.

Flutter: widgets/framework.dart NotifiableElementMixin

type Notification

type Notification any

Notification is a message that bubbles up the tree from the widget that dispatches it (see DispatchNotification) to the NotificationListener widgets above it. It can be a value of any type.

Flutter: widgets/notification_listener.dart Notification

type NotificationListener

type NotificationListener[T any] struct {
	ProxyWidget
	// contains filtered or unexported fields
}

NotificationListener is a widget that listens for notifications of type T bubbling up the tree.

Flutter: widgets/notification_listener.dart NotificationListener

func NewNotificationListener

func NewNotificationListener[T any](onNotification NotificationListenerCallback[T], child Widget, opts ...WidgetOpts) *NotificationListener[T]

NewNotificationListener creates a widget that calls onNotification, if it is not nil, for the notifications of type T that reach it.

Flutter: widgets/notification_listener.dart NotificationListener.new

func (*NotificationListener[T]) CreateElement

func (w *NotificationListener[T]) CreateElement() Element

CreateElement creates the element.

Flutter: widgets/notification_listener.dart NotificationListener.createElement

func (*NotificationListener[T]) OnNotification

func (w *NotificationListener[T]) OnNotification() NotificationListenerCallback[T]

OnNotification is called when a notification of type T bubbles up.

Flutter: widgets/notification_listener.dart NotificationListener.onNotification

type NotificationListenerCallback

type NotificationListenerCallback[T any] func(notification T) bool

NotificationListenerCallback is called when a notification of the listener's type reaches it; it returns whether the notification is handled, which stops it from bubbling.

Flutter: widgets/notification_listener.dart NotificationListenerCallback

type NullableIndexedWidgetBuilder

type NullableIndexedWidgetBuilder func(bc BuildContext, index int) Widget

NullableIndexedWidgetBuilder builds the widget at an index, or returns nil when there is no widget at that index.

Flutter: widgets/framework.dart NullableIndexedWidgetBuilder

type NumericFocusOrder

type NumericFocusOrder struct {
	// Order is the number; the lowest comes first.
	Order float64
}

NumericFocusOrder is a focus order given by a number.

Flutter: widgets/focus_traversal.dart NumericFocusOrder

func NewNumericFocusOrder

func NewNumericFocusOrder(order float64) *NumericFocusOrder

NewNumericFocusOrder creates the order.

Flutter: widgets/focus_traversal.dart NumericFocusOrder.new

func (*NumericFocusOrder) DebugFillProperties

func (o *NumericFocusOrder) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the order.

Flutter: widgets/focus_traversal.dart NumericFocusOrder.debugFillProperties

type Offstage

type Offstage struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

Offstage lays out its child as if it was in the tree, but without painting anything, without making the child available for hit testing, and without taking any room in the parent.

Flutter: widgets/basic.dart Offstage

func NewOffstage

func NewOffstage(child Widget, opts ...OffstageOpts) *Offstage

NewOffstage creates a widget that visually hides its child.

Flutter: widgets/basic.dart Offstage.new

func (*Offstage) CreateElement

func (w *Offstage) CreateElement() Element

CreateElement creates the element, which hides the child from the visitors of the onstage children while it is offstage.

Flutter: widgets/basic.dart Offstage.createElement

func (*Offstage) CreateRenderObject

func (w *Offstage) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Offstage.createRenderObject

func (*Offstage) IsOffstage

func (w *Offstage) IsOffstage() bool

IsOffstage is whether the child is hidden. It is the interface that gluttertest's finders use to skip the offstage subtrees.

Flutter: widgets/basic.dart Offstage.offstage

func (*Offstage) UpdateRenderObject

func (w *Offstage) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Offstage.updateRenderObject

type OffstageOpts

type OffstageOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Offstage is whether the child is hidden; the default is true.
	Offstage foundation.Opt[bool]
}

OffstageOpts are the optional parameters of NewOffstage.

Flutter: widgets/basic.dart Offstage.new

type OnKeyEventCallback

type OnKeyEventCallback func(event services.KeyEvent) KeyEventResult

OnKeyEventCallback is the type of the early and late key event handlers of the FocusManager.

Flutter: widgets/focus_manager.dart OnKeyEventCallback

type Opacity

type Opacity struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

Opacity makes its child partially transparent.

Flutter: widgets/basic.dart Opacity

func NewOpacity

func NewOpacity(opacity float64, child Widget, opts ...OpacityOpts) *Opacity

NewOpacity creates the widget.

Flutter: widgets/basic.dart Opacity.new

func (*Opacity) AlwaysIncludeSemantics

func (w *Opacity) AlwaysIncludeSemantics() bool

AlwaysIncludeSemantics is whether the semantics of the child are included even when it is fully transparent.

Flutter: widgets/basic.dart Opacity.alwaysIncludeSemantics

func (*Opacity) CreateRenderObject

func (w *Opacity) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Opacity.createRenderObject

func (*Opacity) Opacity

func (w *Opacity) Opacity() float64

Opacity is the fraction to scale the child's alpha value, from 0.0 (fully transparent) to 1.0 (fully opaque).

Flutter: widgets/basic.dart Opacity.opacity

func (*Opacity) UpdateRenderObject

func (w *Opacity) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Opacity.updateRenderObject

type OpacityOpts

type OpacityOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AlwaysIncludeSemantics is whether the semantics of the child are included even when it is fully transparent.
	AlwaysIncludeSemantics bool
}

OpacityOpts are the optional parameters of NewOpacity.

Flutter: widgets/basic.dart Opacity.new

type OpenUpwardsPageTransitionsBuilder

type OpenUpwardsPageTransitionsBuilder struct{ PageTransitionsBuilderBase }

OpenUpwardsPageTransitionsBuilder is the transition of a page that opens from the bottom edge of the screen, like the Android Pie one.

Flutter: widgets/page_transitions_builder.dart OpenUpwardsPageTransitionsBuilder

func NewOpenUpwardsPageTransitionsBuilder

func NewOpenUpwardsPageTransitionsBuilder() OpenUpwardsPageTransitionsBuilder

NewOpenUpwardsPageTransitionsBuilder creates the builder.

Flutter: widgets/page_transitions_builder.dart OpenUpwardsPageTransitionsBuilder.new

func (OpenUpwardsPageTransitionsBuilder) BuildTransitions

func (OpenUpwardsPageTransitionsBuilder) BuildTransitions(_ PageRoute, _ BuildContext, a, secondary animation.Animation[float64], child Widget) Widget

BuildTransitions builds the opening of the child from the bottom edge.

Flutter: widgets/page_transitions_builder.dart OpenUpwardsPageTransitionsBuilder.buildTransitions

type OptionsViewOpenDirection

type OptionsViewOpenDirection int

OptionsViewOpenDirection is the direction in which to open the options view.

Flutter: widgets/autocomplete.dart OptionsViewOpenDirection

const (
	// OptionsViewOpenDirectionUnspecified is the zero value: the default, down.
	OptionsViewOpenDirectionUnspecified OptionsViewOpenDirection = iota
	// OptionsViewOpenDirectionUp opens the options view above the field.
	//
	// Flutter: widgets/autocomplete.dart OptionsViewOpenDirection.up
	OptionsViewOpenDirectionUp
	// OptionsViewOpenDirectionDown opens the options view below the field.
	//
	// Flutter: widgets/autocomplete.dart OptionsViewOpenDirection.down
	OptionsViewOpenDirectionDown
	// OptionsViewOpenDirectionMostSpace opens the options view in the direction
	// with the most space.
	//
	// Flutter: widgets/autocomplete.dart OptionsViewOpenDirection.mostSpace
	OptionsViewOpenDirectionMostSpace
)

func (OptionsViewOpenDirection) Name

Name is the name of the direction.

Flutter: widgets/autocomplete.dart OptionsViewOpenDirection.name

func (OptionsViewOpenDirection) String

func (d OptionsViewOpenDirection) String() string

String is "OptionsViewOpenDirection." and the name.

Flutter: widgets/autocomplete.dart OptionsViewOpenDirection.toString

type OrderedTraversalPolicy

type OrderedTraversalPolicy struct {
	FocusTraversalPolicyBase
	// contains filtered or unexported fields
}

OrderedTraversalPolicy traverses the nodes that have a FocusTraversalOrder in that order, followed by the other nodes ordered by the secondary policy.

Flutter: widgets/focus_traversal.dart OrderedTraversalPolicy

func NewOrderedTraversalPolicy

func NewOrderedTraversalPolicy(opts ...OrderedTraversalPolicyOpts) *OrderedTraversalPolicy

NewOrderedTraversalPolicy creates the policy.

Flutter: widgets/focus_traversal.dart OrderedTraversalPolicy.new

func (*OrderedTraversalPolicy) SortDescendants

func (p *OrderedTraversalPolicy) SortDescendants(descendants []*FocusNode, currentNode *FocusNode) []*FocusNode

SortDescendants sorts the nodes with a FocusTraversalOrder by it, and puts them before the others.

Flutter: widgets/focus_traversal.dart OrderedTraversalPolicy.sortDescendants

type OrderedTraversalPolicyOpts

type OrderedTraversalPolicyOpts struct {
	// Secondary orders the nodes that have no FocusTraversalOrder, and the nodes
	// first; the default is ReadingOrderTraversalPolicy.
	Secondary FocusTraversalPolicy
	// RequestFocusCallback replaces DefaultTraversalRequestFocusCallback.
	RequestFocusCallback TraversalRequestFocusCallback
}

OrderedTraversalPolicyOpts are the optional parameters of NewOrderedTraversalPolicy.

Flutter: widgets/focus_traversal.dart OrderedTraversalPolicy.new

type Orientation

type Orientation int

Orientation is whether a size is taller than it is wide.

Flutter: widgets/media_query.dart Orientation

const (
	// OrientationUnspecified is the zero value.
	//
	// Flutter: no counterpart
	OrientationUnspecified Orientation = iota
	// OrientationPortrait is a height at least as big as the width.
	//
	// Flutter: widgets/media_query.dart Orientation.portrait
	OrientationPortrait
	// OrientationLandscape is a width bigger than the height.
	//
	// Flutter: widgets/media_query.dart Orientation.landscape
	OrientationLandscape
)

The values of Orientation follow Flutter's declaration order.

func MediaQueryMaybeOrientationOf

func MediaQueryMaybeOrientationOf(bc BuildContext) (Orientation, bool)

MediaQueryMaybeOrientationOf is MediaQueryOrientationOf that returns false when there is no MediaQuery.

Flutter: widgets/media_query.dart MediaQuery.maybeOrientationOf

func MediaQueryOrientationOf

func MediaQueryOrientationOf(bc BuildContext) Orientation

MediaQueryOrientationOf is the orientation of the media.

Flutter: widgets/media_query.dart MediaQuery.orientationOf

func (Orientation) String

func (o Orientation) String() string

String returns the Flutter name of the value, such as "landscape".

Flutter: widgets/media_query.dart Orientation

type OrientationBuilder

type OrientationBuilder struct {
	StatelessWidget
	// contains filtered or unexported fields
}

OrientationBuilder builds a widget tree that can depend on the parent widget's orientation (distinct from the device orientation): the width against the height of the constraints that it gets. Unbounded constraints are portrait.

Flutter: widgets/layout_builder.dart OrientationBuilder

func NewOrientationBuilder

func NewOrientationBuilder(builder OrientationWidgetBuilder, opts ...WidgetOpts) *OrientationBuilder

NewOrientationBuilder creates a widget that builds with the orientation of the space it gets.

Flutter: widgets/layout_builder.dart OrientationBuilder.new

func (*OrientationBuilder) Build

Build builds a LayoutBuilder that finds the orientation.

Flutter: widgets/layout_builder.dart OrientationBuilder.build

func (*OrientationBuilder) Builder

Builder is the function that builds the child.

Flutter: widgets/layout_builder.dart OrientationBuilder.builder

type OrientationWidgetBuilder

type OrientationWidgetBuilder func(bc BuildContext, orientation Orientation) Widget

OrientationWidgetBuilder builds a widget for the orientation of the parent.

Flutter: widgets/layout_builder.dart OrientationWidgetBuilder

type OverflowBar

type OverflowBar struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

OverflowBar lays out its children in a row unless they "overflow" the available horizontal space, in which case it lays them out in a column instead.

Flutter: widgets/overflow_bar.dart OverflowBar

func NewOverflowBar

func NewOverflowBar(children []Widget, opts ...OverflowBarOpts) *OverflowBar

NewOverflowBar creates the widget.

Flutter: widgets/overflow_bar.dart OverflowBar.new

func (*OverflowBar) Alignment

Alignment is how the children are placed in the row, when set.

Flutter: widgets/overflow_bar.dart OverflowBar.alignment

func (*OverflowBar) CreateRenderObject

func (w *OverflowBar) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/overflow_bar.dart OverflowBar.createRenderObject

func (*OverflowBar) DebugFillProperties

func (w *OverflowBar) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the configuration.

Flutter: widgets/overflow_bar.dart OverflowBar.debugFillProperties

func (*OverflowBar) OverflowAlignment

func (w *OverflowBar) OverflowAlignment() rendering.OverflowBarAlignment

OverflowAlignment is how overflowing children are aligned.

Flutter: widgets/overflow_bar.dart OverflowBar.overflowAlignment

func (*OverflowBar) OverflowDirection

func (w *OverflowBar) OverflowDirection() painting.VerticalDirection

OverflowDirection is the direction of the column of overflowing children.

Flutter: widgets/overflow_bar.dart OverflowBar.overflowDirection

func (*OverflowBar) OverflowSpacing

func (w *OverflowBar) OverflowSpacing() float64

OverflowSpacing is the vertical space between overflowing children.

Flutter: widgets/overflow_bar.dart OverflowBar.overflowSpacing

func (*OverflowBar) Spacing

func (w *OverflowBar) Spacing() float64

Spacing is the horizontal space between the children.

Flutter: widgets/overflow_bar.dart OverflowBar.spacing

func (*OverflowBar) UpdateRenderObject

func (w *OverflowBar) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/overflow_bar.dart OverflowBar.updateRenderObject

type OverflowBarOpts

type OverflowBarOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Spacing is the horizontal space between the children; the default is 0.
	Spacing float64
	// Alignment is how the children are placed in the row when they fit; the
	// default (None) sizes the bar to its children and starts them at the start.
	Alignment foundation.Opt[rendering.MainAxisAlignment]
	// OverflowSpacing is the vertical space between the children when they
	// overflow; the default is 0.
	OverflowSpacing float64
	// OverflowAlignment is how the children are aligned when they overflow; the
	// default is start.
	OverflowAlignment rendering.OverflowBarAlignment
	// OverflowDirection is the direction of the column of overflowing children;
	// the default is down.
	OverflowDirection painting.VerticalDirection
	// TextDirection resolves start and end; the default is the one of the
	// closest Directionality.
	TextDirection ui.TextDirection
}

OverflowBarOpts are the optional parameters of NewOverflowBar.

Flutter: widgets/overflow_bar.dart OverflowBar.new

type OverflowBox

type OverflowBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

OverflowBox imposes different constraints on its child than it gets from its parent, possibly allowing the child to overflow the parent.

Flutter: widgets/basic.dart OverflowBox

func NewOverflowBox

func NewOverflowBox(child Widget, opts ...OverflowBoxOpts) *OverflowBox

NewOverflowBox creates the widget.

Flutter: widgets/basic.dart OverflowBox.new

func (*OverflowBox) Alignment

func (w *OverflowBox) Alignment() painting.AlignmentGeometry

Alignment is how to align the child; the default is Alignment.center.

Flutter: widgets/basic.dart OverflowBox.alignment

func (*OverflowBox) CreateRenderObject

func (w *OverflowBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart OverflowBox.createRenderObject

func (*OverflowBox) Fit

Fit is how the box sizes itself: OverflowBoxFitMax (the default) or OverflowBoxFitDeferToChild.

Flutter: widgets/basic.dart OverflowBox.fit

func (*OverflowBox) MaxHeight

func (w *OverflowBox) MaxHeight() foundation.Opt[float64]

MaxHeight is the maximum height constraint to give the child; null uses the parent's.

Flutter: widgets/basic.dart OverflowBox.maxHeight

func (*OverflowBox) MaxWidth

func (w *OverflowBox) MaxWidth() foundation.Opt[float64]

MaxWidth is the maximum width constraint to give the child; null uses the parent's.

Flutter: widgets/basic.dart OverflowBox.maxWidth

func (*OverflowBox) MinHeight

func (w *OverflowBox) MinHeight() foundation.Opt[float64]

MinHeight is the minimum height constraint to give the child; null uses the parent's.

Flutter: widgets/basic.dart OverflowBox.minHeight

func (*OverflowBox) MinWidth

func (w *OverflowBox) MinWidth() foundation.Opt[float64]

MinWidth is the minimum width constraint to give the child; null uses the parent's.

Flutter: widgets/basic.dart OverflowBox.minWidth

func (*OverflowBox) UpdateRenderObject

func (w *OverflowBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart OverflowBox.updateRenderObject

type OverflowBoxOpts

type OverflowBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment is how to align the child; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
	// MinWidth is the minimum width constraint to give the child; null uses the parent's.
	MinWidth foundation.Opt[float64]
	// MaxWidth is the maximum width constraint to give the child; null uses the parent's.
	MaxWidth foundation.Opt[float64]
	// MinHeight is the minimum height constraint to give the child; null uses the parent's.
	MinHeight foundation.Opt[float64]
	// MaxHeight is the maximum height constraint to give the child; null uses the parent's.
	MaxHeight foundation.Opt[float64]
	// Fit is how the box sizes itself: OverflowBoxFitMax (the default) or OverflowBoxFitDeferToChild.
	Fit rendering.OverflowBoxFit
}

OverflowBoxOpts are the optional parameters of NewOverflowBox.

Flutter: widgets/basic.dart OverflowBox.new

type Overlay

type Overlay struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Overlay is a stack of entries that can be managed independently. It lets widgets float visual elements on top of other widgets.

Flutter: widgets/overlay.dart Overlay

func NewOverlay

func NewOverlay(opts ...OverlayOpts) *Overlay

NewOverlay creates an overlay.

Flutter: widgets/overlay.dart Overlay.new

func (*Overlay) AlwaysSizeToContent

func (w *Overlay) AlwaysSizeToContent() bool

AlwaysSizeToContent is whether the overlay always sizes itself to its content.

Flutter: widgets/overlay.dart Overlay.alwaysSizeToContent

func (*Overlay) ClipBehavior

func (w *Overlay) ClipBehavior() ui.Clip

ClipBehavior is how the overlay clips its entries.

Flutter: widgets/overlay.dart Overlay.clipBehavior

func (*Overlay) CreateState

func (w *Overlay) CreateState() State

CreateState creates the state.

Flutter: widgets/overlay.dart Overlay.createState

func (*Overlay) InitialEntries

func (w *Overlay) InitialEntries() []*OverlayEntry

InitialEntries are the entries the overlay starts with.

Flutter: widgets/overlay.dart Overlay.initialEntries

type OverlayChildLayoutBuilder

type OverlayChildLayoutBuilder func(bc BuildContext, info OverlayChildLayoutInfo) Widget

OverlayChildLayoutBuilder builds the overlay child from the layout information of the portal.

Flutter: widgets/overlay.dart OverlayChildLayoutBuilder

type OverlayChildLayoutInfo

type OverlayChildLayoutInfo struct {
	// ChildSize is the size of the portal's child in its own coordinates.
	//
	// Flutter: widgets/overlay.dart OverlayChildLayoutInfo.childSize
	ChildSize ui.Size
	// ChildPaintTransform is the paint transform of the portal's child, in the
	// coordinates of the target Overlay.
	//
	// Flutter: widgets/overlay.dart OverlayChildLayoutInfo.childPaintTransform
	ChildPaintTransform ui.Matrix4
	// OverlaySize is the size of the target Overlay in its own coordinates.
	//
	// Flutter: widgets/overlay.dart OverlayChildLayoutInfo.overlaySize
	OverlaySize ui.Size
}

OverlayChildLayoutInfo is what the builder of an OverlayPortal.overlayChildLayoutBuilder gets: the size of the portal's child, where it is painted in the Overlay, and the size of the Overlay.

Flutter: widgets/overlay.dart OverlayChildLayoutInfo

type OverlayChildLocation

type OverlayChildLocation int

OverlayChildLocation is the Overlay that an OverlayPortal's overlay child goes into.

Flutter: widgets/overlay.dart OverlayChildLocation

const (
	// OverlayChildLocationUnspecified is the default: the nearest Overlay above
	// the portal.
	//
	// Flutter: no counterpart (the zero value of the enum)
	OverlayChildLocationUnspecified OverlayChildLocation = iota
	// OverlayChildLocationNearestOverlay is the closest Overlay above the portal.
	//
	// Flutter: widgets/overlay.dart OverlayChildLocation.nearestOverlay
	OverlayChildLocationNearestOverlay
	// OverlayChildLocationRootOverlay is the furthest Overlay above the portal,
	// which is the one of the whole app (or of the closest LookupBoundary).
	//
	// Flutter: widgets/overlay.dart OverlayChildLocation.rootOverlay
	OverlayChildLocationRootOverlay
)

func (OverlayChildLocation) String

func (l OverlayChildLocation) String() string

String is the name of the location.

type OverlayEntry

type OverlayEntry struct {
	// contains filtered or unexported fields
}

OverlayEntry is a place in an Overlay that can contain a widget. Entries are inserted into an Overlay with OverlayState.Insert and removed with Remove.

Flutter: widgets/overlay.dart OverlayEntry

func NewOverlayEntry

func NewOverlayEntry(builder WidgetBuilder, opts ...OverlayEntryOpts) *OverlayEntry

NewOverlayEntry creates an entry that the builder builds.

Flutter: widgets/overlay.dart OverlayEntry.new

func (*OverlayEntry) AddListener

AddListener registers a listener that is called when the entry is mounted or unmounted.

Flutter: widgets/overlay.dart OverlayEntry.addListener

func (*OverlayEntry) Builder

func (e *OverlayEntry) Builder() WidgetBuilder

Builder builds the widget of the entry.

Flutter: widgets/overlay.dart OverlayEntry.builder

func (*OverlayEntry) CanSizeOverlay

func (e *OverlayEntry) CanSizeOverlay() bool

CanSizeOverlay is whether the entry can size an overlay that has unbounded constraints.

Flutter: widgets/overlay.dart OverlayEntry.canSizeOverlay

func (*OverlayEntry) Dispose

func (e *OverlayEntry) Dispose()

Dispose discards the resources of the entry, which must have been removed from its overlay. In debug builds it panics with the tag OverlayEntryStillInserted when it has not.

Flutter: widgets/overlay.dart OverlayEntry.dispose

func (*OverlayEntry) MaintainState

func (e *OverlayEntry) MaintainState() bool

MaintainState is whether the entry keeps its state while hidden.

Flutter: widgets/overlay.dart OverlayEntry.maintainState

func (*OverlayEntry) MarkNeedsBuild

func (e *OverlayEntry) MarkNeedsBuild()

MarkNeedsBuild builds the entry again, for the case that the state that its builder reads changed.

Flutter: widgets/overlay.dart OverlayEntry.markNeedsBuild

func (*OverlayEntry) Mounted

func (e *OverlayEntry) Mounted() bool

Mounted is whether the entry is in the tree.

Flutter: widgets/overlay.dart OverlayEntry.mounted

func (*OverlayEntry) Opaque

func (e *OverlayEntry) Opaque() bool

Opaque is whether the entry hides the entries below it.

Flutter: widgets/overlay.dart OverlayEntry.opaque

func (*OverlayEntry) Remove

func (e *OverlayEntry) Remove()

Remove removes the entry from its overlay. In debug builds it panics with the tag OverlayEntryNotInserted when the entry is not in an overlay.

Flutter: widgets/overlay.dart OverlayEntry.remove

func (*OverlayEntry) RemoveListener

func (e *OverlayEntry) RemoveListener(handle foundation.ListenerHandle)

RemoveListener removes a listener.

Flutter: widgets/overlay.dart OverlayEntry.removeListener

func (*OverlayEntry) SetMaintainState

func (e *OverlayEntry) SetMaintainState(value bool)

SetMaintainState changes whether the entry keeps its state, and tells the overlay. In debug builds it panics with the tag OverlayEntryNotInserted when the entry is not in an overlay.

Flutter: widgets/overlay.dart OverlayEntry.maintainState

func (*OverlayEntry) SetOpaque

func (e *OverlayEntry) SetOpaque(value bool)

SetOpaque changes whether the entry is opaque, and tells the overlay.

Flutter: widgets/overlay.dart OverlayEntry.opaque

func (*OverlayEntry) String

func (e *OverlayEntry) String() string

String describes the entry.

Flutter: widgets/overlay.dart OverlayEntry.toString

type OverlayEntryOpts

type OverlayEntryOpts struct {
	// Opaque is whether the entry hides the entries below it, which are then not
	// built or painted.
	Opaque bool
	// MaintainState is whether the entry keeps its state while an opaque entry is
	// above it.
	MaintainState bool
	// CanSizeOverlay is whether the entry can give a size to an overlay that has
	// unbounded constraints.
	CanSizeOverlay bool
}

OverlayEntryOpts are the optional parameters of NewOverlayEntry.

Flutter: widgets/overlay.dart OverlayEntry.new

type OverlayInsertOpts

type OverlayInsertOpts struct {
	// Below is the entry the new one goes below.
	Below *OverlayEntry
	// Above is the entry the new one goes above.
	Above *OverlayEntry
}

OverlayInsertOpts say where an entry is inserted: just below or just above an entry that is in the overlay; the default is above all.

Flutter: widgets/overlay.dart OverlayState.insert

type OverlayOfOpts

type OverlayOfOpts struct {
	// RootOverlay is whether to look for the furthest overlay.
	RootOverlay bool
	// DebugRequiredFor is the widget that requires the overlay, which is named in
	// the error.
	DebugRequiredFor Widget
}

OverlayOfOpts are the optional parameters of OverlayOf and OverlayMaybeOf.

Flutter: widgets/overlay.dart Overlay.of

type OverlayOpts

type OverlayOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// InitialEntries are the entries the overlay starts with, bottom first.
	InitialEntries []*OverlayEntry
	// ClipBehavior is how the overlay clips its entries; the default is
	// ClipHardEdge.
	ClipBehavior ui.Clip
	// AlwaysSizeToContent is whether the overlay always sizes itself to the
	// entry that can size it, instead of to the biggest size it is given.
	AlwaysSizeToContent bool
}

OverlayOpts are the optional parameters of NewOverlay.

Flutter: widgets/overlay.dart Overlay.new

type OverlayPortal

type OverlayPortal struct {
	StatefulWidget
	// contains filtered or unexported fields
}

OverlayPortal is a widget that renders its overlay child on an Overlay.

When the controller shows the overlay child, the builder builds it and the closest Overlay above the portal (or the root one) paints it above the OverlayEntry that the portal is in. The overlay child keeps the context of the portal, so it can use the InheritedWidgets above the portal, and is laid out with the constraints of the Overlay.

The overlay child must not be a Positioned directly: wrap it in a widget that positions it, such as an Align or a Positioned inside a Stack.

Flutter: widgets/overlay.dart OverlayPortal

func NewOverlayPortal

func NewOverlayPortal(controller *OverlayPortalController, overlayChildBuilder WidgetBuilder, child Widget, opts ...OverlayPortalOpts) *OverlayPortal

NewOverlayPortal creates a portal.

Flutter: widgets/overlay.dart OverlayPortal.new

func NewOverlayPortalOverlayChildLayoutBuilder

func NewOverlayPortalOverlayChildLayoutBuilder(controller *OverlayPortalController, overlayChildBuilder OverlayChildLayoutBuilder, child Widget, opts ...OverlayPortalOpts) *OverlayPortal

NewOverlayPortalOverlayChildLayoutBuilder creates a portal whose overlay child is built by a builder that gets the size and the paint transform of the portal's child, and the size of the Overlay. The builder runs during layout, every frame that the layout runs.

Flutter: widgets/overlay.dart OverlayPortal.overlayChildLayoutBuilder

func NewOverlayPortalTargetsRootOverlay deprecated

func NewOverlayPortalTargetsRootOverlay(controller *OverlayPortalController, overlayChildBuilder WidgetBuilder, child Widget, opts ...OverlayPortalOpts) *OverlayPortal

NewOverlayPortalTargetsRootOverlay creates a portal whose overlay child goes into the root Overlay.

Deprecated: Flutter deprecated it in favor of OverlayPortal with OverlayChildLocationRootOverlay.

Flutter: widgets/overlay.dart OverlayPortal.targetsRootOverlay

func (*OverlayPortal) Child

func (w *OverlayPortal) Child() Widget

Child is the widget that the portal lays out and paints where it is.

Flutter: widgets/overlay.dart OverlayPortal.child

func (*OverlayPortal) Controller

func (w *OverlayPortal) Controller() *OverlayPortalController

Controller is the controller that shows and hides the overlay child.

Flutter: widgets/overlay.dart OverlayPortal.controller

func (*OverlayPortal) CreateState

func (w *OverlayPortal) CreateState() State

CreateState creates the state.

Flutter: widgets/overlay.dart OverlayPortal.createState

func (*OverlayPortal) OverlayChildBuilder

func (w *OverlayPortal) OverlayChildBuilder() WidgetBuilder

OverlayChildBuilder builds the overlay child.

Flutter: widgets/overlay.dart OverlayPortal.overlayChildBuilder

func (*OverlayPortal) OverlayLocation

func (w *OverlayPortal) OverlayLocation() OverlayChildLocation

OverlayLocation is the Overlay that the overlay child goes into.

Flutter: widgets/overlay.dart OverlayPortal.overlayLocation

type OverlayPortalController

type OverlayPortalController struct {
	// contains filtered or unexported fields
}

OverlayPortalController shows, hides and brings to the top the overlay child of an OverlayPortal.

A controller can be given to at most one OverlayPortal at a time. When it moves from one portal to another, its IsShowing state does not carry over. Show and Hide can be called before the controller is given to a portal, but should not be called while the widget tree is being rebuilt.

Flutter: widgets/overlay.dart OverlayPortalController

func NewOverlayPortalController

func NewOverlayPortalController(opts ...OverlayPortalControllerOpts) *OverlayPortalController

NewOverlayPortalController creates a controller.

Flutter: widgets/overlay.dart OverlayPortalController.new

func (*OverlayPortalController) Hide

func (c *OverlayPortalController) Hide()

Hide hides the overlay child. In debug builds a controller that is not attached to a portal panics with the tag OverlayPortalHideWithoutShow when it is not showing.

Flutter: widgets/overlay.dart OverlayPortalController.hide

func (*OverlayPortalController) IsShowing

func (c *OverlayPortalController) IsShowing() bool

IsShowing is whether the overlay child is showing.

Flutter: widgets/overlay.dart OverlayPortalController.isShowing

func (*OverlayPortalController) Show

func (c *OverlayPortalController) Show()

Show shows the overlay child, above the other overlay children that are shown, and above the entry of the portal. It has no effect on the position of an overlay child that already is shown, except that it brings it to the top.

Flutter: widgets/overlay.dart OverlayPortalController.show

func (*OverlayPortalController) String

func (c *OverlayPortalController) String() string

String describes the controller.

Flutter: widgets/overlay.dart OverlayPortalController.toString

func (*OverlayPortalController) Toggle

func (c *OverlayPortalController) Toggle()

Toggle shows the overlay child if it is hidden, and hides it if it is shown.

Flutter: widgets/overlay.dart OverlayPortalController.toggle

type OverlayPortalControllerOpts

type OverlayPortalControllerOpts struct {
	// DebugLabel names the controller in messages.
	DebugLabel string
}

OverlayPortalControllerOpts are the optional parameters of NewOverlayPortalController.

Flutter: widgets/overlay.dart OverlayPortalController.new

type OverlayPortalOpts

type OverlayPortalOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OverlayLocation is the Overlay that the overlay child goes into; the
	// default is OverlayChildLocationNearestOverlay.
	OverlayLocation OverlayChildLocation
}

OverlayPortalOpts are the optional parameters of NewOverlayPortal.

Flutter: widgets/overlay.dart OverlayPortal.new

type OverlayRoute

type OverlayRoute interface {
	Route
	// CreateOverlayEntries creates the entries that the route puts in the
	// overlay; they are created in Install.
	//
	// Flutter: widgets/routes.dart OverlayRoute.createOverlayEntries
	CreateOverlayEntries() []*OverlayEntry
	// FinishedWhenPopped is whether the navigator can finalize the route as soon
	// as it is popped, or the route calls FinalizeRoute itself later.
	//
	// Flutter: widgets/routes.dart OverlayRoute.finishedWhenPopped
	FinishedWhenPopped() bool
}

OverlayRoute is a route that displays widgets in the Overlay of the navigator.

Flutter: widgets/routes.dart OverlayRoute

type OverlayRouteBase

type OverlayRouteBase struct {
	RouteBase
	// contains filtered or unexported fields
}

OverlayRouteBase implements the parts of OverlayRoute that are shared. Embed it and call InitOverlayRouteBase; implement CreateOverlayEntries.

Flutter: widgets/routes.dart OverlayRoute

func (*OverlayRouteBase) DidPop

func (b *OverlayRouteBase) DidPop(result any) bool

DidPop finalizes the route when FinishedWhenPopped.

Flutter: widgets/routes.dart OverlayRoute.didPop

func (*OverlayRouteBase) Dispose

func (b *OverlayRouteBase) Dispose()

Dispose disposes the overlay entries.

Flutter: widgets/routes.dart OverlayRoute.dispose

func (*OverlayRouteBase) FinishedWhenPopped

func (b *OverlayRouteBase) FinishedWhenPopped() bool

FinishedWhenPopped is true.

Flutter: widgets/routes.dart OverlayRoute.finishedWhenPopped

func (*OverlayRouteBase) Install

func (b *OverlayRouteBase) Install()

Install creates the overlay entries.

Flutter: widgets/routes.dart OverlayRoute.install

func (*OverlayRouteBase) OverlayEntries

func (b *OverlayRouteBase) OverlayEntries() []*OverlayEntry

OverlayEntries are the entries of the route in the overlay.

Flutter: widgets/routes.dart OverlayRoute.overlayEntries

type OverlayState

type OverlayState struct {
	StateOf[*Overlay]
	TickerProvider
	// contains filtered or unexported fields
}

OverlayState is the state of an Overlay: it manages the entries.

Flutter: widgets/overlay.dart OverlayState

func OverlayMaybeOf

func OverlayMaybeOf(bc BuildContext, opts ...OverlayOfOpts) (*OverlayState, bool)

OverlayMaybeOf is the state of the closest Overlay above the context, and false if there is none.

Flutter: widgets/overlay.dart Overlay.maybeOf

func OverlayOf

func OverlayOf(bc BuildContext, opts ...OverlayOfOpts) *OverlayState

OverlayOf is the state of the closest Overlay above the context. In debug builds it panics with the tag OverlayMissing when there is none.

Flutter: widgets/overlay.dart Overlay.of

func (*OverlayState) Build

func (s *OverlayState) Build(BuildContext) Widget

Build builds the theater of the entries that are on stage, and the ones that keep their state off stage.

Flutter: widgets/overlay.dart OverlayState.build

func (*OverlayState) DebugIsVisible

func (s *OverlayState) DebugIsVisible(entry *OverlayEntry) bool

DebugIsVisible is whether the entry is visible: no opaque entry is above it. In debug builds only; release builds report false.

Flutter: widgets/overlay.dart OverlayState.debugIsVisible

func (*OverlayState) DisableAnimations

func (h *OverlayState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*OverlayState) ErrorReporter

func (h *OverlayState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*OverlayState) InitState

func (s *OverlayState) InitState()

InitState inserts the initial entries.

func (*OverlayState) Insert

func (s *OverlayState) Insert(entry *OverlayEntry, opts ...OverlayInsertOpts)

Insert adds the entry to the overlay, above all the entries by default.

Flutter: widgets/overlay.dart OverlayState.insert

func (*OverlayState) InsertAll

func (s *OverlayState) InsertAll(entries []*OverlayEntry, opts ...OverlayInsertOpts)

InsertAll adds the entries to the overlay, above all the entries by default, in the order that they are given.

Flutter: widgets/overlay.dart OverlayState.insertAll

func (*OverlayState) Rearrange

func (s *OverlayState) Rearrange(newEntries []*OverlayEntry, opts ...OverlayInsertOpts)

Rearrange removes the given entries from the overlay and adds them back in the given order; the entries that are not given go below or above them.

Flutter: widgets/overlay.dart OverlayState.rearrange

type OverlayWrapOpts

type OverlayWrapOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ClipBehavior is how the overlay clips; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// AlwaysSizeToContent is whether the overlay sizes itself to the child.
	AlwaysSizeToContent bool
}

OverlayWrapOpts are the optional parameters of NewOverlayWrap.

Flutter: widgets/overlay.dart Overlay.wrap

type OverscrollIndicatorNotification

type OverscrollIndicatorNotification struct {
	ViewportNotificationMixin
	// Leading is whether the indication will be shown on the leading edge of
	// the scroll view.
	//
	// Flutter: widgets/overscroll_indicator.dart OverscrollIndicatorNotification.leading
	Leading bool
	// PaintOffset controls at which offset a GlowingOverscrollIndicator draws.
	//
	// A positive offset will move the glow away from its edge, i.e. for a
	// vertical, leading indicator, a PaintOffset of 100.0 will draw the
	// indicator 100.0 pixels from the top of the edge. For a vertical indicator
	// with Leading set to false, a PaintOffset of 100.0 will draw the indicator
	// 100.0 pixels from the bottom instead.
	//
	// A negative PaintOffset is generally not useful, since the glow will be
	// clipped.
	//
	// This has no effect on a StretchingOverscrollIndicator.
	//
	// Flutter: widgets/overscroll_indicator.dart OverscrollIndicatorNotification.paintOffset
	PaintOffset float64
	// contains filtered or unexported fields
}

OverscrollIndicatorNotification is a notification that either a GlowingOverscrollIndicator or a StretchingOverscrollIndicator will start showing an overscroll indication.

To prevent the indicator from showing the indication, call DisallowIndicator on the notification.

Flutter: widgets/overscroll_indicator.dart OverscrollIndicatorNotification

func NewOverscrollIndicatorNotification

func NewOverscrollIndicatorNotification(leading bool) *OverscrollIndicatorNotification

NewOverscrollIndicatorNotification creates a notification that a GlowingOverscrollIndicator or a StretchingOverscrollIndicator will start showing an overscroll indication, on the leading edge or the trailing edge.

Flutter: widgets/overscroll_indicator.dart OverscrollIndicatorNotification.new

func (*OverscrollIndicatorNotification) Accepted

func (n *OverscrollIndicatorNotification) Accepted() bool

Accepted is whether the current overscroll event will allow for the indicator to be shown. Calling DisallowIndicator makes it false, preventing the overscroll indicator from showing. It is true by default.

Flutter: widgets/overscroll_indicator.dart OverscrollIndicatorNotification.accepted

func (*OverscrollIndicatorNotification) DisallowIndicator

func (n *OverscrollIndicatorNotification) DisallowIndicator()

DisallowIndicator should be called if the overscroll indicator should be prevented.

Flutter: widgets/overscroll_indicator.dart OverscrollIndicatorNotification.disallowIndicator

func (*OverscrollIndicatorNotification) String

String describes the notification.

Flutter: widgets/overscroll_indicator.dart OverscrollIndicatorNotification.debugFillDescription

type OverscrollNotification

type OverscrollNotification struct {
	ScrollNotificationBase
	// DragDetails is the details of the drag that caused the overscroll, if the
	// user's drag did.
	//
	// Flutter: widgets/scroll_notification.dart OverscrollNotification.dragDetails
	DragDetails foundation.Opt[gestures.DragUpdateDetails]
	// Overscroll is the number of logical pixels that the scrollable did not
	// scroll; it is never zero.
	//
	// Flutter: widgets/scroll_notification.dart OverscrollNotification.overscroll
	Overscroll float64
	// Velocity is the velocity when an overscroll happens in a ballistic
	// scroll, zero otherwise.
	//
	// Flutter: widgets/scroll_notification.dart OverscrollNotification.velocity
	Velocity float64
}

OverscrollNotification indicates that a descendant scrollable has not changed its scroll position because the change would have caused its scroll position to go outside its scroll bounds.

Flutter: widgets/scroll_notification.dart OverscrollNotification

func NewOverscrollNotification

func NewOverscrollNotification(metrics ScrollMetrics, context BuildContext, overscroll float64, opts ...OverscrollNotificationOpts) *OverscrollNotification

NewOverscrollNotification creates the notification. In debug builds it panics with the tag OverscrollNotificationInvalid when overscroll is zero or not finite.

Flutter: widgets/scroll_notification.dart OverscrollNotification.new

func (*OverscrollNotification) String

func (n *OverscrollNotification) String() string

String describes the notification.

Flutter: widgets/scroll_notification.dart OverscrollNotification.debugFillDescription

type OverscrollNotificationOpts

type OverscrollNotificationOpts struct {
	// DragDetails is the details of the drag that caused the overscroll.
	DragDetails foundation.Opt[gestures.DragUpdateDetails]
	// Velocity is the velocity of the ballistic scroll.
	Velocity float64
}

OverscrollNotificationOpts are the optional parameters of NewOverscrollNotification.

Flutter: widgets/scroll_notification.dart OverscrollNotification.new

type Padding

type Padding struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

Padding insets its child by the given padding.

Flutter: widgets/basic.dart Padding

func NewPadding

func NewPadding(padding painting.EdgeInsetsGeometry, child Widget, opts ...PaddingOpts) *Padding

NewPadding creates the widget.

Flutter: widgets/basic.dart Padding.new

func (*Padding) CreateRenderObject

func (w *Padding) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Padding.createRenderObject

func (*Padding) Padding

func (w *Padding) Padding() painting.EdgeInsetsGeometry

Padding is the amount of space by which to inset the child.

Flutter: widgets/basic.dart Padding.padding

func (*Padding) UpdateRenderObject

func (w *Padding) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Padding.updateRenderObject

type PaddingOpts

type PaddingOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

PaddingOpts are the optional parameters of NewPadding.

Flutter: widgets/basic.dart Padding.new

type Page

type Page interface {
	RouteSettings
	// Key is the key of the page; pages with equal keys are the same page.
	//
	// Flutter: widgets/navigator.dart Page.key
	Key() foundation.Key
	// RestorationId is the id for state restoration of the page, or empty.
	//
	// Flutter: widgets/navigator.dart Page.restorationId
	RestorationId() string
	// CanPop is whether the route created from the page can be popped.
	//
	// Flutter: widgets/navigator.dart Page.canPop
	CanPop() bool
	// OnPopInvoked is called after the pop of the route was handled or blocked.
	//
	// Flutter: widgets/navigator.dart Page.onPopInvoked
	OnPopInvoked(didPop bool, result any)
	// CanUpdate is whether the route of the other page can be updated to this
	// page: the pages have the same type and key.
	//
	// Flutter: widgets/navigator.dart Page.canUpdate
	CanUpdate(other Page) bool
	// CreateRoute creates the route of the page; its settings must be the page.
	//
	// Flutter: widgets/navigator.dart Page.createRoute
	CreateRoute(bc BuildContext) Route
}

Page is an immutable description of a route: the Navigator creates a Route from it and updates the route when the page is replaced by one that CanUpdate. A route created from a page has the page as its settings.

Flutter: widgets/navigator.dart Page

type PageBase

type PageBase struct {
	RouteSettingsBase
	// contains filtered or unexported fields
}

PageBase is the base of the Page implementations: embed it, call InitPageBase and implement CreateRoute.

Flutter: widgets/navigator.dart Page

func (*PageBase) CanPop

func (p *PageBase) CanPop() bool

CanPop is whether the route created from the page can be popped.

Flutter: widgets/navigator.dart Page.canPop

func (*PageBase) CanUpdate

func (p *PageBase) CanUpdate(other Page) bool

CanUpdate is whether the other page has the same type and key.

Flutter: widgets/navigator.dart Page.canUpdate

func (*PageBase) Key

func (p *PageBase) Key() foundation.Key

Key is the key of the page, or nil.

Flutter: widgets/navigator.dart Page.key

func (*PageBase) OnPopInvoked

func (p *PageBase) OnPopInvoked(didPop bool, result any)

OnPopInvoked calls the callback of the page, if any.

Flutter: widgets/navigator.dart Page.onPopInvoked

func (*PageBase) RestorationId

func (p *PageBase) RestorationId() string

RestorationId is the id for state restoration, or empty.

Flutter: widgets/navigator.dart Page.restorationId

type PageController

type PageController struct {
	ScrollControllerBase
	// contains filtered or unexported fields
}

PageController controls which page is visible in a PageView, and the scroll position in pages instead of pixels.

Flutter: widgets/page_view.dart PageController

func NewPageController

func NewPageController(opts ...PageControllerOpts) *PageController

NewPageController creates a controller for a page view. In debug builds it panics with the tag ViewportFractionInvalid when the fraction is not positive.

Flutter: widgets/page_view.dart PageController.new

func (*PageController) AnimateToPage

func (c *PageController) AnimateToPage(page int, duration time.Duration, curve animation.Curve) *scheduler.TickerFuture

AnimateToPage animates the controlled view to the page. The future completes when the animation ends.

Flutter: widgets/page_view.dart PageController.animateToPage

func (*PageController) Attach

func (c *PageController) Attach(position ScrollPosition)

Attach registers the position and gives it the viewport fraction.

Flutter: widgets/page_view.dart PageController.attach

func (*PageController) CreateScrollPosition

func (c *PageController) CreateScrollPosition(physics ScrollPhysics, context ScrollContext, oldPosition ScrollPosition) ScrollPosition

CreateScrollPosition creates the position that counts in pages.

Flutter: widgets/page_view.dart PageController.createScrollPosition

func (*PageController) InitialPage

func (c *PageController) InitialPage() int

InitialPage is the page to show when the first view is created.

Flutter: widgets/page_view.dart PageController.initialPage

func (*PageController) JumpToPage

func (c *PageController) JumpToPage(page int)

JumpToPage changes which page is displayed without animation.

Flutter: widgets/page_view.dart PageController.jumpToPage

func (*PageController) KeepPage

func (c *PageController) KeepPage() bool

KeepPage is whether the page is saved in the PageStorage.

Flutter: widgets/page_view.dart PageController.keepPage

func (*PageController) NextPage

func (c *PageController) NextPage(duration time.Duration, curve animation.Curve) *scheduler.TickerFuture

NextPage animates to the next page.

Flutter: widgets/page_view.dart PageController.nextPage

func (*PageController) Page

func (c *PageController) Page() foundation.Opt[float64]

Page is the current page, a fraction while the view is scrolling between two, or none before the first layout. In debug builds it panics with the tag PageControllerNotAttached when no view uses the controller and with PageControllerMultipleViews when more than one does.

Flutter: widgets/page_view.dart PageController.page

func (*PageController) PreviousPage

func (c *PageController) PreviousPage(duration time.Duration, curve animation.Curve) *scheduler.TickerFuture

PreviousPage animates to the previous page.

Flutter: widgets/page_view.dart PageController.previousPage

func (*PageController) ViewportFraction

func (c *PageController) ViewportFraction() float64

ViewportFraction is the fraction of the viewport that each page occupies.

Flutter: widgets/page_view.dart PageController.viewportFraction

type PageControllerOpts

type PageControllerOpts struct {
	// InitialPage is the page to show when the first view is created.
	InitialPage int
	// KeepPage is whether the page is saved in the PageStorage, and restored when
	// a new view is created; the default is true.
	KeepPage foundation.Opt[bool]
	// ViewportFraction is the fraction of the viewport that each page occupies;
	// the default is 1.
	ViewportFraction foundation.Opt[float64]
	// OnAttach is called when a position is attached.
	OnAttach ScrollControllerCallback
	// OnDetach is called when a position is detached.
	OnDetach ScrollControllerCallback
}

PageControllerOpts are the optional parameters of NewPageController.

Flutter: widgets/page_view.dart PageController.new

type PageMetrics

type PageMetrics interface {
	ScrollMetrics
	// ViewportFraction is the fraction of the viewport that each page occupies.
	//
	// Flutter: widgets/page_view.dart PageMetrics.viewportFraction
	ViewportFraction() float64
	// Page is the current page, or none while the pixels are not known.
	//
	// Flutter: widgets/page_view.dart PageMetrics.page
	Page() foundation.Opt[float64]
}

PageMetrics are the scroll metrics of a PageView: they also say the page.

Flutter: widgets/page_view.dart PageMetrics

type PageOpts

type PageOpts struct {
	// Key identifies the page.
	Key foundation.Key
	// Name of the route.
	Name string
	// Arguments of the route.
	Arguments any
	// RestorationId is the id for state restoration.
	RestorationId string
	// CanPop is whether the route can be popped; the default is true.
	CanPop foundation.Opt[bool]
	// OnPopInvoked is called after the pop was handled or blocked.
	OnPopInvoked PopInvokedWithResultCallback
}

PageOpts are the optional parameters of a page, for pages that embed PageBase.

Flutter: widgets/navigator.dart Page.new

type PageRoute

type PageRoute interface {
	ModalRoute
	// contains filtered or unexported methods
}

PageRoute is a modal route that replaces the entire screen.

Flutter: widgets/pages.dart PageRoute

type PageRouteBase

type PageRouteBase struct {
	ModalRouteBase
	// contains filtered or unexported fields
}

PageRouteBase implements PageRoute: it is opaque and only transitions with other page routes. Embed it, call InitPageRouteBase and implement BuildPage, MaintainState, TransitionDuration, BarrierColor and BarrierLabel.

Flutter: widgets/pages.dart PageRoute

func (*PageRouteBase) AllowSnapshotting

func (b *PageRouteBase) AllowSnapshotting() bool

AllowSnapshotting is whether the transitions of the route may be snapshotted.

Flutter: widgets/pages.dart PageRoute.allowSnapshotting

func (*PageRouteBase) BarrierDismissible

func (b *PageRouteBase) BarrierDismissible() bool

BarrierDismissible is whether tapping the barrier pops the route.

Flutter: widgets/pages.dart PageRoute.barrierDismissible

func (*PageRouteBase) CanTransitionFrom

func (b *PageRouteBase) CanTransitionFrom(previousRoute TransitionRoute) bool

CanTransitionFrom is whether the previous route is a page route.

Flutter: widgets/pages.dart PageRoute.canTransitionFrom

func (*PageRouteBase) CanTransitionTo

func (b *PageRouteBase) CanTransitionTo(nextRoute TransitionRoute) bool

CanTransitionTo is whether the next route is a page route.

Flutter: widgets/pages.dart PageRoute.canTransitionTo

func (*PageRouteBase) FullscreenDialog

func (b *PageRouteBase) FullscreenDialog() bool

FullscreenDialog is whether the route is a fullscreen dialog.

Flutter: widgets/pages.dart PageRoute.fullscreenDialog

func (*PageRouteBase) Opaque

func (b *PageRouteBase) Opaque() bool

Opaque is true.

Flutter: widgets/pages.dart PageRoute.opaque

func (*PageRouteBase) PopGestureEnabled

func (b *PageRouteBase) PopGestureEnabled() bool

PopGestureEnabled is whether a back gesture may pop the route; fullscreen dialogs can't be dismissed by a back swipe.

Flutter: widgets/pages.dart PageRoute.popGestureEnabled

type PageRouteBuilder

type PageRouteBuilder struct {
	PageRouteBase
	// contains filtered or unexported fields
}

PageRouteBuilder is a utility class for creating page routes with callbacks for the page and the transitions.

Flutter: widgets/pages.dart PageRouteBuilder

func NewPageRouteBuilder

func NewPageRouteBuilder(pageBuilder RoutePageBuilder, opts ...PageRouteBuilderOpts) *PageRouteBuilder

NewPageRouteBuilder creates a route from the page builder.

Flutter: widgets/pages.dart PageRouteBuilder.new

func (*PageRouteBuilder) BarrierColor

func (r *PageRouteBuilder) BarrierColor() foundation.Opt[ui.Color]

BarrierColor is the color of the barrier, if any.

Flutter: widgets/pages.dart PageRouteBuilder.barrierColor

func (*PageRouteBuilder) BarrierLabel

func (r *PageRouteBuilder) BarrierLabel() string

BarrierLabel is the semantic label of the barrier.

Flutter: widgets/pages.dart PageRouteBuilder.barrierLabel

func (*PageRouteBuilder) BuildPage

func (r *PageRouteBuilder) BuildPage(bc BuildContext, a, secondary animation.Animation[float64]) Widget

BuildPage calls the page builder.

Flutter: widgets/pages.dart PageRouteBuilder.buildPage

func (*PageRouteBuilder) BuildTransitions

func (r *PageRouteBuilder) BuildTransitions(bc BuildContext, a, secondary animation.Animation[float64], child Widget) Widget

BuildTransitions calls the transitions builder.

Flutter: widgets/pages.dart PageRouteBuilder.buildTransitions

func (*PageRouteBuilder) MaintainState

func (r *PageRouteBuilder) MaintainState() bool

MaintainState is whether the route keeps its state while it is not on top.

Flutter: widgets/pages.dart PageRouteBuilder.maintainState

func (*PageRouteBuilder) Opaque

func (r *PageRouteBuilder) Opaque() bool

Opaque is whether the route obscures the previous one.

Flutter: widgets/pages.dart PageRouteBuilder.opaque

func (*PageRouteBuilder) ReverseTransitionDuration

func (r *PageRouteBuilder) ReverseTransitionDuration() time.Duration

ReverseTransitionDuration is the duration of the transition out.

Flutter: widgets/pages.dart PageRouteBuilder.reverseTransitionDuration

func (*PageRouteBuilder) TransitionDuration

func (r *PageRouteBuilder) TransitionDuration() time.Duration

TransitionDuration is the duration of the transition in.

Flutter: widgets/pages.dart PageRouteBuilder.transitionDuration

type PageRouteBuilderOpts

type PageRouteBuilderOpts struct {
	PageRouteOpts
	// TransitionsBuilder builds the transition of the page; the default returns
	// the child.
	TransitionsBuilder RouteTransitionsBuilder
	// TransitionDuration is the duration of the transition in; the default is
	// 300 ms.
	TransitionDuration foundation.Opt[time.Duration]
	// ReverseTransitionDuration is the duration of the transition out; the
	// default is 300 ms.
	ReverseTransitionDuration foundation.Opt[time.Duration]
	// NotOpaque makes the route not obscure the previous one; routes are opaque
	// by default.
	NotOpaque bool
	// BarrierColor is the color of the barrier, if any.
	BarrierColor foundation.Opt[ui.Color]
	// BarrierLabel is the semantic label of the barrier.
	BarrierLabel string
	// DiscardState makes the route lose its state when it is not on top; the
	// state is kept by default.
	DiscardState bool
}

PageRouteBuilderOpts are the optional parameters of NewPageRouteBuilder.

Flutter: widgets/pages.dart PageRouteBuilder.new

type PageRouteFactory

type PageRouteFactory func(settings RouteSettings, builder WidgetBuilder) PageRoute

PageRouteFactory makes the page route of a named route: the settings are the name and the arguments, and the builder makes the content of the page.

Deviation: it is not generic over the result type; results are any values (SPEC §12.10).

Flutter: widgets/app.dart PageRouteFactory

type PageRouteOpts

type PageRouteOpts struct {
	RouteOpts
	// FullscreenDialog is whether the route is a fullscreen dialog.
	FullscreenDialog bool
	// DisallowSnapshotting makes AllowSnapshotting false; snapshotting is allowed
	// by default.
	DisallowSnapshotting bool
	// BarrierDismissible is whether tapping the barrier pops the route.
	BarrierDismissible bool
	// TraversalEdgeBehavior controls the transfer of focus beyond the first and the
	// last items of the focus scope of the route; Unspecified uses
	// Navigator.RouteTraversalEdgeBehavior.
	TraversalEdgeBehavior TraversalEdgeBehavior
	// DirectionalTraversalEdgeBehavior controls the directional transfer of focus
	// beyond the first and the last items of the focus scope of the route;
	// Unspecified uses Navigator.RouteDirectionalTraversalEdgeBehavior.
	DirectionalTraversalEdgeBehavior TraversalEdgeBehavior
}

PageRouteOpts are the optional parameters of the page route bases.

Flutter: widgets/pages.dart PageRoute.new

type PageScrollPhysics

type PageScrollPhysics struct {
	ScrollPhysicsBase
}

PageScrollPhysics are the scroll physics used by a PageView: they settle on a whole page.

Flutter: widgets/page_view.dart PageScrollPhysics

func NewPageScrollPhysics

func NewPageScrollPhysics(parent ScrollPhysics) *PageScrollPhysics

NewPageScrollPhysics creates the physics with the parent (nil for none).

Flutter: widgets/page_view.dart PageScrollPhysics.new

func (*PageScrollPhysics) AllowImplicitScrolling

func (p *PageScrollPhysics) AllowImplicitScrolling() bool

AllowImplicitScrolling is false.

Flutter: widgets/page_view.dart PageScrollPhysics.allowImplicitScrolling

func (*PageScrollPhysics) ApplyTo

func (p *PageScrollPhysics) ApplyTo(ancestor ScrollPhysics) ScrollPhysics

ApplyTo returns a copy on top of the ancestor.

Flutter: widgets/page_view.dart PageScrollPhysics.applyTo

func (*PageScrollPhysics) CreateBallisticSimulation

func (p *PageScrollPhysics) CreateBallisticSimulation(position ScrollMetrics, velocity float64) physics.Simulation

CreateBallisticSimulation is a spring to the page that the fling ends on.

Flutter: widgets/page_view.dart PageScrollPhysics.createBallisticSimulation

type PageStorage

type PageStorage struct {
	StatelessWidget
	// contains filtered or unexported fields
}

PageStorage is a widget that gives the widgets below it a PageStorageBucket to save their state in.

Flutter: widgets/page_storage.dart PageStorage

func NewPageStorage

func NewPageStorage(bucket *PageStorageBucket, child Widget, opts ...WidgetOpts) *PageStorage

NewPageStorage creates the widget.

Flutter: widgets/page_storage.dart PageStorage.new

func (*PageStorage) Bucket

func (w *PageStorage) Bucket() *PageStorageBucket

Bucket is the bucket the widgets below use.

Flutter: widgets/page_storage.dart PageStorage.bucket

func (*PageStorage) Build

func (w *PageStorage) Build(BuildContext) Widget

Build returns the child.

Flutter: widgets/page_storage.dart PageStorage.build

func (*PageStorage) Child

func (w *PageStorage) Child() Widget

Child is the widget below this one.

Flutter: widgets/page_storage.dart PageStorage.child

type PageStorageBucket

type PageStorageBucket struct {
	// contains filtered or unexported fields
}

PageStorageBucket is a storage of state that a PageStorage widget offers to the widgets below it, so that they keep it when they are rebuilt from scratch, for instance when a route is rebuilt.

Flutter: widgets/page_storage.dart PageStorageBucket

func MaybePageStorageOf

func MaybePageStorageOf(bc BuildContext) *PageStorageBucket

MaybePageStorageOf is the bucket of the closest PageStorage above the context, or nil.

Flutter: widgets/page_storage.dart PageStorage.maybeOf

func NewPageStorageBucket

func NewPageStorageBucket() *PageStorageBucket

NewPageStorageBucket creates an empty bucket.

Flutter: widgets/page_storage.dart PageStorageBucket.new

func PageStorageOf

func PageStorageOf(bc BuildContext) *PageStorageBucket

PageStorageOf is the bucket of the closest PageStorage above the context. It panics with the tag PageStorageMissing in debug builds when there is none.

Flutter: widgets/page_storage.dart PageStorage.of

func (*PageStorageBucket) ReadState

func (b *PageStorageBucket) ReadState(bc BuildContext, opts ...PageStorageOpts) any

ReadState returns the data saved for the context, or nil.

Flutter: widgets/page_storage.dart PageStorageBucket.readState

func (*PageStorageBucket) WriteState

func (b *PageStorageBucket) WriteState(bc BuildContext, data any, opts ...PageStorageOpts)

WriteState saves the data for the context. Without an identifier, the entry is the keys of the context's widget and its ancestors; nothing is saved if there is none.

Flutter: widgets/page_storage.dart PageStorageBucket.writeState

type PageStorageKey

type PageStorageKey[T comparable] struct {
	foundation.ValueKey[T]
}

PageStorageKey is a ValueKey that identifies the widget whose state a PageStorageBucket keeps: the keys of a widget and of its ancestors up to the PageStorage form the identifier of the entry.

Flutter: widgets/page_storage.dart PageStorageKey

func NewPageStorageKey

func NewPageStorageKey[T comparable](value T) PageStorageKey[T]

NewPageStorageKey creates a key from the value.

Flutter: widgets/page_storage.dart PageStorageKey.new

func (PageStorageKey[T]) StorageValue

func (k PageStorageKey[T]) StorageValue() any

StorageValue is the value of the key.

Flutter: foundation/key.dart ValueKey.value

func (PageStorageKey[T]) String

func (k PageStorageKey[T]) String() string

String describes the key, such as "[<'list'>]".

Flutter: widgets/page_storage.dart PageStorageKey

type PageStorageOpts

type PageStorageOpts struct {
	// Identifier is the key of the entry, instead of the one computed from the
	// keys of the context and its ancestors.
	Identifier any
}

PageStorageOpts are the optional parameters of the state functions of a PageStorageBucket.

Flutter: widgets/page_storage.dart PageStorageBucket.writeState

type PageTransitionsBuilder

type PageTransitionsBuilder interface {
	// DelegatedTransition is the transition that a route with this builder
	// gives to the route below it, or nil.
	//
	// Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder.delegatedTransition
	DelegatedTransition() DelegatedTransitionBuilder
	// TransitionDuration is the duration of the transition in.
	//
	// Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder.transitionDuration
	TransitionDuration() time.Duration
	// ReverseTransitionDuration is the duration of the transition out.
	//
	// Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder.reverseTransitionDuration
	ReverseTransitionDuration() time.Duration
	// BuildTransitions builds the transition of the child for the route.
	//
	// Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder.buildTransitions
	BuildTransitions(route PageRoute, bc BuildContext, animation, secondaryAnimation animation.Animation[float64], child Widget) Widget
}

PageTransitionsBuilder builds the transitions of a page route: the way a page enters and leaves, and the way the page below it moves out of the way. Implementations are comparable values, so that two themes that hold the same builders are equal.

Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder

type PageTransitionsBuilderBase

type PageTransitionsBuilderBase struct{}

PageTransitionsBuilderBase has the defaults of a PageTransitionsBuilder: no delegated transition and 300 milliseconds in both directions. A builder that has another duration overrides both TransitionDuration and ReverseTransitionDuration (Dart's reverse duration follows the duration; the base of Go has no way to see the type that embeds it).

Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder

func (PageTransitionsBuilderBase) DelegatedTransition

DelegatedTransition is nil.

Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder.delegatedTransition

func (PageTransitionsBuilderBase) ReverseTransitionDuration

func (PageTransitionsBuilderBase) ReverseTransitionDuration() time.Duration

ReverseTransitionDuration is 300 milliseconds.

Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder.reverseTransitionDuration

func (PageTransitionsBuilderBase) TransitionDuration

func (PageTransitionsBuilderBase) TransitionDuration() time.Duration

TransitionDuration is 300 milliseconds.

Flutter: widgets/page_transitions_builder.dart PageTransitionsBuilder.transitionDuration

type PageView

type PageView struct {
	StatefulWidget
	// contains filtered or unexported fields
}

PageView is a scrollable list that works page by page.

Flutter: widgets/page_view.dart PageView

func NewPageView

func NewPageView(children []Widget, opts ...PageViewOpts) *PageView

NewPageView creates a scrollable list that works page by page from an explicit list of widgets.

Flutter: widgets/page_view.dart PageView.new

func NewPageViewBuilder

func NewPageViewBuilder(itemBuilder NullableIndexedWidgetBuilder, opts ...PageViewOpts) *PageView

NewPageViewBuilder creates a scrollable list that works page by page using widgets that are created on demand.

Flutter: widgets/page_view.dart PageView.builder

func NewPageViewCustom

func NewPageViewCustom(childrenDelegate SliverChildDelegate, opts ...PageViewOpts) *PageView

NewPageViewCustom creates a scrollable list that works page by page with a custom child model.

Flutter: widgets/page_view.dart PageView.custom

func (*PageView) AllowImplicitScrolling

func (w *PageView) AllowImplicitScrolling() bool

AllowImplicitScrolling is whether the pages beyond the visible one are kept.

Flutter: widgets/page_view.dart PageView.allowImplicitScrolling

func (*PageView) ChildrenDelegate

func (w *PageView) ChildrenDelegate() SliverChildDelegate

ChildrenDelegate supplies the pages.

Flutter: widgets/page_view.dart PageView.childrenDelegate

func (*PageView) Controller

func (w *PageView) Controller() *PageController

Controller controls which page is visible, or nil.

Flutter: widgets/page_view.dart PageView.controller

func (*PageView) CreateState

func (w *PageView) CreateState() State

CreateState creates the state.

Flutter: widgets/page_view.dart PageView.createState

func (*PageView) ScrollCacheExtent

func (w *PageView) ScrollCacheExtent() rendering.ScrollCacheExtent

ScrollCacheExtent is how far beyond the viewport the view builds pages.

Flutter: widgets/page_view.dart PageView.scrollCacheExtent

type PageViewOpts

type PageViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ScrollDirection is the axis along which the pages scroll; the default is
	// AxisHorizontal.
	ScrollDirection painting.Axis
	// Reverse is whether the pages scroll against the reading direction.
	Reverse bool
	// Controller controls which page is visible.
	Controller *PageController
	// Physics is how the pages respond to the user.
	Physics ScrollPhysics
	// PageSnapping is whether the view settles on a whole page; the default is
	// true.
	PageSnapping foundation.Opt[bool]
	// OnPageChanged is called when the page changes.
	OnPageChanged func(index int)
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// AllowImplicitScrolling is whether the pages beyond the visible one are kept
	// for accessibility.
	AllowImplicitScrolling bool
	// ScrollCacheExtent is how far beyond the viewport the view builds pages; it
	// must be positive exactly when AllowImplicitScrolling is true. The default
	// is one viewport with it, none without.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
	// RestorationID is the identifier for restoring the page; it has no effect
	// until state restoration is ported.
	RestorationID string
	// ClipBehavior is how the view clips its content; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the view behaves during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
	// ScrollBehavior describes how the view scrolls; the default is the one of the
	// ScrollConfiguration above, without scrollbars.
	ScrollBehavior ScrollBehavior
	// PadEnds is whether to add padding to both ends of the list so that the first
	// and last pages can be centered; the default is true.
	PadEnds foundation.Opt[bool]
	// FindChildIndexCallback finds the index of the page that has a key
	// (NewPageViewBuilder).
	FindChildIndexCallback ChildIndexGetter
	// ItemCount is the number of pages; none means unbounded (NewPageViewBuilder).
	ItemCount foundation.Opt[int]
}

PageViewOpts are the optional parameters of NewPageView and its named constructors.

Flutter: widgets/page_view.dart PageView.new

type PanAxis

type PanAxis int

PanAxis is the axes along which an InteractiveViewer pans.

Flutter: widgets/interactive_viewer.dart PanAxis

const (
	// PanAxisUnspecified is the zero value: the default of the widget (free).
	PanAxisUnspecified PanAxis = iota
	// PanAxisHorizontal allows panning only in the horizontal axis.
	//
	// Flutter: widgets/interactive_viewer.dart PanAxis.horizontal
	PanAxisHorizontal
	// PanAxisVertical allows panning only in the vertical axis.
	//
	// Flutter: widgets/interactive_viewer.dart PanAxis.vertical
	PanAxisVertical
	// PanAxisAligned allows panning in one axis at a time, the one the gesture
	// starts in.
	//
	// Flutter: widgets/interactive_viewer.dart PanAxis.aligned
	PanAxisAligned
	// PanAxisFree allows panning in any direction.
	//
	// Flutter: widgets/interactive_viewer.dart PanAxis.free
	PanAxisFree
)

type ParentDataElement

type ParentDataElement struct {
	ProxyElement
}

ParentDataElement is the element of a ParentDataWidget: when the widget changes it writes the parent data again to the render objects below.

Flutter: widgets/framework.dart ParentDataElement

func NewParentDataElement

func NewParentDataElement(w parentDataWidget) *ParentDataElement

NewParentDataElement creates the element of a parent data widget.

Flutter: widgets/framework.dart ParentDataElement.new

func (*ParentDataElement) ApplyWidgetOutOfTurn

func (e *ParentDataElement) ApplyWidgetOutOfTurn(newWidget Widget)

ApplyWidgetOutOfTurn applies the parent data of a new widget to the render objects below, without rebuilding. The widget must say it can be applied that way (DebugCanApplyOutOfTurn) and have the same child.

Flutter: widgets/framework.dart ParentDataElement.applyWidgetOutOfTurn

func (*ParentDataElement) DebugParentDataType

func (e *ParentDataElement) DebugParentDataType() string

DebugParentDataType is the name of the parent data type of the widget.

Flutter: widgets/framework.dart ParentDataElement.debugParentDataType

func (*ParentDataElement) NotifyClients

func (e *ParentDataElement) NotifyClients(Widget)

NotifyClients writes the parent data to the render objects below.

Flutter: widgets/framework.dart ParentDataElement.notifyClients

type ParentDataWidgetOf

type ParentDataWidgetOf[T rendering.ParentData] struct{ ProxyWidget }

ParentDataWidgetOf is the embedded base of a widget that writes parent data of type T to the render objects of the widgets below it, such as Flutter's Positioned or Flexible. Embed it and implement ApplyParentData:

type Tag struct {
	widgets.ParentDataWidgetOf[*rendering.BoxParentData]
}

func (t *Tag) ApplyParentData(renderObject rendering.RenderObject) { ... }

Optional methods are DebugCanApplyOutOfTurn() bool, DebugTypicalAncestorWidgetClass() string and DebugTypicalAncestorWidgetDescription() string.

Flutter: widgets/framework.dart ParentDataWidget

func NewParentDataWidgetBase

func NewParentDataWidgetBase[T rendering.ParentData](child Widget, opts ...WidgetOpts) ParentDataWidgetOf[T]

NewParentDataWidgetBase creates the embedded base of a parent data widget.

Flutter: widgets/framework.dart ParentDataWidget.new

func (*ParentDataWidgetOf[T]) DebugIsValidRenderObject

func (*ParentDataWidgetOf[T]) DebugIsValidRenderObject(renderObject rendering.RenderObject) bool

DebugIsValidRenderObject is whether the parent data of the render object is a T, so that ApplyParentData can write to it.

Flutter: widgets/framework.dart ParentDataWidget.debugIsValidRenderObject

func (*ParentDataWidgetOf[T]) DebugParentDataType

func (*ParentDataWidgetOf[T]) DebugParentDataType() string

DebugParentDataType is the name of T.

Flutter: widgets/framework.dart ParentDataElement.debugParentDataType

type PasteTextIntent

type PasteTextIntent struct {
	IntentBase
	// Cause is what caused the selection to change.
	//
	// Flutter: widgets/text_editing_intents.dart PasteTextIntent.cause
	Cause services.SelectionChangedCause
}

PasteTextIntent is an intent that pastes the clipboard text.

Flutter: widgets/text_editing_intents.dart PasteTextIntent

type PerformanceOverlay

type PerformanceOverlay struct {
	LeafRenderObjectWidget
	// contains filtered or unexported fields
}

PerformanceOverlay displays the performance of the application: a graph and the statistics of the time to build each frame (UI) and of the time to draw it (Raster), against the frame budget of the display (SPEC §14.3). The engine measures the frames only while an overlay is in the tree.

Deviation: Flutter's overlay is drawn by the engine; this one draws itself from the timings that the engine reports, and does not keep the app drawing frames (see rendering.RenderPerformanceOverlay, SPEC §12.10).

Flutter: widgets/performance_overlay.dart PerformanceOverlay

func NewPerformanceOverlay

func NewPerformanceOverlay(opts ...PerformanceOverlayOpts) *PerformanceOverlay

NewPerformanceOverlay creates the overlay with the options of the mask.

Flutter: widgets/performance_overlay.dart PerformanceOverlay.new

func NewPerformanceOverlayAllEnabled

func NewPerformanceOverlayAllEnabled(opts ...PerformanceOverlayAllEnabledOpts) *PerformanceOverlay

NewPerformanceOverlayAllEnabled creates the overlay with every option: both graphs and both texts.

Flutter: widgets/performance_overlay.dart PerformanceOverlay.allEnabled

func (*PerformanceOverlay) CreateRenderObject

func (w *PerformanceOverlay) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object, listening to the frame timings of the binding.

Flutter: widgets/performance_overlay.dart PerformanceOverlay.createRenderObject

func (*PerformanceOverlay) OptionsMask

func (w *PerformanceOverlay) OptionsMask() int

OptionsMask is the bits of the options that are shown.

Flutter: widgets/performance_overlay.dart PerformanceOverlay.optionsMask

func (*PerformanceOverlay) UpdateRenderObject

func (w *PerformanceOverlay) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject sets the options.

Flutter: widgets/performance_overlay.dart PerformanceOverlay.updateRenderObject

type PerformanceOverlayAllEnabledOpts

type PerformanceOverlayAllEnabledOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

PerformanceOverlayAllEnabledOpts are the optional parameters of NewPerformanceOverlayAllEnabled.

Flutter: widgets/performance_overlay.dart PerformanceOverlay.allEnabled

type PerformanceOverlayOpts

type PerformanceOverlayOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OptionsMask has the bits of the rendering.PerformanceOverlayOption values to show;
	// the default is 0, which shows nothing.
	OptionsMask int
}

PerformanceOverlayOpts are the optional parameters of NewPerformanceOverlay.

Flutter: widgets/performance_overlay.dart PerformanceOverlay.new

type PhysicalModel

type PhysicalModel struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

PhysicalModel represents a physical layer that clips its children to a shape and casts a shadow.

Flutter: widgets/basic.dart PhysicalModel

func NewPhysicalModel

func NewPhysicalModel(color ui.Color, child Widget, opts ...PhysicalModelOpts) *PhysicalModel

NewPhysicalModel creates the widget.

Flutter: widgets/basic.dart PhysicalModel.new

func (*PhysicalModel) BorderRadius

func (w *PhysicalModel) BorderRadius() foundation.Opt[painting.BorderRadius]

BorderRadius is the border radius of the rounded corners when the shape is a rectangle.

Flutter: widgets/basic.dart PhysicalModel.borderRadius

func (*PhysicalModel) ClipBehavior

func (w *PhysicalModel) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped and how; the default is ClipNone.

Flutter: widgets/basic.dart PhysicalModel.clipBehavior

func (*PhysicalModel) Color

func (w *PhysicalModel) Color() ui.Color

Color is the background color.

Flutter: widgets/basic.dart PhysicalModel.color

func (*PhysicalModel) CreateRenderObject

func (w *PhysicalModel) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart PhysicalModel.createRenderObject

func (*PhysicalModel) Elevation

func (w *PhysicalModel) Elevation() float64

Elevation is the z-coordinate at which to place this physical object relative to its parent.

Flutter: widgets/basic.dart PhysicalModel.elevation

func (*PhysicalModel) ShadowColor

func (w *PhysicalModel) ShadowColor() foundation.Opt[ui.Color]

ShadowColor is the color to paint the shadow below the material; the default is opaque black.

Flutter: widgets/basic.dart PhysicalModel.shadowColor

func (*PhysicalModel) Shape

func (w *PhysicalModel) Shape() painting.BoxShape

Shape is the type of shape; the default is BoxShapeRectangle.

Flutter: widgets/basic.dart PhysicalModel.shape

func (*PhysicalModel) UpdateRenderObject

func (w *PhysicalModel) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart PhysicalModel.updateRenderObject

type PhysicalModelOpts

type PhysicalModelOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Shape is the type of shape; the default is BoxShapeRectangle.
	Shape painting.BoxShape
	// ClipBehavior is whether the content is clipped and how; the default is ClipNone.
	ClipBehavior ui.Clip
	// BorderRadius is the border radius of the rounded corners when the shape is a rectangle.
	BorderRadius foundation.Opt[painting.BorderRadius]
	// Elevation is the z-coordinate at which to place this physical object relative to its parent.
	Elevation float64
	// ShadowColor is the color to paint the shadow below the material; the default is opaque black.
	ShadowColor foundation.Opt[ui.Color]
}

PhysicalModelOpts are the optional parameters of NewPhysicalModel.

Flutter: widgets/basic.dart PhysicalModel.new

type PhysicalShape

type PhysicalShape struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

PhysicalShape represents a physical layer that clips its children to a path and casts a shadow.

Flutter: widgets/basic.dart PhysicalShape

func NewPhysicalShape

func NewPhysicalShape(clipper rendering.CustomClipper[*ui.Path], color ui.Color, child Widget, opts ...PhysicalShapeOpts) *PhysicalShape

NewPhysicalShape creates the widget.

Flutter: widgets/basic.dart PhysicalShape.new

func (*PhysicalShape) ClipBehavior

func (w *PhysicalShape) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped and how; the default is ClipNone.

Flutter: widgets/basic.dart PhysicalShape.clipBehavior

func (*PhysicalShape) Clipper

func (w *PhysicalShape) Clipper() rendering.CustomClipper[*ui.Path]

Clipper calculates the path used to clip the child and to cast the shadow.

Flutter: widgets/basic.dart PhysicalShape.clipper

func (*PhysicalShape) Color

func (w *PhysicalShape) Color() ui.Color

Color is the background color.

Flutter: widgets/basic.dart PhysicalShape.color

func (*PhysicalShape) CreateRenderObject

func (w *PhysicalShape) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart PhysicalShape.createRenderObject

func (*PhysicalShape) DidUnmountRenderObject

func (w *PhysicalShape) DidUnmountRenderObject(renderObject rendering.RenderObject)

DidUnmountRenderObject clears what the render object holds.

Flutter: widgets/basic.dart PhysicalShape.didUnmountRenderObject

func (*PhysicalShape) Elevation

func (w *PhysicalShape) Elevation() float64

Elevation is the z-coordinate at which to place this physical object relative to its parent.

Flutter: widgets/basic.dart PhysicalShape.elevation

func (*PhysicalShape) ShadowColor

func (w *PhysicalShape) ShadowColor() foundation.Opt[ui.Color]

ShadowColor is the color to paint the shadow below the material; the default is opaque black.

Flutter: widgets/basic.dart PhysicalShape.shadowColor

func (*PhysicalShape) UpdateRenderObject

func (w *PhysicalShape) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart PhysicalShape.updateRenderObject

type PhysicalShapeOpts

type PhysicalShapeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ClipBehavior is whether the content is clipped and how; the default is ClipNone.
	ClipBehavior ui.Clip
	// Elevation is the z-coordinate at which to place this physical object relative to its parent.
	Elevation float64
	// ShadowColor is the color to paint the shadow below the material; the default is opaque black.
	ShadowColor foundation.Opt[ui.Color]
}

PhysicalShapeOpts are the optional parameters of NewPhysicalShape.

Flutter: widgets/basic.dart PhysicalShape.new

type Placeholder

type Placeholder struct {
	StatelessWidget
	// contains filtered or unexported fields
}

Placeholder is a box that draws two crossed lines, as a stand-in for a widget that is not there yet.

Flutter: widgets/placeholder.dart Placeholder

func NewPlaceholder

func NewPlaceholder(child Widget, opts ...PlaceholderOpts) *Placeholder

NewPlaceholder creates a placeholder; the child, which may be nil, is drawn over the lines.

Flutter: widgets/placeholder.dart Placeholder.new

func (*Placeholder) Build

func (w *Placeholder) Build(BuildContext) Widget

Build builds the painted box, limited to the fallback size when it is unconstrained.

Flutter: widgets/placeholder.dart Placeholder.build

func (*Placeholder) Child

func (w *Placeholder) Child() Widget

Child is the widget drawn over the lines.

Flutter: widgets/placeholder.dart Placeholder.child

func (*Placeholder) Color

func (w *Placeholder) Color() ui.Color

Color is the color of the lines.

Flutter: widgets/placeholder.dart Placeholder.color

func (*Placeholder) FallbackHeight

func (w *Placeholder) FallbackHeight() float64

FallbackHeight is the height used when the constraints are unbounded.

Flutter: widgets/placeholder.dart Placeholder.fallbackHeight

func (*Placeholder) FallbackWidth

func (w *Placeholder) FallbackWidth() float64

FallbackWidth is the width used when the constraints are unbounded.

Flutter: widgets/placeholder.dart Placeholder.fallbackWidth

func (*Placeholder) StrokeWidth

func (w *Placeholder) StrokeWidth() float64

StrokeWidth is the width of the lines.

Flutter: widgets/placeholder.dart Placeholder.strokeWidth

type PlaceholderOpts

type PlaceholderOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Color is the color to draw the placeholder box; the default is 0xFF455A64
	// (blue grey 700).
	Color foundation.Opt[ui.Color]
	// StrokeWidth is the width of the lines in the placeholder box; the default
	// is 2.
	StrokeWidth foundation.Opt[float64]
	// FallbackWidth is the width to use when the placeholder is in a situation
	// with an unbounded width; the default is 400.
	FallbackWidth foundation.Opt[float64]
	// FallbackHeight is the height to use when the placeholder is in a situation
	// with an unbounded height; the default is 400.
	FallbackHeight foundation.Opt[float64]
}

PlaceholderOpts are the optional parameters of NewPlaceholder.

Flutter: widgets/placeholder.dart Placeholder.new

type PlainScrollPhysics

type PlainScrollPhysics struct {
	ScrollPhysicsBase
}

PlainScrollPhysics is the ScrollPhysics class itself: physics that decide nothing and defer to the parent.

Flutter: widgets/scroll_physics.dart ScrollPhysics

func NewPlainScrollPhysics

func NewPlainScrollPhysics(parent ScrollPhysics) *PlainScrollPhysics

NewPlainScrollPhysics creates physics with the parent (nil for none).

Flutter: widgets/scroll_physics.dart ScrollPhysics.new

func (*PlainScrollPhysics) String

func (p *PlainScrollPhysics) String() string

String is "ScrollPhysics", then " -> " and the parent if there is one.

Flutter: widgets/scroll_physics.dart ScrollPhysics.toString

type PlatformMenu

type PlatformMenu struct {
	*PlatformMenuItemBase
	// contains filtered or unexported fields
}

PlatformMenu is a menu of the menu bar, with items in it. It is disabled when it has none.

Flutter: widgets/platform_menu_bar.dart PlatformMenu

func NewPlatformMenu

func NewPlatformMenu(label string, menus []PlatformMenuItem, opts ...PlatformMenuOpts) *PlatformMenu

NewPlatformMenu creates a menu with the label and the items in it.

Flutter: widgets/platform_menu_bar.dart PlatformMenu.new

func (*PlatformMenu) Descendants

func (m *PlatformMenu) Descendants() []PlatformMenuItem

Descendants are the items below the menu, all levels, depth first.

Flutter: widgets/platform_menu_bar.dart PlatformMenu.descendants

func (*PlatformMenu) Menus

func (m *PlatformMenu) Menus() []PlatformMenuItem

Menus are the items of the menu.

Flutter: widgets/platform_menu_bar.dart PlatformMenu.menus

func (*PlatformMenu) OnClose

func (m *PlatformMenu) OnClose() func()

OnClose is called when the menu closes.

Flutter: widgets/platform_menu_bar.dart PlatformMenu.onClose

func (*PlatformMenu) OnOpen

func (m *PlatformMenu) OnOpen() func()

OnOpen is called when the menu opens.

Flutter: widgets/platform_menu_bar.dart PlatformMenu.onOpen

func (*PlatformMenu) ToChannelRepresentation

func (m *PlatformMenu) ToChannelRepresentation(delegate PlatformMenuDelegate, getID MenuItemSerializableIDGenerator) []ui.PlatformMenuItemData

ToChannelRepresentation is the data of the menu with its children. Dividers that are first, last or next to another are dropped, because groups and plain items may both add them.

Flutter: widgets/platform_menu_bar.dart PlatformMenu.toChannelRepresentation

type PlatformMenuBar

type PlatformMenuBar struct {
	StatefulWidget
	// contains filtered or unexported fields
}

PlatformMenuBar is a widget that gives the platform the menus of the app, for the platform to show in its menu bar (the menu bar at the top of the screen on macOS). It draws nothing: it builds its child, or an empty box. There may be only one active at a time; in debug builds a second one panics with the tag PlatformMenuBarDuplicated. On a platform without a menu bar it does nothing.

Flutter: widgets/platform_menu_bar.dart PlatformMenuBar

func NewPlatformMenuBar

func NewPlatformMenuBar(menus []PlatformMenuItem, opts ...PlatformMenuBarOpts) *PlatformMenuBar

NewPlatformMenuBar creates the widget with the top-level menus.

Flutter: widgets/platform_menu_bar.dart PlatformMenuBar.new

func (*PlatformMenuBar) Child

func (w *PlatformMenuBar) Child() Widget

Child is the widget below this one.

Flutter: widgets/platform_menu_bar.dart PlatformMenuBar.child

func (*PlatformMenuBar) CreateState

func (w *PlatformMenuBar) CreateState() State

CreateState creates the state.

Flutter: widgets/platform_menu_bar.dart PlatformMenuBar.createState

func (*PlatformMenuBar) Menus

func (w *PlatformMenuBar) Menus() []PlatformMenuItem

Menus are the top-level menus.

Flutter: widgets/platform_menu_bar.dart PlatformMenuBar.menus

type PlatformMenuBarOpts

type PlatformMenuBarOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Child is the widget below this one; the menu bar draws nothing of its own.
	Child Widget
}

PlatformMenuBarOpts are the optional parameters of NewPlatformMenuBar.

Flutter: widgets/platform_menu_bar.dart PlatformMenuBar.new

type PlatformMenuDelegate

type PlatformMenuDelegate interface {
	// SetMenus sets the top-level menus of the menu bar, replacing the others.
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformMenuDelegate.setMenus
	SetMenus(topLevelMenus []PlatformMenuItem)
	// ClearMenus removes the menus that were set, which gives the platform's default menu bar back.
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformMenuDelegate.clearMenus
	ClearMenus()
	// DebugLockDelegate says whether the context may use the delegate: there is one active
	// PlatformMenuBar at a time, and a lock keeps a second from taking it. In release builds it
	// is true.
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformMenuDelegate.debugLockDelegate
	DebugLockDelegate(bc BuildContext) bool
	// DebugUnlockDelegate says whether the context may let go of the delegate (it is the one that
	// locked it). In release builds it is true.
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformMenuDelegate.debugUnlockDelegate
	DebugUnlockDelegate(bc BuildContext) bool
}

PlatformMenuDelegate is what the binding uses to put the menus of a PlatformMenuBar in the platform's menu bar. DefaultPlatformMenuDelegate does it through the engine.

Flutter: widgets/platform_menu_bar.dart PlatformMenuDelegate

type PlatformMenuItem

type PlatformMenuItem interface {
	// Label is the text of the item.
	Label() string
	// Tooltip is the tooltip of the item, if it has one.
	Tooltip() foundation.Opt[string]
	// Shortcut is the shortcut of the item, nil when it has none.
	Shortcut() MenuSerializableShortcut
	// OnSelected is called when the user chooses the item; nil when there is none.
	OnSelected() func()
	// OnOpen is called when the menu of the item opens (menus only); nil when there is none.
	OnOpen() func()
	// OnClose is called when the menu of the item closes (menus only); nil when there is none.
	OnClose() func()
	// OnSelectedIntent is the intent that is invoked in the focused widget when the user chooses the item;
	// nil when there is none.
	OnSelectedIntent() Intent
	// Descendants are the items below this one, all levels, depth first.
	Descendants() []PlatformMenuItem
	// Members are the items of a group.
	Members() []PlatformMenuItem
	// ToChannelRepresentation is the data that goes to the platform for the item, with the ids that getID
	// gives.
	ToChannelRepresentation(delegate PlatformMenuDelegate, getID MenuItemSerializableIDGenerator) []ui.PlatformMenuItemData
}

PlatformMenuItem is an entry of a platform menu: a plain item, a menu with items in it, a group of items between dividers, or an item that the platform provides.

Deviation: Flutter's PlatformMenuItem is a class that its subclasses extend, with default getters; here it is an interface, PlatformMenuItemBase is the plain item that NewPlatformMenuItem makes, and the others embed it (SPEC §12.10).

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem

type PlatformMenuItemBase

type PlatformMenuItemBase struct {
	// contains filtered or unexported fields
}

PlatformMenuItemBase is the plain item of a platform menu, and what the other items embed.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem

func NewPlatformMenuItem

func NewPlatformMenuItem(label string, opts ...PlatformMenuItemOpts) *PlatformMenuItemBase

NewPlatformMenuItem creates a plain item. In debug builds it panics with the tag PlatformMenuItemSelectionConflict when both OnSelected and OnSelectedIntent are given.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.new

func (*PlatformMenuItemBase) Descendants

func (i *PlatformMenuItemBase) Descendants() []PlatformMenuItem

Descendants is empty: a plain item has no items below it.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.descendants

func (*PlatformMenuItemBase) Label

func (i *PlatformMenuItemBase) Label() string

Label is the text of the item.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.label

func (*PlatformMenuItemBase) Members

func (i *PlatformMenuItemBase) Members() []PlatformMenuItem

Members is empty: only a group has members.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.members

func (*PlatformMenuItemBase) OnClose

func (i *PlatformMenuItemBase) OnClose() func()

OnClose is nil: only a menu closes.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.onClose

func (*PlatformMenuItemBase) OnOpen

func (i *PlatformMenuItemBase) OnOpen() func()

OnOpen is nil: only a menu opens.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.onOpen

func (*PlatformMenuItemBase) OnSelected

func (i *PlatformMenuItemBase) OnSelected() func()

OnSelected is called when the user chooses the item.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.onSelected

func (*PlatformMenuItemBase) OnSelectedIntent

func (i *PlatformMenuItemBase) OnSelectedIntent() Intent

OnSelectedIntent is the intent that is invoked when the user chooses the item.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.onSelectedIntent

func (*PlatformMenuItemBase) Shortcut

Shortcut is the shortcut of the item.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.shortcut

func (*PlatformMenuItemBase) ToChannelRepresentation

ToChannelRepresentation is the data of the item: its id, label, tooltip, whether it is enabled (it has a callback or an intent) and its shortcut.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.toChannelRepresentation

func (*PlatformMenuItemBase) Tooltip

func (i *PlatformMenuItemBase) Tooltip() foundation.Opt[string]

Tooltip is the tooltip of the item.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.tooltip

type PlatformMenuItemGroup

type PlatformMenuItemGroup struct {
	*PlatformMenuItemBase
	// contains filtered or unexported fields
}

PlatformMenuItemGroup is a group of items that the platform shows between dividers.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItemGroup

func NewPlatformMenuItemGroup

func NewPlatformMenuItemGroup(members []PlatformMenuItem) *PlatformMenuItemGroup

NewPlatformMenuItemGroup creates a group of items. In debug builds sending a group with no members to the platform panics with the tag PlatformMenuItemGroupEmpty.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItemGroup.new

func (*PlatformMenuItemGroup) Members

func (g *PlatformMenuItemGroup) Members() []PlatformMenuItem

Members are the items of the group.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItemGroup.members

func (*PlatformMenuItemGroup) ToChannelRepresentation

ToChannelRepresentation is a divider, the items of the group and a divider.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItemGroup.toChannelRepresentation

type PlatformMenuItemOpts

type PlatformMenuItemOpts struct {
	// Tooltip is the tooltip of the item.
	Tooltip foundation.Opt[string]
	// Shortcut is the shortcut that chooses the item.
	Shortcut MenuSerializableShortcut
	// OnSelected is called when the user chooses the item; an item with neither it nor OnSelectedIntent is
	// disabled.
	OnSelected func()
	// OnSelectedIntent is invoked in the focused widget when the user chooses the item. Only one of
	// OnSelected and OnSelectedIntent may be given.
	OnSelectedIntent Intent
}

PlatformMenuItemOpts are the optional parameters of NewPlatformMenuItem.

Flutter: widgets/platform_menu_bar.dart PlatformMenuItem.new

type PlatformMenuOpts

type PlatformMenuOpts struct {
	// Tooltip is the tooltip of the menu.
	Tooltip foundation.Opt[string]
	// OnOpen is called when the menu opens.
	OnOpen func()
	// OnClose is called when the menu closes.
	OnClose func()
}

PlatformMenuOpts are the optional parameters of NewPlatformMenu.

Flutter: widgets/platform_menu_bar.dart PlatformMenu.new

type PlatformProvidedMenuItem

type PlatformProvidedMenuItem struct {
	*PlatformMenuItemBase
	// contains filtered or unexported fields
}

PlatformProvidedMenuItem is a menu item that the platform provides, with its own title, action and shortcut: About, Quit, Hide and the others of PlatformProvidedMenuItemType. Only macOS has them.

Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItem

func NewPlatformProvidedMenuItem

NewPlatformProvidedMenuItem creates the item of the type.

Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItem.new

func (*PlatformProvidedMenuItem) Enabled

func (i *PlatformProvidedMenuItem) Enabled() bool

Enabled says whether the user can choose the item.

Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItem.enabled

func (*PlatformProvidedMenuItem) ToChannelRepresentation

ToChannelRepresentation is the data of the item: its id, whether it is enabled and its type. In debug builds it panics with the tag PlatformProvidedMenuItemUnavailable when the platform does not provide the type.

Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItem.toChannelRepresentation

func (*PlatformProvidedMenuItem) Type

Type is the kind of the item.

Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItem.type

type PlatformProvidedMenuItemOpts

type PlatformProvidedMenuItemOpts struct {
	// Enabled says the user can choose the item; the default is true.
	Enabled foundation.Opt[bool]
}

PlatformProvidedMenuItemOpts are the optional parameters of NewPlatformProvidedMenuItem.

Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItem.new

type PlatformProvidedMenuItemType

type PlatformProvidedMenuItemType int

PlatformProvidedMenuItemType is a menu item that the platform provides, with its own title, action and shortcut. The zero value is PlatformProvidedMenuItemTypeUnspecified, which no item has.

Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType

const (
	// PlatformProvidedMenuItemTypeUnspecified is the zero value, which no item has.
	PlatformProvidedMenuItemTypeUnspecified PlatformProvidedMenuItemType = iota
	// PlatformProvidedMenuItemTypeAbout shows the standard About panel (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.about
	PlatformProvidedMenuItemTypeAbout
	// PlatformProvidedMenuItemTypeQuit quits the app (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.quit
	PlatformProvidedMenuItemTypeQuit
	// PlatformProvidedMenuItemTypeServicesSubmenu is the Services submenu (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.servicesSubmenu
	PlatformProvidedMenuItemTypeServicesSubmenu
	// PlatformProvidedMenuItemTypeHide hides the app (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.hide
	PlatformProvidedMenuItemTypeHide
	// PlatformProvidedMenuItemTypeHideOtherApplications hides the other apps (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.hideOtherApplications
	PlatformProvidedMenuItemTypeHideOtherApplications
	// PlatformProvidedMenuItemTypeShowAllApplications shows all the apps again (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.showAllApplications
	PlatformProvidedMenuItemTypeShowAllApplications
	// PlatformProvidedMenuItemTypeStartSpeaking starts speaking the selected text (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.startSpeaking
	PlatformProvidedMenuItemTypeStartSpeaking
	// PlatformProvidedMenuItemTypeStopSpeaking stops speaking (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.stopSpeaking
	PlatformProvidedMenuItemTypeStopSpeaking
	// PlatformProvidedMenuItemTypeToggleFullScreen enters or leaves full screen (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.toggleFullScreen
	PlatformProvidedMenuItemTypeToggleFullScreen
	// PlatformProvidedMenuItemTypeMinimizeWindow minimizes the window (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.minimizeWindow
	PlatformProvidedMenuItemTypeMinimizeWindow
	// PlatformProvidedMenuItemTypeZoomWindow zooms the window (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.zoomWindow
	PlatformProvidedMenuItemTypeZoomWindow
	// PlatformProvidedMenuItemTypeArrangeWindowsInFront brings all the windows to the front (macOS).
	//
	// Flutter: widgets/platform_menu_bar.dart PlatformProvidedMenuItemType.arrangeWindowsInFront
	PlatformProvidedMenuItemTypeArrangeWindowsInFront
)

The values of PlatformProvidedMenuItemType, in Flutter's order after the zero value (the index that goes to the platform is the value minus one).

type PlatformRouteInformationProvider

type PlatformRouteInformationProvider struct {
	foundation.ChangeNotifier
	WidgetsBindingObserverBase
	RouteInformationProviderBase
	// contains filtered or unexported fields
}

PlatformRouteInformationProvider is the route information provider that listens to the routes that the platform pushes and keeps the route information that the router reports. There is no platform history on the desktop, so it keeps the entries in memory.

Flutter: widgets/router.dart PlatformRouteInformationProvider

func NewPlatformRouteInformationProvider

func NewPlatformRouteInformationProvider(binding *WidgetsBinding, initialRouteInformation *RouteInformation) *PlatformRouteInformationProvider

NewPlatformRouteInformationProvider creates the provider with the route information that the app starts with.

Deviation: Flutter reads WidgetsBinding.instance; Glutter has no singletons, so the binding is a parameter (SPEC §12.10).

Flutter: widgets/router.dart PlatformRouteInformationProvider.new

func (*PlatformRouteInformationProvider) AddListener

AddListener adds the listener; the first one registers the provider with the binding.

Flutter: widgets/router.dart PlatformRouteInformationProvider.addListener

func (*PlatformRouteInformationProvider) DidPushRouteInformation

func (p *PlatformRouteInformationProvider) DidPushRouteInformation(routeInformation *RouteInformation) bool

DidPushRouteInformation is called when the platform pushes a route: the value changes, and the listeners (the router) are told.

Flutter: widgets/router.dart PlatformRouteInformationProvider.didPushRouteInformation

func (*PlatformRouteInformationProvider) Dispose

func (p *PlatformRouteInformationProvider) Dispose()

Dispose unregisters from the binding and disposes the notifier.

Flutter: widgets/router.dart PlatformRouteInformationProvider.dispose

func (*PlatformRouteInformationProvider) RemoveListener

RemoveListener removes the listener; without listeners the provider unregisters from the binding.

Flutter: widgets/router.dart PlatformRouteInformationProvider.removeListener

func (*PlatformRouteInformationProvider) RouterReportsNewRouteInformation

func (p *PlatformRouteInformationProvider) RouterReportsNewRouteInformation(routeInformation *RouteInformation, reportingType RouteInformationReportingType)

RouterReportsNewRouteInformation tells the platform about the route information that the router reports, as a replacement of the current entry of the history for a neglect report, or for a report without intention whose location is the same as the one the platform has, and as a new entry otherwise.

It calls SelectMultiEntryHistory and RouteInformationUpdated of the binding's SystemNavigator.

Flutter: widgets/router.dart PlatformRouteInformationProvider.routerReportsNewRouteInformation

func (*PlatformRouteInformationProvider) Value

Value is the route information that the platform or the router reported last.

Flutter: widgets/router.dart PlatformRouteInformationProvider.value

type PointerLock

type PointerLock struct {
	// contains filtered or unexported fields
}

PointerLock locks the pointer to a window, for the mouse look of a game and the orbit of a CAD that never stops at the edge of the screen (SPEC §27.6). While the pointer is locked the cursor is hidden, and the pointer events of the mouse keep the Position that the pointer had when the lock began and carry the motion in Delta, unaccelerated where the platform gives it. The lock ends when the app calls Unlock, when the window loses the focus, when the compositor ends it, when the window is closed, and on the web when the user presses Escape; it does not come back by itself, and the app locks again when it wants to. Flutter has no such API (SPEC §12.10).

Flutter: no counterpart

func PointerLockOf

func PointerLockOf(bc BuildContext) *PointerLock

PointerLockOf returns the pointer lock of the app (the one of the binding).

Flutter: no counterpart

func (*PointerLock) AddListener

AddListener adds fn, which is called when a lock ends by itself: the window lost the focus, the platform ended it, the window was closed. It is not called for Unlock. Remove it with RemoveListener.

Flutter: no counterpart

func (*PointerLock) Lock

func (p *PointerLock) Lock(view *ui.View) error

Lock locks the pointer to the window of the view. It fails with PointerLockUnavailable (TagPointerLockUnavailable) when the platform cannot, and with PointerLockDenied (TagPointerLockDenied) when it refuses; the web refuses outside a user gesture. Locking a locked view is not an error.

Flutter: no counterpart

func (*PointerLock) Locked

func (p *PointerLock) Locked() bool

Locked says whether the pointer is locked to a window of the app.

Flutter: no counterpart

func (*PointerLock) RemoveListener

func (p *PointerLock) RemoveListener(handle foundation.ListenerHandle)

RemoveListener removes a listener that AddListener added.

Flutter: no counterpart

func (*PointerLock) Unlock

func (p *PointerLock) Unlock()

Unlock ends the lock of every view. The listeners are not told: the app asked for it.

Flutter: no counterpart

type PopEntry

type PopEntry interface {
	// OnPopInvokedWithResult is called after a pop was handled (didPop true) or
	// blocked.
	//
	// Flutter: widgets/routes.dart PopEntry.onPopInvokedWithResult
	OnPopInvokedWithResult(didPop bool, result any)
	// CanPopNotifier tells whether a pop is allowed.
	//
	// Flutter: widgets/routes.dart PopEntry.canPopNotifier
	CanPopNotifier() foundation.ValueListenable[bool]
}

PopEntry is a pop scope that a route consults when it is asked to pop; PopScope registers itself as one.

Flutter: widgets/routes.dart PopEntry

type PopInvokedWithResultCallback

type PopInvokedWithResultCallback func(didPop bool, result any)

PopInvokedWithResultCallback is called after a route pop was handled, or blocked. DidPop is whether the route was popped, and result is the result of the pop (nil if blocked).

Flutter: widgets/routes.dart PopInvokedWithResultCallback

type PopPageCallback

type PopPageCallback func(route Route, result any) bool

PopPageCallback is called when a page-based route is popped; it returns whether the pop succeeded, and a pop that did not succeed leaves the route in place. It is the deprecated way of handling pops, replaced by DidRemovePageCallback.

Flutter: widgets/navigator.dart PopPageCallback

type PopResultCallback

type PopResultCallback func(result any)

PopResultCallback is called with the result of a pop.

Flutter: widgets/navigator_pop_handler.dart PopResultCallback

type PopScope

type PopScope struct {
	StatefulWidget
	// contains filtered or unexported fields
}

PopScope manages whether the route it is in can be popped, and is told about the pops: a back gesture, the Navigator's MaybePop, or the system back.

Flutter: widgets/pop_scope.dart PopScope

func NewPopScope

func NewPopScope(child Widget, opts ...PopScopeOpts) *PopScope

NewPopScope creates the widget.

Flutter: widgets/pop_scope.dart PopScope.new

func (*PopScope) CanPop

func (w *PopScope) CanPop() bool

CanPop is whether the route can be popped.

Flutter: widgets/pop_scope.dart PopScope.canPop

func (*PopScope) Child

func (w *PopScope) Child() Widget

Child is the widget below.

Flutter: widgets/pop_scope.dart PopScope.child

func (*PopScope) CreateState

func (w *PopScope) CreateState() State

CreateState creates the state.

Flutter: widgets/pop_scope.dart PopScope.createState

type PopScopeOpts

type PopScopeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// CanPop is whether the route can be popped; the default is true.
	CanPop foundation.Opt[bool]
	// OnPopInvokedWithResult is called after a pop was handled (didPop true) or
	// blocked (false).
	OnPopInvokedWithResult PopInvokedWithResultCallback
}

PopScopeOpts are the optional parameters of NewPopScope.

Flutter: widgets/pop_scope.dart PopScope.new

type PopupRoute

type PopupRoute interface {
	ModalRoute
}

PopupRoute is a modal route that overlays a widget over the current route.

Flutter: widgets/routes.dart PopupRoute

type PopupRouteBase

type PopupRouteBase struct {
	ModalRouteBase
}

PopupRouteBase implements PopupRoute: it is not opaque, keeps its state and can't be snapshotted. Embed it and call InitPopupRouteBase.

Flutter: widgets/routes.dart PopupRoute

func (*PopupRouteBase) AllowSnapshotting

func (b *PopupRouteBase) AllowSnapshotting() bool

AllowSnapshotting is false.

Flutter: widgets/routes.dart PopupRoute.allowSnapshotting

func (*PopupRouteBase) MaintainState

func (b *PopupRouteBase) MaintainState() bool

MaintainState is true.

Flutter: widgets/routes.dart PopupRoute.maintainState

func (*PopupRouteBase) Opaque

func (b *PopupRouteBase) Opaque() bool

Opaque is false.

Flutter: widgets/routes.dart PopupRoute.opaque

type Positioned

type Positioned struct {
	ParentDataWidgetOf[*rendering.StackParentData]
	// contains filtered or unexported fields
}

Positioned controls where a child of a Stack is positioned.

Flutter: widgets/basic.dart Positioned

func NewPositioned

func NewPositioned(child Widget, opts ...PositionedOpts) *Positioned

NewPositioned creates a widget that controls where a child of a Stack is positioned. In debug builds it panics with the tag PositionedOverconstrained when it has a left, a right and a width, or a top, a bottom and a height.

Flutter: widgets/basic.dart Positioned.new

func NewPositionedFill

func NewPositionedFill(child Widget, opts ...PositionedFillOpts) *Positioned

NewPositionedFill creates a Positioned that fills the stack, with the given distances to its edges.

Flutter: widgets/basic.dart Positioned.fill

func NewPositionedFromRect

func NewPositionedFromRect(rect ui.Rect, child Widget, opts ...WidgetOpts) *Positioned

NewPositionedFromRect creates a Positioned with the left, top, width and height of the rect.

Flutter: widgets/basic.dart Positioned.fromRect

func NewPositionedFromRelativeRect

func NewPositionedFromRelativeRect(rect rendering.RelativeRect, child Widget, opts ...WidgetOpts) *Positioned

NewPositionedFromRelativeRect creates a Positioned with the left, top, right and bottom of the rect.

Flutter: widgets/basic.dart Positioned.fromRelativeRect

func NewPositionedWithDirection

func NewPositionedWithDirection(textDirection ui.TextDirection, child Widget, opts ...PositionedDirectionalOpts) *Positioned

NewPositionedWithDirection creates a Positioned whose start and end are resolved with the text direction.

Flutter: widgets/basic.dart Positioned.directional

func (*Positioned) ApplyParentData

func (w *Positioned) ApplyParentData(renderObject rendering.RenderObject)

ApplyParentData writes the position to the parent data of the render object.

Flutter: widgets/basic.dart Positioned.applyParentData

func (*Positioned) Bottom

func (w *Positioned) Bottom() foundation.Opt[float64]

Bottom is the distance from the bottom edge of the stack.

Flutter: widgets/basic.dart Positioned.bottom

func (*Positioned) DebugTypicalAncestorWidgetClass

func (*Positioned) DebugTypicalAncestorWidgetClass() string

DebugTypicalAncestorWidgetClass is the name of the widget this one belongs in.

Flutter: widgets/basic.dart Positioned.debugTypicalAncestorWidgetClass

func (*Positioned) Height

func (w *Positioned) Height() foundation.Opt[float64]

Height is the child's height.

Flutter: widgets/basic.dart Positioned.height

func (*Positioned) Left

func (w *Positioned) Left() foundation.Opt[float64]

Left is the distance from the left edge of the stack.

Flutter: widgets/basic.dart Positioned.left

func (*Positioned) Right

func (w *Positioned) Right() foundation.Opt[float64]

Right is the distance from the right edge of the stack.

Flutter: widgets/basic.dart Positioned.right

func (*Positioned) Top

func (w *Positioned) Top() foundation.Opt[float64]

Top is the distance from the top edge of the stack.

Flutter: widgets/basic.dart Positioned.top

func (*Positioned) Width

func (w *Positioned) Width() foundation.Opt[float64]

Width is the child's width.

Flutter: widgets/basic.dart Positioned.width

type PositionedDirectional

type PositionedDirectional struct {
	StatelessWidget
	// contains filtered or unexported fields
}

PositionedDirectional controls where a child of a Stack is positioned without committing to a specific text direction.

Flutter: widgets/basic.dart PositionedDirectional

func NewPositionedDirectional

func NewPositionedDirectional(child Widget, opts ...PositionedDirectionalOpts) *PositionedDirectional

NewPositionedDirectional creates a widget that positions a child of a Stack with the start and end of the ambient text direction.

Flutter: widgets/basic.dart PositionedDirectional.new

func (*PositionedDirectional) Build

Build builds a Positioned for the ambient text direction.

Flutter: widgets/basic.dart PositionedDirectional.build

func (*PositionedDirectional) Child

func (w *PositionedDirectional) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/basic.dart PositionedDirectional.child

type PositionedDirectionalOpts

type PositionedDirectionalOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Start is the distance from the start edge of the stack.
	Start foundation.Opt[float64]
	// Top is the distance from the top edge of the stack.
	Top foundation.Opt[float64]
	// End is the distance from the end edge of the stack.
	End foundation.Opt[float64]
	// Bottom is the distance from the bottom edge of the stack.
	Bottom foundation.Opt[float64]
	// Width is the child's width.
	Width foundation.Opt[float64]
	// Height is the child's height.
	Height foundation.Opt[float64]
}

PositionedDirectionalOpts are the optional parameters of NewPositionedDirectional and of NewPositionedWithDirection.

Flutter: widgets/basic.dart PositionedDirectional.new

type PositionedFillOpts

type PositionedFillOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Left, Top, Right and Bottom are the distances from the edges of the stack.
	Left, Top, Right, Bottom float64
}

PositionedFillOpts are the optional parameters of NewPositionedFill. The distances default to zero.

Flutter: widgets/basic.dart Positioned.fill

type PositionedOpts

type PositionedOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Left is the distance that the child's left edge is inset from the left of
	// the stack.
	Left foundation.Opt[float64]
	// Top is the distance that the child's top edge is inset from the top of the
	// stack.
	Top foundation.Opt[float64]
	// Right is the distance that the child's right edge is inset from the right
	// of the stack.
	Right foundation.Opt[float64]
	// Bottom is the distance that the child's bottom edge is inset from the
	// bottom of the stack.
	Bottom foundation.Opt[float64]
	// Width is the child's width; it must not be set together with Left and Right.
	Width foundation.Opt[float64]
	// Height is the child's height; it must not be set together with Top and
	// Bottom.
	Height foundation.Opt[float64]
}

PositionedOpts are the optional parameters of NewPositioned.

Flutter: widgets/basic.dart Positioned.new

type PositionedTransition

type PositionedTransition struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

PositionedTransition animates the position of a widget relative to a Stack that is its parent.

Flutter: widgets/transitions.dart PositionedTransition

func NewPositionedTransition

func NewPositionedTransition(rect animation.Animation[rendering.RelativeRect], child Widget, opts ...WidgetOpts) *PositionedTransition

NewPositionedTransition creates the widget.

Flutter: widgets/transitions.dart PositionedTransition.new

func (*PositionedTransition) Build

Build positions the child by the current rectangle.

Flutter: widgets/transitions.dart PositionedTransition.build

func (*PositionedTransition) Child

func (w *PositionedTransition) Child() Widget

Child is the widget below this one.

Flutter: widgets/transitions.dart PositionedTransition.child

func (*PositionedTransition) Rect

Rect is the animation of the rectangle.

Flutter: widgets/transitions.dart PositionedTransition.rect

type PrecacheImageOpts

type PrecacheImageOpts struct {
	// Size is the size the image will be shown at, if it is known.
	Size foundation.Opt[ui.Size]
	// OnError is called when the image fails to load; the default reports the
	// error without making noise.
	OnError painting.ImageErrorListener
}

PrecacheImageOpts are the optional parameters of PrecacheImage.

Flutter: widgets/image.dart precacheImage

type PreferredSize

type PreferredSize struct {
	StatelessWidget
	// contains filtered or unexported fields
}

PreferredSize gives a preferred size to any child, for the places that take a PreferredSizeWidget, such as AppBar.bottom. It does not constrain the child; the parent decides the size that the child has.

Flutter: widgets/preferred_size.dart PreferredSize

func NewPreferredSize

func NewPreferredSize(preferredSize ui.Size, child Widget, opts ...PreferredSizeOpts) *PreferredSize

NewPreferredSize creates the widget.

Flutter: widgets/preferred_size.dart PreferredSize.new

func (*PreferredSize) Build

func (w *PreferredSize) Build(BuildContext) Widget

Build returns the child.

Flutter: widgets/preferred_size.dart PreferredSize.build

func (*PreferredSize) Child

func (w *PreferredSize) Child() Widget

Child is the widget below this widget in the tree.

Flutter: widgets/preferred_size.dart PreferredSize.child

func (*PreferredSize) PreferredSize

func (w *PreferredSize) PreferredSize() ui.Size

PreferredSize is the size that the widget would prefer.

Flutter: widgets/preferred_size.dart PreferredSize.preferredSize

type PreferredSizeOpts

type PreferredSizeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

PreferredSizeOpts are the optional parameters of NewPreferredSize.

Flutter: widgets/preferred_size.dart PreferredSize.new

type PreferredSizeWidget

type PreferredSizeWidget interface {
	Widget
	// PreferredSize is the size this widget would prefer if it were otherwise
	// unconstrained. In many cases it is only the height, with the width
	// infinite.
	//
	// Flutter: widgets/preferred_size.dart PreferredSizeWidget.preferredSize
	PreferredSize() ui.Size
}

PreferredSizeWidget is a widget with a preferred size, which an ancestor such as a Scaffold uses to size it without laying it out. Embed the widget in the interface values that carry it: a Scaffold finds the size by asserting the widget to this interface.

Flutter: widgets/preferred_size.dart PreferredSizeWidget

type PreviousFocusAction

type PreviousFocusAction struct{ ContextActionBase }

PreviousFocusAction is the action that handles a PreviousFocusIntent.

Deviation: it is a ContextAction, like NextFocusAction (SPEC §12.10).

Flutter: widgets/focus_traversal.dart PreviousFocusAction

func NewPreviousFocusAction

func NewPreviousFocusAction() *PreviousFocusAction

NewPreviousFocusAction creates the action.

Flutter: widgets/focus_traversal.dart PreviousFocusAction.new

func (*PreviousFocusAction) IntentType

func (a *PreviousFocusAction) IntentType() reflect.Type

IntentType is PreviousFocusIntent.

Flutter: widgets/actions.dart Action.intentType

func (*PreviousFocusAction) InvokeWithContext

func (a *PreviousFocusAction) InvokeWithContext(_ Intent, bc BuildContext) any

InvokeWithContext moves the primary focus to the previous node and says whether it found one.

Flutter: widgets/focus_traversal.dart PreviousFocusAction.invoke

func (*PreviousFocusAction) ToKeyEventResult

func (a *PreviousFocusAction) ToKeyEventResult(_ Intent, invokeResult any) KeyEventResult

ToKeyEventResult is handled when a node was found, else skipRemainingHandlers.

Flutter: widgets/focus_traversal.dart PreviousFocusAction.toKeyEventResult

type PreviousFocusIntent

type PreviousFocusIntent struct{ IntentBase }

PreviousFocusIntent is an intent that moves the focus to the previous node (Shift+Tab by default).

Flutter: widgets/focus_traversal.dart PreviousFocusIntent

type PrimaryScrollController

type PrimaryScrollController struct {
	InheritedWidget
	// contains filtered or unexported fields
}

PrimaryScrollController associates a ScrollController with a subtree. The scroll views below it that do not have a controller of their own use it on the platforms and axis it names, and widgets such as a scrollbar find the controller of the primary scroll view with it.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController

func NewPrimaryScrollController

func NewPrimaryScrollController(controller ScrollController, child Widget, opts ...PrimaryScrollControllerOpts) *PrimaryScrollController

NewPrimaryScrollController creates the widget.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.new

func NewPrimaryScrollControllerNone

func NewPrimaryScrollControllerNone(child Widget, opts ...WidgetOpts) *PrimaryScrollController

NewPrimaryScrollControllerNone creates a widget that blocks the primary scroll controller of the widgets above it: there is none below.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.none

func (*PrimaryScrollController) AutomaticallyInheritForPlatforms

func (w *PrimaryScrollController) AutomaticallyInheritForPlatforms() []foundation.TargetPlatform

AutomaticallyInheritForPlatforms are the platforms on which the scroll views below inherit the controller by default.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.automaticallyInheritForPlatforms

func (*PrimaryScrollController) Controller

func (w *PrimaryScrollController) Controller() ScrollController

Controller is the controller, or nil for the widget made by NewPrimaryScrollControllerNone.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.controller

func (*PrimaryScrollController) ScrollDirection

func (w *PrimaryScrollController) ScrollDirection() foundation.Opt[painting.Axis]

ScrollDirection is the axis of the scroll views that inherit the controller by default; none for NewPrimaryScrollControllerNone.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.scrollDirection

func (*PrimaryScrollController) UpdateShouldNotify

func (w *PrimaryScrollController) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the controller changed.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.updateShouldNotify

type PrimaryScrollControllerOpts

type PrimaryScrollControllerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AutomaticallyInheritForPlatforms are the platforms on which the scroll
	// views below inherit the controller by default; the default is the mobile
	// platforms (Android, iOS, Fuchsia).
	AutomaticallyInheritForPlatforms []foundation.TargetPlatform
	// ScrollDirection is the axis of the scroll views that inherit the controller
	// by default; the default is the vertical axis.
	ScrollDirection foundation.Opt[painting.Axis]
}

PrimaryScrollControllerOpts are the optional parameters of NewPrimaryScrollController.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.new

type PrioritizedAction

type PrioritizedAction struct {
	ContextActionBase
	// contains filtered or unexported fields
}

PrioritizedAction is the action for PrioritizedIntents: it finds the first intent that has an enabled action at the primary focus and invokes it.

Flutter: widgets/actions.dart PrioritizedAction

func NewPrioritizedAction

func NewPrioritizedAction() *PrioritizedAction

NewPrioritizedAction creates the action.

Flutter: widgets/actions.dart PrioritizedAction.new

func (*PrioritizedAction) IntentType

func (a *PrioritizedAction) IntentType() reflect.Type

IntentType is PrioritizedIntents.

Flutter: widgets/actions.dart Action.intentType

func (*PrioritizedAction) InvokeWithContext

func (a *PrioritizedAction) InvokeWithContext(_ Intent, bc BuildContext) any

InvokeWithContext invokes the action that IsEnabledWithContext found.

Flutter: widgets/actions.dart PrioritizedAction.invoke

func (*PrioritizedAction) IsEnabledWithContext

func (a *PrioritizedAction) IsEnabledWithContext(intent Intent, bc BuildContext) bool

IsEnabledWithContext finds the action to invoke: it is enabled when there is one.

Flutter: widgets/actions.dart PrioritizedAction.isEnabled

type PrioritizedIntents

type PrioritizedIntents struct {
	IntentBase
	// OrderedIntents are the intents, the one to try first first.
	//
	// Flutter: widgets/actions.dart PrioritizedIntents.orderedIntents
	OrderedIntents []Intent
}

PrioritizedIntents is an intent that holds a list of intents, in priority order. The first of them whose action is enabled runs.

Flutter: widgets/actions.dart PrioritizedIntents

type ProxyElement

type ProxyElement struct {
	ComponentElement
	// contains filtered or unexported fields
}

ProxyElement is the element of a ProxyWidget: its child is the widget's child. Embed it, call InitProxyElement and implement NotifyClients.

Flutter: widgets/framework.dart ProxyElement

func (*ProxyElement) Build

func (p *ProxyElement) Build() Widget

Build is the child of the widget.

Flutter: widgets/framework.dart ProxyElement.build

func (*ProxyElement) Update

func (p *ProxyElement) Update(newWidget Widget)

Update replaces the widget, tells the clients and rebuilds.

Flutter: widgets/framework.dart ProxyElement.update

func (*ProxyElement) Updated

func (p *ProxyElement) Updated(oldWidget Widget)

Updated calls NotifyClients.

Flutter: widgets/framework.dart ProxyElement.updated

type ProxyElementSelf

type ProxyElementSelf interface {
	ComponentElementSelf
	// NotifyClients tells the dependents of the widget about the change, when the
	// widget changed in a way that matters to them (see Updated).
	//
	// Flutter: widgets/framework.dart ProxyElement.notifyClients
	NotifyClients(oldWidget Widget)
	// Updated is called when the widget changes, before the element rebuilds. It
	// calls NotifyClients by default.
	//
	// Flutter: widgets/framework.dart ProxyElement.updated
	Updated(oldWidget Widget)
}

ProxyElementSelf is what a proxy element needs from the outer type.

Flutter: no counterpart

type ProxyWidget

type ProxyWidget struct {
	WidgetBase
	// contains filtered or unexported fields
}

ProxyWidget is a widget that has exactly one child and builds nothing itself: it exists to give its element a job. InheritedWidget and ParentDataWidget are proxy widgets. A proxy widget of your own makes its element with CreateElement (see ElementCreator) and embeds ProxyElement in it.

Flutter: widgets/framework.dart ProxyWidget

func NewProxyWidgetBase

func NewProxyWidgetBase(child Widget, opts ...WidgetOpts) ProxyWidget

NewProxyWidgetBase creates the embedded base of a proxy widget.

Flutter: widgets/framework.dart ProxyWidget.new

func (*ProxyWidget) Child

func (p *ProxyWidget) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/framework.dart ProxyWidget.child

type RadioBuilder

type RadioBuilder func(bc BuildContext, state *ToggleableStateMixin) Widget

RadioBuilder builds the painting of a RawRadio from the state of the toggle.

Flutter: widgets/raw_radio.dart RadioBuilder

type RadioClient

type RadioClient[T comparable] interface {
	// Tristate is whether the radio can be deselected by selecting it again.
	//
	// Flutter: widgets/radio_group.dart RadioClient.tristate
	Tristate() bool
	// RadioValue is the value that the radio stands for.
	//
	// Flutter: widgets/radio_group.dart RadioClient.radioValue
	RadioValue() T
	// Enabled is whether the radio responds to input.
	//
	// Flutter: widgets/radio_group.dart RadioClient.enabled
	Enabled() bool
	// FocusNode is the focus node of the radio.
	//
	// Flutter: widgets/radio_group.dart RadioClient.focusNode
	FocusNode() *FocusNode
}

RadioClient is a radio button that can register with a RadioGroupRegistry.

Flutter: widgets/radio_group.dart RadioClient

type RadioClientRegistration

type RadioClientRegistration[T comparable] struct {
	// contains filtered or unexported fields
}

RadioClientRegistration keeps the registry that a radio belongs to; embed it in the state of the radio.

Flutter: widgets/radio_group.dart RadioClient

func (*RadioClientRegistration[T]) Registry

func (r *RadioClientRegistration[T]) Registry() RadioGroupRegistry[T]

Registry is the registry that the radio belongs to, or nil.

Flutter: widgets/radio_group.dart RadioClient.registry

func (*RadioClientRegistration[T]) SetRegistry

func (r *RadioClientRegistration[T]) SetRegistry(client RadioClient[T], registry RadioGroupRegistry[T])

SetRegistry moves the radio, which is the client, to the registry (nil for none).

Flutter: widgets/radio_group.dart RadioClient.registry

type RadioGroup

type RadioGroup[T comparable] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

RadioGroup is a widget that manages a group of radio buttons below it: it holds the value of the group, calls OnChanged when the user selects another radio, and moves the selection with the arrow keys.

Flutter: widgets/radio_group.dart RadioGroup

func NewRadioGroup

func NewRadioGroup[T comparable](onChanged func(value foundation.Opt[T]), child Widget, opts ...RadioGroupOpts[T]) *RadioGroup[T]

NewRadioGroup creates the widget.

Flutter: widgets/radio_group.dart RadioGroup.new

func (*RadioGroup[T]) Child

func (w *RadioGroup[T]) Child() Widget

Child is the widget below this one.

Flutter: widgets/radio_group.dart RadioGroup.child

func (*RadioGroup[T]) CreateState

func (w *RadioGroup[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/radio_group.dart RadioGroup.createState

func (*RadioGroup[T]) GroupValue

func (w *RadioGroup[T]) GroupValue() foundation.Opt[T]

GroupValue is the value of the currently selected radio.

Flutter: widgets/radio_group.dart RadioGroup.groupValue

func (*RadioGroup[T]) OnChanged

func (w *RadioGroup[T]) OnChanged() func(value foundation.Opt[T])

OnChanged is called when the user selects a radio.

Flutter: widgets/radio_group.dart RadioGroup.onChanged

type RadioGroupOpts

type RadioGroupOpts[T comparable] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// GroupValue is the value of the currently selected radio; none for none.
	GroupValue foundation.Opt[T]
}

RadioGroupOpts are the optional parameters of NewRadioGroup.

Flutter: widgets/radio_group.dart RadioGroup.new

type RadioGroupRegistry

type RadioGroupRegistry[T comparable] interface {
	// GroupValue is the value of the selected radio, or none.
	//
	// Flutter: widgets/radio_group.dart RadioGroupRegistry.groupValue
	GroupValue() foundation.Opt[T]
	// RegisterClient registers a radio with the group.
	//
	// Flutter: widgets/radio_group.dart RadioGroupRegistry.registerClient
	RegisterClient(radio RadioClient[T])
	// UnregisterClient takes a radio out of the group.
	//
	// Flutter: widgets/radio_group.dart RadioGroupRegistry.unregisterClient
	UnregisterClient(radio RadioClient[T])
	// OnChanged is called with the value of the radio that is selected, or none
	// when a toggleable radio is deselected.
	//
	// Flutter: widgets/radio_group.dart RadioGroupRegistry.onChanged
	OnChanged(value foundation.Opt[T])
}

RadioGroupRegistry is what the radio buttons of a group register with: it has the value of the group and the function to call when another radio is selected.

Flutter: widgets/radio_group.dart RadioGroupRegistry

func RadioGroupMaybeOf

func RadioGroupMaybeOf[T comparable](bc BuildContext) (RadioGroupRegistry[T], bool)

RadioGroupMaybeOf returns the registry of the closest RadioGroup above the context that has the value type T, if there is one. The context depends on it.

Flutter: widgets/radio_group.dart RadioGroup.maybeOf

type RangeMaintainingScrollPhysics

type RangeMaintainingScrollPhysics struct {
	ScrollPhysicsBase
}

RangeMaintainingScrollPhysics keeps the scroll position within the range of the content when its dimensions change, and keeps an overscroll that was there before the change.

Flutter: widgets/scroll_physics.dart RangeMaintainingScrollPhysics

func NewRangeMaintainingScrollPhysics

func NewRangeMaintainingScrollPhysics(parent ScrollPhysics) *RangeMaintainingScrollPhysics

NewRangeMaintainingScrollPhysics creates the physics with the parent (nil for none).

Flutter: widgets/scroll_physics.dart RangeMaintainingScrollPhysics.new

func (*RangeMaintainingScrollPhysics) AdjustPositionForNewDimensions

func (p *RangeMaintainingScrollPhysics) AdjustPositionForNewDimensions(oldPosition, newPosition ScrollMetrics, isScrolling bool, velocity float64) float64

AdjustPositionForNewDimensions keeps the overscroll and the boundary when the extents change while the scrollable is at rest.

Flutter: widgets/scroll_physics.dart RangeMaintainingScrollPhysics.adjustPositionForNewDimensions

func (*RangeMaintainingScrollPhysics) ApplyTo

ApplyTo returns a copy on top of the ancestor.

Flutter: widgets/scroll_physics.dart RangeMaintainingScrollPhysics.applyTo

type RawAutocomplete

type RawAutocomplete[T comparable] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

RawAutocomplete is a widget for helping the user make a selection by entering some text and choosing from among a list of options.

The user's text is passed to the optionsBuilder, which builds the options of the current text. When options are available, the optionsViewBuilder builds a view of them, shown over the other widgets of the app in the overlay.

Deviation: the announcement of the search results to the semantics service is not ported (SPEC §12.10).

Flutter: widgets/autocomplete.dart RawAutocomplete

func NewRawAutocomplete

func NewRawAutocomplete[T comparable](optionsViewBuilder AutocompleteOptionsViewBuilder[T], optionsBuilder AutocompleteOptionsBuilder[T],
	opts ...RawAutocompleteOpts[T]) *RawAutocomplete[T]

NewRawAutocomplete creates the widget. In debug builds it panics with the tag RawAutocompleteNoField when there is neither a field view builder nor a key, a focus node and a text editing controller, with RawAutocompleteFocusNodeMismatch when only one of the focus node and the controller is given, and with RawAutocompleteInitialValueAndController when both an initial value and a controller are given.

Flutter: widgets/autocomplete.dart RawAutocomplete.new

func (*RawAutocomplete[T]) CreateState

func (w *RawAutocomplete[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/autocomplete.dart RawAutocomplete.createState

type RawAutocompleteOpts

type RawAutocompleteOpts[T comparable] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OptionsViewOpenDirection is the direction in which to open the options
	// view; the default is down.
	OptionsViewOpenDirection OptionsViewOpenDirection
	// DisplayStringForOption returns the string to show in the field for an
	// option; the default is the default string of the option.
	DisplayStringForOption AutocompleteOptionToString[T]
	// FieldViewBuilder builds the field. If it is nil, the field is built outside
	// of the RawAutocomplete, with the FocusNode, the TextEditingController and
	// a key given, and its submit is passed to RawAutocompleteOnFieldSubmitted.
	FieldViewBuilder AutocompleteFieldViewBuilder
	// FocusNode is the node of the field; it must be given together with the
	// TextEditingController.
	FocusNode *FocusNode
	// OnSelected is called when an option is selected by the user.
	OnSelected AutocompleteOnSelected[T]
	// TextEditingController is the controller of the field; it must be given
	// together with the FocusNode.
	TextEditingController *TextEditingController
	// InitialValue is the initial value of the field; it can't be given together
	// with a TextEditingController.
	InitialValue foundation.Opt[services.TextEditingValue]
}

RawAutocompleteOpts are the optional parameters of NewRawAutocomplete.

Flutter: widgets/autocomplete.dart RawAutocomplete.new

type RawDialogRoute

type RawDialogRoute struct {
	PopupRouteBase
	// contains filtered or unexported fields
}

RawDialogRoute is a general dialog route which allows for customization of the dialog popup. It is used by ShowGeneralDialog.

Flutter: widgets/routes.dart RawDialogRoute

func NewRawDialogRoute

func NewRawDialogRoute(pageBuilder RoutePageBuilder, opts ...RawDialogRouteOpts) *RawDialogRoute

NewRawDialogRoute creates a dialog route.

Flutter: widgets/routes.dart RawDialogRoute.new

func (*RawDialogRoute) BarrierColor

func (r *RawDialogRoute) BarrierColor() foundation.Opt[ui.Color]

BarrierColor is the color of the barrier.

Flutter: widgets/routes.dart RawDialogRoute.barrierColor

func (*RawDialogRoute) BarrierDismissible

func (r *RawDialogRoute) BarrierDismissible() bool

BarrierDismissible is whether tapping the barrier pops the route.

Flutter: widgets/routes.dart RawDialogRoute.barrierDismissible

func (*RawDialogRoute) BarrierLabel

func (r *RawDialogRoute) BarrierLabel() string

BarrierLabel is the semantic label of the barrier.

Flutter: widgets/routes.dart RawDialogRoute.barrierLabel

func (*RawDialogRoute) BuildPage

func (r *RawDialogRoute) BuildPage(bc BuildContext, a, secondary animation.Animation[float64]) Widget

BuildPage builds the page with the page builder, in a semantics scope.

Deviation: Flutter wraps the page in a DisplayFeatureSubScreen with the anchor point; Glutter has no display features (SPEC §12.10).

Flutter: widgets/routes.dart RawDialogRoute.buildPage

func (*RawDialogRoute) BuildTransitions

func (r *RawDialogRoute) BuildTransitions(bc BuildContext, a, secondary animation.Animation[float64], child Widget) Widget

BuildTransitions builds the transition: a fade by default.

Flutter: widgets/routes.dart RawDialogRoute.buildTransitions

func (*RawDialogRoute) CreateSimulation

func (r *RawDialogRoute) CreateSimulation(forward bool) physics.Simulation

CreateSimulation is the simulation of RawDialogRouteOpts.Simulation, or none: the controller then runs for the transition duration.

Flutter: widgets/routes.dart TransitionRoute.createSimulation

func (*RawDialogRoute) FullscreenDialog

func (r *RawDialogRoute) FullscreenDialog() bool

FullscreenDialog is whether the dialog is fullscreen.

Flutter: widgets/routes.dart RawDialogRoute.fullscreenDialog

func (*RawDialogRoute) TransitionDuration

func (r *RawDialogRoute) TransitionDuration() time.Duration

TransitionDuration is the duration of the transition.

Flutter: widgets/routes.dart RawDialogRoute.transitionDuration

type RawDialogRouteOpts

type RawDialogRouteOpts struct {
	ModalRouteOpts
	// BarrierDismissible is whether tapping the barrier pops the route; the
	// default is true.
	BarrierDismissible foundation.Opt[bool]
	// BarrierColor is the color of the barrier; the default is 0x80000000.
	BarrierColor foundation.Opt[ui.Color]
	// NoBarrierColor makes the barrier colorless.
	NoBarrierColor bool
	// BarrierLabel is the semantic label of the barrier.
	BarrierLabel string
	// Simulation creates the simulation that drives the transition instead of a curve over the duration
	// (CupertinoDialogRoute drives it with a spring); nil runs the controller for the duration.
	//
	// Flutter: widgets/routes.dart TransitionRoute.createSimulation (a subclass overrides it)
	Simulation func(forward bool) physics.Simulation
	// TransitionDuration is the duration of the transition; the default is 200 ms.
	TransitionDuration foundation.Opt[time.Duration]
	// TransitionBuilder builds the transition of the dialog; the default is a
	// FadeTransition.
	TransitionBuilder RouteTransitionsBuilder
	// FullscreenDialog is whether the dialog is fullscreen.
	FullscreenDialog bool
}

RawDialogRouteOpts are the optional parameters of NewRawDialogRoute.

Flutter: widgets/routes.dart RawDialogRoute.new

type RawGestureDetector

type RawGestureDetector struct {
	StatefulWidget
	// contains filtered or unexported fields
}

RawGestureDetector is a widget that detects gestures described by the given recognizer factories.

Flutter: widgets/gesture_detector.dart RawGestureDetector

func NewRawGestureDetector

func NewRawGestureDetector(child Widget, opts ...RawGestureDetectorOpts) *RawGestureDetector

NewRawGestureDetector creates the widget; the child may be nil.

Flutter: widgets/gesture_detector.dart RawGestureDetector.new

func (*RawGestureDetector) Behavior

Behavior is how the detector behaves during hit testing.

Flutter: widgets/gesture_detector.dart RawGestureDetector.behavior

func (*RawGestureDetector) Child

func (w *RawGestureDetector) Child() Widget

Child is the widget below this one in the tree, or nil.

Flutter: widgets/gesture_detector.dart RawGestureDetector.child

func (*RawGestureDetector) CreateState

func (w *RawGestureDetector) CreateState() State

CreateState creates the state.

Flutter: widgets/gesture_detector.dart RawGestureDetector.createState

func (*RawGestureDetector) Gestures

Gestures are the gestures to detect.

Flutter: widgets/gesture_detector.dart RawGestureDetector.gestures

type RawGestureDetectorOpts

type RawGestureDetectorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Gestures are the gestures to detect, by the type of their recognizer.
	Gestures map[reflect.Type]GestureRecognizerFactory
	// Behavior is how this detector behaves during hit testing; the default is
	// deferToChild when there is a child, and translucent otherwise.
	Behavior rendering.HitTestBehavior
	// ExcludeFromSemantics is whether to exclude these gestures from the
	// semantics tree.
	ExcludeFromSemantics bool
	// Semantics is the delegate that assigns the semantics actions; the default
	// calls the callbacks of the recognizers.
	Semantics SemanticsGestureDelegate
}

RawGestureDetectorOpts are the optional parameters of NewRawGestureDetector.

Flutter: widgets/gesture_detector.dart RawGestureDetector.new

type RawGestureDetectorState

type RawGestureDetectorState struct {
	StateOf[*RawGestureDetector]
	// contains filtered or unexported fields
}

RawGestureDetectorState is the state of a RawGestureDetector: it owns the recognizers.

Flutter: widgets/gesture_detector.dart RawGestureDetectorState

func (*RawGestureDetectorState) Build

Build listens for the pointers and gives them to the recognizers.

Flutter: widgets/gesture_detector.dart RawGestureDetectorState.build

func (*RawGestureDetectorState) DidUpdateWidget

func (s *RawGestureDetectorState) DidUpdateWidget(old *RawGestureDetector)

DidUpdateWidget updates the recognizers.

Flutter: widgets/gesture_detector.dart RawGestureDetectorState.didUpdateWidget

func (*RawGestureDetectorState) Dispose

func (s *RawGestureDetectorState) Dispose()

Dispose disposes of the recognizers.

Flutter: widgets/gesture_detector.dart RawGestureDetectorState.dispose

func (*RawGestureDetectorState) InitState

func (s *RawGestureDetectorState) InitState()

InitState makes the recognizers.

Flutter: widgets/gesture_detector.dart RawGestureDetectorState.initState

func (*RawGestureDetectorState) Recognizers

Recognizers are the recognizers that the state keeps, by type.

Flutter: widgets/gesture_detector.dart RawGestureDetectorState._recognizers

func (*RawGestureDetectorState) ReplaceGestureRecognizers

func (s *RawGestureDetectorState) ReplaceGestureRecognizers(gestureFactories map[reflect.Type]GestureRecognizerFactory)

ReplaceGestureRecognizers changes the recognizers. It can only be called during layout, by a render object that learns about the gestures then; it panics with the tag GestureDetectorNotDuringLayout in debug builds otherwise.

Flutter: widgets/gesture_detector.dart RawGestureDetectorState.replaceGestureRecognizers

func (*RawGestureDetectorState) ReplaceSemanticsActions

func (s *RawGestureDetectorState) ReplaceSemanticsActions(actions map[ui.SemanticsAction]struct{})

ReplaceSemanticsActions changes the semantics actions that the render object handles. It does nothing when the detector has no semantics handler.

Flutter: widgets/gesture_detector.dart RawGestureDetectorState.replaceSemanticsActions

type RawImage

type RawImage struct {
	LeafRenderObjectWidget
	// contains filtered or unexported fields
}

RawImage is a widget that displays a dart:ui Image directly.

Flutter: widgets/basic.dart RawImage

func NewRawImage

func NewRawImage(image *ui.Image, opts ...RawImageOpts) *RawImage

NewRawImage creates the widget; the image may be nil. The widget does not take the ownership of the image: the render object holds a clone.

Flutter: widgets/basic.dart RawImage.new

func (*RawImage) CreateRenderObject

func (w *RawImage) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart RawImage.createRenderObject

func (*RawImage) DidUnmountRenderObject

func (w *RawImage) DidUnmountRenderObject(renderObject rendering.RenderObject)

DidUnmountRenderObject lets go of the image.

Flutter: widgets/basic.dart RawImage.didUnmountRenderObject

func (*RawImage) Image

func (w *RawImage) Image() *ui.Image

Image is the image to display, or nil.

Flutter: widgets/basic.dart RawImage.image

func (*RawImage) UpdateRenderObject

func (w *RawImage) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart RawImage.updateRenderObject

type RawImageOpts

type RawImageOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// DebugImageLabel is a description of the image, for debugging.
	DebugImageLabel string
	// Width is the width to give the image, if the constraints allow it.
	Width foundation.Opt[float64]
	// Height is the height to give the image, if the constraints allow it.
	Height foundation.Opt[float64]
	// Scale is the number of image pixels per logical pixel; the default is 1.
	Scale float64
	// Color is blended with the image using ColorBlendMode.
	Color foundation.Opt[ui.Color]
	// Opacity is the opacity of the image.
	Opacity foundation.ValueListenable[float64]
	// ColorBlendMode is how Color is blended; the default is srcIn.
	ColorBlendMode ui.BlendMode
	// Fit is how the image is inscribed into the box.
	Fit painting.BoxFit
	// Alignment is how the image is aligned within its bounds; the default is
	// AlignmentCenter.
	Alignment painting.AlignmentGeometry
	// Repeat is how the image is repeated in the area it does not cover.
	Repeat painting.ImageRepeat
	// CenterSlice is the center slice for a nine-patch image.
	CenterSlice foundation.Opt[ui.Rect]
	// MatchTextDirection is whether the image is flipped in right to left text.
	MatchTextDirection bool
	// InvertColors is whether the colors of the image are inverted.
	InvertColors bool
	// FilterQuality is the quality of image sampling; the default is
	// FilterQualityMedium.
	FilterQuality ui.FilterQuality
	// IsAntiAlias is whether to paint the image with anti-aliasing.
	IsAntiAlias bool
}

RawImageOpts are the optional parameters of NewRawImage.

Flutter: widgets/basic.dart RawImage.new

type RawMagnifier

type RawMagnifier struct {
	StatelessWidget
	// contains filtered or unexported fields
}

RawMagnifier is a common base class for magnifiers.

This magnifying glass is useful for scenarios on mobile devices where the user's finger may be covering part of the screen where a granular action is being performed, such as navigating a small cursor with a drag gesture, on an image or text.

A magnifier can be conveniently managed by MagnifierController, which handles showing and hiding the magnifier, with an optional entry / exit animation.

Flutter: widgets/magnifier.dart RawMagnifier

func NewRawMagnifier

func NewRawMagnifier(size ui.Size, opts ...RawMagnifierOpts) *RawMagnifier

NewRawMagnifier constructs a RawMagnifier.

By default, this magnifier uses the default MagnifierDecoration (which draws nothing), the focal point is directly under the magnifier, and there is no magnification; this means that a default magnifier will be entirely invisible to the naked eye, painting exactly what is under it, exactly where it was painted originally.

In debug builds a magnification scale of 0 panics with the tag RawMagnifierScaleZero.

Flutter: widgets/magnifier.dart RawMagnifier.new

func (*RawMagnifier) Build

func (w *RawMagnifier) Build(bc BuildContext) Widget

Build builds the lens and, above it, the decoration.

Flutter: widgets/magnifier.dart RawMagnifier.build

func (*RawMagnifier) Child

func (w *RawMagnifier) Child() Widget

Child is an optional widget to position inside the lens of the RawMagnifier.

This is positioned over the RawMagnifier - it may be useful for tinting the RawMagnifier, or drawing a crosshair-like UI.

Flutter: widgets/magnifier.dart RawMagnifier.child

func (*RawMagnifier) ClipBehavior

func (w *RawMagnifier) ClipBehavior() ui.Clip

ClipBehavior is whether and how to clip the parts of the decoration that render inside the loupe.

Flutter: widgets/magnifier.dart RawMagnifier.clipBehavior

func (*RawMagnifier) Decoration

func (w *RawMagnifier) Decoration() *MagnifierDecoration

Decoration is this magnifier's decoration.

This sets the shape of the loupe, plus any borders and shadows that it casts. The default has no border and no shadow; combined with the default magnification scale of 1.0, this results in the magnifier having no visible effect.

Flutter: widgets/magnifier.dart RawMagnifier.decoration

func (*RawMagnifier) FocalPointOffset

func (w *RawMagnifier) FocalPointOffset() ui.Offset

FocalPointOffset is the offset of the magnifier from the RawMagnifier's center.

For example, if the RawMagnifier is globally positioned at Offset(100, 100), and the focal point offset is Offset(-20, -20), then the RawMagnifier will see the content at global offset (80, 80).

If left as zero, the RawMagnifier will show the content that is directly below it.

Flutter: widgets/magnifier.dart RawMagnifier.focalPointOffset

func (*RawMagnifier) MagnificationScale

func (w *RawMagnifier) MagnificationScale() float64

MagnificationScale is how "zoomed in" the magnification subject is in the lens. The default is 1.0, which is no magnification.

Flutter: widgets/magnifier.dart RawMagnifier.magnificationScale

func (*RawMagnifier) Size

func (w *RawMagnifier) Size() ui.Size

Size is the size of the magnifier. This does not include the border from the decoration; it only includes the size of the magnifier.

Flutter: widgets/magnifier.dart RawMagnifier.size

type RawMagnifierOpts

type RawMagnifierOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Child is an optional widget to position inside the lens of the
	// RawMagnifier.
	Child Widget
	// Decoration is this magnifier's decoration; the default draws nothing.
	Decoration *MagnifierDecoration
	// ClipBehavior is whether and how to clip the parts of the decoration that
	// render inside the loupe; the default is ClipNone.
	ClipBehavior ui.Clip
	// FocalPointOffset is the offset of the magnifier from the RawMagnifier's
	// center; the default is zero.
	FocalPointOffset ui.Offset
	// MagnificationScale is how "zoomed in" the magnification subject is in the
	// lens; the default is 1, which is no magnification.
	MagnificationScale foundation.Opt[float64]
}

RawMagnifierOpts are the optional parameters of NewRawMagnifier.

Flutter: widgets/magnifier.dart RawMagnifier.new

type RawMenuAnchor

type RawMenuAnchor struct {
	StatefulWidget
	// contains filtered or unexported fields
}

RawMenuAnchor is a widget that wraps a child and shows a menu overlay at the request of a MenuController. It has no style: it handles the logic of the menu, and leaves the look of the menu to the overlay builder.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchor

func NewRawMenuAnchor

func NewRawMenuAnchor(controller *MenuController, overlayBuilder RawMenuAnchorOverlayBuilder, child Widget, opts ...RawMenuAnchorOpts) *RawMenuAnchor

NewRawMenuAnchor creates a menu anchor. The child may be nil.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchor.new

func (*RawMenuAnchor) Controller

func (w *RawMenuAnchor) Controller() *MenuController

Controller is the controller of the anchor.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchor.controller

func (*RawMenuAnchor) CreateState

func (w *RawMenuAnchor) CreateState() State

CreateState creates the state.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchor.createState

type RawMenuAnchorChildBuilder

type RawMenuAnchorChildBuilder func(bc BuildContext, controller *MenuController, child Widget) Widget

RawMenuAnchorChildBuilder is the type of the function that builds the anchor child of a RawMenuAnchor; child may be nil.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchorChildBuilder

type RawMenuAnchorCloseRequestedCallback

type RawMenuAnchorCloseRequestedCallback func(hideOverlay foundation.VoidCallback)

RawMenuAnchorCloseRequestedCallback is the type of the callback that is called when a request to close the menu is made; calling hideOverlay closes it.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchorCloseRequestedCallback

type RawMenuAnchorGroup

type RawMenuAnchorGroup struct {
	StatefulWidget
	// contains filtered or unexported fields
}

RawMenuAnchorGroup is a widget that groups menu anchors, so that one tap outside closes all the menus in the group. It has no menu of its own.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchorGroup

func NewRawMenuAnchorGroup

func NewRawMenuAnchorGroup(controller *MenuController, child Widget, opts ...WidgetOpts) *RawMenuAnchorGroup

NewRawMenuAnchorGroup creates a group of menu anchors.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchorGroup.new

func (*RawMenuAnchorGroup) CreateState

func (w *RawMenuAnchorGroup) CreateState() State

CreateState creates the state.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchorGroup.createState

type RawMenuAnchorOpenRequestedCallback

type RawMenuAnchorOpenRequestedCallback func(position foundation.Opt[ui.Offset], showOverlay foundation.VoidCallback)

RawMenuAnchorOpenRequestedCallback is the type of the callback that is called when a request to open the menu is made; calling showOverlay opens it.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchorOpenRequestedCallback

type RawMenuAnchorOpts

type RawMenuAnchorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ChildFocusNode is the focus node of the anchor child, which receives the
	// focus when the menu opens.
	ChildFocusNode *FocusNode
	// ConsumeOutsideTaps stops a tap outside the menu from doing anything else
	// while the menu is open.
	ConsumeOutsideTaps bool
	// OnOpen is called when the menu is opened.
	OnOpen foundation.VoidCallback
	// OnClose is called when the menu is closed.
	OnClose foundation.VoidCallback
	// OnOpenRequested is called when a request to open the menu is made; the
	// default shows the overlay.
	OnOpenRequested RawMenuAnchorOpenRequestedCallback
	// OnCloseRequested is called when a request to close the menu is made; the
	// default hides the overlay.
	OnCloseRequested RawMenuAnchorCloseRequestedCallback
	// UseRootOverlay puts the menu in the root overlay, instead of the nearest.
	UseRootOverlay bool
	// Builder builds the anchor child; the default is the child.
	Builder RawMenuAnchorChildBuilder
}

RawMenuAnchorOpts are the optional parameters of NewRawMenuAnchor.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchor.new

type RawMenuAnchorOverlayBuilder

type RawMenuAnchorOverlayBuilder func(bc BuildContext, info RawMenuOverlayInfo) Widget

RawMenuAnchorOverlayBuilder is the type of the function that builds the overlay of a RawMenuAnchor.

Flutter: widgets/raw_menu_anchor.dart RawMenuAnchorOverlayBuilder

type RawMenuOverlayInfo

type RawMenuOverlayInfo struct {
	// AnchorRect is the position and size of the anchor widget relative to the
	// overlay.
	//
	// Flutter: widgets/raw_menu_anchor.dart RawMenuOverlayInfo.anchorRect
	AnchorRect ui.Rect
	// OverlaySize is the size of the overlay.
	//
	// Flutter: widgets/raw_menu_anchor.dart RawMenuOverlayInfo.overlaySize
	OverlaySize ui.Size
	// Position is the position passed to MenuController.Open, if any, relative
	// to the anchor.
	//
	// Flutter: widgets/raw_menu_anchor.dart RawMenuOverlayInfo.position
	Position foundation.Opt[ui.Offset]
	// TapRegionGroupID is the group ID of the tap regions of the menu: a menu
	// should wrap its content in a TapRegion with this group ID so taps inside
	// it are not outside taps.
	//
	// Flutter: widgets/raw_menu_anchor.dart RawMenuOverlayInfo.tapRegionGroupId
	TapRegionGroupID any
}

RawMenuOverlayInfo is the layout information of a menu overlay: the anchor rectangle, the size of the overlay, the position that the menu was opened at and the group of the tap regions of the menu.

Flutter: widgets/raw_menu_anchor.dart RawMenuOverlayInfo

type RawRadio

type RawRadio[T comparable] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

RawRadio is a radio button without a look: it has the behavior of a radio (the toggle animations, the focus, the hover, the keys and the registry of the group) and builds the painting with a builder.

Flutter: widgets/raw_radio.dart RawRadio

func NewRawRadio

func NewRawRadio[T comparable](value T, mouseCursor WidgetStateProperty[services.MouseCursor], toggleable bool,
	focusNode *FocusNode, autofocus bool, groupRegistry RadioGroupRegistry[T], enabled bool,
	builder RadioBuilder, opts ...RawRadioOpts) *RawRadio[T]

NewRawRadio creates the widget. In debug builds it panics with the tag RawRadioNoRegistry when it is enabled and has no registry.

Flutter: widgets/raw_radio.dart RawRadio.new

func (*RawRadio[T]) Autofocus

func (w *RawRadio[T]) Autofocus() bool

Autofocus is whether the radio asks for the focus when it is built.

Flutter: widgets/raw_radio.dart RawRadio.autofocus

func (*RawRadio[T]) Builder

func (w *RawRadio[T]) Builder() RadioBuilder

Builder builds the painting of the radio.

Flutter: widgets/raw_radio.dart RawRadio.builder

func (*RawRadio[T]) CreateState

func (w *RawRadio[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/raw_radio.dart RawRadio.createState

func (*RawRadio[T]) Enabled

func (w *RawRadio[T]) Enabled() bool

Enabled is whether the radio responds to input.

Flutter: widgets/raw_radio.dart RawRadio.enabled

func (*RawRadio[T]) FocusNode

func (w *RawRadio[T]) FocusNode() *FocusNode

FocusNode is the focus node of the radio.

Flutter: widgets/raw_radio.dart RawRadio.focusNode

func (*RawRadio[T]) GroupRegistry

func (w *RawRadio[T]) GroupRegistry() RadioGroupRegistry[T]

GroupRegistry is the registry of the group of the radio.

Flutter: widgets/raw_radio.dart RawRadio.groupRegistry

func (*RawRadio[T]) MouseCursor

func (w *RawRadio[T]) MouseCursor() WidgetStateProperty[services.MouseCursor]

MouseCursor is the cursor over the radio, in each state.

Flutter: widgets/raw_radio.dart RawRadio.mouseCursor

func (*RawRadio[T]) Toggleable

func (w *RawRadio[T]) Toggleable() bool

Toggleable is whether the radio can be deselected by selecting it again.

Flutter: widgets/raw_radio.dart RawRadio.toggleable

func (*RawRadio[T]) Value

func (w *RawRadio[T]) Value() T

Value is the value that this radio stands for.

Flutter: widgets/raw_radio.dart RawRadio.value

type RawRadioOpts

type RawRadioOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

RawRadioOpts are the optional parameters of NewRawRadio.

Flutter: widgets/raw_radio.dart RawRadio.new

type RawScrollbar

type RawScrollbar struct {
	StatefulWidget
	// contains filtered or unexported fields
}

RawScrollbar is a scrollbar without a visual style: it paints a thumb (and optionally a track) over the scrollable it wraps, fades it in and out, and lets the user drag the thumb and click the track. The Material Scrollbar builds on it. The ScrollBehavior builds one for each scrollable on the desktop platforms.

Flutter: widgets/scrollbar.dart RawScrollbar

func NewRawScrollbar

func NewRawScrollbar(child Widget, opts ...RawScrollbarOpts) *RawScrollbar

NewRawScrollbar creates the scrollbar around the child. In debug builds it panics with the tag RawScrollbarInvalid when its options are inconsistent: a track without a thumb, a negative length, a radius and a shape.

Flutter: widgets/scrollbar.dart RawScrollbar.new

func (*RawScrollbar) Child

func (w *RawScrollbar) Child() Widget

Child is the scrollable the scrollbar is for.

Flutter: widgets/scrollbar.dart RawScrollbar.child

func (*RawScrollbar) CreateState

func (w *RawScrollbar) CreateState() State

CreateState creates the state.

Flutter: widgets/scrollbar.dart RawScrollbar.createState

func (*RawScrollbar) Options

func (w *RawScrollbar) Options() RawScrollbarOpts

Options are the options the widget was made with.

Flutter: widgets/scrollbar.dart RawScrollbar.new

type RawScrollbarOpts

type RawScrollbarOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Controller is the controller of the scrollable the scrollbar belongs to;
	// the PrimaryScrollController's by default.
	Controller ScrollController
	// ThumbVisibility makes the thumb always visible when true, and never when
	// false; the default (none) is visible while scrolling.
	ThumbVisibility foundation.Opt[bool]
	// Shape is the shape of the thumb, instead of a radius.
	Shape painting.OutlinedBorder
	// Radius is the corner radius of the thumb.
	Radius foundation.Opt[ui.Radius]
	// Thickness is the thickness of the thumb; the default is 6.
	Thickness foundation.Opt[float64]
	// ThumbColor is the color of the thumb; the default is 0x66BCBCBC.
	ThumbColor foundation.Opt[ui.Color]
	// MinThumbLength is the shortest the thumb gets; the default is 18.
	MinThumbLength foundation.Opt[float64]
	// MinOverscrollLength is the shortest the thumb gets while it overscrolls;
	// the default is MinThumbLength.
	MinOverscrollLength foundation.Opt[float64]
	// TrackVisibility makes the track visible when true and the thumb is.
	TrackVisibility foundation.Opt[bool]
	// TrackRadius is the corner radius of the track.
	TrackRadius foundation.Opt[ui.Radius]
	// TrackColor is the color of the track; the default is 0x08000000.
	TrackColor foundation.Opt[ui.Color]
	// TrackBorderColor is the color of the border of the track; the default is
	// 0x1A000000.
	TrackBorderColor foundation.Opt[ui.Color]
	// FadeDuration is the duration of the fade of the scrollbar; the default is
	// 300 ms.
	FadeDuration foundation.Opt[time.Duration]
	// TimeToFade is the time after scrolling before the scrollbar fades; the
	// default is 600 ms.
	TimeToFade foundation.Opt[time.Duration]
	// PressDuration is how long the thumb must be pressed to start the drag; the
	// default is zero.
	PressDuration time.Duration
	// NotificationPredicate decides which scroll notifications the scrollbar
	// handles; the default is DefaultScrollNotificationPredicate.
	NotificationPredicate ScrollNotificationPredicate
	// Interactive is whether the scrollbar responds to the pointer; the default
	// is true.
	Interactive foundation.Opt[bool]
	// ScrollbarOrientation is the side of the scrollable the scrollbar sits on.
	ScrollbarOrientation ScrollbarOrientation
	// MainAxisMargin is the margin at the ends of the track.
	MainAxisMargin float64
	// CrossAxisMargin is the margin between the thumb and the edge.
	CrossAxisMargin float64
	// Padding is the padding around the scrollbar; the MediaQuery's padding by
	// default.
	Padding painting.EdgeInsetsGeometry
	// Subclass makes what a subclass of RawScrollbarState overrides (the Material
	// scrollbar is one). The function gets the base state, which the subclass
	// keeps to call the methods that Flutter's super calls. Go has no
	// inheritance, so the base calls the subclass where Flutter's dispatch is
	// virtual.
	Subclass func(base *RawScrollbarState) RawScrollbarSubclass
}

RawScrollbarOpts are the optional parameters of NewRawScrollbar.

Flutter: widgets/scrollbar.dart RawScrollbar.new

type RawScrollbarState

type RawScrollbarState struct {
	StateOf[*RawScrollbar]
	TickerProvider
	// contains filtered or unexported fields
}

RawScrollbarState is the state of a RawScrollbar.

Flutter: widgets/scrollbar.dart RawScrollbarState

func (*RawScrollbarState) BeforeDidChangeDependencies

func (s *RawScrollbarState) BeforeDidChangeDependencies()

BeforeDidChangeDependencies is part of RawScrollbarSubclass for the state itself, which runs nothing before its own.

Flutter: widgets/scrollbar.dart RawScrollbarState.didChangeDependencies

func (*RawScrollbarState) BeforeDispose

func (s *RawScrollbarState) BeforeDispose()

BeforeDispose is part of RawScrollbarSubclass for the state itself, which runs nothing before its own.

Flutter: widgets/scrollbar.dart RawScrollbarState.dispose

func (*RawScrollbarState) Build

func (s *RawScrollbarState) Build(bc BuildContext) Widget

Build updates the painter and builds the notification listeners, the gesture detector, the mouse region and the painted child.

Flutter: widgets/scrollbar.dart RawScrollbarState.build

func (*RawScrollbarState) DidChangeDependencies

func (s *RawScrollbarState) DidChangeDependencies()

DidChangeDependencies checks, after the frame, that the controller has a position when the thumb is always visible.

Flutter: widgets/scrollbar.dart RawScrollbarState.didChangeDependencies

func (*RawScrollbarState) DidUpdateWidget

func (s *RawScrollbarState) DidUpdateWidget(oldWidget *RawScrollbar)

DidUpdateWidget starts or reverses the fade when the visibility of the thumb changed.

Flutter: widgets/scrollbar.dart RawScrollbarState.didUpdateWidget

func (*RawScrollbarState) DisableAnimations

func (h *RawScrollbarState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*RawScrollbarState) Dispose

func (s *RawScrollbarState) Dispose()

Dispose disposes the fade, the timer and the painter.

Flutter: widgets/scrollbar.dart RawScrollbarState.dispose

func (*RawScrollbarState) EnableGestures

func (s *RawScrollbarState) EnableGestures() bool

EnableGestures is whether the scrollbar responds to the pointer.

Flutter: widgets/scrollbar.dart RawScrollbarState.enableGestures

func (*RawScrollbarState) ErrorReporter

func (h *RawScrollbarState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*RawScrollbarState) GetScrollbarDirection

func (s *RawScrollbarState) GetScrollbarDirection() foundation.Opt[painting.Axis]

GetScrollbarDirection is the axis of the scrollable the scrollbar listens to; none until the first scroll metrics notification.

Flutter: widgets/scrollbar.dart RawScrollbarState.getScrollbarDirection

func (*RawScrollbarState) HandleHover

func (s *RawScrollbarState) HandleHover(event *gestures.PointerHoverEvent)

HandleHover is called when a mouse moves over the scrollbar's box: it shows the scrollbar while the mouse is over it.

Flutter: widgets/scrollbar.dart RawScrollbarState.handleHover

func (*RawScrollbarState) HandleHoverExit

func (s *RawScrollbarState) HandleHoverExit(*gestures.PointerExitEvent)

HandleHoverExit is called when the mouse leaves the scrollbar's box.

Flutter: widgets/scrollbar.dart RawScrollbarState.handleHoverExit

func (*RawScrollbarState) HandleThumbPress

func (s *RawScrollbarState) HandleThumbPress()

HandleThumbPress is called when a pointer touches the thumb: it holds the scrollable.

Flutter: widgets/scrollbar.dart RawScrollbarState.handleThumbPress

func (*RawScrollbarState) HandleThumbPressEnd

func (s *RawScrollbarState) HandleThumbPressEnd(localPosition ui.Offset, velocity gestures.Velocity)

HandleThumbPressEnd is called when the thumb stops being dragged: it ends the drag of the position, with the velocity of the drag on mobile platforms.

Flutter: widgets/scrollbar.dart RawScrollbarState.handleThumbPressEnd

func (*RawScrollbarState) HandleThumbPressStart

func (s *RawScrollbarState) HandleThumbPressStart(localPosition ui.Offset)

HandleThumbPressStart is called when the thumb starts to be dragged: it starts a drag of the position.

Flutter: widgets/scrollbar.dart RawScrollbarState.handleThumbPressStart

func (*RawScrollbarState) HandleThumbPressUpdate

func (s *RawScrollbarState) HandleThumbPressUpdate(localPosition ui.Offset)

HandleThumbPressUpdate is called when the thumb is dragged: it updates the drag of the position.

Flutter: widgets/scrollbar.dart RawScrollbarState.handleThumbPressUpdate

func (*RawScrollbarState) HandleTrackTapDown

func (s *RawScrollbarState) HandleTrackTapDown(details gestures.TapDownDetails)

HandleTrackTapDown is called when the track is tapped: it scrolls a page toward the tap.

Flutter: widgets/scrollbar.dart RawScrollbarState.handleTrackTapDown

func (*RawScrollbarState) InitState

func (s *RawScrollbarState) InitState()

InitState creates the animation of the fade and the painter.

Flutter: widgets/scrollbar.dart RawScrollbarState.initState

func (*RawScrollbarState) IsPointerOverScrollbar

func (s *RawScrollbarState) IsPointerOverScrollbar(position ui.Offset, kind ui.PointerDeviceKind) bool

IsPointerOverScrollbar is whether the global position is over the scrollbar; forHover accepts a transparent scrollbar for a mouse.

Flutter: widgets/scrollbar.dart RawScrollbarState.isPointerOverScrollbar

func (*RawScrollbarState) IsPointerOverThumb

func (s *RawScrollbarState) IsPointerOverThumb(position ui.Offset, kind ui.PointerDeviceKind) bool

IsPointerOverThumb is whether the global position is over the thumb.

Flutter: widgets/scrollbar.dart RawScrollbarState.isPointerOverThumb

func (*RawScrollbarState) IsPointerOverTrack

func (s *RawScrollbarState) IsPointerOverTrack(position ui.Offset, kind ui.PointerDeviceKind) bool

IsPointerOverTrack is whether the global position is over the track but not the thumb.

Flutter: widgets/scrollbar.dart RawScrollbarState.isPointerOverTrack

func (*RawScrollbarState) ScrollbarPainter

func (s *RawScrollbarState) ScrollbarPainter() *ScrollbarPainter

ScrollbarPainter is the painter of the scrollbar.

Flutter: widgets/scrollbar.dart RawScrollbarState.scrollbarPainter

func (*RawScrollbarState) ShowScrollbar

func (s *RawScrollbarState) ShowScrollbar() bool

ShowScrollbar is whether the thumb is always visible.

Flutter: widgets/scrollbar.dart RawScrollbarState.showScrollbar

func (*RawScrollbarState) UpdateScrollbarPainter

func (s *RawScrollbarState) UpdateScrollbarPainter()

UpdateScrollbarPainter copies the options of the widget and the text direction and the padding of the context to the painter.

Flutter: widgets/scrollbar.dart RawScrollbarState.updateScrollbarPainter

type RawScrollbarSubclass

type RawScrollbarSubclass interface {
	// ShowScrollbar overrides RawScrollbarState.ShowScrollbar.
	ShowScrollbar() bool
	// EnableGestures overrides RawScrollbarState.EnableGestures.
	EnableGestures() bool
	// UpdateScrollbarPainter overrides RawScrollbarState.UpdateScrollbarPainter.
	UpdateScrollbarPainter()
	// HandleThumbPress overrides RawScrollbarState.HandleThumbPress.
	HandleThumbPress()
	// HandleThumbPressStart overrides RawScrollbarState.HandleThumbPressStart.
	HandleThumbPressStart(localPosition ui.Offset)
	// HandleThumbPressEnd overrides RawScrollbarState.HandleThumbPressEnd.
	HandleThumbPressEnd(localPosition ui.Offset, velocity gestures.Velocity)
	// HandleTrackTapDown overrides RawScrollbarState.HandleTrackTapDown.
	HandleTrackTapDown(details gestures.TapDownDetails)
	// HandleHover overrides RawScrollbarState.HandleHover.
	HandleHover(event *gestures.PointerHoverEvent)
	// HandleHoverExit overrides RawScrollbarState.HandleHoverExit.
	HandleHoverExit(event *gestures.PointerExitEvent)
	// InitState runs after the initState of RawScrollbarState.
	InitState()
	// BeforeDidChangeDependencies runs before the didChangeDependencies of
	// RawScrollbarState, which a subclass calls last.
	BeforeDidChangeDependencies()
	// BeforeDispose runs before the dispose of RawScrollbarState, which a
	// subclass calls last.
	BeforeDispose()
}

RawScrollbarSubclass is what a subclass of RawScrollbarState overrides: the methods that RawScrollbarState calls on itself with a virtual dispatch in Flutter, and the lifecycle of the state.

Flutter: widgets/scrollbar.dart RawScrollbarState

type RawTooltip

type RawTooltip struct {
	StatefulWidget
	// contains filtered or unexported fields
}

RawTooltip is a widget that shows a tooltip component when a gesture triggers it, or a mouse hovers the child, and that has no style of its own.

Deviation: the announcement of the tooltip to the semantics service is not ported (SPEC §12.10).

Flutter: widgets/raw_tooltip.dart RawTooltip

func NewRawTooltip

func NewRawTooltip(semanticsTooltip foundation.Opt[string], tooltipBuilder TooltipComponentBuilder, child Widget, opts ...RawTooltipOpts) *RawTooltip

NewRawTooltip creates the tooltip. The semanticsTooltip is the text for accessibility; when it is the empty string, the tooltip is not created.

Flutter: widgets/raw_tooltip.dart RawTooltip.new

func (*RawTooltip) CreateState

func (w *RawTooltip) CreateState() State

CreateState creates the state.

Flutter: widgets/raw_tooltip.dart RawTooltip.createState

type RawTooltipController

type RawTooltipController struct {
	// contains filtered or unexported fields
}

RawTooltipController shows and hides a RawTooltip from code. Give it in RawTooltipOpts.Controller; it works on the tooltip it is attached to, and does nothing when none is.

Deviation: Flutter's apps reach RawTooltipState through a GlobalKey (SPEC §12.10).

Flutter: no counterpart

func NewRawTooltipController

func NewRawTooltipController() *RawTooltipController

NewRawTooltipController creates a controller that is attached to no tooltip yet.

Flutter: no counterpart

func (*RawTooltipController) Hide

func (c *RawTooltipController) Hide()

Hide hides the tooltip at once. It does nothing when no tooltip is attached.

Flutter: no counterpart

func (*RawTooltipController) IsShowing

func (c *RawTooltipController) IsShowing() bool

IsShowing is whether the tooltip shows or is animating in. It is false when no tooltip is attached.

Flutter: no counterpart

func (*RawTooltipController) Show

func (c *RawTooltipController) Show()

Show shows the tooltip at once, without the hover delay, and keeps it until it is hidden. It does nothing when no tooltip is attached.

Flutter: widgets/raw_tooltip.dart RawTooltipState.ensureTooltipVisible

type RawTooltipOpts

type RawTooltipOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// HoverDelay is the delay before the tooltip shows when a mouse hovers the
	// child; the default is zero.
	HoverDelay time.Duration
	// TouchDelay is how long the tooltip stays after a touch trigger; the
	// default is 1.5 seconds.
	TouchDelay foundation.Opt[time.Duration]
	// DismissDelay is the delay before the tooltip is dismissed when a mouse
	// leaves; the default is 100 milliseconds.
	DismissDelay foundation.Opt[time.Duration]
	// DisableTapToDismiss stops a tap elsewhere from dismissing the tooltip
	// (Flutter's enableTapToDismiss is true by default).
	DisableTapToDismiss bool
	// TriggerMode is the gesture that triggers the tooltip; the default is long press.
	TriggerMode TooltipTriggerMode
	// DisableFeedback turns the feedback of the trigger off (Flutter's
	// enableFeedback is true by default).
	DisableFeedback bool
	// OnTriggered is called when the tooltip is triggered by a gesture.
	OnTriggered foundation.VoidCallback
	// AnimationStyle overrides the curve and the durations of the animation of
	// the tooltip.
	AnimationStyle animation.AnimationStyle
	// PositionDelegate gives the position of the tooltip; the default puts it
	// below the target, or above if it doesn't fit.
	PositionDelegate TooltipPositionDelegate
	// IgnorePointer makes the tooltip ignore pointer events.
	IgnorePointer bool
	// HoverDelayFunc, when set, gives the hover delay each time a mouse enters the
	// child, instead of HoverDelay: an app can show a tooltip at once when another one
	// was hidden a moment ago.
	//
	// Deviation: Flutter reads the hover delay once, when the widget is built (SPEC
	// §12.10).
	HoverDelayFunc func() time.Duration
	// OnShown is called when the tooltip starts to show: its animation leaves the
	// dismissed state.
	//
	// Deviation: Flutter has no such callback (SPEC §12.10).
	OnShown foundation.VoidCallback
	// OnHidden is called when the tooltip is dismissed, whatever hid it: the mouse
	// leaving, a tap, RawTooltipDismissAll, the controller, a key (DismissOnKey), or
	// the widget leaving the tree while it showed.
	//
	// Deviation: Flutter has no such callback (SPEC §12.10).
	OnHidden foundation.VoidCallback
	// Controller shows and hides the tooltip from code; it works on the state of the
	// widget it is given to.
	//
	// Deviation: Flutter reaches the state through a GlobalKey (SPEC §12.10).
	Controller *RawTooltipController
	// DismissOnKey hides the tooltip when a key goes down while it shows, as Flutter's
	// Tooltip does for the escape key on the desktop. The key event is not handled: it
	// goes on to the widgets as if the tooltip were not there.
	//
	// Deviation: Flutter's Tooltip reacts to the escape key only (SPEC §12.10).
	DismissOnKey bool
}

RawTooltipOpts are the optional parameters of NewRawTooltip.

Flutter: widgets/raw_tooltip.dart RawTooltip.new

type RawTooltipState

type RawTooltipState struct {
	StateOf[*RawTooltip]
	SingleTickerProvider
	// contains filtered or unexported fields
}

RawTooltipState is the state of a RawTooltip.

Flutter: widgets/raw_tooltip.dart RawTooltipState

func (*RawTooltipState) Build

Build builds the child with the listeners and the overlay portal of the tooltip.

Flutter: widgets/raw_tooltip.dart RawTooltipState.build

func (*RawTooltipState) DidUpdateWidget

func (s *RawTooltipState) DidUpdateWidget(*RawTooltip)

DidUpdateWidget attaches the new controller and follows DismissOnKey.

Flutter: widgets/raw_tooltip.dart RawTooltipState.didUpdateWidget

func (*RawTooltipState) DisableAnimations

func (h *RawTooltipState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*RawTooltipState) Dispose

func (s *RawTooltipState) Dispose()

Dispose releases the recognizers, the timer and the animation.

Flutter: widgets/raw_tooltip.dart RawTooltipState.dispose

func (*RawTooltipState) EnsureTooltipVisible

func (s *RawTooltipState) EnsureTooltipVisible() bool

EnsureTooltipVisible shows the tooltip if it is not already visible, and says whether it did.

Flutter: widgets/raw_tooltip.dart RawTooltipState.ensureTooltipVisible

func (*RawTooltipState) ErrorReporter

func (h *RawTooltipState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*RawTooltipState) InitState

func (s *RawTooltipState) InitState()

InitState listens to the global pointer events, so that a tooltip is hidden immediately if some other control is clicked on. Pointer events are dispatched to global routes after other routes.

Flutter: widgets/raw_tooltip.dart RawTooltipState.initState

type RawView

type RawView struct {
	StatelessWidget
	// contains filtered or unexported fields
}

RawView is a View without the MediaQuery and the focus scope: the bridge between the widget tree and a view, nothing else. It creates the render view of the view and owns the pipeline owner of its render tree.

Flutter: widgets/view.dart RawView

func NewRawView

func NewRawView(view *ui.View, child Widget, opts ...ViewOpts) *RawView

NewRawView creates a RawView that shows the child in the view.

Flutter: widgets/view.dart RawView.new

func (*RawView) Build

func (w *RawView) Build(BuildContext) Widget

Build makes the internal widget that owns the render view.

Flutter: widgets/view.dart RawView.build

type ReadingOrderTraversalPolicy

type ReadingOrderTraversalPolicy struct {
	FocusTraversalPolicyBase
}

ReadingOrderTraversalPolicy traverses the nodes top to bottom in rows, then in the reading direction of each row (left to right for ltr), treating the nodes whose rects overlap vertically as one row.

Flutter: widgets/focus_traversal.dart ReadingOrderTraversalPolicy

func NewReadingOrderTraversalPolicy

func NewReadingOrderTraversalPolicy(opts ...FocusTraversalPolicyOpts) *ReadingOrderTraversalPolicy

NewReadingOrderTraversalPolicy creates the policy.

Flutter: widgets/focus_traversal.dart ReadingOrderTraversalPolicy.new

func (*ReadingOrderTraversalPolicy) SortDescendants

func (p *ReadingOrderTraversalPolicy) SortDescendants(descendants []*FocusNode, _ *FocusNode) []*FocusNode

SortDescendants sorts the nodes into reading order.

Flutter: widgets/focus_traversal.dart ReadingOrderTraversalPolicy.sortDescendants

type RebuildOpts

type RebuildOpts struct {
	// Force rebuilds the element even when it is not dirty.
	Force bool
}

RebuildOpts are the optional parameters of Element.Rebuild.

Flutter: widgets/framework.dart Element.rebuild

type RedoTextIntent

type RedoTextIntent struct {
	IntentBase
	// Cause is what caused the selection to change.
	//
	// Flutter: widgets/text_editing_intents.dart RedoTextIntent.cause
	Cause services.SelectionChangedCause
}

RedoTextIntent is an intent that redoes the last undone change.

Flutter: widgets/text_editing_intents.dart RedoTextIntent

type RegularWindow

type RegularWindow struct {
	StatelessWidget
	// contains filtered or unexported fields
}

RegularWindow shows its child in the regular window of a controller. When the widget leaves the tree the window stays, until the controller destroys it. Descendants reach the controller with WindowScopeOf.

Flutter: widgets/_window.dart RegularWindow

func NewRegularWindow

func NewRegularWindow(controller *RegularWindowController, child Widget, opts ...RegularWindowOpts) *RegularWindow

NewRegularWindow creates the widget that shows the child in the window of the controller.

Flutter: widgets/_window.dart RegularWindow.new

func (*RegularWindow) Build

func (w *RegularWindow) Build(BuildContext) Widget

Build shows the child in the view of the window.

Flutter: widgets/_window.dart RegularWindow.build

func (*RegularWindow) Child

func (w *RegularWindow) Child() Widget

Child is the content of the window.

Flutter: widgets/_window.dart RegularWindow.child

func (*RegularWindow) Controller

func (w *RegularWindow) Controller() *RegularWindowController

Controller is the controller of the window.

Flutter: widgets/_window.dart RegularWindow.controller

type RegularWindowController

type RegularWindowController struct {
	// contains filtered or unexported fields
}

RegularWindowController is the controller of a regular window: a traditional top-level window that can be resized, minimized, maximized and closed. The window is created when the controller is; the controller does not touch the widget tree, a RegularWindow widget shows the content in the window. The user of the controller destroys the window with Destroy when it is no longer needed. Descendants of the RegularWindow reach the controller with WindowScopeOf.

Deviation: Flutter's is an abstract class with a platform implementation behind a factory; this is the one implementation, made by the WindowingOwner. The windows that size themselves to their content (sizedToContent) are not ported (SPEC §12.10).

Flutter: widgets/_window.dart RegularWindowController

func NewRegularWindowController

func NewRegularWindowController(bc BuildContext, size ui.Size, opts ...RegularWindowControllerOpts) (*RegularWindowController, error)

NewRegularWindowController creates a regular window of the size, in logical pixels, and the controller of it. The window belongs to the windowing owner of the binding that the context reaches. It fails with WindowingUnsupported when the platform cannot make windows, and with the platform's error when it cannot make this one. It panics with the tag WindowSizeViolatesConstraints when the size does not satisfy the constraints.

Flutter: widgets/_window.dart RegularWindowController.new

func (*RegularWindowController) Activate

func (c *RegularWindowController) Activate()

Activate asks for the window to be shown at its size and position, out of the minimized state, and to get the focus. The platform decides whether it gets the focus and the top of the stack of windows. A hidden window is shown first.

Flutter: widgets/_window.dart RegularWindowController.activate

func (*RegularWindowController) ContentSize

func (c *RegularWindowController) ContentSize() ui.Size

ContentSize is the size of the content of the window in logical pixels.

Flutter: widgets/_window.dart BaseWindowController.contentSize

func (*RegularWindowController) Destroy

func (c *RegularWindowController) Destroy()

Destroy destroys the window and tells the delegate. It does nothing when the window is destroyed already.

Flutter: widgets/_window.dart BaseWindowController.destroy

func (*RegularWindowController) IsActivated

func (c *RegularWindowController) IsActivated() bool

IsActivated is whether the window is focused and can receive user input.

Flutter: widgets/_window.dart RegularWindowController.isActivated

func (*RegularWindowController) IsFullscreen

func (c *RegularWindowController) IsFullscreen() bool

IsFullscreen is whether the window is fullscreen.

Flutter: widgets/_window.dart RegularWindowController.isFullscreen

func (*RegularWindowController) IsHidden

func (c *RegularWindowController) IsHidden() bool

IsHidden is whether the app took the window off the screen with SetHidden. It is what the app asked for: the platform does not hide a window by itself.

Flutter: no counterpart

func (*RegularWindowController) IsMaximized

func (c *RegularWindowController) IsMaximized() bool

IsMaximized is whether the window is maximized.

Flutter: widgets/_window.dart RegularWindowController.isMaximized

func (*RegularWindowController) IsMinimized

func (c *RegularWindowController) IsMinimized() bool

IsMinimized is whether the window is minimized. Where the platform says so (X11) it is what the window manager did; otherwise (Wayland, whose xdg-shell does not say) it is what the controller last asked for, until the window is activated.

Flutter: widgets/_window.dart RegularWindowController.isMinimized

func (*RegularWindowController) RootView

func (c *RegularWindowController) RootView() *ui.View

RootView is the view of the window.

Flutter: widgets/_window.dart BaseWindowController.rootView

func (*RegularWindowController) SetConstraints

func (c *RegularWindowController) SetConstraints(constraints rendering.BoxConstraints)

SetConstraints asks for new limits on the size of the window. The platform may resize the window to satisfy them, or ignore them.

Flutter: widgets/_window.dart RegularWindowController.setConstraints

func (*RegularWindowController) SetContentType

func (c *RegularWindowController) SetContentType(contentType ui.ContentType)

SetContentType tells the compositor what the window shows (a game, a video or pictures), so that it can pick the refresh rate and the latency that suit it.

Flutter: no counterpart

func (*RegularWindowController) SetFullscreen

func (c *RegularWindowController) SetFullscreen(fullscreen bool)

SetFullscreen asks for the window to be fullscreen, or to go back to the state it had. The platform may refuse either.

Deviation: Flutter's takes the display to go fullscreen on; the compositor chooses here (SPEC §12.10).

Flutter: widgets/_window.dart RegularWindowController.setFullscreen

func (*RegularWindowController) SetHidden

func (c *RegularWindowController) SetHidden(hidden bool)

SetHidden takes the window off the screen (true): it has no surface on the screen, no entry in the task bar, and gets no input and no focus. With false the window comes back with the size, title, icon and state it had, and asks for the focus. The widgets of the window and their state stay as they are: only the platform window is hidden. A hidden window still counts as open, so RunApp goes on while it exists; when every window of the app is hidden the app lifecycle state is AppLifecycleStateHidden, and frames and tickers stop until a window is shown. Activate shows a hidden window too. A platform that cannot hide a window (the web) ignores it.

Deviation: Flutter's window controllers cannot hide a window; this is what a desktop app that lives in the system tray needs (SPEC §8.7, §12.10).

Flutter: no counterpart

func (*RegularWindowController) SetIcon

func (c *RegularWindowController) SetIcon(icon ui.WindowIcon) error

SetIcon sets the icon of the window; an empty icon removes it. It fails with WindowIconInvalid when a picture of the icon is wrong, and with the platform's error when it cannot use the icon. A platform that has no window icons ignores it.

Flutter: no counterpart

func (*RegularWindowController) SetMaximized

func (c *RegularWindowController) SetMaximized(maximized bool)

SetMaximized asks for the window to be maximized, or restored. It has no effect on a window that is fullscreen or minimized.

Flutter: widgets/_window.dart RegularWindowController.setMaximized

func (*RegularWindowController) SetMinimized

func (c *RegularWindowController) SetMinimized(minimized bool)

SetMinimized asks for the window to be minimized, or, with false, shown again.

Flutter: widgets/_window.dart RegularWindowController.setMinimized

func (*RegularWindowController) SetSize

func (c *RegularWindowController) SetSize(size ui.Size)

SetSize asks for a new content size of the window, in logical pixels. The platform may clamp it to the constraints of the window, or ignore it.

Flutter: widgets/_window.dart RegularWindowController.setSize

func (*RegularWindowController) SetTitle

func (c *RegularWindowController) SetTitle(title string)

SetTitle asks for a new title of the window.

Flutter: widgets/_window.dart RegularWindowController.setTitle

func (*RegularWindowController) Title

func (c *RegularWindowController) Title() string

Title is the title of the window. The platform decides what is shown; this is the title that was asked for, or the one the platform reported.

Flutter: widgets/_window.dart RegularWindowController.title

type RegularWindowControllerDelegate

type RegularWindowControllerDelegate interface {
	// OnWindowCloseRequested is called when the user asks to close the window. The
	// default destroys the window; an override can delay or prevent that.
	//
	// Flutter: widgets/_window.dart RegularWindowControllerDelegate.onWindowCloseRequested
	OnWindowCloseRequested(controller *RegularWindowController)
	// OnWindowDestroyed is called after the window is closed.
	//
	// Flutter: widgets/_window.dart RegularWindowControllerDelegate.onWindowDestroyed
	OnWindowDestroyed()
}

RegularWindowControllerDelegate listens to the life of a regular window. Embed RegularWindowControllerDelegateBase and override what you need.

Flutter: widgets/_window.dart RegularWindowControllerDelegate

type RegularWindowControllerDelegateBase

type RegularWindowControllerDelegateBase struct{}

RegularWindowControllerDelegateBase is a RegularWindowControllerDelegate that destroys the window on a request to close it and does nothing when it is gone.

Flutter: widgets/_window.dart RegularWindowControllerDelegate

func (RegularWindowControllerDelegateBase) OnWindowCloseRequested

func (RegularWindowControllerDelegateBase) OnWindowCloseRequested(controller *RegularWindowController)

OnWindowCloseRequested destroys the window.

Flutter: widgets/_window.dart RegularWindowControllerDelegate.onWindowCloseRequested

func (RegularWindowControllerDelegateBase) OnWindowDestroyed

func (RegularWindowControllerDelegateBase) OnWindowDestroyed()

OnWindowDestroyed does nothing.

Flutter: widgets/_window.dart RegularWindowControllerDelegate.onWindowDestroyed

type RegularWindowControllerOpts

type RegularWindowControllerOpts struct {
	// Constraints are the smallest and largest size of the window. The size must
	// satisfy them. The platform enforces them in its own way and may not honor
	// them. The default is no limit.
	Constraints foundation.Opt[rendering.BoxConstraints]
	// Title is the title of the window; some platforms use the name of the app when
	// it is empty.
	Title string
	// Delegate listens to the life of the window; the default destroys the window
	// when the user closes it.
	Delegate RegularWindowControllerDelegate
	// Decorations is how the title bar is made; the default is DecorationsAuto.
	Decorations Decorations
	// Icon is the icon of the window; the default is none, and the desktop takes
	// the icon of the app.
	Icon ui.WindowIcon
	// ContentType is the hint about what the window shows.
	ContentType ui.ContentType
	// State is the state the window is created in: the platform creates it
	// maximized, minimized or fullscreen, so it never shows at its size first. The
	// zero value is a normal window. No position can be asked for (Wayland gives
	// clients none).
	//
	// Flutter: no counterpart
	State WindowState
}

RegularWindowControllerOpts are the optional parameters of NewRegularWindowController.

Flutter: widgets/_window.dart RegularWindowController.new

type RegularWindowOpts

type RegularWindowOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

RegularWindowOpts are the optional parameters of NewRegularWindow.

Flutter: widgets/_window.dart RegularWindow.new

type RelativePositionedTransition

type RelativePositionedTransition struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

RelativePositionedTransition animates the position of a widget relative to a rectangle of the given size, in a Stack.

Flutter: widgets/transitions.dart RelativePositionedTransition

func NewRelativePositionedTransition

func NewRelativePositionedTransition(rect animation.Animation[foundation.Opt[ui.Rect]], size ui.Size, child Widget, opts ...WidgetOpts) *RelativePositionedTransition

NewRelativePositionedTransition creates the widget; the rectangle is relative to the given size, and none counts as the zero rectangle.

Flutter: widgets/transitions.dart RelativePositionedTransition.new

func (*RelativePositionedTransition) Build

Build positions the child by the current rectangle.

Flutter: widgets/transitions.dart RelativePositionedTransition.build

func (*RelativePositionedTransition) Child

Child is the widget below this one.

Flutter: widgets/transitions.dart RelativePositionedTransition.child

func (*RelativePositionedTransition) Rect

Rect is the animation of the rectangle.

Flutter: widgets/transitions.dart RelativePositionedTransition.rect

func (*RelativePositionedTransition) Size

Size is the size the rectangle is relative to.

Flutter: widgets/transitions.dart RelativePositionedTransition.size

type RemoveSides

type RemoveSides struct {
	// Left removes the left side.
	Left bool
	// Top removes the top side.
	Top bool
	// Right removes the right side.
	Right bool
	// Bottom removes the bottom side.
	Bottom bool
}

RemoveSides says which sides of the insets a Remove method removes.

Flutter: widgets/media_query.dart MediaQueryData.removePadding

type RenderNestedScrollViewViewport

type RenderNestedScrollViewViewport struct {
	rendering.RenderViewport
	// contains filtered or unexported fields
}

RenderNestedScrollViewViewport is the render object of a NestedScrollViewViewport.

Flutter: widgets/nested_scroll_view.dart RenderNestedScrollViewViewport

func (*RenderNestedScrollViewViewport) Handle

Handle talks to the sliver overlap absorber.

Flutter: widgets/nested_scroll_view.dart RenderNestedScrollViewViewport.handle

func (*RenderNestedScrollViewViewport) MarkNeedsLayout

func (r *RenderNestedScrollViewViewport) MarkNeedsLayout()

MarkNeedsLayout tells the handle, then marks the viewport.

func (*RenderNestedScrollViewViewport) SetHandle

SetHandle changes the handle.

Flutter: widgets/nested_scroll_view.dart RenderNestedScrollViewViewport.handle

type RenderObjectElement

type RenderObjectElement struct {
	ElementBase
	// contains filtered or unexported fields
}

RenderObjectElement is the element of a RenderObjectWidget. It creates the render object and keeps it in sync with the widget, and it puts the render objects of its descendants into its own.

Flutter: widgets/framework.dart RenderObjectElement

func (*RenderObjectElement) AttachRenderObject

func (e *RenderObjectElement) AttachRenderObject(newSlot any)

AttachRenderObject inserts the render object into the closest ancestor that has one and applies the parent data of the widgets in between. In debug builds an element without such an ancestor reports the error RenderObjectAncestorMissing.

Flutter: widgets/framework.dart RenderObjectElement.attachRenderObject

func (*RenderObjectElement) DebugDoingBuild

func (e *RenderObjectElement) DebugDoingBuild() bool

DebugDoingBuild is whether the element is creating or updating its render object.

Flutter: widgets/framework.dart RenderObjectElement.debugDoingBuild

func (*RenderObjectElement) DebugFillProperties

func (e *RenderObjectElement) DebugFillProperties(properties *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the render object.

Flutter: widgets/framework.dart RenderObjectElement.debugFillProperties

func (*RenderObjectElement) DetachRenderObject

func (e *RenderObjectElement) DetachRenderObject()

DetachRenderObject takes the render object out of the ancestor's.

Flutter: widgets/framework.dart RenderObjectElement.detachRenderObject

func (*RenderObjectElement) Mount

func (e *RenderObjectElement) Mount(parent Element, newSlot any)

Mount creates the render object and attaches it to the render tree.

Flutter: widgets/framework.dart RenderObjectElement.mount

func (*RenderObjectElement) PerformRebuild

func (e *RenderObjectElement) PerformRebuild()

PerformRebuild updates the render object from the widget.

Flutter: widgets/framework.dart RenderObjectElement.performRebuild

func (*RenderObjectElement) RenderObjectAttachingChild

func (e *RenderObjectElement) RenderObjectAttachingChild() Element

RenderObjectAttachingChild is nil: a render object element holds the render objects of its subtree itself.

Flutter: widgets/framework.dart RenderObjectElement.renderObjectAttachingChild

func (*RenderObjectElement) Unmount

func (e *RenderObjectElement) Unmount()

Unmount tells the widget, then disposes the render object.

Flutter: widgets/framework.dart RenderObjectElement.unmount

func (*RenderObjectElement) Update

func (e *RenderObjectElement) Update(newWidget Widget)

Update replaces the widget and updates the render object from it.

Flutter: widgets/framework.dart RenderObjectElement.update

func (*RenderObjectElement) UpdateSlot

func (e *RenderObjectElement) UpdateSlot(newSlot any)

UpdateSlot moves the render object to the new slot of the ancestor's render object.

Flutter: widgets/framework.dart RenderObjectElement.updateSlot

type RenderObjectElementSelf

type RenderObjectElementSelf interface {
	Element
	// InsertRenderObjectChild puts the render object of a child into this
	// element's render object, in the slot.
	//
	// Flutter: widgets/framework.dart RenderObjectElement.insertRenderObjectChild
	InsertRenderObjectChild(child rendering.RenderObject, slot any)
	// MoveRenderObjectChild moves the render object of a child to another slot.
	//
	// Flutter: widgets/framework.dart RenderObjectElement.moveRenderObjectChild
	MoveRenderObjectChild(child rendering.RenderObject, oldSlot, newSlot any)
	// RemoveRenderObjectChild takes the render object of a child out of this
	// element's render object.
	//
	// Flutter: widgets/framework.dart RenderObjectElement.removeRenderObjectChild
	RemoveRenderObjectChild(child rendering.RenderObject, slot any)
	// contains filtered or unexported methods
}

RenderObjectElementSelf is what a render object element needs from the outer type: where to put the children's render objects.

Flutter: no counterpart

type RenderObjectWidget

type RenderObjectWidget struct{ WidgetBase }

RenderObjectWidget is the base of the widgets that have a render object. Embed LeafRenderObjectWidget, SingleChildRenderObjectWidget or MultiChildRenderObjectWidget, and implement CreateRenderObject. Optional methods are UpdateRenderObject(bc, renderObject) and DidUnmountRenderObject(renderObject).

Flutter: widgets/framework.dart RenderObjectWidget

func NewRenderObjectWidgetBase

func NewRenderObjectWidgetBase(opts ...WidgetOpts) RenderObjectWidget

NewRenderObjectWidgetBase creates the base of a render object widget.

Flutter: widgets/framework.dart RenderObjectWidget.new

type RenderSliverOverlapAbsorber

type RenderSliverOverlapAbsorber struct {
	rendering.RenderSliver
	rendering.RenderObjectWithChild[rendering.Sliver]
	// contains filtered or unexported fields
}

RenderSliverOverlapAbsorber is the render object of a SliverOverlapAbsorber.

Flutter: widgets/nested_scroll_view.dart RenderSliverOverlapAbsorber

func NewRenderSliverOverlapAbsorber

func NewRenderSliverOverlapAbsorber(handle *SliverOverlapAbsorberHandle, sliver rendering.Sliver) *RenderSliverOverlapAbsorber

NewRenderSliverOverlapAbsorber creates the sliver; the child may be nil.

Flutter: widgets/nested_scroll_view.dart RenderSliverOverlapAbsorber.new

func (*RenderSliverOverlapAbsorber) ApplyPaintTransform

func (r *RenderSliverOverlapAbsorber) ApplyPaintTransform(rendering.RenderObject, *ui.Matrix4)

ApplyPaintTransform does nothing: the child is at the origin.

func (*RenderSliverOverlapAbsorber) Attach

Attach counts this absorber as a writer of the handle.

func (*RenderSliverOverlapAbsorber) ChildMainAxisPosition

func (r *RenderSliverOverlapAbsorber) ChildMainAxisPosition(rendering.RenderObject) float64

ChildMainAxisPosition is zero.

func (*RenderSliverOverlapAbsorber) Detach

func (r *RenderSliverOverlapAbsorber) Detach()

Detach stops counting this absorber as a writer of the handle.

func (*RenderSliverOverlapAbsorber) Handle

Handle is where the absorbed extent goes.

Flutter: widgets/nested_scroll_view.dart RenderSliverOverlapAbsorber.handle

func (*RenderSliverOverlapAbsorber) HitTestChildren

func (r *RenderSliverOverlapAbsorber) HitTestChildren(result *rendering.SliverHitTestResult, mainAxisPosition, crossAxisPosition float64) bool

HitTestChildren hit tests the child.

func (*RenderSliverOverlapAbsorber) Paint

func (r *RenderSliverOverlapAbsorber) Paint(context *rendering.PaintingContext, offset ui.Offset)

Paint paints the child.

func (*RenderSliverOverlapAbsorber) PerformLayout

func (r *RenderSliverOverlapAbsorber) PerformLayout()

PerformLayout lays the child out, takes its obstruction out of its scroll and layout extents, and tells the handle.

func (*RenderSliverOverlapAbsorber) SetHandle

SetHandle changes the handle.

Flutter: widgets/nested_scroll_view.dart RenderSliverOverlapAbsorber.handle

type RenderSliverOverlapInjector

type RenderSliverOverlapInjector struct {
	rendering.RenderSliver
	// contains filtered or unexported fields
}

RenderSliverOverlapInjector is the render object of a SliverOverlapInjector.

Flutter: widgets/nested_scroll_view.dart RenderSliverOverlapInjector

func NewRenderSliverOverlapInjector

func NewRenderSliverOverlapInjector(handle *SliverOverlapAbsorberHandle) *RenderSliverOverlapInjector

NewRenderSliverOverlapInjector creates the sliver.

Flutter: widgets/nested_scroll_view.dart RenderSliverOverlapInjector.new

func (*RenderSliverOverlapInjector) Attach

Attach listens to the handle.

func (*RenderSliverOverlapInjector) Detach

func (r *RenderSliverOverlapInjector) Detach()

Detach stops listening to the handle.

func (*RenderSliverOverlapInjector) Handle

Handle is where the extent comes from.

Flutter: widgets/nested_scroll_view.dart RenderSliverOverlapInjector.handle

func (*RenderSliverOverlapInjector) PerformLayout

func (r *RenderSliverOverlapInjector) PerformLayout()

PerformLayout takes the extent from the handle.

func (*RenderSliverOverlapInjector) SetHandle

SetHandle changes the handle.

Flutter: widgets/nested_scroll_view.dart RenderSliverOverlapInjector.handle

type RenderTapRegion

type RenderTapRegion struct {
	rendering.RenderProxyBoxWithHitTestBehavior

	// DebugLabel names the region in debug output.
	//
	// Flutter: widgets/tap_region.dart RenderTapRegion.debugLabel
	DebugLabel string
	// contains filtered or unexported fields
}

RenderTapRegion is the render object of a TapRegion.

Flutter: widgets/tap_region.dart RenderTapRegion

func (*RenderTapRegion) Dispose

func (r *RenderTapRegion) Dispose()

Dispose unregisters the region.

Flutter: widgets/tap_region.dart RenderTapRegion.dispose

func (*RenderTapRegion) Layout

func (r *RenderTapRegion) Layout(constraints rendering.Constraints, opts ...rendering.LayoutOpts)

Layout lays out as a proxy box and registers the region with the surface when it is enabled.

Flutter: widgets/tap_region.dart RenderTapRegion.layout

func (*RenderTapRegion) SetConsumeOutsideTaps

func (r *RenderTapRegion) SetConsumeOutsideTaps(value bool)

SetConsumeOutsideTaps sets whether the taps outside the region are consumed.

Flutter: widgets/tap_region.dart RenderTapRegion.consumeOutsideTaps

func (*RenderTapRegion) SetEnabled

func (r *RenderTapRegion) SetEnabled(value bool)

SetEnabled turns the region on or off.

Flutter: widgets/tap_region.dart RenderTapRegion.enabled

func (*RenderTapRegion) SetGroupID

func (r *RenderTapRegion) SetGroupID(value any)

SetGroupID sets the group of the region.

Flutter: widgets/tap_region.dart RenderTapRegion.groupId

func (*RenderTapRegion) SetRegistry

func (r *RenderTapRegion) SetRegistry(value TapRegionRegistry)

SetRegistry sets the registry the region registers with.

Flutter: widgets/tap_region.dart RenderTapRegion.registry

type RenderTapRegionSurface

type RenderTapRegionSurface struct {
	rendering.RenderProxyBoxWithHitTestBehavior
	// contains filtered or unexported fields
}

RenderTapRegionSurface is the render object of a TapRegionSurface.

Deviation: it doesn't take the tap and long press actions of the semantics (SPEC §12.10).

Flutter: widgets/tap_region.dart RenderTapRegionSurface

func NewRenderTapRegionSurface

func NewRenderTapRegionSurface(g *gestures.GestureBinding) *RenderTapRegionSurface

NewRenderTapRegionSurface creates the surface; the gesture binding is the one whose arena a consumed tap joins.

Flutter: widgets/tap_region.dart RenderTapRegionSurface.new

func (*RenderTapRegionSurface) HandleEvent

func (r *RenderTapRegionSurface) HandleEvent(event gestures.PointerEvent, entry gestures.HitTestEntry)

HandleEvent tells the regions about a pointer that went down or up.

Flutter: widgets/tap_region.dart RenderTapRegionSurface.handleEvent

func (*RenderTapRegionSurface) HitTest

func (r *RenderTapRegionSurface) HitTest(result *rendering.BoxHitTestResult, position ui.Offset) bool

HitTest hits the children and remembers the result for the entry, so that HandleEvent can tell which regions were hit.

Flutter: widgets/tap_region.dart RenderTapRegionSurface.hitTest

func (*RenderTapRegionSurface) RegisterTapRegion

func (r *RenderTapRegionSurface) RegisterTapRegion(region *RenderTapRegion)

RegisterTapRegion adds a region.

Flutter: widgets/tap_region.dart RenderTapRegionSurface.registerTapRegion

func (*RenderTapRegionSurface) UnregisterTapRegion

func (r *RenderTapRegionSurface) UnregisterTapRegion(region *RenderTapRegion)

UnregisterTapRegion removes a region.

Flutter: widgets/tap_region.dart RenderTapRegionSurface.unregisterTapRegion

type RenderTreeRootElement

type RenderTreeRootElement struct {
	RenderObjectElement
}

RenderTreeRootElement is the element of a render object that is the root of a render tree of its own, such as a view's: it does not attach itself to an ancestor's render object.

Flutter: widgets/framework.dart RenderTreeRootElement

func (*RenderTreeRootElement) AttachRenderObject

func (e *RenderTreeRootElement) AttachRenderObject(newSlot any)

AttachRenderObject only sets the slot.

Flutter: widgets/framework.dart RenderTreeRootElement.attachRenderObject

func (*RenderTreeRootElement) DetachRenderObject

func (e *RenderTreeRootElement) DetachRenderObject()

DetachRenderObject only clears the slot.

Flutter: widgets/framework.dart RenderTreeRootElement.detachRenderObject

func (*RenderTreeRootElement) UpdateSlot

func (e *RenderTreeRootElement) UpdateSlot(newSlot any)

UpdateSlot sets the slot and checks, in debug builds, that there is still no ancestor to attach to.

Flutter: widgets/framework.dart RenderTreeRootElement.updateSlot

type ReorderCallback

type ReorderCallback func(oldIndex, newIndex int)

ReorderCallback is called when an item is dropped at a new place: oldIndex is the index of the item, newIndex the index of the place.

Flutter: widgets/reorderable_list.dart ReorderCallback

type ReorderDragBoundaryProvider

type ReorderDragBoundaryProvider func(bc BuildContext) DragBoundaryDelegate[ui.Rect]

ReorderDragBoundaryProvider gives the boundary that an item that is dragged stays within, or nil for none.

Flutter: widgets/reorderable_list.dart ReorderDragBoundaryProvider

type ReorderItemProxyDecorator

type ReorderItemProxyDecorator func(child Widget, index int, animation animation.Animation[float64]) Widget

ReorderItemProxyDecorator decorates the item that is being dragged. The animation goes from 0 to 1 when the drag starts, and from 1 to 0 when it ends.

Flutter: widgets/reorderable_list.dart ReorderItemProxyDecorator

type ReorderableDelayedDragStartListener

type ReorderableDelayedDragStartListener struct {
	StatelessWidget
	// contains filtered or unexported fields
}

ReorderableDelayedDragStartListener starts the drag of an item of a ReorderableList or SliverReorderableList after a long press.

Flutter: widgets/reorderable_list.dart ReorderableDelayedDragStartListener

func NewReorderableDelayedDragStartListener

func NewReorderableDelayedDragStartListener(index int, child Widget, opts ...ReorderableDragStartListenerOpts) *ReorderableDelayedDragStartListener

NewReorderableDelayedDragStartListener creates a listener for the item at the index.

Flutter: widgets/reorderable_list.dart ReorderableDelayedDragStartListener.new

func (*ReorderableDelayedDragStartListener) Build

Build builds a listener of the pointer down.

type ReorderableDragStartListener

type ReorderableDragStartListener struct {
	StatelessWidget
	// contains filtered or unexported fields
}

ReorderableDragStartListener starts the drag of an item of a ReorderableList or SliverReorderableList as soon as the pointer is down.

Flutter: widgets/reorderable_list.dart ReorderableDragStartListener

func NewReorderableDragStartListener

func NewReorderableDragStartListener(index int, child Widget, opts ...ReorderableDragStartListenerOpts) *ReorderableDragStartListener

NewReorderableDragStartListener creates a listener for the item at the index.

Flutter: widgets/reorderable_list.dart ReorderableDragStartListener.new

func (*ReorderableDragStartListener) Build

Build builds a listener of the pointer down.

type ReorderableDragStartListenerOpts

type ReorderableDragStartListenerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Enabled is whether the drag can start; the default is true.
	Enabled foundation.Opt[bool]
}

ReorderableDragStartListenerOpts are the optional parameters of NewReorderableDragStartListener and NewReorderableDelayedDragStartListener.

Flutter: widgets/reorderable_list.dart ReorderableDragStartListener.new

type ReorderableList

type ReorderableList struct {
	StatefulWidget
	// contains filtered or unexported fields
}

ReorderableList is a scrolling container that allows the user to interactively reorder the list items. The items need keys, and a drag start listener (ReorderableDragStartListener or ReorderableDelayedDragStartListener) in each item starts the drag.

Flutter: widgets/reorderable_list.dart ReorderableList

func NewReorderableList

func NewReorderableList(itemBuilder IndexedWidgetBuilder, itemCount int, opts ...ReorderableListOpts) *ReorderableList

NewReorderableList creates a list of itemCount items that the builder builds. In debug builds it panics when itemCount is negative (ReorderableItemCountNegative), when more than one of the extents is given (ReorderableExtentConflict), or when not exactly one of OnReorder and OnReorderItem is given (ReorderableCallbackInvalid).

Flutter: widgets/reorderable_list.dart ReorderableList.new

func (*ReorderableList) CreateState

func (w *ReorderableList) CreateState() State

CreateState creates the state.

Flutter: widgets/reorderable_list.dart ReorderableList.createState

func (*ReorderableList) ItemCount

func (w *ReorderableList) ItemCount() int

ItemCount is the number of items.

Flutter: widgets/reorderable_list.dart ReorderableList.itemCount

type ReorderableListOpts

type ReorderableListOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OnReorder is called when an item is dropped. Deprecated in Flutter in favor
	// of OnReorderItem; exactly one of the two must be given.
	OnReorder ReorderCallback
	// OnReorderItem is called when an item is dropped; the new index is that of
	// the item after it is removed from the old one.
	OnReorderItem ReorderCallback
	// OnReorderStart is called when the user starts to drag an item.
	OnReorderStart func(index int)
	// OnReorderEnd is called when the user drops the item.
	OnReorderEnd func(index int)
	// ItemExtent is the extent of all the items.
	ItemExtent foundation.Opt[float64]
	// ItemExtentBuilder gives the extent of each item.
	ItemExtentBuilder rendering.ItemExtentBuilder
	// PrototypeItem is the widget whose extent all the items have.
	PrototypeItem Widget
	// ProxyDecorator decorates the item that is being dragged.
	ProxyDecorator ReorderItemProxyDecorator
	// Padding is the space around the items.
	Padding painting.EdgeInsetsGeometry
	// ScrollDirection is the axis along which the list scrolls; the default is
	// AxisVertical.
	ScrollDirection painting.Axis
	// Reverse is whether the list scrolls against the reading direction.
	Reverse bool
	// Controller reads and controls the scroll position.
	Controller ScrollController
	// Primary is whether this is the primary scroll view.
	Primary foundation.Opt[bool]
	// Physics is how the list responds to the user.
	Physics ScrollPhysics
	// ShrinkWrap is whether the extent of the list is the extent of its content.
	ShrinkWrap bool
	// Anchor is the relative position of the zero scroll offset, from 0 to 1.
	Anchor float64
	// ScrollCacheExtent is how far beyond the viewport the list builds items.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// KeyboardDismissBehavior is how the list dismisses the keyboard.
	KeyboardDismissBehavior ScrollViewKeyboardDismissBehavior
	// RestorationID is the identifier for restoring the scroll offset.
	RestorationID string
	// ClipBehavior is how the list clips; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// AutoScrollerVelocityScalar is the speed of the scrolling when an item is
	// dragged to the edge; the default is 50.
	AutoScrollerVelocityScalar foundation.Opt[float64]
	// DragBoundaryProvider gives the boundary the dragged item stays within.
	DragBoundaryProvider ReorderDragBoundaryProvider
}

ReorderableListOpts are the optional parameters of NewReorderableList.

Flutter: widgets/reorderable_list.dart ReorderableList.new

type ReorderableListState

type ReorderableListState struct {
	StateOf[*ReorderableList]
	// contains filtered or unexported fields
}

ReorderableListState is the state of a ReorderableList: it can start and cancel the reordering of an item.

Flutter: widgets/reorderable_list.dart ReorderableListState

func ReorderableListMaybeOf

func ReorderableListMaybeOf(bc BuildContext) (*ReorderableListState, bool)

ReorderableListMaybeOf is the state of the closest ReorderableList above the context, and false if there is none.

Flutter: widgets/reorderable_list.dart ReorderableList.maybeOf

func ReorderableListOf

func ReorderableListOf(bc BuildContext) *ReorderableListState

ReorderableListOf is the state of the closest ReorderableList above the context. In debug builds it panics with the tag ReorderableListMissing when there is none.

Flutter: widgets/reorderable_list.dart ReorderableList.of

func (*ReorderableListState) Build

Build builds the scroll view with the reorderable sliver.

func (*ReorderableListState) CancelReorder

func (s *ReorderableListState) CancelReorder()

CancelReorder cancels the reordering that is in progress.

Flutter: widgets/reorderable_list.dart ReorderableListState.cancelReorder

func (*ReorderableListState) StartItemDragReorder

func (s *ReorderableListState) StartItemDragReorder(index int, event *gestures.PointerDownEvent, recognizer *gestures.MultiDragGestureRecognizer)

StartItemDragReorder starts dragging the item at the index with the pointer of the event, which the recognizer tracks.

Flutter: widgets/reorderable_list.dart ReorderableListState.startItemDragReorder

type RepaintBoundary

type RepaintBoundary struct {
	SingleChildRenderObjectWidget
}

RepaintBoundary creates a separate display list for its child.

Flutter: widgets/basic.dart RepaintBoundary

func NewRepaintBoundary

func NewRepaintBoundary(child Widget, opts ...RepaintBoundaryOpts) *RepaintBoundary

NewRepaintBoundary creates the widget.

Flutter: widgets/basic.dart RepaintBoundary.new

func NewRepaintBoundaryWrap

func NewRepaintBoundaryWrap(childIndex int, child Widget) *RepaintBoundary

NewRepaintBoundaryWrap creates a RepaintBoundary with a key made from the child's key, or from the index of the child when it has none, so that the boundaries of a list of children keep their identity.

Flutter: widgets/basic.dart RepaintBoundary.wrap

func (*RepaintBoundary) CreateRenderObject

func (w *RepaintBoundary) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart RepaintBoundary.createRenderObject

type RepaintBoundaryOpts

type RepaintBoundaryOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

RepaintBoundaryOpts are the optional parameters of NewRepaintBoundary.

Flutter: widgets/basic.dart RepaintBoundary.new

type ReplaceTextIntent

type ReplaceTextIntent struct {
	IntentBase
	// CurrentTextEditingValue is the value the replacement is made in.
	//
	// Flutter: widgets/text_editing_intents.dart ReplaceTextIntent.currentTextEditingValue
	CurrentTextEditingValue services.TextEditingValue
	// ReplacementText is the text that replaces the range.
	//
	// Flutter: widgets/text_editing_intents.dart ReplaceTextIntent.replacementText
	ReplacementText string
	// ReplacementRange is the range that is replaced.
	//
	// Flutter: widgets/text_editing_intents.dart ReplaceTextIntent.replacementRange
	ReplacementRange ui.TextRange
	// Cause is what caused the change.
	//
	// Flutter: widgets/text_editing_intents.dart ReplaceTextIntent.cause
	Cause services.SelectionChangedCause
}

ReplaceTextIntent is an intent that replaces the text in a range with another text, in a value.

Flutter: widgets/text_editing_intents.dart ReplaceTextIntent

func NewReplaceTextIntent

func NewReplaceTextIntent(currentTextEditingValue services.TextEditingValue, replacementText string, replacementRange ui.TextRange, cause services.SelectionChangedCause) ReplaceTextIntent

NewReplaceTextIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ReplaceTextIntent.new

type RequestFocusAction

type RequestFocusAction struct{ ActionBase }

RequestFocusAction is the action that handles a RequestFocusIntent.

Flutter: widgets/focus_traversal.dart RequestFocusAction

func NewRequestFocusAction

func NewRequestFocusAction() *RequestFocusAction

NewRequestFocusAction creates the action.

Flutter: widgets/focus_traversal.dart RequestFocusAction.new

func (*RequestFocusAction) IntentType

func (a *RequestFocusAction) IntentType() reflect.Type

IntentType is RequestFocusIntent.

Flutter: widgets/actions.dart Action.intentType

func (*RequestFocusAction) Invoke

func (a *RequestFocusAction) Invoke(intent Intent) any

Invoke requests the focus with the callback of the intent.

Flutter: widgets/focus_traversal.dart RequestFocusAction.invoke

type RequestFocusIntent

type RequestFocusIntent struct {
	IntentBase
	// FocusNode is the node to request the focus for.
	//
	// Flutter: widgets/focus_traversal.dart RequestFocusIntent.focusNode
	FocusNode *FocusNode
	// RequestFocusCallback gives the focus to the node; the default is
	// DefaultTraversalRequestFocusCallback.
	//
	// Flutter: widgets/focus_traversal.dart RequestFocusIntent.requestFocusCallback
	RequestFocusCallback TraversalRequestFocusCallback
}

RequestFocusIntent is an intent that requests the focus for a node. It does it with its callback, so that the node is also scrolled into view.

Flutter: widgets/focus_traversal.dart RequestFocusIntent

type ResolvableColor

type ResolvableColor interface {
	ui.ColorValue
	// ResolveColor is the color that the value has in the context.
	//
	// Flutter: cupertino/colors.dart CupertinoDynamicColor.resolveFrom
	ResolveColor(bc BuildContext) ui.Color
}

ResolvableColor is a ui.ColorValue that depends on the context: cupertino's CupertinoDynamicColor, which is another color in dark mode, in high contrast and on an elevated interface. Resolve methods such as IconThemeData.Resolve ask it for the color of a context.

Flutter: cupertino/colors.dart CupertinoDynamicColor.resolveFrom

type RichText

type RichText struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

RichText displays a paragraph of text with multiple styles.

Flutter: widgets/basic.dart RichText

func NewRichText

func NewRichText(text painting.InlineSpan, opts ...RichTextOpts) *RichText

NewRichText creates the widget; the children are the widgets of the widget spans in the text. In debug builds it panics with the tag TextMaxLinesInvalid when MaxLines is not greater than zero and with RichTextNoSelectionColor when there is a registrar but no color.

Flutter: widgets/basic.dart RichText.new

func (*RichText) CreateRenderObject

func (w *RichText) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the paragraph.

Flutter: widgets/basic.dart RichText.createRenderObject

func (*RichText) IsRichText

func (w *RichText) IsRichText() bool

IsRichText is true: the text finders of gluttertest skip RichText widgets unless they are asked for them.

Flutter: no counterpart (used by finders)

func (*RichText) MaxLines

func (w *RichText) MaxLines() foundation.Opt[int]

MaxLines is the maximum number of lines.

Flutter: widgets/basic.dart RichText.maxLines

func (*RichText) Overflow

func (w *RichText) Overflow() painting.TextOverflow

Overflow is how visual overflow is handled.

Flutter: widgets/basic.dart RichText.overflow

func (*RichText) PlainText

func (w *RichText) PlainText() string

PlainText is the text of the widget without styles.

Flutter: no counterpart (used by finders)

func (*RichText) SoftWrap

func (w *RichText) SoftWrap() bool

SoftWrap is whether the text wraps at the box width.

Flutter: widgets/basic.dart RichText.softWrap

func (*RichText) Text

func (w *RichText) Text() painting.InlineSpan

Text is the text to display.

Flutter: widgets/basic.dart RichText.text

func (*RichText) TextAlign

func (w *RichText) TextAlign() ui.TextAlign

TextAlign is how the text is aligned horizontally.

Flutter: widgets/basic.dart RichText.textAlign

func (*RichText) TextDirection

func (w *RichText) TextDirection() ui.TextDirection

TextDirection is the direction of the text, or unspecified for the one of the Directionality.

Flutter: widgets/basic.dart RichText.textDirection

func (*RichText) TextScaler

func (w *RichText) TextScaler() painting.TextScaler

TextScaler is how the font size is scaled.

Flutter: widgets/basic.dart RichText.textScaler

func (*RichText) UpdateRenderObject

func (w *RichText) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the paragraph.

Flutter: widgets/basic.dart RichText.updateRenderObject

type RichTextOpts

type RichTextOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TextAlign is how the text is aligned horizontally; the default is
	// TextAlignStart.
	TextAlign ui.TextAlign
	// TextDirection is the direction of the text; the default is the one of the
	// closest Directionality.
	TextDirection ui.TextDirection
	// SoftWrap is whether the text wraps at the box width; the default is true.
	SoftWrap foundation.Opt[bool]
	// Overflow is how visual overflow is handled; the default is
	// TextOverflowClip.
	Overflow painting.TextOverflow
	// TextScaler is how the font size is scaled; the default is no scaling.
	TextScaler painting.TextScaler
	// MaxLines is the maximum number of lines.
	MaxLines foundation.Opt[int]
	// Locale is the locale used to select region specific glyphs; the default is
	// the one of the closest Localizations.
	Locale foundation.Opt[ui.Locale]
	// StrutStyle is the strut style to use.
	StrutStyle *painting.StrutStyle
	// TextWidthBasis is how the width of the text is measured; the default is
	// TextWidthBasisParent.
	TextWidthBasis painting.TextWidthBasis
	// TextHeightBehavior says how the line height applies to the first ascent
	// and the last descent.
	TextHeightBehavior *ui.TextHeightBehavior
	// SelectionRegistrar is where the text registers its selectable fragments.
	SelectionRegistrar rendering.SelectionRegistrar
	// SelectionColor is the color of the selection highlight; it is required
	// when there is a registrar.
	SelectionColor foundation.Opt[ui.Color]
}

RichTextOpts are the optional parameters of NewRichText.

Flutter: widgets/basic.dart RichText.new

type RootBackButtonDispatcher

type RootBackButtonDispatcher struct {
	BackButtonDispatcherBase
	WidgetsBindingObserverBase
	// contains filtered or unexported fields
}

RootBackButtonDispatcher listens to the system for the back button, through the widgets binding, and tells the callbacks. It is the dispatcher of a Router that is not nested in another.

Flutter: widgets/router.dart RootBackButtonDispatcher

func NewRootBackButtonDispatcher

func NewRootBackButtonDispatcher(binding *WidgetsBinding) *RootBackButtonDispatcher

NewRootBackButtonDispatcher creates a dispatcher that registers with the binding while it has callbacks.

Deviation: Flutter reads WidgetsBinding.instance; Glutter has no singletons, so the binding is a parameter (SPEC §12.10).

Flutter: widgets/router.dart RootBackButtonDispatcher.new

func (*RootBackButtonDispatcher) AddCallback

AddCallback adds the callback; the first one registers the dispatcher with the binding.

Flutter: widgets/router.dart RootBackButtonDispatcher.addCallback

func (*RootBackButtonDispatcher) DidPopRoute

func (d *RootBackButtonDispatcher) DidPopRoute() bool

DidPopRoute invokes the callbacks, with false as the default.

Flutter: widgets/router.dart RootBackButtonDispatcher.didPopRoute

func (*RootBackButtonDispatcher) RemoveCallback

func (d *RootBackButtonDispatcher) RemoveCallback(handle BackButtonCallbackHandle)

RemoveCallback removes the callback; the last one unregisters the dispatcher.

Flutter: widgets/router.dart RootBackButtonDispatcher.removeCallback

type RootElement

type RootElement struct {
	ElementBase
	// contains filtered or unexported fields
}

RootElement is the element of a RootWidget: the root of the element tree.

Flutter: widgets/binding.dart RootElement

func (*RootElement) DebugDoingBuild

func (e *RootElement) DebugDoingBuild() bool

DebugDoingBuild is false: this element has no build phase.

Flutter: widgets/binding.dart RootElement.debugDoingBuild

func (*RootElement) DebugExpectsRenderObjectForSlot

func (e *RootElement) DebugExpectsRenderObjectForSlot(any) bool

DebugExpectsRenderObjectForSlot is false.

Flutter: widgets/binding.dart RootElement.debugExpectsRenderObjectForSlot

func (*RootElement) ForgetChild

func (e *RootElement) ForgetChild(child Element)

ForgetChild drops the child.

Flutter: widgets/binding.dart RootElement.forgetChild

func (*RootElement) Mount

func (e *RootElement) Mount(parent Element, slot any)

Mount mounts the element as the root and builds its child.

Flutter: widgets/binding.dart RootElement.mount

func (*RootElement) PerformRebuild

func (e *RootElement) PerformRebuild()

PerformRebuild applies the widget that Attach set aside.

Flutter: widgets/binding.dart RootElement.performRebuild

func (*RootElement) Update

func (e *RootElement) Update(newWidget Widget)

Update replaces the widget and rebuilds the child.

Flutter: widgets/binding.dart RootElement.update

func (*RootElement) VisitChildren

func (e *RootElement) VisitChildren(visitor ElementVisitor)

VisitChildren visits the child.

Flutter: widgets/binding.dart RootElement.visitChildren

type RootWidget

type RootWidget struct {
	WidgetBase
	// contains filtered or unexported fields
}

RootWidget is the widget at the root of the tree: it stands for the app and has the root element, which has no parent.

Flutter: widgets/binding.dart RootWidget

func NewRootWidget

func NewRootWidget(child Widget, opts ...RootWidgetOpts) *RootWidget

NewRootWidget creates the root widget with its child (which may be nil).

Flutter: widgets/binding.dart RootWidget.new

func (*RootWidget) Attach

func (w *RootWidget) Attach(owner *BuildOwner, element *RootElement) *RootElement

Attach creates the root element, gives it the owner and mounts it; or, given the element of an earlier call, marks it for an update to this widget.

Flutter: widgets/binding.dart RootWidget.attach

func (*RootWidget) Child

func (w *RootWidget) Child() Widget

Child is the widget below the root.

Flutter: widgets/binding.dart RootWidget.child

func (*RootWidget) CreateElement

func (w *RootWidget) CreateElement() Element

CreateElement creates the root element.

Flutter: widgets/binding.dart RootWidget.createElement

func (*RootWidget) ToStringShort

func (w *RootWidget) ToStringShort() string

ToStringShort is the debug short description, or the type name.

Flutter: widgets/binding.dart RootWidget.toStringShort

type RootWidgetOpts

type RootWidgetOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// DebugShortDescription is what ToStringShort returns.
	DebugShortDescription string
}

RootWidgetOpts are the optional parameters of NewRootWidget.

Flutter: widgets/binding.dart RootWidget.new

type RotatedBox

type RotatedBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

RotatedBox rotates its child by a integral number of quarter turns.

Flutter: widgets/basic.dart RotatedBox

func NewRotatedBox

func NewRotatedBox(quarterTurns int, child Widget, opts ...RotatedBoxOpts) *RotatedBox

NewRotatedBox creates the widget.

Flutter: widgets/basic.dart RotatedBox.new

func (*RotatedBox) CreateRenderObject

func (w *RotatedBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart RotatedBox.createRenderObject

func (*RotatedBox) QuarterTurns

func (w *RotatedBox) QuarterTurns() int

QuarterTurns is the number of clockwise quarter turns the child should be rotated.

Flutter: widgets/basic.dart RotatedBox.quarterTurns

func (*RotatedBox) UpdateRenderObject

func (w *RotatedBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart RotatedBox.updateRenderObject

type RotatedBoxOpts

type RotatedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

RotatedBoxOpts are the optional parameters of NewRotatedBox.

Flutter: widgets/basic.dart RotatedBox.new

type RotationTransition

type RotationTransition struct{ MatrixTransition }

RotationTransition animates the rotation of a widget, in turns.

Flutter: widgets/transitions.dart RotationTransition

func NewRotationTransition

func NewRotationTransition(turns animation.Animation[float64], child Widget, opts ...RotationTransitionOpts) *RotationTransition

NewRotationTransition creates the widget; one turn is a full rotation.

Flutter: widgets/transitions.dart RotationTransition.new

func (*RotationTransition) Turns

Turns is the animation of the rotation, in turns.

Flutter: widgets/transitions.dart RotationTransition.turns

type RotationTransitionOpts

type RotationTransitionOpts = MatrixTransitionOpts

RotationTransitionOpts are the optional parameters of NewRotationTransition.

Flutter: widgets/transitions.dart RotationTransition.new

type Route

type Route interface {
	// AsRoute is the base of the route.
	AsRoute() *RouteBase
	// Navigator is the navigator the route is installed in, or nil.
	//
	// Flutter: widgets/navigator.dart Route.navigator
	Navigator() *NavigatorState
	// Settings are the settings of the route.
	//
	// Flutter: widgets/navigator.dart Route.settings
	Settings() RouteSettings
	// RequestFocus is whether the route requests the focus when it becomes the
	// top one.
	//
	// Flutter: widgets/navigator.dart Route.requestFocus
	RequestFocus() bool
	// OverlayEntries are the entries the route puts in the overlay of the
	// navigator.
	//
	// Flutter: widgets/navigator.dart Route.overlayEntries
	OverlayEntries() []*OverlayEntry
	// Install is called when the route is inserted into the navigator.
	//
	// Flutter: widgets/navigator.dart Route.install
	Install()
	// DidPush is called after Install when the route is pushed; the future
	// completes when the transition in finished.
	//
	// Flutter: widgets/navigator.dart Route.didPush
	DidPush() *scheduler.TickerFuture
	// DidAdd is called after Install when the route was added to the navigator
	// without a transition.
	//
	// Flutter: widgets/navigator.dart Route.didAdd
	DidAdd()
	// DidReplace is called after Install when the route replaces another one.
	//
	// Flutter: widgets/navigator.dart Route.didReplace
	DidReplace(oldRoute Route)
	// PopDisposition says how the route handles a request to pop it.
	//
	// Flutter: widgets/navigator.dart Route.popDisposition
	PopDisposition() RoutePopDisposition
	// OnPopInvokedWithResult is called after a pop of the route was handled
	// (didPop true) or blocked (false).
	//
	// Flutter: widgets/navigator.dart Route.onPopInvokedWithResult
	OnPopInvokedWithResult(didPop bool, result any)
	// WillHandlePopInternally is whether a pop is handled inside the route
	// (local history entries) instead of removing it.
	//
	// Flutter: widgets/navigator.dart Route.willHandlePopInternally
	WillHandlePopInternally() bool
	// CurrentResult is the value that the route completes with when it is popped
	// without a result.
	//
	// Flutter: widgets/navigator.dart Route.currentResult
	CurrentResult() any
	// Popped returns a channel that gets the result of the route when it is
	// popped, then is closed. Each call returns a new channel.
	//
	// Flutter: widgets/navigator.dart Route.popped
	Popped() <-chan any
	// DidPop is called when the route is popped; it returns false if the route
	// handled the pop itself (a local history entry was removed).
	//
	// Flutter: widgets/navigator.dart Route.didPop
	DidPop(result any) bool
	// DidComplete is called when the route is popped or removed to complete the
	// future of Popped.
	//
	// Flutter: widgets/navigator.dart Route.didComplete
	DidComplete(result any)
	// DidPopNext is called when the route above this one was popped, and this one
	// is the top route now.
	//
	// Flutter: widgets/navigator.dart Route.didPopNext
	DidPopNext(nextRoute Route)
	// DidChangeNext is called when the route above this one changed.
	//
	// Flutter: widgets/navigator.dart Route.didChangeNext
	DidChangeNext(nextRoute Route)
	// DidChangePrevious is called when the route below this one changed.
	//
	// Flutter: widgets/navigator.dart Route.didChangePrevious
	DidChangePrevious(previousRoute Route)
	// ChangedInternalState is called when the state of the route changed.
	//
	// Flutter: widgets/navigator.dart Route.changedInternalState
	ChangedInternalState()
	// ChangedExternalState is called when the navigator's dependencies changed.
	//
	// Flutter: widgets/navigator.dart Route.changedExternalState
	ChangedExternalState()
	// Dispose is called when the route is no longer needed.
	//
	// Flutter: widgets/navigator.dart Route.dispose
	Dispose()
	// IsCurrent is whether the route is the top one of the navigator.
	//
	// Flutter: widgets/navigator.dart Route.isCurrent
	IsCurrent() bool
	// IsFirst is whether the route is the bottom one of the navigator.
	//
	// Flutter: widgets/navigator.dart Route.isFirst
	IsFirst() bool
	// IsActive is whether the route is on the navigator and not popped or
	// removed.
	//
	// Flutter: widgets/navigator.dart Route.isActive
	IsActive() bool
	// HasActiveRouteBelow is whether there is an active route below this one.
	//
	// Flutter: widgets/navigator.dart Route.hasActiveRouteBelow
	HasActiveRouteBelow() bool
	// String describes the route.
	String() string
}

Route is an entry in the history of a Navigator: a screen or a dialog. The result of a route is passed to the channel that Push returned, and the results are any values.

Implement a route by embedding RouteBase (InitRouteBase), or one of the route bases of this package (OverlayRouteBase, TransitionRouteBase, ModalRouteBase, PageRouteBase, PopupRouteBase).

Flutter: widgets/navigator.dart Route

func NavigatorDefaultGenerateInitialRoutes(navigator *NavigatorState, initialRouteName string) []Route

NavigatorDefaultGenerateInitialRoutes is the default OnGenerateInitialRoutes: for the initial route "/a/b" it creates the routes "/", "/a" and "/a/b" (the ones that exist), and for the default route just that one.

Flutter: widgets/navigator.dart Navigator.defaultGenerateInitialRoutes

type RouteAware

type RouteAware interface {
	// DidPopNext is called when the top route has been popped off, and the
	// current route shows up.
	//
	// Flutter: widgets/routes.dart RouteAware.didPopNext
	DidPopNext()
	// DidPush is called when the current route has been pushed.
	//
	// Flutter: widgets/routes.dart RouteAware.didPush
	DidPush()
	// DidPop is called when the current route has been popped off.
	//
	// Flutter: widgets/routes.dart RouteAware.didPop
	DidPop()
	// DidPushNext is called when a new route has been pushed, and the current
	// route is no longer visible.
	//
	// Flutter: widgets/routes.dart RouteAware.didPushNext
	DidPushNext()
}

RouteAware is an interface for objects that are aware of their current Route. Subscribe it to a RouteObserver.

Flutter: widgets/routes.dart RouteAware

type RouteAwareBase

type RouteAwareBase struct{}

RouteAwareBase implements RouteAware with methods that do nothing. Embed it.

Flutter: widgets/routes.dart RouteAware

func (RouteAwareBase) DidPop

func (RouteAwareBase) DidPop()

DidPop does nothing.

Flutter: widgets/routes.dart RouteAware.didPop

func (RouteAwareBase) DidPopNext

func (RouteAwareBase) DidPopNext()

DidPopNext does nothing.

Flutter: widgets/routes.dart RouteAware.didPopNext

func (RouteAwareBase) DidPush

func (RouteAwareBase) DidPush()

DidPush does nothing.

Flutter: widgets/routes.dart RouteAware.didPush

func (RouteAwareBase) DidPushNext

func (RouteAwareBase) DidPushNext()

DidPushNext does nothing.

Flutter: widgets/routes.dart RouteAware.didPushNext

type RouteBase

type RouteBase struct {
	// contains filtered or unexported fields
}

RouteBase implements the parts of Route that every route shares. Embed it (or a base that embeds it) and call InitRouteBase with the outer value.

Flutter: widgets/navigator.dart Route

func (*RouteBase) AsRoute

func (b *RouteBase) AsRoute() *RouteBase

AsRoute is the base of the route.

func (*RouteBase) ChangedExternalState

func (b *RouteBase) ChangedExternalState()

ChangedExternalState does nothing.

Flutter: widgets/navigator.dart Route.changedExternalState

func (*RouteBase) ChangedInternalState

func (b *RouteBase) ChangedInternalState()

ChangedInternalState does nothing.

Flutter: widgets/navigator.dart Route.changedInternalState

func (*RouteBase) CurrentResult

func (b *RouteBase) CurrentResult() any

CurrentResult is nil.

Flutter: widgets/navigator.dart Route.currentResult

func (*RouteBase) DidAdd

func (b *RouteBase) DidAdd()

DidAdd asks for focus on the navigator when the route requests focus.

Flutter: widgets/navigator.dart Route.didAdd

func (*RouteBase) DidChangeNext

func (b *RouteBase) DidChangeNext(nextRoute Route)

DidChangeNext does nothing.

Flutter: widgets/navigator.dart Route.didChangeNext

func (*RouteBase) DidChangePrevious

func (b *RouteBase) DidChangePrevious(previousRoute Route)

DidChangePrevious does nothing.

Flutter: widgets/navigator.dart Route.didChangePrevious

func (*RouteBase) DidComplete

func (b *RouteBase) DidComplete(result any)

DidComplete completes the channel of Popped with the result, or with the current result when there is none.

Flutter: widgets/navigator.dart Route.didComplete

func (*RouteBase) DidPop

func (b *RouteBase) DidPop(result any) bool

DidPop completes the route and returns true.

Flutter: widgets/navigator.dart Route.didPop

func (*RouteBase) DidPopNext

func (b *RouteBase) DidPopNext(nextRoute Route)

DidPopNext does nothing.

Flutter: widgets/navigator.dart Route.didPopNext

func (*RouteBase) DidPush

func (b *RouteBase) DidPush() *scheduler.TickerFuture

DidPush returns a future that is complete, and asks for focus on the navigator when it requests focus.

Flutter: widgets/navigator.dart Route.didPush

func (*RouteBase) DidReplace

func (b *RouteBase) DidReplace(oldRoute Route)

DidReplace does nothing.

Flutter: widgets/navigator.dart Route.didReplace

func (*RouteBase) Dispose

func (b *RouteBase) Dispose()

Dispose lets go of the navigator and completes the dispose future.

Flutter: widgets/navigator.dart Route.dispose

func (*RouteBase) HasActiveRouteBelow

func (b *RouteBase) HasActiveRouteBelow() bool

HasActiveRouteBelow is whether there is a present route below this one.

Flutter: widgets/navigator.dart Route.hasActiveRouteBelow

func (*RouteBase) Install

func (b *RouteBase) Install()

Install does nothing.

Flutter: widgets/navigator.dart Route.install

func (*RouteBase) IsActive

func (b *RouteBase) IsActive() bool

IsActive is whether the route is in the history and not popped or removed.

Flutter: widgets/navigator.dart Route.isActive

func (*RouteBase) IsCurrent

func (b *RouteBase) IsCurrent() bool

IsCurrent is whether the route is the top present route of the navigator.

Flutter: widgets/navigator.dart Route.isCurrent

func (*RouteBase) IsFirst

func (b *RouteBase) IsFirst() bool

IsFirst is whether the route is the first present route of the navigator.

Flutter: widgets/navigator.dart Route.isFirst

func (*RouteBase) Navigator

func (b *RouteBase) Navigator() *NavigatorState

Navigator is the navigator the route is installed in, or nil.

Flutter: widgets/navigator.dart Route.navigator

func (*RouteBase) OnPopInvokedWithResult

func (b *RouteBase) OnPopInvokedWithResult(didPop bool, result any)

OnPopInvokedWithResult tells the page, if the route was made from one.

Flutter: widgets/navigator.dart Route.onPopInvokedWithResult

func (*RouteBase) OverlayEntries

func (b *RouteBase) OverlayEntries() []*OverlayEntry

OverlayEntries is empty; overlay routes have entries.

Flutter: widgets/navigator.dart Route.overlayEntries

func (*RouteBase) PopDisposition

func (b *RouteBase) PopDisposition() RoutePopDisposition

PopDisposition is how the route handles a pop: a route of a page with canPop false is not popped, the first route bubbles up, and every other route is popped.

Flutter: widgets/navigator.dart Route.popDisposition

func (*RouteBase) Popped

func (b *RouteBase) Popped() <-chan any

Popped returns a channel that gets the result of the route when it is popped or removed.

Flutter: widgets/navigator.dart Route.popped

func (*RouteBase) PoppedThen

func (b *RouteBase) PoppedThen(fn func(result any))

PoppedThen calls fn with the result of the route when the route is popped, at once on the UI thread (and at once when it was popped already). It is the callback form of Popped, for code that has to run on the UI thread.

Flutter: widgets/navigator.dart Route.popped

func (*RouteBase) RequestFocus

func (b *RouteBase) RequestFocus() bool

RequestFocus is whether the route requests focus when it becomes the top one. It defaults to the RequestFocus of the navigator, or false without one.

Flutter: widgets/navigator.dart Route.requestFocus

func (*RouteBase) Settings

func (b *RouteBase) Settings() RouteSettings

Settings are the settings of the route.

Flutter: widgets/navigator.dart Route.settings

func (*RouteBase) String

func (b *RouteBase) String() string

String describes the route.

func (*RouteBase) WillHandlePopInternally

func (b *RouteBase) WillHandlePopInternally() bool

WillHandlePopInternally is false.

Flutter: widgets/navigator.dart Route.willHandlePopInternally

type RouteFactory

type RouteFactory func(settings RouteSettings) Route

RouteFactory creates a route for the given settings.

Flutter: widgets/navigator.dart RouteFactory

type RouteInformation

type RouteInformation struct {
	// contains filtered or unexported fields
}

RouteInformation is the unit of the route information that the platform, a route information provider and the router pass around: a URI and some state that the platform stores in the history with it. Compare the pointers of two values with == to know whether they are the same one.

Flutter: widgets/router.dart RouteInformation

func NewRouteInformation

func NewRouteInformation(options ...RouteInformationOpts) *RouteInformation

NewRouteInformation creates the route information. The URI is required: in debug builds a nil one panics with the tag RouteInformationURIMissing.

Deviation: Flutter's deprecated location parameter, a string, is not ported.

Flutter: widgets/router.dart RouteInformation.new

func (*RouteInformation) State

func (r *RouteInformation) State() any

State is the state that the platform saves with the entry of the history.

Flutter: widgets/router.dart RouteInformation.state

func (*RouteInformation) URI

func (r *RouteInformation) URI() *url.URL

URI is the location of the route information.

Flutter: widgets/router.dart RouteInformation.uri

type RouteInformationOpts

type RouteInformationOpts struct {
	// URI is the location; it is required.
	URI *url.URL
	// State is the state that the platform saves with the entry of the history.
	State any
}

RouteInformationOpts are the parameters of NewRouteInformation.

Flutter: widgets/router.dart RouteInformation.new

type RouteInformationParser

type RouteInformationParser[T any] interface {
	// ParseRouteInformation converts the route information to a configuration.
	//
	// Flutter: widgets/router.dart RouteInformationParser.parseRouteInformation
	ParseRouteInformation(routeInformation *RouteInformation) *Future[T]
	// ParseRouteInformationWithDependencies is like ParseRouteInformation but gets
	// the context of the router, to look up dependencies; when a dependency
	// changes, the router parses again.
	//
	// Flutter: widgets/router.dart RouteInformationParser.parseRouteInformationWithDependencies
	ParseRouteInformationWithDependencies(routeInformation *RouteInformation, bc BuildContext) *Future[T]
	// RestoreRouteInformation converts the configuration to route information, or
	// returns nil to not report it to the platform.
	//
	// Flutter: widgets/router.dart RouteInformationParser.restoreRouteInformation
	RestoreRouteInformation(configuration T) *RouteInformation
}

RouteInformationParser converts the route information of the platform to a configuration of the app, and back.

Flutter: widgets/router.dart RouteInformationParser

type RouteInformationParserBase

type RouteInformationParserBase[T any] struct {
	// contains filtered or unexported fields
}

RouteInformationParserBase implements the defaults of RouteInformationParser: embed it, call InitRouteInformationParserBase, and implement ParseRouteInformation or ParseRouteInformationWithDependencies.

Flutter: widgets/router.dart RouteInformationParser

func (*RouteInformationParserBase[T]) ParseRouteInformation

func (b *RouteInformationParserBase[T]) ParseRouteInformation(*RouteInformation) *Future[T]

ParseRouteInformation panics: one of the two parse methods must be implemented.

Flutter: widgets/router.dart RouteInformationParser.parseRouteInformation

func (*RouteInformationParserBase[T]) ParseRouteInformationWithDependencies

func (b *RouteInformationParserBase[T]) ParseRouteInformationWithDependencies(routeInformation *RouteInformation, _ BuildContext) *Future[T]

ParseRouteInformationWithDependencies calls ParseRouteInformation.

Flutter: widgets/router.dart RouteInformationParser.parseRouteInformationWithDependencies

func (*RouteInformationParserBase[T]) RestoreRouteInformation

func (b *RouteInformationParserBase[T]) RestoreRouteInformation(T) *RouteInformation

RestoreRouteInformation returns nil: nothing is reported.

Flutter: widgets/router.dart RouteInformationParser.restoreRouteInformation

type RouteInformationProvider

type RouteInformationProvider interface {
	foundation.ValueListenable[*RouteInformation]
	// RouterReportsNewRouteInformation is called when the router reports its route
	// information, for the provider to tell the platform.
	//
	// Flutter: widgets/router.dart RouteInformationProvider.routerReportsNewRouteInformation
	RouterReportsNewRouteInformation(routeInformation *RouteInformation, reportingType RouteInformationReportingType)
}

RouteInformationProvider provides the route information of the platform to the router, and gets what the router reports back.

Flutter: widgets/router.dart RouteInformationProvider

type RouteInformationProviderBase

type RouteInformationProviderBase struct{}

RouteInformationProviderBase implements RouterReportsNewRouteInformation as a function that does nothing; embed it in a provider.

Flutter: widgets/router.dart RouteInformationProvider

func (RouteInformationProviderBase) RouterReportsNewRouteInformation

RouterReportsNewRouteInformation does nothing.

Flutter: widgets/router.dart RouteInformationProvider.routerReportsNewRouteInformation

type RouteInformationReportingType

type RouteInformationReportingType int

RouteInformationReportingType is how the router reports its route information to the route information provider.

Flutter: widgets/router.dart RouteInformationReportingType

const (
	// RouteInformationReportingTypeUnspecified is the same as
	// RouteInformationReportingTypeNone.
	RouteInformationReportingTypeUnspecified RouteInformationReportingType = iota
	// RouteInformationReportingTypeNone lets the provider decide whether the
	// report replaces the entry of the history or adds one.
	//
	// Flutter: widgets/router.dart RouteInformationReportingType.none
	RouteInformationReportingTypeNone
	// RouteInformationReportingTypeNeglect makes the provider replace the entry of
	// the history.
	//
	// Flutter: widgets/router.dart RouteInformationReportingType.neglect
	RouteInformationReportingTypeNeglect
	// RouteInformationReportingTypeNavigate makes the provider add an entry to the
	// history.
	//
	// Flutter: widgets/router.dart RouteInformationReportingType.navigate
	RouteInformationReportingTypeNavigate
)

type RouteListFactory

type RouteListFactory func(navigator *NavigatorState, initialRoute string) []Route

RouteListFactory creates the list of routes that the navigator starts with.

Flutter: widgets/navigator.dart RouteListFactory

type RouteObserver

type RouteObserver[R interface {
	Route
	comparable
}] struct {
	NavigatorObserverBase
	// contains filtered or unexported fields
}

RouteObserver informs RouteAware subscribers about the routes of type R that they are subscribed to.

Flutter: widgets/routes.dart RouteObserver

func NewRouteObserver

func NewRouteObserver[R interface {
	Route
	comparable
}]() *RouteObserver[R]

NewRouteObserver creates an observer.

Flutter: widgets/routes.dart RouteObserver.new

func (*RouteObserver[R]) DebugObservingRoute

func (o *RouteObserver[R]) DebugObservingRoute(route R) bool

DebugObservingRoute is whether the route has subscribers; in debug builds only.

Flutter: widgets/routes.dart RouteObserver.debugObservingRoute

func (*RouteObserver[R]) DidPop

func (o *RouteObserver[R]) DidPop(route, previousRoute Route)

DidPop tells the subscribers of the previous route that its next route was popped, and the subscribers of the route that it was popped.

Flutter: widgets/routes.dart RouteObserver.didPop

func (*RouteObserver[R]) DidPush

func (o *RouteObserver[R]) DidPush(route, previousRoute Route)

DidPush tells the subscribers of the previous route that a new route was pushed.

Flutter: widgets/routes.dart RouteObserver.didPush

func (*RouteObserver[R]) Subscribe

func (o *RouteObserver[R]) Subscribe(routeAware RouteAware, route R)

Subscribe registers the route aware to be informed about changes to the route; it is told that the route was pushed.

Flutter: widgets/routes.dart RouteObserver.subscribe

func (*RouteObserver[R]) Unsubscribe

func (o *RouteObserver[R]) Unsubscribe(routeAware RouteAware)

Unsubscribe removes the route aware from every route.

Flutter: widgets/routes.dart RouteObserver.unsubscribe

type RouteOpts

type RouteOpts struct {
	// Settings are the settings of the route; the default has no name and no
	// arguments.
	Settings RouteSettings
	// RequestFocus is whether the route requests the focus when it becomes the
	// top one; the default is the RequestFocus of the navigator.
	RequestFocus foundation.Opt[bool]
}

RouteOpts are the optional parameters of the route bases.

Flutter: widgets/navigator.dart Route.new

type RoutePageBuilder

type RoutePageBuilder func(bc BuildContext, animation, secondaryAnimation animation.Animation[float64]) Widget

RoutePageBuilder builds the primary content of a route.

Flutter: widgets/routes.dart RoutePageBuilder

type RoutePopDisposition

type RoutePopDisposition int

RoutePopDisposition describes how a route handles a request to pop it.

Flutter: widgets/navigator.dart RoutePopDisposition

const (
	// RoutePopDispositionPop means the route should be popped.
	//
	// Flutter: widgets/navigator.dart RoutePopDisposition.pop
	RoutePopDispositionPop RoutePopDisposition = iota
	// RoutePopDispositionDoNotPop means the route must not be popped.
	//
	// Flutter: widgets/navigator.dart RoutePopDisposition.doNotPop
	RoutePopDispositionDoNotPop
	// RoutePopDispositionBubble means the route does not decide, so the request
	// goes to the parent: for instance, the navigator of an enclosing app.
	//
	// Flutter: widgets/navigator.dart RoutePopDisposition.bubble
	RoutePopDispositionBubble
)

func (RoutePopDisposition) String

func (d RoutePopDisposition) String() string

String names the disposition.

type RoutePredicate

type RoutePredicate func(route Route) bool

RoutePredicate decides for a route; it is used to say where to stop popping or removing routes.

Flutter: widgets/navigator.dart RoutePredicate

func ModalRouteWithName

func ModalRouteWithName(name string) RoutePredicate

ModalRouteWithName returns a predicate that is true for the modal routes that have the name and do not handle pops internally.

Flutter: widgets/routes.dart ModalRoute.withName

type RouteSettings

type RouteSettings interface {
	// Name is the name of the route, for instance "/settings"; empty if none.
	//
	// Flutter: widgets/navigator.dart RouteSettings.name
	Name() string
	// Arguments is the arguments the route was pushed with, or nil.
	//
	// Flutter: widgets/navigator.dart RouteSettings.arguments
	Arguments() any
}

RouteSettings describes a route: its name and the arguments it was pushed with. Page implements it as well.

Flutter: widgets/navigator.dart RouteSettings

func ModalRouteSettingsOf

func ModalRouteSettingsOf(bc BuildContext) RouteSettings

ModalRouteSettingsOf returns the settings of the route that the context is in, or nil.

Flutter: widgets/routes.dart ModalRoute.settingsOf

type RouteSettingsBase

type RouteSettingsBase struct {
	// contains filtered or unexported fields
}

RouteSettingsBase is the implementation of RouteSettings that Page implementations embed, and that NewRouteSettings returns.

Flutter: widgets/navigator.dart RouteSettings

func NewRouteSettings

func NewRouteSettings(opts ...RouteSettingsOpts) *RouteSettingsBase

NewRouteSettings creates route settings.

Flutter: widgets/navigator.dart RouteSettings.new

func (*RouteSettingsBase) Arguments

func (s *RouteSettingsBase) Arguments() any

Arguments are the arguments of the route, or nil.

Flutter: widgets/navigator.dart RouteSettings.arguments

func (*RouteSettingsBase) Name

func (s *RouteSettingsBase) Name() string

Name is the name of the route, empty if none.

Flutter: widgets/navigator.dart RouteSettings.name

func (*RouteSettingsBase) String

func (s *RouteSettingsBase) String() string

String describes the settings: the name in quotes ("none" if empty) and the arguments.

Flutter: widgets/navigator.dart RouteSettings.toString

type RouteSettingsOpts

type RouteSettingsOpts struct {
	// Name is the name of the route; empty means none.
	Name string
	// Arguments are passed to the route.
	Arguments any
}

RouteSettingsOpts are the optional parameters of NewRouteSettings.

Flutter: widgets/navigator.dart RouteSettings.new

type RouteTransitionRecord

type RouteTransitionRecord interface {
	// Route is the route that this record is about.
	//
	// Flutter: widgets/navigator.dart RouteTransitionRecord.route
	Route() Route
	// IsWaitingForEnteringDecision is whether the route is new and waits for the
	// delegate to decide how it enters: MarkForPush or MarkForAdd.
	//
	// Flutter: widgets/navigator.dart RouteTransitionRecord.isWaitingForEnteringDecision
	IsWaitingForEnteringDecision() bool
	// IsWaitingForExitingDecision is whether the route is leaving and waits for
	// the delegate to decide how it exits: MarkForPop or MarkForComplete.
	//
	// Flutter: widgets/navigator.dart RouteTransitionRecord.isWaitingForExitingDecision
	IsWaitingForExitingDecision() bool
	// MarkForPush marks the route to be pushed with a transition, as if
	// NavigatorState.Push was called.
	//
	// Flutter: widgets/navigator.dart RouteTransitionRecord.markForPush
	MarkForPush()
	// MarkForAdd marks the route to be added without a transition.
	//
	// Flutter: widgets/navigator.dart RouteTransitionRecord.markForAdd
	MarkForAdd()
	// MarkForPop marks the route to be popped with a transition and completes it
	// with the result, as if NavigatorState.Pop was called.
	//
	// Flutter: widgets/navigator.dart RouteTransitionRecord.markForPop
	MarkForPop(result ...any)
	// MarkForComplete marks the route to be completed with the result and removed
	// without a transition.
	//
	// Flutter: widgets/navigator.dart RouteTransitionRecord.markForComplete
	MarkForComplete(result ...any)
}

RouteTransitionRecord is a route and the decision that the TransitionDelegate of the Navigator makes about how it transitions in or out when the pages change.

Flutter: widgets/navigator.dart RouteTransitionRecord

type RouteTransitionsBuilder

type RouteTransitionsBuilder func(bc BuildContext, animation, secondaryAnimation animation.Animation[float64], child Widget) Widget

RouteTransitionsBuilder builds the transition of the page of a route.

Flutter: widgets/routes.dart RouteTransitionsBuilder

type Router

type Router[T any] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Router is the widget that reports the route information of the app to the platform and builds the widgets of the app from it, through its delegate. It keeps a route information provider, a parser, a delegate and a back button dispatcher together.

Flutter: widgets/router.dart Router

func NewRouter

func NewRouter[T any](routerDelegate RouterDelegate[T], opts ...RouterOpts[T]) *Router[T]

NewRouter creates a router. In debug builds a route information provider without a parser panics with the tag RouterParserMissing.

Flutter: widgets/router.dart Router.new

func NewRouterWithConfig

func NewRouterWithConfig[T any](config RouterConfig[T], key ...foundation.Key) *Router[T]

NewRouterWithConfig creates a router from the configuration.

Flutter: widgets/router.dart Router.withConfig

func RouterMaybeOf

func RouterMaybeOf[T any](bc BuildContext) *Router[T]

RouterMaybeOf returns the router above the context, or nil when there is none.

Flutter: widgets/router.dart Router.maybeOf

func RouterOf

func RouterOf[T any](bc BuildContext) *Router[T]

RouterOf returns the router above the context. In debug builds it panics with the tag RouterMissing when there is none, or RouterTypeMismatch when the router has another configuration type.

Flutter: widgets/router.dart Router.of

func (*Router[T]) BackButtonDispatcher

func (w *Router[T]) BackButtonDispatcher() BackButtonDispatcher

BackButtonDispatcher is the dispatcher of the router.

Flutter: widgets/router.dart Router.backButtonDispatcher

func (*Router[T]) CreateState

func (w *Router[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/router.dart Router.createState

func (*Router[T]) RouteInformationParser

func (w *Router[T]) RouteInformationParser() RouteInformationParser[T]

RouteInformationParser is the parser of the router.

Flutter: widgets/router.dart Router.routeInformationParser

func (*Router[T]) RouteInformationProvider

func (w *Router[T]) RouteInformationProvider() RouteInformationProvider

RouteInformationProvider is the provider of the router.

Flutter: widgets/router.dart Router.routeInformationProvider

func (*Router[T]) RouterDelegate

func (w *Router[T]) RouterDelegate() RouterDelegate[T]

RouterDelegate is the delegate of the router.

Flutter: widgets/router.dart Router.routerDelegate

type RouterConfig

type RouterConfig[T any] struct {
	// RouteInformationProvider provides the route information of the platform;
	// when it is set the parser must be too.
	RouteInformationProvider RouteInformationProvider
	// RouteInformationParser parses the route information into a configuration.
	RouteInformationParser RouteInformationParser[T]
	// RouterDelegate builds the widgets of the router for the configuration; it is
	// required.
	RouterDelegate RouterDelegate[T]
	// BackButtonDispatcher tells the router that the platform wants to pop.
	BackButtonDispatcher BackButtonDispatcher
}

RouterConfig is the set of objects that configure a Router: the objects of WidgetsApp.router and MaterialApp.router.

Flutter: widgets/router.dart RouterConfig

type RouterDelegate

type RouterDelegate[T any] interface {
	foundation.Listenable
	// SetInitialRoutePath is called when the router is created and the platform
	// gave an initial route; the default calls SetNewRoutePath.
	//
	// Flutter: widgets/router.dart RouterDelegate.setInitialRoutePath
	SetInitialRoutePath(configuration T) *Future[struct{}]
	// SetRestoredRoutePath is called when the router restores its state; the
	// default calls SetNewRoutePath.
	//
	// Flutter: widgets/router.dart RouterDelegate.setRestoredRoutePath
	SetRestoredRoutePath(configuration T) *Future[struct{}]
	// SetNewRoutePath is called when the platform pushes a new route and the
	// parser made the configuration of it; the future completes when the delegate
	// is ready to build.
	//
	// Flutter: widgets/router.dart RouterDelegate.setNewRoutePath
	SetNewRoutePath(configuration T) *Future[struct{}]
	// PopRoute is called when the back button is pressed; it returns true when it
	// handled it.
	//
	// Deviation: Flutter's popRoute returns a Future<bool>; Glutter's is synchronous
	// because Navigator.maybePop is (SPEC §12.10).
	//
	// Flutter: widgets/router.dart RouterDelegate.popRoute
	PopRoute() bool
	// CurrentConfiguration is the configuration of the app, which the parser
	// converts to route information for the platform, or none.
	//
	// Flutter: widgets/router.dart RouterDelegate.currentConfiguration
	CurrentConfiguration() foundation.Opt[T]
	// Build builds the widgets of the router.
	//
	// Flutter: widgets/router.dart RouterDelegate.build
	Build(bc BuildContext) Widget
}

RouterDelegate builds the widgets of a Router for a configuration of the app, and tells the router to rebuild (it is a Listenable) when the configuration changes.

Flutter: widgets/router.dart RouterDelegate

type RouterDelegateBase

type RouterDelegateBase[T any] struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

RouterDelegateBase implements the defaults of RouterDelegate and its Listenable: embed it, call InitRouterDelegateBase, and implement SetNewRoutePath, PopRoute and Build.

Flutter: widgets/router.dart RouterDelegate

func (*RouterDelegateBase[T]) CurrentConfiguration

func (b *RouterDelegateBase[T]) CurrentConfiguration() foundation.Opt[T]

CurrentConfiguration is none.

Flutter: widgets/router.dart RouterDelegate.currentConfiguration

func (*RouterDelegateBase[T]) SetInitialRoutePath

func (b *RouterDelegateBase[T]) SetInitialRoutePath(configuration T) *Future[struct{}]

SetInitialRoutePath calls SetNewRoutePath.

Flutter: widgets/router.dart RouterDelegate.setInitialRoutePath

func (*RouterDelegateBase[T]) SetRestoredRoutePath

func (b *RouterDelegateBase[T]) SetRestoredRoutePath(configuration T) *Future[struct{}]

SetRestoredRoutePath calls SetNewRoutePath.

Flutter: widgets/router.dart RouterDelegate.setRestoredRoutePath

type RouterOpts

type RouterOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// RouteInformationProvider provides the route information of the platform;
	// when it is set RouteInformationParser must be too.
	RouteInformationProvider RouteInformationProvider
	// RouteInformationParser parses the route information into a configuration.
	RouteInformationParser RouteInformationParser[T]
	// BackButtonDispatcher tells the router that the platform wants to pop.
	BackButtonDispatcher BackButtonDispatcher
}

RouterOpts are the optional parameters of NewRouter.

Flutter: widgets/router.dart Router.new

type Row

type Row struct{ Flex }

Row displays its children in a horizontal array.

Flutter: widgets/basic.dart Row

func NewRow

func NewRow(children []Widget, opts ...RowOpts) *Row

NewRow creates a horizontal array of children.

Flutter: widgets/basic.dart Row.new

type RowOpts

type RowOpts = FlexOpts

RowOpts are the optional parameters of NewRow; they are those of NewFlex.

Flutter: widgets/basic.dart Row.new

type RunAppOpts

type RunAppOpts struct {
	// Assets is the file system the AssetBundle reads from; without it the
	// bundle finds nothing.
	Assets fs.FS
	// AppID is the application ID: the Wayland app_id and the X11 WM_CLASS. It
	// must match the app's .desktop file.
	AppID string
	// Window is the config of the first window.
	Window WindowConfig
	// Fonts are loaded, in order, before the first frame, from bytes or from
	// Assets. A font that fails to load makes RunApp return the error
	// (FontSourceInvalid, AssetNotFound, FontDataInvalid...). More fonts can be
	// loaded later with PlatformDispatcher.LoadFontFromList or services.FontLoader.
	Fonts []FontSource
	// Backend, when not empty, is "wayland" or "x11" and overrides
	// GLUTTER_BACKEND.
	Backend string
	// Renderer, when not empty, is "auto" or the name of the renderer ("vulkan" or
	// "gles" on Linux), and overrides GLUTTER_RENDERER. Empty means "auto". A
	// renderer that is asked for by name never falls back; a name that is not a
	// renderer is RendererUnknown, and one that this OS or build lacks is
	// RendererUnavailable (SPEC §9.6).
	Renderer string
	// Gamepads is the gamepad mode: "auto" (the default), "ondemand" or "off". In "auto" a pad moves the focus of the app, as key
	// events, but the service only reads the pads until the app uses package gamepad, and nothing is written to a pad; "ondemand"
	// starts nothing until the app uses it; "off" never starts the service. GLUTTER_GAMEPADS overrides it. A value that is no
	// mode is GamepadsModeUnknown (SPEC §28.2).
	Gamepads string
	// ErrorReporter receives the errors the framework recovers from or reports
	// (SPEC §14.2). The default logs each one, as JSON, through Logger.
	ErrorReporter foundation.ErrorReporter
	// ErrorWidgetBuilder builds the widget that replaces a widget that panicked
	// in Build; the default is a red box with the message in debug builds and a
	// gray box in release builds.
	ErrorWidgetBuilder func(err error) Widget
	// Logger gets the log of the engine and of the default error reporter;
	// slog.Default() when nil.
	Logger *slog.Logger
	// Debug are the debug flags (SPEC §14.3); the default is a fresh set, all
	// off.
	Debug *DebugOptions
}

RunAppOpts are the optional parameters of RunApp and RunWidget (SPEC §13).

Flutter: widgets/binding.dart runApp

type SafeArea

type SafeArea struct {
	StatelessWidget
	// contains filtered or unexported fields
}

SafeArea is a widget that insets its child by sufficient padding to avoid intrusions by the operating system.

Flutter: widgets/safe_area.dart SafeArea

func NewSafeArea

func NewSafeArea(child Widget, opts ...SafeAreaOpts) *SafeArea

NewSafeArea creates the widget.

Flutter: widgets/safe_area.dart SafeArea.new

func (*SafeArea) Build

func (w *SafeArea) Build(bc BuildContext) Widget

Build pads the child and removes the padding from the MediaQuery below.

Flutter: widgets/safe_area.dart SafeArea.build

type SafeAreaOpts

type SafeAreaOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Left says whether to avoid system intrusions on the left; the default is
	// true.
	Left foundation.Opt[bool]
	// Top says whether to avoid system intrusions at the top; the default is true.
	Top foundation.Opt[bool]
	// Right says whether to avoid system intrusions on the right; the default is
	// true.
	Right foundation.Opt[bool]
	// Bottom says whether to avoid system intrusions at the bottom; the default
	// is true.
	Bottom foundation.Opt[bool]
	// Minimum is the minimum padding to apply.
	Minimum painting.EdgeInsets
	// MaintainBottomViewPadding says whether to use the view padding instead of
	// the padding at the bottom, which does not change when the keyboard shows.
	MaintainBottomViewPadding bool
}

SafeAreaOpts are the optional parameters of NewSafeArea.

Flutter: widgets/safe_area.dart SafeArea.new

type ScaleTransition

type ScaleTransition struct{ MatrixTransition }

ScaleTransition animates the scale of a transformed widget.

Flutter: widgets/transitions.dart ScaleTransition

func NewScaleTransition

func NewScaleTransition(scale animation.Animation[float64], child Widget, opts ...ScaleTransitionOpts) *ScaleTransition

NewScaleTransition creates the widget; the scale is applied to x and y.

Flutter: widgets/transitions.dart ScaleTransition.new

func (*ScaleTransition) Scale

Scale is the animation of the scale.

Flutter: widgets/transitions.dart ScaleTransition.scale

type ScaleTransitionOpts

type ScaleTransitionOpts = MatrixTransitionOpts

ScaleTransitionOpts are the optional parameters of NewScaleTransition.

Flutter: widgets/transitions.dart ScaleTransition.new

type ScrollAction

type ScrollAction struct{ ContextActionBase }

ScrollAction is the action that scrolls the Scrollable around the primary focus (or the one attached to the PrimaryScrollController) for a ScrollIntent.

Flutter: widgets/scrollable_helpers.dart ScrollAction

func NewScrollAction

func NewScrollAction() *ScrollAction

NewScrollAction creates the action.

Flutter: widgets/scrollable_helpers.dart ScrollAction.new

func (*ScrollAction) IntentType

func (a *ScrollAction) IntentType() reflect.Type

IntentType is ScrollIntent.

Flutter: widgets/actions.dart Action.intentType

func (*ScrollAction) InvokeWithContext

func (a *ScrollAction) InvokeWithContext(intent Intent, bc BuildContext) any

InvokeWithContext scrolls the scrollable by an increment in the direction of the intent, with a short animation.

Flutter: widgets/scrollable_helpers.dart ScrollAction.invoke

func (*ScrollAction) IsEnabledWithContext

func (a *ScrollAction) IsEnabledWithContext(_ Intent, bc BuildContext) bool

IsEnabledWithContext is whether there is a Scrollable around the context, or the primary scroll controller has a client.

Flutter: widgets/scrollable_helpers.dart ScrollAction.isEnabled

type ScrollActivity

type ScrollActivity interface {
	// Delegate is the object that this activity changes.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.delegate
	Delegate() ScrollActivityDelegate
	// UpdateDelegate changes the delegate; it panics with the tag
	// ScrollActivityDelegateSame in debug builds when it is the same one.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.updateDelegate
	UpdateDelegate(delegate ScrollActivityDelegate)
	// ResetActivity is called when the position that owns the activity is
	// replaced by one of another type.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.resetActivity
	ResetActivity()
	// DispatchScrollStartNotification dispatches a ScrollStartNotification.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.dispatchScrollStartNotification
	DispatchScrollStartNotification(metrics ScrollMetrics, bc BuildContext)
	// DispatchScrollUpdateNotification dispatches a ScrollUpdateNotification.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.dispatchScrollUpdateNotification
	DispatchScrollUpdateNotification(metrics ScrollMetrics, bc BuildContext, scrollDelta float64)
	// DispatchOverscrollNotification dispatches an OverscrollNotification.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.dispatchOverscrollNotification
	DispatchOverscrollNotification(metrics ScrollMetrics, bc BuildContext, overscroll float64)
	// DispatchScrollEndNotification dispatches a ScrollEndNotification.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.dispatchScrollEndNotification
	DispatchScrollEndNotification(metrics ScrollMetrics, bc BuildContext)
	// ApplyNewDimensions is called when the dimensions of the content or the
	// viewport changed.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.applyNewDimensions
	ApplyNewDimensions()
	// ShouldIgnorePointer is whether the scrollable ignores pointer events while
	// this activity runs.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.shouldIgnorePointer
	ShouldIgnorePointer() bool
	// IsScrolling is whether the scrollable is in motion.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.isScrolling
	IsScrolling() bool
	// Velocity is the velocity of the scrollable, in pixels per second.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.velocity
	Velocity() float64
	// Dispose is called when the activity is replaced or the position is
	// disposed.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.dispose
	Dispose()
	// String describes the activity.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivity.toString
	String() string
}

ScrollActivity is the activity a scroll position is in: idle, held, dragged, carried by a simulation, or driven by an animation. It changes the position through its delegate and dispatches the notifications.

Implement it by embedding ScrollActivityBase (InitScrollActivityBase).

Flutter: widgets/scroll_activity.dart ScrollActivity

type ScrollActivityBase

type ScrollActivityBase struct {
	// contains filtered or unexported fields
}

ScrollActivityBase implements the parts of ScrollActivity that every activity shares: the delegate, the notifications and the disposed flag. Embed it and call InitScrollActivityBase.

Flutter: widgets/scroll_activity.dart ScrollActivity

func (*ScrollActivityBase) ApplyNewDimensions

func (b *ScrollActivityBase) ApplyNewDimensions()

ApplyNewDimensions does nothing.

Flutter: widgets/scroll_activity.dart ScrollActivity.applyNewDimensions

func (*ScrollActivityBase) Delegate

Delegate is the object that this activity changes.

Flutter: widgets/scroll_activity.dart ScrollActivity.delegate

func (*ScrollActivityBase) DispatchOverscrollNotification

func (b *ScrollActivityBase) DispatchOverscrollNotification(metrics ScrollMetrics, bc BuildContext, overscroll float64)

DispatchOverscrollNotification dispatches an OverscrollNotification without drag details.

Flutter: widgets/scroll_activity.dart ScrollActivity.dispatchOverscrollNotification

func (*ScrollActivityBase) DispatchScrollEndNotification

func (b *ScrollActivityBase) DispatchScrollEndNotification(metrics ScrollMetrics, bc BuildContext)

DispatchScrollEndNotification dispatches a ScrollEndNotification without drag details.

Flutter: widgets/scroll_activity.dart ScrollActivity.dispatchScrollEndNotification

func (*ScrollActivityBase) DispatchScrollStartNotification

func (b *ScrollActivityBase) DispatchScrollStartNotification(metrics ScrollMetrics, bc BuildContext)

DispatchScrollStartNotification dispatches a ScrollStartNotification without drag details.

Flutter: widgets/scroll_activity.dart ScrollActivity.dispatchScrollStartNotification

func (*ScrollActivityBase) DispatchScrollUpdateNotification

func (b *ScrollActivityBase) DispatchScrollUpdateNotification(metrics ScrollMetrics, bc BuildContext, scrollDelta float64)

DispatchScrollUpdateNotification dispatches a ScrollUpdateNotification without drag details.

Flutter: widgets/scroll_activity.dart ScrollActivity.dispatchScrollUpdateNotification

func (*ScrollActivityBase) Dispose

func (b *ScrollActivityBase) Dispose()

Dispose marks the activity disposed.

Flutter: widgets/scroll_activity.dart ScrollActivity.dispose

func (*ScrollActivityBase) IsDisposed

func (b *ScrollActivityBase) IsDisposed() bool

IsDisposed is whether Dispose was called.

Flutter: widgets/scroll_activity.dart ScrollActivity._isDisposed

func (*ScrollActivityBase) ResetActivity

func (b *ScrollActivityBase) ResetActivity()

ResetActivity does nothing.

Flutter: widgets/scroll_activity.dart ScrollActivity.resetActivity

func (*ScrollActivityBase) String

func (b *ScrollActivityBase) String() string

String is the identity of the activity.

Flutter: widgets/scroll_activity.dart ScrollActivity.toString

func (*ScrollActivityBase) UpdateDelegate

func (b *ScrollActivityBase) UpdateDelegate(delegate ScrollActivityDelegate)

UpdateDelegate changes the delegate.

Flutter: widgets/scroll_activity.dart ScrollActivity.updateDelegate

type ScrollActivityDelegate

type ScrollActivityDelegate interface {
	// AxisDirection is the direction in which the scroll offset increases.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivityDelegate.axisDirection
	AxisDirection() painting.AxisDirection
	// SetPixels updates the scroll position to the given pixel value, and returns
	// the overscroll: the part of the change that was not applied.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivityDelegate.setPixels
	SetPixels(pixels float64) float64
	// ApplyUserOffset updates the scroll position by a user's drag of delta
	// pixels, after the physics have applied their friction.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivityDelegate.applyUserOffset
	ApplyUserOffset(delta float64)
	// GoIdle ends the current activity and starts an idle one.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivityDelegate.goIdle
	GoIdle()
	// GoBallistic ends the current activity and starts a ballistic one with the
	// velocity.
	//
	// Flutter: widgets/scroll_activity.dart ScrollActivityDelegate.goBallistic
	GoBallistic(velocity float64)
}

ScrollActivityDelegate is the interface a ScrollActivity uses to change the scroll position, and to hand over to another activity. The scroll position implements it.

Flutter: widgets/scroll_activity.dart ScrollActivityDelegate

type ScrollBehavior

type ScrollBehavior interface {
	// CopyWith returns a behavior that wraps this one, with the given values
	// changed.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.copyWith
	CopyWith(changes ...ScrollBehaviorCopy) ScrollBehavior
	// GetPlatform is the platform the scrollable behaves like; the default is
	// foundation.DefaultTargetPlatform.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.getPlatform
	GetPlatform(bc BuildContext) foundation.TargetPlatform
	// DragDevices are the kinds of pointer that can drag the scrollable.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.dragDevices
	DragDevices() []ui.PointerDeviceKind
	// GetMultitouchDragStrategy is how a drag follows several fingers.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.getMultitouchDragStrategy
	GetMultitouchDragStrategy(bc BuildContext) gestures.MultitouchDragStrategy
	// PointerAxisModifiers are the keys that make a mouse wheel scroll the other
	// axis while one of them is held; the default is the two Shift keys.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.pointerAxisModifiers
	PointerAxisModifiers() []services.LogicalKeyboardKey
	// BuildScrollbar wraps the child in a scrollbar; the default is a
	// RawScrollbar on Linux, macOS and Windows.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.buildScrollbar
	BuildScrollbar(bc BuildContext, child Widget, details ScrollableDetails) Widget
	// BuildOverscrollIndicator wraps the child in an overscroll indicator; the
	// default is a GlowingOverscrollIndicator on Android and Fuchsia, and the
	// child on the other platforms.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.buildOverscrollIndicator
	BuildOverscrollIndicator(bc BuildContext, child Widget, details ScrollableDetails) Widget
	// VelocityTrackerBuilder makes the velocity tracker of a pointer.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.velocityTrackerBuilder
	VelocityTrackerBuilder(bc BuildContext) gestures.GestureVelocityTrackerBuilder
	// GetScrollPhysics are the default physics of the scrollables.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.getScrollPhysics
	GetScrollPhysics(bc BuildContext) ScrollPhysics
	// ShouldNotify is whether the scrollables that depend on the configuration
	// should rebuild when this behavior replaces the old one of the same type.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.shouldNotify
	ShouldNotify(oldDelegate ScrollBehavior) bool
	// GetKeyboardDismissBehavior is how scroll views react to a drag with the
	// keyboard open.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.getKeyboardDismissBehavior
	GetKeyboardDismissBehavior(bc BuildContext) ScrollViewKeyboardDismissBehavior
	// String is the name of the type of the behavior.
	//
	// Flutter: widgets/scroll_configuration.dart ScrollBehavior.toString
	String() string
}

ScrollBehavior describes how a scrollable behaves on a platform: which pointers drag it, its physics, its scrollbar and its overscroll indicator. ScrollConfiguration gives it to the scrollables below it.

Implement it by embedding ScrollBehaviorBase (InitScrollBehaviorBase) and overriding what differs.

Flutter: widgets/scroll_configuration.dart ScrollBehavior

func NewScrollBehavior

func NewScrollBehavior() ScrollBehavior

NewScrollBehavior creates the default behavior.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.new

func ScrollConfigurationOf

func ScrollConfigurationOf(bc BuildContext) ScrollBehavior

ScrollConfigurationOf is the behavior of the closest ScrollConfiguration above the context, or the default one. The context depends on it.

Flutter: widgets/scroll_configuration.dart ScrollConfiguration.of

type ScrollBehaviorBase

type ScrollBehaviorBase struct {
	// contains filtered or unexported fields
}

ScrollBehaviorBase implements ScrollBehavior with Flutter's defaults for the platform. Embed it and call InitScrollBehaviorBase with the outer value so that the methods call the outer type's overrides.

Flutter: widgets/scroll_configuration.dart ScrollBehavior

func (*ScrollBehaviorBase) BuildOverscrollIndicator

func (b *ScrollBehaviorBase) BuildOverscrollIndicator(bc BuildContext, child Widget, details ScrollableDetails) Widget

BuildOverscrollIndicator applies a GlowingOverscrollIndicator to the child on Android and Fuchsia, and returns the child on the other platforms.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.buildOverscrollIndicator

func (*ScrollBehaviorBase) BuildScrollbar

func (b *ScrollBehaviorBase) BuildScrollbar(bc BuildContext, child Widget, details ScrollableDetails) Widget

BuildScrollbar is a RawScrollbar on Linux, macOS and Windows, and the child on the other platforms.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.buildScrollbar

func (*ScrollBehaviorBase) CopyWith

func (b *ScrollBehaviorBase) CopyWith(changes ...ScrollBehaviorCopy) ScrollBehavior

CopyWith returns a behavior that wraps this one, with the given values changed.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.copyWith

func (*ScrollBehaviorBase) DragDevices

func (b *ScrollBehaviorBase) DragDevices() []ui.PointerDeviceKind

DragDevices are the kinds of pointer other than a mouse.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.dragDevices

func (*ScrollBehaviorBase) GetKeyboardDismissBehavior

func (b *ScrollBehaviorBase) GetKeyboardDismissBehavior(BuildContext) ScrollViewKeyboardDismissBehavior

GetKeyboardDismissBehavior is manual.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.getKeyboardDismissBehavior

func (*ScrollBehaviorBase) GetMultitouchDragStrategy

func (b *ScrollBehaviorBase) GetMultitouchDragStrategy(bc BuildContext) gestures.MultitouchDragStrategy

GetMultitouchDragStrategy is the average of the boundary pointers on macOS and iOS, and the latest pointer elsewhere.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.getMultitouchDragStrategy

func (*ScrollBehaviorBase) GetPlatform

GetPlatform is foundation.DefaultTargetPlatform.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.getPlatform

func (*ScrollBehaviorBase) GetScrollPhysics

func (b *ScrollBehaviorBase) GetScrollPhysics(bc BuildContext) ScrollPhysics

GetScrollPhysics are bouncing physics on iOS, fast bouncing physics on macOS and clamping physics elsewhere, each over RangeMaintainingScrollPhysics.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.getScrollPhysics

func (*ScrollBehaviorBase) PointerAxisModifiers

func (b *ScrollBehaviorBase) PointerAxisModifiers() []services.LogicalKeyboardKey

PointerAxisModifiers are the two Shift keys.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.pointerAxisModifiers

func (*ScrollBehaviorBase) ShouldNotify

func (b *ScrollBehaviorBase) ShouldNotify(ScrollBehavior) bool

ShouldNotify is false.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.shouldNotify

func (*ScrollBehaviorBase) String

func (b *ScrollBehaviorBase) String() string

String is the name of the type of the behavior.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.toString

func (*ScrollBehaviorBase) VelocityTrackerBuilder

VelocityTrackerBuilder makes the iOS tracker on iOS, the macOS tracker on macOS and the plain one elsewhere.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.velocityTrackerBuilder

type ScrollBehaviorCopy

type ScrollBehaviorCopy struct {
	// Scrollbars is whether to build a scrollbar; the default is true.
	Scrollbars foundation.Opt[bool]
	// Overscroll is whether to build an overscroll indicator; the default is
	// true.
	Overscroll foundation.Opt[bool]
	// DragDevices replaces the kinds of pointer that drag; nil keeps them.
	DragDevices []ui.PointerDeviceKind
	// MultitouchDragStrategy replaces the strategy; the Unspecified value keeps
	// it.
	MultitouchDragStrategy gestures.MultitouchDragStrategy
	// PointerAxisModifiers replaces the keys that flip the axis of the wheel; nil
	// keeps them.
	PointerAxisModifiers []services.LogicalKeyboardKey
	// Physics replaces the physics; nil keeps them.
	Physics ScrollPhysics
	// Platform replaces the platform; the Unspecified value keeps it.
	Platform foundation.TargetPlatform
	// KeyboardDismissBehavior replaces the behavior; the Unspecified value keeps
	// it.
	KeyboardDismissBehavior ScrollViewKeyboardDismissBehavior
}

ScrollBehaviorCopy are the values that ScrollBehavior.CopyWith changes.

Flutter: widgets/scroll_configuration.dart ScrollBehavior.copyWith

type ScrollConfiguration

type ScrollConfiguration struct {
	InheritedWidget
	// contains filtered or unexported fields
}

ScrollConfiguration controls how Scrollable widgets behave in a subtree: it gives them a ScrollBehavior.

Flutter: widgets/scroll_configuration.dart ScrollConfiguration

func NewScrollConfiguration

func NewScrollConfiguration(behavior ScrollBehavior, child Widget, opts ...WidgetOpts) *ScrollConfiguration

NewScrollConfiguration creates the widget.

Flutter: widgets/scroll_configuration.dart ScrollConfiguration.new

func (*ScrollConfiguration) Behavior

func (w *ScrollConfiguration) Behavior() ScrollBehavior

Behavior is the scroll behavior for the subtree.

Flutter: widgets/scroll_configuration.dart ScrollConfiguration.behavior

func (*ScrollConfiguration) UpdateShouldNotify

func (w *ScrollConfiguration) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the behavior is of another type, or notifies.

Flutter: widgets/scroll_configuration.dart ScrollConfiguration.updateShouldNotify

type ScrollContext

type ScrollContext interface {
	// NotificationContext is the context the scroll notifications are
	// dispatched from, or nil when the scrollable is not built.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.notificationContext
	NotificationContext() BuildContext
	// StorageContext is the context that identifies the scrollable in a
	// PageStorage, and where the position gets the widgets binding.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.storageContext
	StorageContext() BuildContext
	// Vsync is the ticker provider the position's animations use.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.vsync
	Vsync() scheduler.TickerProvider
	// AxisDirection is the direction in which the scroll offset increases.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.axisDirection
	AxisDirection() painting.AxisDirection
	// DevicePixelRatio is the device pixel ratio of the display the scrollable
	// is on.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.devicePixelRatio
	DevicePixelRatio() float64
	// SetIgnorePointer makes the scrollable ignore (or stop ignoring) pointer
	// events.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.setIgnorePointer
	SetIgnorePointer(value bool)
	// SetCanDrag says whether the user can drag the scrollable.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.setCanDrag
	SetCanDrag(value bool)
	// SetSemanticsActions sets the scroll actions the semantics of the
	// scrollable offers.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.setSemanticsActions
	SetSemanticsActions(actions map[ui.SemanticsAction]struct{})
	// SaveOffset saves the scroll offset so that it can be restored.
	//
	// Flutter: widgets/scroll_context.dart ScrollContext.saveOffset
	SaveOffset(offset float64)
}

ScrollContext is what a ScrollPosition asks of the scrollable that owns it: its place in the widget tree, a ticker provider for its animations, its axis, and a way to tell it that the user can drag it, that pointers are to be ignored while it scrolls, and what its semantics can do. ScrollableState implements it.

Flutter: widgets/scroll_context.dart ScrollContext

type ScrollController

type ScrollController interface {
	foundation.Listenable
	// InitialScrollOffset is the initial scroll offset that the controller gives
	// the positions it creates.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.initialScrollOffset
	InitialScrollOffset() float64
	// KeepScrollOffset is whether the positions save their offset in the
	// PageStorage.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.keepScrollOffset
	KeepScrollOffset() bool
	// DebugLabel names the controller in debug output.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.debugLabel
	DebugLabel() string
	// Positions are the scroll positions attached to the controller.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.positions
	Positions() []ScrollPosition
	// HasClients is whether any position is attached.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.hasClients
	HasClients() bool
	// Position is the position attached; it panics with the tag
	// ScrollControllerNotAttached in debug builds when there is none, and with
	// ScrollControllerMultipleClients when there are several.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.position
	Position() ScrollPosition
	// Offset is the scroll offset of the attached position.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.offset
	Offset() float64
	// AnimateTo animates the positions to the offset.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.animateTo
	AnimateTo(offset float64, duration time.Duration, curve animation.Curve) *scheduler.TickerFuture
	// JumpTo changes the positions to the offset.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.jumpTo
	JumpTo(value float64)
	// Attach registers the position to the controller.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.attach
	Attach(position ScrollPosition)
	// Detach unregisters the position from the controller.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.detach
	Detach(position ScrollPosition)
	// CreateScrollPosition creates the position for the scrollable.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.createScrollPosition
	CreateScrollPosition(physics ScrollPhysics, context ScrollContext, oldPosition ScrollPosition) ScrollPosition
	// Dispose releases the controller.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.dispose
	Dispose()
	// DebugFillDescription appends the parts of the description.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.debugFillDescription
	DebugFillDescription(description []string) []string
	// String describes the controller.
	//
	// Flutter: widgets/scroll_controller.dart ScrollController.toString
	String() string
}

ScrollController controls one or more scrollables: it reads and changes their scroll position, and notifies its listeners when a position changes. Pass it to a scrollable; it creates the position (CreateScrollPosition) and attaches it.

Implement it by embedding ScrollControllerBase (InitScrollControllerBase) to change how the positions are created or attached.

Flutter: widgets/scroll_controller.dart ScrollController

func PrimaryScrollControllerMaybeOf

func PrimaryScrollControllerMaybeOf(bc BuildContext) ScrollController

PrimaryScrollControllerMaybeOf is the controller of the closest PrimaryScrollController above the context, or nil. The context depends on it.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.maybeOf

func PrimaryScrollControllerOf

func PrimaryScrollControllerOf(bc BuildContext) ScrollController

PrimaryScrollControllerOf is the controller of the closest PrimaryScrollController above the context. In debug builds it panics with the tag PrimaryScrollControllerMissing when there is none.

Flutter: widgets/primary_scroll_controller.dart PrimaryScrollController.of

type ScrollControllerBase

type ScrollControllerBase struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

ScrollControllerBase implements ScrollController. It is what NewScrollController returns; embed it to extend the controller.

Flutter: widgets/scroll_controller.dart ScrollController

func NewScrollController

func NewScrollController(opts ...ScrollControllerOpts) *ScrollControllerBase

NewScrollController creates a controller.

Flutter: widgets/scroll_controller.dart ScrollController.new

func (*ScrollControllerBase) AnimateTo

func (c *ScrollControllerBase) AnimateTo(offset float64, duration time.Duration, curve animation.Curve) *scheduler.TickerFuture

AnimateTo animates every attached position to the offset. The future completes when all the animations have. In debug builds it panics with the tag ScrollControllerNotAttached when no position is attached.

Flutter: widgets/scroll_controller.dart ScrollController.animateTo

func (*ScrollControllerBase) Attach

func (c *ScrollControllerBase) Attach(position ScrollPosition)

Attach registers the position, and listens to it. In debug builds it panics with the tag ScrollControllerPositionAttached when it is attached already.

Flutter: widgets/scroll_controller.dart ScrollController.attach

func (*ScrollControllerBase) CreateScrollPosition

func (c *ScrollControllerBase) CreateScrollPosition(physics ScrollPhysics, context ScrollContext, oldPosition ScrollPosition) ScrollPosition

CreateScrollPosition creates a ScrollPositionWithSingleContext with the initial offset of the controller.

Flutter: widgets/scroll_controller.dart ScrollController.createScrollPosition

func (*ScrollControllerBase) DebugFillDescription

func (c *ScrollControllerBase) DebugFillDescription(description []string) []string

DebugFillDescription appends the label, the initial offset and the clients.

Flutter: widgets/scroll_controller.dart ScrollController.debugFillDescription

func (*ScrollControllerBase) DebugLabel

func (c *ScrollControllerBase) DebugLabel() string

DebugLabel names the controller in debug output.

Flutter: widgets/scroll_controller.dart ScrollController.debugLabel

func (*ScrollControllerBase) Detach

func (c *ScrollControllerBase) Detach(position ScrollPosition)

Detach unregisters the position. In debug builds it panics with the tag ScrollControllerPositionNotAttached when it is not attached.

Flutter: widgets/scroll_controller.dart ScrollController.detach

func (*ScrollControllerBase) Dispose

func (c *ScrollControllerBase) Dispose()

Dispose stops listening to the positions.

Flutter: widgets/scroll_controller.dart ScrollController.dispose

func (*ScrollControllerBase) HasClients

func (c *ScrollControllerBase) HasClients() bool

HasClients is whether any position is attached.

Flutter: widgets/scroll_controller.dart ScrollController.hasClients

func (*ScrollControllerBase) InitialScrollOffset

func (c *ScrollControllerBase) InitialScrollOffset() float64

InitialScrollOffset is the initial offset of the positions.

Flutter: widgets/scroll_controller.dart ScrollController.initialScrollOffset

func (*ScrollControllerBase) JumpTo

func (c *ScrollControllerBase) JumpTo(value float64)

JumpTo changes every attached position to the value. In debug builds it panics with the tag ScrollControllerNotAttached when no position is attached.

Flutter: widgets/scroll_controller.dart ScrollController.jumpTo

func (*ScrollControllerBase) KeepScrollOffset

func (c *ScrollControllerBase) KeepScrollOffset() bool

KeepScrollOffset is whether the positions save their offset in the PageStorage.

Flutter: widgets/scroll_controller.dart ScrollController.keepScrollOffset

func (*ScrollControllerBase) Offset

func (c *ScrollControllerBase) Offset() float64

Offset is the scroll offset of the attached position.

Flutter: widgets/scroll_controller.dart ScrollController.offset

func (*ScrollControllerBase) Position

func (c *ScrollControllerBase) Position() ScrollPosition

Position is the position attached to the controller.

Flutter: widgets/scroll_controller.dart ScrollController.position

func (*ScrollControllerBase) Positions

func (c *ScrollControllerBase) Positions() []ScrollPosition

Positions are the scroll positions attached to the controller.

Flutter: widgets/scroll_controller.dart ScrollController.positions

func (*ScrollControllerBase) String

func (c *ScrollControllerBase) String() string

String is the identity of the controller and its description.

Flutter: widgets/scroll_controller.dart ScrollController.toString

type ScrollControllerCallback

type ScrollControllerCallback func(position ScrollPosition)

ScrollControllerCallback is called with the position that a controller attached or detached.

Flutter: widgets/scroll_controller.dart ScrollControllerCallback

type ScrollControllerOpts

type ScrollControllerOpts struct {
	// InitialScrollOffset is the initial offset of the positions; the default is
	// 0.
	InitialScrollOffset float64
	// KeepScrollOffset is whether the positions save their offset in the
	// PageStorage; the default is true.
	KeepScrollOffset foundation.Opt[bool]
	// DebugLabel names the controller in debug output.
	DebugLabel string
	// OnAttach is called when a position is attached.
	OnAttach ScrollControllerCallback
	// OnDetach is called when a position is detached.
	OnDetach ScrollControllerCallback
}

ScrollControllerOpts are the optional parameters of NewScrollController.

Flutter: widgets/scroll_controller.dart ScrollController.new

type ScrollDecelerationRate

type ScrollDecelerationRate int

ScrollDecelerationRate is how quickly a BouncingScrollPhysics decelerates.

Flutter: widgets/scroll_physics.dart ScrollDecelerationRate

const (
	// ScrollDecelerationRateUnspecified is the zero value: the physics'
	// default, which is ScrollDecelerationRateNormal.
	//
	// Flutter: no counterpart
	ScrollDecelerationRateUnspecified ScrollDecelerationRate = iota
	// ScrollDecelerationRateNormal is the default rate, used on iOS.
	//
	// Flutter: widgets/scroll_physics.dart ScrollDecelerationRate.normal
	ScrollDecelerationRateNormal
	// ScrollDecelerationRateFast decelerates quicker; macOS uses it.
	//
	// Flutter: widgets/scroll_physics.dart ScrollDecelerationRate.fast
	ScrollDecelerationRateFast
)

func (ScrollDecelerationRate) String

func (r ScrollDecelerationRate) String() string

String is the name with the enum, such as "ScrollDecelerationRate.fast".

Flutter: widgets/scroll_physics.dart ScrollDecelerationRate

type ScrollDragController

type ScrollDragController struct {
	// contains filtered or unexported fields
}

ScrollDragController is the Drag that a scroll position hands to the gesture recognizer: it turns the updates of the drag into scroll offsets.

Flutter: widgets/scroll_activity.dart ScrollDragController

func NewScrollDragController

func NewScrollDragController(delegate ScrollActivityDelegate, details gestures.DragStartDetails, opts ...ScrollDragControllerOpts) *ScrollDragController

NewScrollDragController creates the controller for the drag that started with details. In debug builds it panics with the tag ScrollDragThresholdInvalid when the motion start distance threshold is not positive.

Flutter: widgets/scroll_activity.dart ScrollDragController.new

func (*ScrollDragController) Cancel

func (c *ScrollDragController) Cancel()

Cancel goes ballistic with no velocity.

Flutter: widgets/scroll_activity.dart ScrollDragController.cancel

func (*ScrollDragController) Delegate

Delegate is the object that the drag changes.

Flutter: widgets/scroll_activity.dart ScrollDragController.delegate

func (*ScrollDragController) Dispose

func (c *ScrollDragController) Dispose()

Dispose forgets the last details and calls the drag canceled callback.

Flutter: widgets/scroll_activity.dart ScrollDragController.dispose

func (*ScrollDragController) End

End goes ballistic with the velocity of the drag, plus the carried momentum.

Flutter: widgets/scroll_activity.dart ScrollDragController.end

func (*ScrollDragController) LastDetails

func (c *ScrollDragController) LastDetails() any

LastDetails is the details of the last event of the drag: a DragStartDetails, a DragUpdateDetails or a DragEndDetails.

Flutter: widgets/scroll_activity.dart ScrollDragController.lastDetails

func (*ScrollDragController) String

func (c *ScrollDragController) String() string

String is the identity of the controller.

Flutter: widgets/scroll_activity.dart ScrollDragController.toString

func (*ScrollDragController) Update

func (c *ScrollDragController) Update(details gestures.DragUpdateDetails)

Update scrolls by the primary delta of the drag.

Flutter: widgets/scroll_activity.dart ScrollDragController.update

func (*ScrollDragController) UpdateDelegate

func (c *ScrollDragController) UpdateDelegate(delegate ScrollActivityDelegate)

UpdateDelegate changes the delegate; it panics with the tag ScrollActivityDelegateSame in debug builds when it is the same one.

Flutter: widgets/scroll_activity.dart ScrollDragController.updateDelegate

type ScrollDragControllerOpts

type ScrollDragControllerOpts struct {
	// OnDragCanceled is called when the controller is disposed.
	OnDragCanceled func()
	// CarriedVelocity is the velocity the scrollable had when the finger came
	// down, to be added to the fling.
	CarriedVelocity foundation.Opt[float64]
	// MotionStartDistanceThreshold is the distance the pointer must move before
	// the scrollable moves, after the motion stopped; it must be positive.
	MotionStartDistanceThreshold foundation.Opt[float64]
}

ScrollDragControllerOpts are the optional parameters of NewScrollDragController.

Flutter: widgets/scroll_activity.dart ScrollDragController.new

type ScrollEndNotification

type ScrollEndNotification struct {
	ScrollNotificationBase
	// DragDetails is the details of the drag that ended the scroll, if the
	// user's drag did.
	//
	// Flutter: widgets/scroll_notification.dart ScrollEndNotification.dragDetails
	DragDetails foundation.Opt[gestures.DragEndDetails]
}

ScrollEndNotification indicates that a descendant scrollable has ended scrolling.

Flutter: widgets/scroll_notification.dart ScrollEndNotification

func NewScrollEndNotification

func NewScrollEndNotification(metrics ScrollMetrics, context BuildContext, dragDetails foundation.Opt[gestures.DragEndDetails]) *ScrollEndNotification

NewScrollEndNotification creates the notification.

Flutter: widgets/scroll_notification.dart ScrollEndNotification.new

func (*ScrollEndNotification) String

func (n *ScrollEndNotification) String() string

String describes the notification.

Flutter: widgets/scroll_notification.dart ScrollEndNotification.debugFillDescription

type ScrollHoldController

type ScrollHoldController interface {
	// Cancel releases the hold; the scrollable goes ballistic with no velocity.
	//
	// Flutter: widgets/scroll_activity.dart ScrollHoldController.cancel
	Cancel()
}

ScrollHoldController is the handle of a hold on a scroll position: the user has touched down and the scrollable stops.

Flutter: widgets/scroll_activity.dart ScrollHoldController

type ScrollIncrementCalculator

type ScrollIncrementCalculator func(details ScrollIncrementDetails) float64

ScrollIncrementCalculator is the size of a scroll increment, in pixels. A Scrollable can have its own.

Flutter: widgets/scrollable_helpers.dart ScrollIncrementCalculator

type ScrollIncrementDetails

type ScrollIncrementDetails struct {
	// Type is the type of the increment.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollIncrementDetails.type
	Type ScrollIncrementType
	// Metrics are the metrics of the scrollable.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollIncrementDetails.metrics
	Metrics ScrollMetrics
}

ScrollIncrementDetails describes a scroll increment: its type and the metrics of the scrollable.

Flutter: widgets/scrollable_helpers.dart ScrollIncrementDetails

type ScrollIncrementType

type ScrollIncrementType int

ScrollIncrementType is the kind of increment of a scroll by keyboard or by a click on the scrollbar track.

Flutter: widgets/scrollable_helpers.dart ScrollIncrementType

const (
	// ScrollIncrementTypeUnspecified is the zero value: a line.
	//
	// Flutter: no counterpart
	ScrollIncrementTypeUnspecified ScrollIncrementType = iota
	// ScrollIncrementTypeLine is a small increment, 50 pixels by default.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollIncrementType.line
	ScrollIncrementTypeLine
	// ScrollIncrementTypePage is a page: 80% of the viewport by default.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollIncrementType.page
	ScrollIncrementTypePage
)

func (ScrollIncrementType) String

func (t ScrollIncrementType) String() string

String is the name with the enum, such as "ScrollIncrementType.page".

Flutter: widgets/scrollable_helpers.dart ScrollIncrementType

type ScrollIntent

type ScrollIntent struct {
	IntentBase
	// Direction is the direction to scroll in.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollIntent.direction
	Direction painting.AxisDirection
	// Type is the size of the increment; the default is a line.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollIntent.type
	Type ScrollIncrementType
}

ScrollIntent is what a request to scroll (a key press, a click on the track of a scrollbar) is: a direction and an increment type.

Flutter: widgets/scrollable_helpers.dart ScrollIntent

type ScrollMetrics

type ScrollMetrics interface {
	// CopyWith returns a snapshot of the metrics with the given values changed.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.copyWith
	CopyWith(changes ...ScrollMetricsChanges) ScrollMetrics
	// MinScrollExtent is the minimum in-range value for Pixels. It panics with
	// the tag ScrollMetricsValueMissing when HasContentDimensions is false.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.minScrollExtent
	MinScrollExtent() float64
	// MaxScrollExtent is the maximum in-range value for Pixels. It panics with
	// the tag ScrollMetricsValueMissing when HasContentDimensions is false.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.maxScrollExtent
	MaxScrollExtent() float64
	// HasContentDimensions is whether MinScrollExtent and MaxScrollExtent are
	// known.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.hasContentDimensions
	HasContentDimensions() bool
	// Pixels is the current scroll position, in logical pixels along the axis.
	// It panics with the tag ScrollMetricsValueMissing when HasPixels is false.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.pixels
	Pixels() float64
	// HasPixels is whether Pixels is known.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.hasPixels
	HasPixels() bool
	// ViewportDimension is the extent of the viewport along the axis. It panics
	// with the tag ScrollMetricsValueMissing when HasViewportDimension is false.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.viewportDimension
	ViewportDimension() float64
	// HasViewportDimension is whether ViewportDimension is known.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.hasViewportDimension
	HasViewportDimension() bool
	// AxisDirection is the direction in which the scroll offset increases.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.axisDirection
	AxisDirection() painting.AxisDirection
	// DevicePixelRatio is the ratio of physical pixels to logical pixels of the
	// display the scrollable is on.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.devicePixelRatio
	DevicePixelRatio() float64

	// Axis is the axis of AxisDirection.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.axis
	Axis() painting.Axis
	// OutOfRange is whether Pixels is outside MinScrollExtent..MaxScrollExtent.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.outOfRange
	OutOfRange() bool
	// AtEdge is whether Pixels is at an end of the scroll extent.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.atEdge
	AtEdge() bool
	// ExtentBefore is the extent of the content before the viewport.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.extentBefore
	ExtentBefore() float64
	// ExtentInside is the extent of the content that is visible in the
	// viewport.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.extentInside
	ExtentInside() float64
	// ExtentAfter is the extent of the content after the viewport.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.extentAfter
	ExtentAfter() float64
	// ExtentTotal is the extent of all the content, including what is before
	// and after the viewport.
	//
	// Flutter: widgets/scroll_metrics.dart ScrollMetrics.extentTotal
	ExtentTotal() float64
}

ScrollMetrics describes the state of a scrollable: how far it is scrolled, how large its viewport and its content are, and in which direction it scrolls. A ScrollPosition implements it, and the notifications carry a snapshot of it (FixedScrollMetrics).

Flutter: widgets/scroll_metrics.dart ScrollMetrics

type ScrollMetricsChanges

type ScrollMetricsChanges struct {
	// MinScrollExtent replaces the minimum scroll extent.
	MinScrollExtent foundation.Opt[float64]
	// MaxScrollExtent replaces the maximum scroll extent.
	MaxScrollExtent foundation.Opt[float64]
	// Pixels replaces the scroll position.
	Pixels foundation.Opt[float64]
	// ViewportDimension replaces the viewport extent.
	ViewportDimension foundation.Opt[float64]
	// AxisDirection replaces the axis direction; AxisDirectionUnspecified keeps
	// it.
	AxisDirection painting.AxisDirection
	// DevicePixelRatio replaces the device pixel ratio; zero keeps it.
	DevicePixelRatio float64
}

ScrollMetricsChanges are the values that ScrollMetrics.CopyWith changes; the ones left out keep the value of the metrics. Only the first value passed to CopyWith is used.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.copyWith

type ScrollMetricsMixin

type ScrollMetricsMixin struct {
	// contains filtered or unexported fields
}

ScrollMetricsMixin gives a type that implements the primitive methods of ScrollMetrics the derived ones (Axis, OutOfRange, AtEdge, ExtentBefore, ExtentInside, ExtentAfter, ExtentTotal) and CopyWith. Embed it and call InitScrollMetricsMixin with the outer value.

Flutter: widgets/scroll_metrics.dart ScrollMetrics

func (*ScrollMetricsMixin) AtEdge

func (m *ScrollMetricsMixin) AtEdge() bool

AtEdge is whether Pixels is at an end of the scroll extent.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.atEdge

func (*ScrollMetricsMixin) Axis

func (m *ScrollMetricsMixin) Axis() painting.Axis

Axis is the axis of AxisDirection.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.axis

func (*ScrollMetricsMixin) CopyWith

func (m *ScrollMetricsMixin) CopyWith(changes ...ScrollMetricsChanges) ScrollMetrics

CopyWith returns a snapshot of the metrics with the given values changed.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.copyWith

func (*ScrollMetricsMixin) ExtentAfter

func (m *ScrollMetricsMixin) ExtentAfter() float64

ExtentAfter is the extent of the content after the viewport.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.extentAfter

func (*ScrollMetricsMixin) ExtentBefore

func (m *ScrollMetricsMixin) ExtentBefore() float64

ExtentBefore is the extent of the content before the viewport.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.extentBefore

func (*ScrollMetricsMixin) ExtentInside

func (m *ScrollMetricsMixin) ExtentInside() float64

ExtentInside is the extent of the content that is visible in the viewport. In debug builds it panics with the tag ScrollMetricsExtentsInvalid when the minimum scroll extent is past the maximum.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.extentInside

func (*ScrollMetricsMixin) ExtentTotal

func (m *ScrollMetricsMixin) ExtentTotal() float64

ExtentTotal is the extent of all the content, including what is before and after the viewport.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.extentTotal

func (*ScrollMetricsMixin) OutOfRange

func (m *ScrollMetricsMixin) OutOfRange() bool

OutOfRange is whether Pixels is outside MinScrollExtent..MaxScrollExtent.

Flutter: widgets/scroll_metrics.dart ScrollMetrics.outOfRange

type ScrollMetricsNotification

type ScrollMetricsNotification struct {
	ViewportNotificationMixin
	// contains filtered or unexported fields
}

ScrollMetricsNotification indicates that the metrics of a descendant scrollable changed without the scroll position changing (for instance when the content grows).

Flutter: widgets/scroll_position.dart ScrollMetricsNotification

func NewScrollMetricsNotification

func NewScrollMetricsNotification(metrics ScrollMetrics, context BuildContext) *ScrollMetricsNotification

NewScrollMetricsNotification creates the notification.

Flutter: widgets/scroll_position.dart ScrollMetricsNotification.new

func (*ScrollMetricsNotification) AsScrollUpdate

AsScrollUpdate is the notification as a ScrollUpdateNotification with the same metrics, context and depth.

Flutter: widgets/scroll_position.dart ScrollMetricsNotification.asScrollUpdate

func (*ScrollMetricsNotification) Context

Context is the build context of the scrollable that dispatched the notification.

Flutter: widgets/scroll_position.dart ScrollMetricsNotification.context

func (*ScrollMetricsNotification) Metrics

Metrics is a snapshot of the scroll metrics when the notification was created.

Flutter: widgets/scroll_position.dart ScrollMetricsNotification.metrics

func (*ScrollMetricsNotification) String

func (n *ScrollMetricsNotification) String() string

String describes the notification.

Flutter: widgets/scroll_position.dart ScrollMetricsNotification.debugFillDescription

type ScrollNotification

type ScrollNotification interface {
	ViewportNotification
	// Metrics is a snapshot of the scroll metrics when the notification was
	// created.
	//
	// Flutter: widgets/scroll_notification.dart ScrollNotification.metrics
	Metrics() ScrollMetrics
	// Context is the build context of the scrollable that dispatched the
	// notification (the one of its notification context).
	//
	// Flutter: widgets/scroll_notification.dart ScrollNotification.context
	Context() BuildContext
	// IsScrollNotification marks the notifications that are scroll
	// notifications. ScrollMetricsNotification has the same methods as the rest
	// but is not one, as in Flutter, so the interface needs the mark.
	//
	// Flutter: no counterpart
	IsScrollNotification()
}

ScrollNotification is a notification about a change to a scrollable: the scroll started, updated, overscrolled or ended, or the user's scroll direction changed.

Flutter: widgets/scroll_notification.dart ScrollNotification

type ScrollNotificationBase

type ScrollNotificationBase struct {
	LayoutChangedNotification
	ViewportNotificationMixin
	// contains filtered or unexported fields
}

ScrollNotificationBase is the part that every ScrollNotification has. The concrete notifications embed it.

Deviation: Flutter's ScrollNotification extends LayoutChangedNotification, so a NotificationListener<LayoutChangedNotification> receives it; Go has no inheritance of types, so it does not (SPEC §12.10).

Flutter: widgets/scroll_notification.dart ScrollNotification

func (*ScrollNotificationBase) Context

func (n *ScrollNotificationBase) Context() BuildContext

Context is the build context of the scrollable that dispatched the notification.

Flutter: widgets/scroll_notification.dart ScrollNotification.context

func (*ScrollNotificationBase) IsScrollNotification

func (n *ScrollNotificationBase) IsScrollNotification()

IsScrollNotification marks the notification as a ScrollNotification.

Flutter: no counterpart

func (*ScrollNotificationBase) Metrics

Metrics is a snapshot of the scroll metrics when the notification was created.

Flutter: widgets/scroll_notification.dart ScrollNotification.metrics

type ScrollNotificationCallback

type ScrollNotificationCallback func(notification ScrollNotification)

ScrollNotificationCallback is called with the scroll notifications of the scrollables below a ScrollNotificationObserver.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationCallback

type ScrollNotificationListenerHandle

type ScrollNotificationListenerHandle struct {
	// contains filtered or unexported fields
}

ScrollNotificationListenerHandle identifies a listener added to a ScrollNotificationObserverState.

Flutter: no counterpart (Dart removes a listener by its function)

type ScrollNotificationObserver

type ScrollNotificationObserver struct {
	StatefulWidget
	// contains filtered or unexported fields
}

ScrollNotificationObserver notifies its listeners of the scroll notifications of the scrollables below it, without the listeners having to be above the scrollables in the tree.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserver

func NewScrollNotificationObserver

func NewScrollNotificationObserver(child Widget, opts ...WidgetOpts) *ScrollNotificationObserver

NewScrollNotificationObserver creates the widget.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserver.new

func (*ScrollNotificationObserver) Child

Child is the widget below this one.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserver.child

func (*ScrollNotificationObserver) CreateState

func (w *ScrollNotificationObserver) CreateState() State

CreateState creates the state.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserver.createState

type ScrollNotificationObserverState

type ScrollNotificationObserverState struct {
	StateOf[*ScrollNotificationObserver]
	// contains filtered or unexported fields
}

ScrollNotificationObserverState is the state of a ScrollNotificationObserver: it keeps the listeners.

Deviation: AddListener returns a handle that RemoveListener takes, where Dart removes the listener by its function (SPEC §12.10).

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserverState

func ScrollNotificationObserverMaybeOf

func ScrollNotificationObserverMaybeOf(bc BuildContext) *ScrollNotificationObserverState

ScrollNotificationObserverMaybeOf is the state of the closest observer above the context, or nil. The context depends on it.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserver.maybeOf

func ScrollNotificationObserverOf

func ScrollNotificationObserverOf(bc BuildContext) *ScrollNotificationObserverState

ScrollNotificationObserverOf is the state of the closest observer above the context. In debug builds it panics with the tag ScrollNotificationObserverMissing when there is none.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserver.of

func (*ScrollNotificationObserverState) AddListener

AddListener registers the listener; the handle removes it.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserverState.addListener

func (*ScrollNotificationObserverState) Build

Build listens to the scroll notifications below and gives the state to them.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserverState.build

func (*ScrollNotificationObserverState) Dispose

func (s *ScrollNotificationObserverState) Dispose()

Dispose drops the listeners.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserverState.dispose

func (*ScrollNotificationObserverState) RemoveListener

RemoveListener removes the listener that the handle was made for.

Flutter: widgets/scroll_notification_observer.dart ScrollNotificationObserverState.removeListener

type ScrollNotificationPredicate

type ScrollNotificationPredicate func(notification ScrollNotification) bool

ScrollNotificationPredicate decides whether a scroll notification is handled by a widget, for instance only the ones of its own scrollable.

Flutter: widgets/scroll_notification.dart ScrollNotificationPredicate

type ScrollPhysics

type ScrollPhysics interface {
	// Parent is the physics this one defers to, or nil.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.parent
	Parent() ScrollPhysics
	// ApplyTo returns a copy of these physics with the ancestor at the end of
	// their chain of parents.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.applyTo
	ApplyTo(ancestor ScrollPhysics) ScrollPhysics
	// ApplyPhysicsToUserOffset is the number of pixels the scroll position moves
	// for a drag of offset pixels.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.applyPhysicsToUserOffset
	ApplyPhysicsToUserOffset(position ScrollMetrics, offset float64) float64
	// ShouldAcceptUserOffset is whether the scrollable should let the user
	// scroll it.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.shouldAcceptUserOffset
	ShouldAcceptUserOffset(position ScrollMetrics) bool
	// RecommendDeferredLoading is whether the scrollable is moving so fast that
	// it is better to not load the images of the content yet.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.recommendDeferredLoading
	RecommendDeferredLoading(velocity float64, metrics ScrollMetrics, bc BuildContext) bool
	// ApplyBoundaryConditions is the part of the change to value that the
	// position must not apply: the overscroll.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.applyBoundaryConditions
	ApplyBoundaryConditions(position ScrollMetrics, value float64) float64
	// AdjustPositionForNewDimensions is the scroll position to use after the
	// dimensions of the content or the viewport changed.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.adjustPositionForNewDimensions
	AdjustPositionForNewDimensions(oldPosition, newPosition ScrollMetrics, isScrolling bool, velocity float64) float64
	// CreateBallisticSimulation is the simulation that carries the scrollable
	// from where it is, at the velocity, to rest; nil if it is to stay put.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.createBallisticSimulation
	CreateBallisticSimulation(position ScrollMetrics, velocity float64) physics.Simulation
	// Spring is the spring that pulls an overscrolled position back.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.spring
	Spring() physics.SpringDescription
	// ToleranceFor is the tolerance of the simulations of the position.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.toleranceFor
	ToleranceFor(metrics ScrollMetrics) physics.Tolerance
	// MinFlingDistance is the minimum distance of a gesture to be a fling.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.minFlingDistance
	MinFlingDistance() float64
	// MinFlingVelocity is the minimum velocity of a gesture to be a fling.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.minFlingVelocity
	MinFlingVelocity() float64
	// MaxFlingVelocity is the maximum velocity of a fling.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.maxFlingVelocity
	MaxFlingVelocity() float64
	// CarriedMomentum is the velocity a new drag gets from the velocity the
	// scrollable had when the finger came down.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.carriedMomentum
	CarriedMomentum(existingVelocity float64) float64
	// DragStartDistanceMotionThreshold is the distance the pointer has to move
	// before a drag that started while the scrollable was stopped moves it; none
	// for no threshold.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.dragStartDistanceMotionThreshold
	DragStartDistanceMotionThreshold() foundation.Opt[float64]
	// AllowImplicitScrolling is whether a viewport may build more of its content
	// when the semantics ask for it.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.allowImplicitScrolling
	AllowImplicitScrolling() bool
	// AllowUserScrolling is whether the user may scroll.
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.allowUserScrolling
	AllowUserScrolling() bool
	// String describes the chain of physics, such as
	// "ClampingScrollPhysics -> RangeMaintainingScrollPhysics".
	//
	// Flutter: widgets/scroll_physics.dart ScrollPhysics.toString
	String() string
}

ScrollPhysics determines the physics of a scrollable: how user gestures move it, how it comes to rest, where it stops and how it reacts to a change of its dimensions. Physics are immutable and chain: each one has a parent that it defers to for what it does not decide.

Implement it by embedding ScrollPhysicsBase (InitScrollPhysicsBase) and overriding the methods that differ, and give the type an ApplyTo that builds a copy of it on top of its ancestor.

Flutter: widgets/scroll_physics.dart ScrollPhysics

type ScrollPhysicsBase

type ScrollPhysicsBase struct {
	// contains filtered or unexported fields
}

ScrollPhysicsBase implements ScrollPhysics with the behavior of Flutter's ScrollPhysics class: it defers to the parent, or has the default when there is none. Embed it and call InitScrollPhysicsBase with the outer value so that the methods call the outer type's overrides.

Flutter: widgets/scroll_physics.dart ScrollPhysics

func (*ScrollPhysicsBase) AdjustPositionForNewDimensions

func (b *ScrollPhysicsBase) AdjustPositionForNewDimensions(oldPosition, newPosition ScrollMetrics, isScrolling bool, velocity float64) float64

AdjustPositionForNewDimensions defers to the parent; without one it keeps the new position.

Flutter: widgets/scroll_physics.dart ScrollPhysics.adjustPositionForNewDimensions

func (*ScrollPhysicsBase) AllowImplicitScrolling

func (b *ScrollPhysicsBase) AllowImplicitScrolling() bool

AllowImplicitScrolling is true.

Flutter: widgets/scroll_physics.dart ScrollPhysics.allowImplicitScrolling

func (*ScrollPhysicsBase) AllowUserScrolling

func (b *ScrollPhysicsBase) AllowUserScrolling() bool

AllowUserScrolling is true.

Flutter: widgets/scroll_physics.dart ScrollPhysics.allowUserScrolling

func (*ScrollPhysicsBase) ApplyBoundaryConditions

func (b *ScrollPhysicsBase) ApplyBoundaryConditions(position ScrollMetrics, value float64) float64

ApplyBoundaryConditions defers to the parent; without one there is no overscroll.

Flutter: widgets/scroll_physics.dart ScrollPhysics.applyBoundaryConditions

func (*ScrollPhysicsBase) ApplyPhysicsToUserOffset

func (b *ScrollPhysicsBase) ApplyPhysicsToUserOffset(position ScrollMetrics, offset float64) float64

ApplyPhysicsToUserOffset defers to the parent; without one the offset is used as it is.

Flutter: widgets/scroll_physics.dart ScrollPhysics.applyPhysicsToUserOffset

func (*ScrollPhysicsBase) ApplyTo

func (b *ScrollPhysicsBase) ApplyTo(ancestor ScrollPhysics) ScrollPhysics

ApplyTo returns plain ScrollPhysics with the ancestor at the end of the chain.

Flutter: widgets/scroll_physics.dart ScrollPhysics.applyTo

func (*ScrollPhysicsBase) BuildParent

func (b *ScrollPhysicsBase) BuildParent(ancestor ScrollPhysics) ScrollPhysics

BuildParent applies the parent of these physics to the ancestor, or returns the ancestor if there is no parent. ApplyTo implementations use it to build the parent of the copy.

Flutter: widgets/scroll_physics.dart ScrollPhysics.buildParent

func (*ScrollPhysicsBase) CarriedMomentum

func (b *ScrollPhysicsBase) CarriedMomentum(existingVelocity float64) float64

CarriedMomentum defers to the parent; without one it is zero.

Flutter: widgets/scroll_physics.dart ScrollPhysics.carriedMomentum

func (*ScrollPhysicsBase) CreateBallisticSimulation

func (b *ScrollPhysicsBase) CreateBallisticSimulation(position ScrollMetrics, velocity float64) physics.Simulation

CreateBallisticSimulation defers to the parent; without one it is nil.

Flutter: widgets/scroll_physics.dart ScrollPhysics.createBallisticSimulation

func (*ScrollPhysicsBase) DragStartDistanceMotionThreshold

func (b *ScrollPhysicsBase) DragStartDistanceMotionThreshold() foundation.Opt[float64]

DragStartDistanceMotionThreshold defers to the parent; without one it is none.

Flutter: widgets/scroll_physics.dart ScrollPhysics.dragStartDistanceMotionThreshold

func (*ScrollPhysicsBase) MaxFlingVelocity

func (b *ScrollPhysicsBase) MaxFlingVelocity() float64

MaxFlingVelocity defers to the parent; without one it is the maximum fling velocity of the gestures.

Flutter: widgets/scroll_physics.dart ScrollPhysics.maxFlingVelocity

func (*ScrollPhysicsBase) MinFlingDistance

func (b *ScrollPhysicsBase) MinFlingDistance() float64

MinFlingDistance defers to the parent; without one it is the touch slop.

Flutter: widgets/scroll_physics.dart ScrollPhysics.minFlingDistance

func (*ScrollPhysicsBase) MinFlingVelocity

func (b *ScrollPhysicsBase) MinFlingVelocity() float64

MinFlingVelocity defers to the parent; without one it is the minimum fling velocity of the gestures.

Flutter: widgets/scroll_physics.dart ScrollPhysics.minFlingVelocity

func (*ScrollPhysicsBase) Parent

func (b *ScrollPhysicsBase) Parent() ScrollPhysics

Parent is the physics this one defers to, or nil.

Flutter: widgets/scroll_physics.dart ScrollPhysics.parent

func (*ScrollPhysicsBase) RecommendDeferredLoading

func (b *ScrollPhysicsBase) RecommendDeferredLoading(velocity float64, metrics ScrollMetrics, bc BuildContext) bool

RecommendDeferredLoading defers to the parent; without one it is whether the velocity is larger than the longest side of the view in physical pixels per second.

Flutter: widgets/scroll_physics.dart ScrollPhysics.recommendDeferredLoading

func (*ScrollPhysicsBase) ShouldAcceptUserOffset

func (b *ScrollPhysicsBase) ShouldAcceptUserOffset(position ScrollMetrics) bool

ShouldAcceptUserOffset is false if user scrolling is not allowed. Otherwise it defers to the parent; without one, it is whether the content can scroll.

Flutter: widgets/scroll_physics.dart ScrollPhysics.shouldAcceptUserOffset

func (*ScrollPhysicsBase) Spring

Spring defers to the parent; without one it is a spring with mass 0.5, stiffness 100 and damping ratio 1.1.

Flutter: widgets/scroll_physics.dart ScrollPhysics.spring

func (*ScrollPhysicsBase) String

func (b *ScrollPhysicsBase) String() string

String is the name of the type of the physics, then " -> " and the parent if there is one.

Flutter: widgets/scroll_physics.dart ScrollPhysics.toString

func (*ScrollPhysicsBase) ToleranceFor

func (b *ScrollPhysicsBase) ToleranceFor(metrics ScrollMetrics) physics.Tolerance

ToleranceFor defers to the parent; without one it is a distance of one physical pixel and a velocity of a physical pixel in 50 ms.

Flutter: widgets/scroll_physics.dart ScrollPhysics.toleranceFor

type ScrollPosition

type ScrollPosition interface {
	rendering.ViewportOffset
	ScrollMetrics

	// Base is the embedded ScrollPositionBase.
	Base() *ScrollPositionBase
	// Physics is the physics that decide how the position moves.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.physics
	Physics() ScrollPhysics
	// Context is the scrollable that owns the position.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.context
	Context() ScrollContext
	// KeepScrollOffset is whether the position saves its offset in the
	// PageStorage.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.keepScrollOffset
	KeepScrollOffset() bool
	// DebugLabel names the position in debug output.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.debugLabel
	DebugLabel() string
	// HaveDimensions is whether the content dimensions were applied.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.haveDimensions
	HaveDimensions() bool
	// ShouldIgnorePointer is whether the scrollable ignores pointer events.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.shouldIgnorePointer
	ShouldIgnorePointer() bool
	// Activity is the current activity.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.activity
	Activity() ScrollActivity
	// BeginActivity ends the current activity and starts the new one.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.beginActivity
	BeginActivity(newActivity ScrollActivity)
	// Absorb takes over the state of the old position of the same scrollable.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.absorb
	Absorb(other ScrollPosition)
	// SetPixels changes the position to the new value, within the boundary
	// conditions, and returns the overscroll.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.setPixels
	SetPixels(newPixels float64) float64
	// CorrectPixels changes the position without notifying anyone.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.correctPixels
	CorrectPixels(value float64)
	// ForcePixels changes the position and notifies, ignoring the boundary
	// conditions.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.forcePixels
	ForcePixels(value float64)
	// SaveScrollOffset writes the position to the PageStorage.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.saveScrollOffset
	SaveScrollOffset()
	// RestoreScrollOffset reads the position from the PageStorage.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.restoreScrollOffset
	RestoreScrollOffset()
	// RestoreOffset restores a saved offset.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.restoreOffset
	RestoreOffset(offset float64, initialRestore bool)
	// SaveOffset gives the offset to the scroll context to save.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.saveOffset
	SaveOffset()
	// ApplyBoundaryConditions is the part of the change to value that the
	// position does not apply.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.applyBoundaryConditions
	ApplyBoundaryConditions(value float64) float64
	// CorrectForNewDimensions adjusts the position for new dimensions; false
	// asks the viewport for another layout.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.correctForNewDimensions
	CorrectForNewDimensions(oldPosition, newPosition ScrollMetrics) bool
	// ApplyNewDimensions is called when the dimensions are accepted.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.applyNewDimensions
	ApplyNewDimensions()
	// EnsureVisible scrolls so that the render object is visible.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.ensureVisible
	EnsureVisible(object rendering.RenderObject, opts ...EnsureVisibleOpts) *scheduler.TickerFuture
	// IsScrollingNotifier is a notifier of whether the position is scrolling.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.isScrollingNotifier
	IsScrollingNotifier() *foundation.ValueNotifier[bool]
	// PointerScroll scrolls by a pointer scroll event (a wheel notch, a
	// trackpad) of delta pixels.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.pointerScroll
	PointerScroll(delta float64)
	// MoveTo animates or jumps to the value, clamped by default to the extents.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.moveTo
	MoveTo(to float64, opts ...rendering.ViewportOffsetMoveToOpts) *scheduler.TickerFuture
	// JumpToWithoutSettling jumps to the value without going ballistic.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.jumpToWithoutSettling
	JumpToWithoutSettling(value float64)
	// Hold stops the position, for a finger that touches down; the callback is
	// called when the hold ends.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.hold
	Hold(holdCancelCallback func()) ScrollHoldController
	// Drag starts a drag of the position; the callback is called when it ends.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.drag
	Drag(details gestures.DragStartDetails, dragCancelCallback func()) gestures.Drag
	// DidStartScroll dispatches the scroll start notification.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.didStartScroll
	DidStartScroll()
	// DidUpdateScrollPositionBy dispatches the scroll update notification.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.didUpdateScrollPositionBy
	DidUpdateScrollPositionBy(delta float64)
	// DidEndScroll dispatches the scroll end notification and saves the offset.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.didEndScroll
	DidEndScroll()
	// DidOverscrollBy dispatches the overscroll notification.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.didOverscrollBy
	DidOverscrollBy(value float64)
	// DidUpdateScrollDirection dispatches the user scroll notification.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.didUpdateScrollDirection
	DidUpdateScrollDirection(direction rendering.ScrollDirection)
	// DidUpdateScrollMetrics dispatches the scroll metrics notification.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.didUpdateScrollMetrics
	DidUpdateScrollMetrics()
	// RecommendDeferredLoading is whether the content should defer loading
	// images, because the position moves fast.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.recommendDeferredLoading
	RecommendDeferredLoading(bc BuildContext) bool
	// NotifyListeners notifies the listeners and updates the semantics actions.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.notifyListeners
	NotifyListeners()
	// Dispose disposes the activity and the notifiers.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.dispose
	Dispose()
	// DebugFillDescription appends the parts of the description of the position
	// to description and returns it.
	//
	// Flutter: widgets/scroll_position.dart ScrollPosition.debugFillDescription
	DebugFillDescription(description []string) []string
	// String describes the position.
	//
	// Flutter: rendering/viewport_offset.dart ViewportOffset.toString
	String() string
}

ScrollPosition determines which portion of the content of a scrollable is visible. It is the ViewportOffset of the scrollable's viewport and its ScrollMetrics, and it owns the current ScrollActivity.

Implement it with ScrollPositionBase; ScrollPositionWithSingleContext is the position that the scroll controllers make.

Flutter: widgets/scroll_position.dart ScrollPosition

type ScrollPositionAlignmentPolicy

type ScrollPositionAlignmentPolicy int

ScrollPositionAlignmentPolicy is how ScrollPosition.EnsureVisible aligns the object it reveals.

Flutter: widgets/scroll_position.dart ScrollPositionAlignmentPolicy

const (
	// ScrollPositionAlignmentPolicyExplicit is the zero value: the object is
	// aligned by the alignment given to EnsureVisible.
	//
	// Flutter: widgets/scroll_position.dart ScrollPositionAlignmentPolicy.explicit
	ScrollPositionAlignmentPolicyExplicit ScrollPositionAlignmentPolicy = iota
	// ScrollPositionAlignmentPolicyKeepVisibleAtEnd scrolls only as far as
	// needed to put the object at the end of the viewport, and not at all if it
	// is visible; it never scrolls backwards.
	//
	// Flutter: widgets/scroll_position.dart ScrollPositionAlignmentPolicy.keepVisibleAtEnd
	ScrollPositionAlignmentPolicyKeepVisibleAtEnd
	// ScrollPositionAlignmentPolicyKeepVisibleAtStart scrolls only as far as
	// needed to put the object at the start of the viewport; it never scrolls
	// forwards.
	//
	// Flutter: widgets/scroll_position.dart ScrollPositionAlignmentPolicy.keepVisibleAtStart
	ScrollPositionAlignmentPolicyKeepVisibleAtStart
)

type ScrollPositionBase

type ScrollPositionBase struct {
	foundation.ChangeNotifier
	ScrollMetricsMixin
	// contains filtered or unexported fields
}

ScrollPositionBase implements ScrollPosition except for AnimateTo, JumpTo, PointerScroll, JumpToWithoutSettling, Hold and Drag, which the position type provides. Embed it and call InitScrollPositionBase with the outer value.

Flutter: widgets/scroll_position.dart ScrollPosition

func (*ScrollPositionBase) Absorb

func (b *ScrollPositionBase) Absorb(other ScrollPosition)

Absorb takes over the state of the old position of the same scrollable. In debug builds it panics with the tag ScrollPositionAbsorbInvalid if the old position belongs to another scrollable, or this one already has pixels or an activity, or the old one has no activity.

Flutter: widgets/scroll_position.dart ScrollPosition.absorb

func (*ScrollPositionBase) Activity

func (b *ScrollPositionBase) Activity() ScrollActivity

Activity is the current activity; nil when it was absorbed by another position.

Flutter: widgets/scroll_position.dart ScrollPosition.activity

func (*ScrollPositionBase) AllowImplicitScrolling

func (b *ScrollPositionBase) AllowImplicitScrolling() bool

AllowImplicitScrolling is whether the physics allow implicit scrolling.

Flutter: widgets/scroll_position.dart ScrollPosition.allowImplicitScrolling

func (*ScrollPositionBase) ApplyBoundaryConditions

func (b *ScrollPositionBase) ApplyBoundaryConditions(value float64) float64

ApplyBoundaryConditions asks the physics for the overscroll of a change to value. In debug builds it panics with the tag ScrollPhysicsOverscrollInvalid if the physics return more overscroll than the change.

Flutter: widgets/scroll_position.dart ScrollPosition.applyBoundaryConditions

func (*ScrollPositionBase) ApplyContentDimensions

func (b *ScrollPositionBase) ApplyContentDimensions(minScrollExtent, maxScrollExtent float64) bool

ApplyContentDimensions records the scroll extents of the content. It returns false to ask the viewport for another layout, when the physics moved the position. In debug builds it panics with the tag ScrollPositionExtentsInvalid when the minimum is past the maximum, and with ScrollPositionCorrectionMissing when ApplyNewDimensions changed the offset instead of CorrectForNewDimensions.

Flutter: widgets/scroll_position.dart ScrollPosition.applyContentDimensions

func (*ScrollPositionBase) ApplyNewDimensions

func (b *ScrollPositionBase) ApplyNewDimensions()

ApplyNewDimensions tells the activity, and updates the semantics actions.

Flutter: widgets/scroll_position.dart ScrollPosition.applyNewDimensions

func (*ScrollPositionBase) ApplyViewportDimension

func (b *ScrollPositionBase) ApplyViewportDimension(viewportDimension float64) bool

ApplyViewportDimension records the extent of the viewport; a change asks ApplyContentDimensions to accept it again. It always returns true.

Flutter: widgets/scroll_position.dart ScrollPosition.applyViewportDimension

func (*ScrollPositionBase) AxisDirection

func (b *ScrollPositionBase) AxisDirection() painting.AxisDirection

AxisDirection is the direction of the scrollable.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.axisDirection

func (*ScrollPositionBase) Base

Base is the position itself.

func (*ScrollPositionBase) BeginActivity

func (b *ScrollPositionBase) BeginActivity(newActivity ScrollActivity)

BeginActivity ends the current activity and starts the new one, updating whether the scrollable ignores pointers and the scrolling notifier, and dispatching the start or end of the scroll.

Flutter: widgets/scroll_position.dart ScrollPosition.beginActivity

func (*ScrollPositionBase) Context

func (b *ScrollPositionBase) Context() ScrollContext

Context is the scrollable that owns the position.

Flutter: widgets/scroll_position.dart ScrollPosition.context

func (*ScrollPositionBase) CorrectBy

func (b *ScrollPositionBase) CorrectBy(correction float64)

CorrectBy changes the position by the correction without notifying anyone. The viewport uses it when a sliver asks for a scroll offset correction.

Flutter: widgets/scroll_position.dart ScrollPosition.correctBy

func (*ScrollPositionBase) CorrectForNewDimensions

func (b *ScrollPositionBase) CorrectForNewDimensions(oldPosition, newPosition ScrollMetrics) bool

CorrectForNewDimensions asks the physics for the position to use with the new dimensions, and corrects to it; it returns false, to lay out again, if the position changed.

Flutter: widgets/scroll_position.dart ScrollPosition.correctForNewDimensions

func (*ScrollPositionBase) CorrectPixels

func (b *ScrollPositionBase) CorrectPixels(value float64)

CorrectPixels changes the position without notifying anyone. The viewport uses it when it lays out for the first time.

Flutter: widgets/scroll_position.dart ScrollPosition.correctPixels

func (*ScrollPositionBase) DebugFillDescription

func (b *ScrollPositionBase) DebugFillDescription(description []string) []string

DebugFillDescription appends the label, the offset, the range and the viewport extent.

Flutter: widgets/scroll_position.dart ScrollPosition.debugFillDescription

func (*ScrollPositionBase) DebugLabel

func (b *ScrollPositionBase) DebugLabel() string

DebugLabel names the position in debug output.

Flutter: widgets/scroll_position.dart ScrollPosition.debugLabel

func (*ScrollPositionBase) DevicePixelRatio

func (b *ScrollPositionBase) DevicePixelRatio() float64

DevicePixelRatio is the device pixel ratio of the scrollable.

Flutter: widgets/scroll_position.dart ScrollPosition.devicePixelRatio

func (*ScrollPositionBase) DidEndScroll

func (b *ScrollPositionBase) DidEndScroll()

DidEndScroll dispatches the ScrollEndNotification of the activity, and saves the offset.

Flutter: widgets/scroll_position.dart ScrollPosition.didEndScroll

func (*ScrollPositionBase) DidOverscrollBy

func (b *ScrollPositionBase) DidOverscrollBy(value float64)

DidOverscrollBy dispatches the OverscrollNotification of the activity. In debug builds it panics with the tag ScrollOverscrollWhileIdle if the activity is not scrolling.

Flutter: widgets/scroll_position.dart ScrollPosition.didOverscrollBy

func (*ScrollPositionBase) DidStartScroll

func (b *ScrollPositionBase) DidStartScroll()

DidStartScroll dispatches the ScrollStartNotification of the activity.

Flutter: widgets/scroll_position.dart ScrollPosition.didStartScroll

func (*ScrollPositionBase) DidUpdateScrollDirection

func (b *ScrollPositionBase) DidUpdateScrollDirection(direction rendering.ScrollDirection)

DidUpdateScrollDirection dispatches a UserScrollNotification.

Flutter: widgets/scroll_position.dart ScrollPosition.didUpdateScrollDirection

func (*ScrollPositionBase) DidUpdateScrollMetrics

func (b *ScrollPositionBase) DidUpdateScrollMetrics()

DidUpdateScrollMetrics dispatches a ScrollMetricsNotification. It is called in a microtask after the metrics changed during layout, and does nothing when the position was disposed meanwhile.

Deviation: the disposed check, and the debug checks read the binding the position kept, not the storage context, which the state of a scrollable that left the tree no longer has (SPEC §12.10).

Flutter: widgets/scroll_position.dart ScrollPosition.didUpdateScrollMetrics

func (*ScrollPositionBase) DidUpdateScrollPositionBy

func (b *ScrollPositionBase) DidUpdateScrollPositionBy(delta float64)

DidUpdateScrollPositionBy dispatches the ScrollUpdateNotification of the activity.

Flutter: widgets/scroll_position.dart ScrollPosition.didUpdateScrollPositionBy

func (*ScrollPositionBase) Dispose

func (b *ScrollPositionBase) Dispose()

Dispose disposes the activity (nil if another position absorbed it) and the notifiers. A function that the position posted earlier no longer reaches the storage context, which is gone with the state of the scrollable.

Flutter: widgets/scroll_position.dart ScrollPosition.dispose

func (*ScrollPositionBase) EnsureVisible

EnsureVisible scrolls so that the object is visible in the viewport that contains it, jumping or animating, and returns the future of the animation. In debug builds it panics with the tag ScrollEnsureVisibleDetached when the object is not attached.

Flutter: widgets/scroll_position.dart ScrollPosition.ensureVisible

func (*ScrollPositionBase) ForcePixels

func (b *ScrollPositionBase) ForcePixels(value float64)

ForcePixels changes the position and notifies the listeners, ignoring the boundary conditions, and remembers the change as the implied velocity until the end of the frame.

Flutter: widgets/scroll_position.dart ScrollPosition.forcePixels

func (*ScrollPositionBase) HasContentDimensions

func (b *ScrollPositionBase) HasContentDimensions() bool

HasContentDimensions is whether the scroll extents are known.

Flutter: widgets/scroll_position.dart ScrollPosition.hasContentDimensions

func (*ScrollPositionBase) HasPixels

func (b *ScrollPositionBase) HasPixels() bool

HasPixels is whether the scroll position is known.

Flutter: widgets/scroll_position.dart ScrollPosition.hasPixels

func (*ScrollPositionBase) HasViewportDimension

func (b *ScrollPositionBase) HasViewportDimension() bool

HasViewportDimension is whether the extent of the viewport is known.

Flutter: widgets/scroll_position.dart ScrollPosition.hasViewportDimension

func (*ScrollPositionBase) HaveDimensions

func (b *ScrollPositionBase) HaveDimensions() bool

HaveDimensions is whether the content dimensions were applied.

Flutter: widgets/scroll_position.dart ScrollPosition.haveDimensions

func (*ScrollPositionBase) IsScrollingNotifier

func (b *ScrollPositionBase) IsScrollingNotifier() *foundation.ValueNotifier[bool]

IsScrollingNotifier is a notifier of whether the position is scrolling.

Flutter: widgets/scroll_position.dart ScrollPosition.isScrollingNotifier

func (*ScrollPositionBase) KeepScrollOffset

func (b *ScrollPositionBase) KeepScrollOffset() bool

KeepScrollOffset is whether the position saves its offset in the PageStorage.

Flutter: widgets/scroll_position.dart ScrollPosition.keepScrollOffset

func (*ScrollPositionBase) MaxScrollExtent

func (b *ScrollPositionBase) MaxScrollExtent() float64

MaxScrollExtent is the maximum in-range value for Pixels.

Flutter: widgets/scroll_position.dart ScrollPosition.maxScrollExtent

func (*ScrollPositionBase) MinScrollExtent

func (b *ScrollPositionBase) MinScrollExtent() float64

MinScrollExtent is the minimum in-range value for Pixels.

Flutter: widgets/scroll_position.dart ScrollPosition.minScrollExtent

func (*ScrollPositionBase) MoveTo

MoveTo animates to the value, or jumps if there is no duration. The value is clamped to the scroll extents unless Clamp is false.

Flutter: widgets/scroll_position.dart ScrollPosition.moveTo

func (*ScrollPositionBase) NotifyListeners

func (b *ScrollPositionBase) NotifyListeners()

NotifyListeners updates the semantics actions, then notifies the listeners.

Flutter: widgets/scroll_position.dart ScrollPosition.notifyListeners

func (*ScrollPositionBase) Physics

func (b *ScrollPositionBase) Physics() ScrollPhysics

Physics is the physics that decide how the position moves.

Flutter: widgets/scroll_position.dart ScrollPosition.physics

func (*ScrollPositionBase) Pixels

func (b *ScrollPositionBase) Pixels() float64

Pixels is the current scroll position.

Flutter: widgets/scroll_position.dart ScrollPosition.pixels

func (*ScrollPositionBase) RecommendDeferredLoading

func (b *ScrollPositionBase) RecommendDeferredLoading(bc BuildContext) bool

RecommendDeferredLoading asks the physics whether the content should defer loading images, given the velocity of the position.

Flutter: widgets/scroll_position.dart ScrollPosition.recommendDeferredLoading

func (*ScrollPositionBase) RestoreOffset

func (b *ScrollPositionBase) RestoreOffset(offset float64, initialRestore bool)

RestoreOffset restores a saved offset: it is the initial position when initialRestore is true, and a jump otherwise.

Flutter: widgets/scroll_position.dart ScrollPosition.restoreOffset

func (*ScrollPositionBase) RestoreScrollOffset

func (b *ScrollPositionBase) RestoreScrollOffset()

RestoreScrollOffset reads the position from the PageStorage of the storage context, if it has none yet.

Flutter: widgets/scroll_position.dart ScrollPosition.restoreScrollOffset

func (*ScrollPositionBase) SaveOffset

func (b *ScrollPositionBase) SaveOffset()

SaveOffset gives the offset to the scroll context to save.

Flutter: widgets/scroll_position.dart ScrollPosition.saveOffset

func (*ScrollPositionBase) SaveScrollOffset

func (b *ScrollPositionBase) SaveScrollOffset()

SaveScrollOffset writes the position to the PageStorage of the storage context, if there is one. It does nothing once the position is disposed.

Flutter: widgets/scroll_position.dart ScrollPosition.saveScrollOffset

func (*ScrollPositionBase) SetPixels

func (b *ScrollPositionBase) SetPixels(newPixels float64) float64

SetPixels updates the position to the new value, within the boundary conditions of the physics, notifies the listeners and returns the overscroll: the part of the change that was not applied. In debug builds it panics with the tag ScrollPositionChangedDuringLayout if it is called in the build, layout or paint phase, and with ScrollOverscrollInvalid if the boundary conditions return more overscroll than the change.

Flutter: widgets/scroll_position.dart ScrollPosition.setPixels

func (*ScrollPositionBase) ShouldIgnorePointer

func (b *ScrollPositionBase) ShouldIgnorePointer() bool

ShouldIgnorePointer is whether the scrollable ignores pointer events: not when it is out of range, and otherwise as the activity says.

Flutter: widgets/scroll_position.dart ScrollPosition.shouldIgnorePointer

func (*ScrollPositionBase) String

func (b *ScrollPositionBase) String() string

String is the identity of the position and its description.

Flutter: rendering/viewport_offset.dart ViewportOffset.toString

func (*ScrollPositionBase) ViewportDimension

func (b *ScrollPositionBase) ViewportDimension() float64

ViewportDimension is the extent of the viewport.

Flutter: widgets/scroll_position.dart ScrollPosition.viewportDimension

type ScrollPositionOpts

type ScrollPositionOpts struct {
	// KeepScrollOffset is whether the position saves its offset in the
	// PageStorage; the default is true.
	KeepScrollOffset foundation.Opt[bool]
	// OldPosition is the position of the same scrollable that this one replaces;
	// this one absorbs it.
	OldPosition ScrollPosition
	// DebugLabel names the position in debug output.
	DebugLabel string
}

ScrollPositionOpts are the optional parameters of ScrollPositionBase.

Flutter: widgets/scroll_position.dart ScrollPosition.new

type ScrollPositionWithSingleContext

type ScrollPositionWithSingleContext struct {
	ScrollPositionBase
	// contains filtered or unexported fields
}

ScrollPositionWithSingleContext is a scroll position for a scrollable that has one ScrollContext: it handles the activities, the user's drags and holds, and the animations. The ScrollController makes it.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext

func NewScrollPositionWithSingleContext

func NewScrollPositionWithSingleContext(physics ScrollPhysics, context ScrollContext, opts ...ScrollPositionWithSingleContextOpts) *ScrollPositionWithSingleContext

NewScrollPositionWithSingleContext creates the position.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.new

func (*ScrollPositionWithSingleContext) Absorb

Absorb takes over the state of the old position, and its drag and scroll direction if it is of the same type.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.absorb

func (*ScrollPositionWithSingleContext) AnimateTo

AnimateTo animates the position to the value, or jumps if it is already within the tolerance. The future completes when the activity is disposed.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.animateTo

func (*ScrollPositionWithSingleContext) ApplyNewDimensions

func (p *ScrollPositionWithSingleContext) ApplyNewDimensions()

ApplyNewDimensions tells the scroll context whether the user can drag.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.applyNewDimensions

func (*ScrollPositionWithSingleContext) ApplyUserOffset

func (p *ScrollPositionWithSingleContext) ApplyUserOffset(delta float64)

ApplyUserOffset updates the scroll direction and moves the position by the drag delta, after the physics.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.applyUserOffset

func (*ScrollPositionWithSingleContext) BeginActivity

func (p *ScrollPositionWithSingleContext) BeginActivity(newActivity ScrollActivity)

BeginActivity ends the current activity and starts the new one, with the delegate of this position.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.beginActivity

func (*ScrollPositionWithSingleContext) DebugFillDescription

func (p *ScrollPositionWithSingleContext) DebugFillDescription(description []string) []string

DebugFillDescription appends the context, the physics, the activity and the scroll direction.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.debugFillDescription

func (*ScrollPositionWithSingleContext) Dispose

func (p *ScrollPositionWithSingleContext) Dispose()

Dispose disposes the drag and the position.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.dispose

func (*ScrollPositionWithSingleContext) Drag

func (p *ScrollPositionWithSingleContext) Drag(details gestures.DragStartDetails, dragCancelCallback func()) gestures.Drag

Drag starts a drag activity for the details; the callback is called when the drag ends.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.drag

func (*ScrollPositionWithSingleContext) GoBallistic

func (p *ScrollPositionWithSingleContext) GoBallistic(velocity float64)

GoBallistic starts a ballistic activity with the simulation of the physics, or an idle one if there is none.

Deviation: the physics receive the outermost position (self), so that physics of a custom position type can recognise it; Dart passes `this`, which is virtual.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.goBallistic

func (*ScrollPositionWithSingleContext) GoIdle

func (p *ScrollPositionWithSingleContext) GoIdle()

GoIdle starts an idle activity.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.goIdle

func (*ScrollPositionWithSingleContext) Hold

func (p *ScrollPositionWithSingleContext) Hold(holdCancelCallback func()) ScrollHoldController

Hold starts a hold activity; the callback is called when it is disposed.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.hold

func (*ScrollPositionWithSingleContext) JumpTo

func (p *ScrollPositionWithSingleContext) JumpTo(value float64)

JumpTo changes the position to the value at once, with the notifications of a scroll, then goes ballistic with no velocity.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.jumpTo

func (*ScrollPositionWithSingleContext) JumpToWithoutSettling

func (p *ScrollPositionWithSingleContext) JumpToWithoutSettling(value float64)

JumpToWithoutSettling jumps to the value without going ballistic afterwards.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.jumpToWithoutSettling

func (*ScrollPositionWithSingleContext) PointerScroll

func (p *ScrollPositionWithSingleContext) PointerScroll(delta float64)

PointerScroll scrolls by a pointer scroll event, as a jump of delta pixels that is clamped to the extents.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.pointerScroll

func (*ScrollPositionWithSingleContext) SetPixels

func (p *ScrollPositionWithSingleContext) SetPixels(newPixels float64) float64

SetPixels changes the position; in debug builds it panics with the tag ScrollPositionNotScrolling if the activity is not scrolling.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.setPixels

func (*ScrollPositionWithSingleContext) UpdateUserScrollDirection

func (p *ScrollPositionWithSingleContext) UpdateUserScrollDirection(value rendering.ScrollDirection)

UpdateUserScrollDirection sets the direction, and dispatches a UserScrollNotification if it changed.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.updateUserScrollDirection

func (*ScrollPositionWithSingleContext) UserScrollDirection

UserScrollDirection is the direction in which the user is scrolling.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.userScrollDirection

type ScrollPositionWithSingleContextOpts

type ScrollPositionWithSingleContextOpts struct {
	// InitialPixels is the position to start at if there is no old position or
	// saved offset; the default is 0.
	InitialPixels foundation.Opt[float64]
	// NoInitialPixels leaves the position without pixels until the viewport sets
	// them, instead of using InitialPixels.
	NoInitialPixels bool
	// KeepScrollOffset is whether the position saves its offset in the
	// PageStorage; the default is true.
	KeepScrollOffset foundation.Opt[bool]
	// OldPosition is the position this one replaces.
	OldPosition ScrollPosition
	// DebugLabel names the position in debug output.
	DebugLabel string
}

ScrollPositionWithSingleContextOpts are the optional parameters of NewScrollPositionWithSingleContext.

Flutter: widgets/scroll_position_with_single_context.dart ScrollPositionWithSingleContext.new

type ScrollStartNotification

type ScrollStartNotification struct {
	ScrollNotificationBase
	// DragDetails is the details of the drag that started the scroll, if the
	// user's drag did.
	//
	// Flutter: widgets/scroll_notification.dart ScrollStartNotification.dragDetails
	DragDetails foundation.Opt[gestures.DragStartDetails]
}

ScrollStartNotification indicates that a descendant scrollable has begun scrolling.

Flutter: widgets/scroll_notification.dart ScrollStartNotification

func NewScrollStartNotification

func NewScrollStartNotification(metrics ScrollMetrics, context BuildContext, dragDetails foundation.Opt[gestures.DragStartDetails]) *ScrollStartNotification

NewScrollStartNotification creates the notification.

Flutter: widgets/scroll_notification.dart ScrollStartNotification.new

func (*ScrollStartNotification) String

func (n *ScrollStartNotification) String() string

String describes the notification.

Flutter: widgets/scroll_notification.dart ScrollStartNotification.debugFillDescription

type ScrollToDocumentBoundaryIntent

type ScrollToDocumentBoundaryIntent struct {
	DirectionalTextEditingIntentBase
}

ScrollToDocumentBoundaryIntent is an intent that scrolls to the start or end of the document.

Flutter: widgets/text_editing_intents.dart ScrollToDocumentBoundaryIntent

func NewScrollToDocumentBoundaryIntent

func NewScrollToDocumentBoundaryIntent(forward bool) ScrollToDocumentBoundaryIntent

NewScrollToDocumentBoundaryIntent creates the intent.

Flutter: widgets/text_editing_intents.dart ScrollToDocumentBoundaryIntent.new

type ScrollUpdateNotification

type ScrollUpdateNotification struct {
	ScrollNotificationBase
	// DragDetails is the details of the drag that moved the scrollable, if the
	// user's drag did.
	//
	// Flutter: widgets/scroll_notification.dart ScrollUpdateNotification.dragDetails
	DragDetails foundation.Opt[gestures.DragUpdateDetails]
	// ScrollDelta is the distance by which the scrollable was scrolled, in
	// logical pixels; none for a notification made from a metrics change.
	//
	// Flutter: widgets/scroll_notification.dart ScrollUpdateNotification.scrollDelta
	ScrollDelta foundation.Opt[float64]
}

ScrollUpdateNotification indicates that a descendant scrollable has changed its scroll position.

Flutter: widgets/scroll_notification.dart ScrollUpdateNotification

func NewScrollUpdateNotification

func NewScrollUpdateNotification(metrics ScrollMetrics, context BuildContext, opts ...ScrollUpdateNotificationOpts) *ScrollUpdateNotification

NewScrollUpdateNotification creates the notification.

Flutter: widgets/scroll_notification.dart ScrollUpdateNotification.new

func (*ScrollUpdateNotification) String

func (n *ScrollUpdateNotification) String() string

String describes the notification.

Flutter: widgets/scroll_notification.dart ScrollUpdateNotification.debugFillDescription

type ScrollUpdateNotificationOpts

type ScrollUpdateNotificationOpts struct {
	// DragDetails is the details of the drag that moved the scrollable.
	DragDetails foundation.Opt[gestures.DragUpdateDetails]
	// ScrollDelta is the distance by which the scrollable moved.
	ScrollDelta foundation.Opt[float64]
	// Depth is the initial depth of the notification.
	Depth foundation.Opt[int]
}

ScrollUpdateNotificationOpts are the optional parameters of NewScrollUpdateNotification.

Flutter: widgets/scroll_notification.dart ScrollUpdateNotification.new

type ScrollView

type ScrollView struct {
	StatelessWidget
	// contains filtered or unexported fields
}

ScrollView is the base of the widgets that create a Scrollable and a Viewport for their slivers: CustomScrollView, ListView and GridView. A type that embeds it implements ScrollViewSelf and calls InitScrollView.

Flutter: widgets/scroll_view.dart ScrollView

func (*ScrollView) Anchor

func (v *ScrollView) Anchor() float64

Anchor is the relative position of the zero scroll offset.

Flutter: widgets/scroll_view.dart ScrollView.anchor

func (*ScrollView) Build

func (v *ScrollView) Build(bc BuildContext) Widget

Build builds the Scrollable with the viewport of the slivers.

Flutter: widgets/scroll_view.dart ScrollView.build

func (*ScrollView) BuildViewport

func (v *ScrollView) BuildViewport(bc BuildContext, offset rendering.ViewportOffset, axisDirection painting.AxisDirection, slivers []Widget) Widget

BuildViewport builds the viewport, or the shrink-wrapping one, for the slivers.

Flutter: widgets/scroll_view.dart ScrollView.buildViewport

func (*ScrollView) Center

func (v *ScrollView) Center() foundation.Key

Center is the key of the sliver at the zero scroll offset, or nil.

Flutter: widgets/scroll_view.dart ScrollView.center

func (*ScrollView) ClipBehavior

func (v *ScrollView) ClipBehavior() ui.Clip

ClipBehavior is how the view clips its content.

Flutter: widgets/scroll_view.dart ScrollView.clipBehavior

func (*ScrollView) Controller

func (v *ScrollView) Controller() ScrollController

Controller reads and controls the scroll position.

Flutter: widgets/scroll_view.dart ScrollView.controller

func (*ScrollView) DragStartBehavior

func (v *ScrollView) DragStartBehavior() gestures.DragStartBehavior

DragStartBehavior is where a drag starts.

Flutter: widgets/scroll_view.dart ScrollView.dragStartBehavior

func (*ScrollView) GetDirection

func (v *ScrollView) GetDirection(bc BuildContext) painting.AxisDirection

GetDirection is the axis direction of the view: its axis, reversed or not, and the ambient text direction for a horizontal one.

Flutter: widgets/scroll_view.dart ScrollView.getDirection

func (*ScrollView) HitTestBehavior

func (v *ScrollView) HitTestBehavior() rendering.HitTestBehavior

HitTestBehavior is how the view behaves during hit testing.

Flutter: widgets/scroll_view.dart ScrollView.hitTestBehavior

func (*ScrollView) KeyboardDismissBehavior

func (v *ScrollView) KeyboardDismissBehavior() ScrollViewKeyboardDismissBehavior

KeyboardDismissBehavior is how the view dismisses the keyboard, or unspecified.

Flutter: widgets/scroll_view.dart ScrollView.keyboardDismissBehavior

func (*ScrollView) PaintOrder

func (v *ScrollView) PaintOrder() rendering.SliverPaintOrder

PaintOrder is the order in which the slivers paint.

Flutter: widgets/scroll_view.dart ScrollView.paintOrder

func (*ScrollView) Physics

func (v *ScrollView) Physics() ScrollPhysics

Physics is how the view responds to the user, or nil.

Flutter: widgets/scroll_view.dart ScrollView.physics

func (*ScrollView) Primary

func (v *ScrollView) Primary() foundation.Opt[bool]

Primary is whether the view was asked to be primary, or none.

Flutter: widgets/scroll_view.dart ScrollView.primary

func (*ScrollView) RestorationID

func (v *ScrollView) RestorationID() string

RestorationID is the identifier for restoring the scroll offset.

Flutter: widgets/scroll_view.dart ScrollView.restorationId

func (*ScrollView) Reverse

func (v *ScrollView) Reverse() bool

Reverse is whether the view scrolls against the reading direction.

Flutter: widgets/scroll_view.dart ScrollView.reverse

func (*ScrollView) ScrollBehavior

func (v *ScrollView) ScrollBehavior() ScrollBehavior

ScrollBehavior describes how the view scrolls, or nil.

Flutter: widgets/scroll_view.dart ScrollView.scrollBehavior

func (*ScrollView) ScrollCacheExtent

func (v *ScrollView) ScrollCacheExtent() foundation.Opt[rendering.ScrollCacheExtent]

ScrollCacheExtent is how far beyond the viewport the view builds children.

Flutter: widgets/scroll_view.dart ScrollView.scrollCacheExtent

func (*ScrollView) ScrollDirection

func (v *ScrollView) ScrollDirection() painting.Axis

ScrollDirection is the axis along which the view scrolls.

Flutter: widgets/scroll_view.dart ScrollView.scrollDirection

func (*ScrollView) SemanticChildCount

func (v *ScrollView) SemanticChildCount() foundation.Opt[int]

SemanticChildCount is the number of children that contribute semantic information, or none.

Flutter: widgets/scroll_view.dart ScrollView.semanticChildCount

func (*ScrollView) ShrinkWrap

func (v *ScrollView) ShrinkWrap() bool

ShrinkWrap is whether the view takes the extent of its content.

Flutter: widgets/scroll_view.dart ScrollView.shrinkWrap

type ScrollViewKeyboardDismissBehavior

type ScrollViewKeyboardDismissBehavior int

ScrollViewKeyboardDismissBehavior is how a scroll view reacts to the keyboard when the user drags it. Linux has no on-screen keyboard to dismiss, so it is only stored in the behavior.

Flutter: widgets/scroll_view.dart ScrollViewKeyboardDismissBehavior

const (
	// ScrollViewKeyboardDismissBehaviorUnspecified is the zero value: the
	// behavior's default, which is manual.
	//
	// Flutter: no counterpart
	ScrollViewKeyboardDismissBehaviorUnspecified ScrollViewKeyboardDismissBehavior = iota
	// ScrollViewKeyboardDismissBehaviorManual does not dismiss the keyboard on
	// its own.
	//
	// Flutter: widgets/scroll_view.dart ScrollViewKeyboardDismissBehavior.manual
	ScrollViewKeyboardDismissBehaviorManual
	// ScrollViewKeyboardDismissBehaviorOnDrag dismisses the keyboard when the
	// user starts to drag the scroll view.
	//
	// Flutter: widgets/scroll_view.dart ScrollViewKeyboardDismissBehavior.onDrag
	ScrollViewKeyboardDismissBehaviorOnDrag
)

func (ScrollViewKeyboardDismissBehavior) String

String is the name with the enum, such as "ScrollViewKeyboardDismissBehavior.manual".

Flutter: widgets/scroll_view.dart ScrollViewKeyboardDismissBehavior

type ScrollViewOpts

type ScrollViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ScrollDirection is the axis along which the view scrolls; the default is
	// AxisVertical.
	ScrollDirection painting.Axis
	// Reverse is whether the view scrolls against the reading direction.
	Reverse bool
	// Controller reads and controls the scroll position. A view that has one is
	// not primary.
	Controller ScrollController
	// Primary is whether this is the primary scroll view that uses the
	// PrimaryScrollController above; the default is true for a vertical view
	// with no controller.
	Primary foundation.Opt[bool]
	// Physics is how the view responds to the user; the default is the one of the
	// ScrollBehavior (always scrollable for a primary view).
	Physics ScrollPhysics
	// ShrinkWrap is whether the extent of the view along the main axis is the
	// extent of its content.
	ShrinkWrap bool
	// ScrollCacheExtent is how far beyond the viewport the view builds children;
	// the default is 250 logical pixels.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// KeyboardDismissBehavior is how the view dismisses the keyboard; the default
	// is the one of the ScrollBehavior.
	KeyboardDismissBehavior ScrollViewKeyboardDismissBehavior
	// RestorationID is the identifier for restoring the scroll offset; it has no
	// effect until state restoration is ported.
	RestorationID string
	// ClipBehavior is how the view clips its content; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the view behaves during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
	// ScrollBehavior describes how the view scrolls; the default is the one of the
	// ScrollConfiguration above.
	ScrollBehavior ScrollBehavior
	// Center is the key of the sliver at the zero scroll offset; the default is
	// the first sliver. It can not be set for a shrink-wrapping view.
	Center foundation.Key
	// Anchor is the relative position of the zero scroll offset, from 0 to 1.
	Anchor float64
	// PaintOrder is the order in which the slivers paint; the default is the first
	// sliver on top.
	PaintOrder rendering.SliverPaintOrder
	// SemanticChildCount is the number of children that contribute semantic
	// information; none lets the scrollable find them.
	SemanticChildCount foundation.Opt[int]
}

ScrollViewOpts are the optional parameters of the base of the scroll views, and of NewCustomScrollView.

Flutter: widgets/scroll_view.dart ScrollView.new

type ScrollViewSelf

type ScrollViewSelf interface {
	// BuildSlivers builds the slivers that the viewport shows.
	//
	// Flutter: widgets/scroll_view.dart ScrollView.buildSlivers
	BuildSlivers(bc BuildContext) []Widget
}

ScrollViewSelf is what a scroll view needs of the type that embeds it: the slivers to scroll. A type may also have a BuildViewport method with the signature of ScrollView.BuildViewport to replace the viewport.

Flutter: widgets/scroll_view.dart ScrollView.buildSlivers

type Scrollable

type Scrollable struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Scrollable implements the interaction model of a scrollable widget: gestures, the scroll position and the semantics. It does not draw anything: the viewport that ViewportBuilder returns shows the content.

Deviation: Flutter's has restorationId and TwoDimensionalScrollable (SPEC §12.10).

Flutter: widgets/scrollable.dart Scrollable

func NewScrollable

func NewScrollable(viewportBuilder ViewportBuilder, opts ...ScrollableOpts) *Scrollable

NewScrollable creates the widget. In debug builds it panics with the tag ScrollableSemanticChildCountInvalid when the semantic child count is negative.

Flutter: widgets/scrollable.dart Scrollable.new

func (*Scrollable) Axis

func (w *Scrollable) Axis() painting.Axis

Axis is the axis of the direction.

Flutter: widgets/scrollable.dart Scrollable.axis

func (*Scrollable) AxisDirection

func (w *Scrollable) AxisDirection() painting.AxisDirection

AxisDirection is the direction in which the scroll offset increases.

Flutter: widgets/scrollable.dart Scrollable.axisDirection

func (*Scrollable) ClipBehavior

func (w *Scrollable) ClipBehavior() ui.Clip

ClipBehavior is the clip of the decorations.

Flutter: widgets/scrollable.dart Scrollable.clipBehavior

func (*Scrollable) Controller

func (w *Scrollable) Controller() ScrollController

Controller is the controller of the scroll position, or nil.

Flutter: widgets/scrollable.dart Scrollable.controller

func (*Scrollable) CreateState

func (w *Scrollable) CreateState() State

CreateState creates the state.

Flutter: widgets/scrollable.dart Scrollable.createState

func (*Scrollable) DragStartBehavior

func (w *Scrollable) DragStartBehavior() gestures.DragStartBehavior

DragStartBehavior is where a drag starts.

Flutter: widgets/scrollable.dart Scrollable.dragStartBehavior

func (*Scrollable) ExcludeFromSemantics

func (w *Scrollable) ExcludeFromSemantics() bool

ExcludeFromSemantics is whether the scrollable is left out of the semantics.

Flutter: widgets/scrollable.dart Scrollable.excludeFromSemantics

func (*Scrollable) HitTestBehavior

func (w *Scrollable) HitTestBehavior() rendering.HitTestBehavior

HitTestBehavior is how the scrollable behaves during hit testing.

Flutter: widgets/scrollable.dart Scrollable.hitTestBehavior

func (*Scrollable) IncrementCalculator

func (w *Scrollable) IncrementCalculator() ScrollIncrementCalculator

IncrementCalculator is the calculator of the scroll increments, or nil.

Flutter: widgets/scrollable.dart Scrollable.incrementCalculator

func (*Scrollable) Physics

func (w *Scrollable) Physics() ScrollPhysics

Physics are the physics of the scrollable, or nil.

Flutter: widgets/scrollable.dart Scrollable.physics

func (*Scrollable) ScrollBehavior

func (w *Scrollable) ScrollBehavior() ScrollBehavior

ScrollBehavior is the behavior of this scrollable, or nil for the configuration's.

Flutter: widgets/scrollable.dart Scrollable.scrollBehavior

func (*Scrollable) SemanticChildCount

func (w *Scrollable) SemanticChildCount() foundation.Opt[int]

SemanticChildCount is the number of children that contribute semantics.

Flutter: widgets/scrollable.dart Scrollable.semanticChildCount

func (*Scrollable) ViewportBuilder

func (w *Scrollable) ViewportBuilder() ViewportBuilder

ViewportBuilder builds the viewport.

Flutter: widgets/scrollable.dart Scrollable.viewportBuilder

type ScrollableDetails

type ScrollableDetails struct {
	// Direction is the direction in which the scroll offset increases.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollableDetails.direction
	Direction painting.AxisDirection
	// Controller is the controller of the scrollable, or nil.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollableDetails.controller
	Controller ScrollController
	// Physics are the physics of the scrollable, or nil.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollableDetails.physics
	Physics ScrollPhysics
	// DecorationClipBehavior is the clip of the decorators (such as the
	// overscroll indicator) of the scrollable; none for the scrollable's own.
	//
	// Flutter: widgets/scrollable_helpers.dart ScrollableDetails.decorationClipBehavior
	DecorationClipBehavior foundation.Opt[ui.Clip]
}

ScrollableDetails describes the aspects of a scrollable on one axis: its direction, controller and physics, and the clip of its decorations. The ScrollBehavior builds its scrollbar and overscroll indicator from them.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails

func NewScrollableDetails

func NewScrollableDetails(direction painting.AxisDirection, opts ...ScrollableDetailsOpts) ScrollableDetails

NewScrollableDetails creates the details.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails.new

func NewScrollableDetailsHorizontal

func NewScrollableDetailsHorizontal(opts ...ScrollableDetailsOpts) ScrollableDetails

NewScrollableDetailsHorizontal creates the details of a horizontal scrollable that scrolls right, or left if Reverse is set.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails.horizontal

func NewScrollableDetailsVertical

func NewScrollableDetailsVertical(opts ...ScrollableDetailsOpts) ScrollableDetails

NewScrollableDetailsVertical creates the details of a vertical scrollable that scrolls down, or up if Reverse is set.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails.vertical

func (ScrollableDetails) CopyWith

CopyWith returns the details with the given values changed.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails.copyWith

func (ScrollableDetails) Equal

Equal is whether the details have the same direction, controller, physics and clip.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails.operator ==

func (ScrollableDetails) String

func (d ScrollableDetails) String() string

String describes the details.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails.toString

type ScrollableDetailsCopy

type ScrollableDetailsCopy struct {
	// Direction replaces the direction; AxisDirectionUnspecified keeps it.
	Direction painting.AxisDirection
	// Controller replaces the controller; nil keeps it.
	Controller ScrollController
	// Physics replaces the physics; nil keeps them.
	Physics ScrollPhysics
	// DecorationClipBehavior replaces the clip; none keeps it.
	DecorationClipBehavior foundation.Opt[ui.Clip]
}

ScrollableDetailsCopy are the values that ScrollableDetails.CopyWith changes.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails.copyWith

type ScrollableDetailsOpts

type ScrollableDetailsOpts struct {
	// Controller is the controller of the scrollable.
	Controller ScrollController
	// Physics are the physics of the scrollable.
	Physics ScrollPhysics
	// DecorationClipBehavior is the clip of the decorators.
	DecorationClipBehavior foundation.Opt[ui.Clip]
	// Reverse makes the vertical and horizontal constructors scroll in the
	// reverse direction (up, left).
	Reverse bool
}

ScrollableDetailsOpts are the optional parameters of the constructors of ScrollableDetails.

Flutter: widgets/scrollable_helpers.dart ScrollableDetails.new

type ScrollableOfOpts

type ScrollableOfOpts struct {
	// Axis, if set, looks for the closest Scrollable that scrolls along it.
	Axis foundation.Opt[painting.Axis]
}

ScrollableOfOpts are the optional parameters of ScrollableMaybeOf and ScrollableOf.

Flutter: widgets/scrollable.dart Scrollable.of

type ScrollableOpts

type ScrollableOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AxisDirection is the direction in which the scroll offset increases; the
	// default is AxisDirectionDown.
	AxisDirection painting.AxisDirection
	// Controller controls the scroll position; a fallback one is made without it.
	Controller ScrollController
	// Physics are the physics of the scrollable; the ScrollBehavior's by
	// default.
	Physics ScrollPhysics
	// IncrementCalculator is the size of the scroll increments, for the keyboard
	// and the scrollbar track; the defaults are 50 pixels and 80% of the
	// viewport.
	IncrementCalculator ScrollIncrementCalculator
	// ExcludeFromSemantics leaves the scrollable out of the semantics tree.
	ExcludeFromSemantics bool
	// SemanticChildCount is the number of children that contribute semantics,
	// when it is not all of the ones the viewport builds; none for unknown.
	SemanticChildCount foundation.Opt[int]
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// ScrollBehavior is the behavior for this scrollable instead of the
	// ScrollConfiguration's.
	ScrollBehavior ScrollBehavior
	// ClipBehavior is the clip of the decorations of the scrollable; the default
	// is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the scrollable behaves during hit testing; the
	// default is HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
}

ScrollableOpts are the optional parameters of NewScrollable.

Flutter: widgets/scrollable.dart Scrollable.new

type ScrollableState

type ScrollableState struct {
	StateOf[*Scrollable]
	TickerProvider
	// contains filtered or unexported fields
}

ScrollableState is the state of a Scrollable: it owns the scroll position, listens to the gestures that drag it and to the pointer signals that scroll it, and implements ScrollContext for the position.

Flutter: widgets/scrollable.dart ScrollableState

func ScrollableMaybeOf

func ScrollableMaybeOf(bc BuildContext, opts ...ScrollableOfOpts) *ScrollableState

ScrollableMaybeOf is the state of the closest Scrollable above the context (the closest along the axis, if there is one in the options), or nil. The context depends on it.

Flutter: widgets/scrollable.dart Scrollable.maybeOf

func ScrollableOf

func ScrollableOf(bc BuildContext, opts ...ScrollableOfOpts) *ScrollableState

ScrollableOf is the state of the closest Scrollable above the context. In debug builds it panics with the tag ScrollableNotFound when there is none.

Flutter: widgets/scrollable.dart Scrollable.of

func (*ScrollableState) AxisDirection

func (s *ScrollableState) AxisDirection() painting.AxisDirection

AxisDirection is the direction of the widget.

Flutter: widgets/scrollable.dart ScrollableState.axisDirection

func (*ScrollableState) Build

func (s *ScrollableState) Build(bc BuildContext) Widget

Build builds the listener for pointer signals, the gesture detector, the semantics and the viewport.

Flutter: widgets/scrollable.dart ScrollableState.build

func (*ScrollableState) DeltaToScrollOrigin

func (s *ScrollableState) DeltaToScrollOrigin() ui.Offset

DeltaToScrollOrigin is the offset of the scroll origin from the top left of the content: the scroll position along the axis, with the sign of the direction.

Flutter: widgets/scrollable.dart ScrollableState.deltaToScrollOrigin

func (*ScrollableState) DevicePixelRatio

func (s *ScrollableState) DevicePixelRatio() float64

DevicePixelRatio is the device pixel ratio of the media query or the view.

Flutter: widgets/scrollable.dart ScrollableState.devicePixelRatio

func (*ScrollableState) DidChangeDependencies

func (s *ScrollableState) DidChangeDependencies()

DidChangeDependencies reads the media query and updates the position.

Flutter: widgets/scrollable.dart ScrollableState.didChangeDependencies

func (*ScrollableState) DidUpdateWidget

func (s *ScrollableState) DidUpdateWidget(oldWidget *Scrollable)

DidUpdateWidget attaches the position to the new controller, and updates the position if the configuration changed.

Flutter: widgets/scrollable.dart ScrollableState.didUpdateWidget

func (*ScrollableState) DisableAnimations

func (h *ScrollableState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*ScrollableState) Dispose

func (s *ScrollableState) Dispose()

Dispose detaches and disposes the position and the fallback controller.

Flutter: widgets/scrollable.dart ScrollableState.dispose

func (*ScrollableState) ErrorReporter

func (h *ScrollableState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*ScrollableState) InitState

func (s *ScrollableState) InitState()

InitState makes the fallback controller if the widget has none.

Flutter: widgets/scrollable.dart ScrollableState.initState

func (*ScrollableState) NotificationContext

func (s *ScrollableState) NotificationContext() BuildContext

NotificationContext is the context of the gesture detector, where the notifications start; nil when it is not built.

Flutter: widgets/scrollable.dart ScrollableState.notificationContext

func (*ScrollableState) Position

func (s *ScrollableState) Position() ScrollPosition

Position is the scroll position.

Flutter: widgets/scrollable.dart ScrollableState.position

func (*ScrollableState) ResolvedPhysics

func (s *ScrollableState) ResolvedPhysics() ScrollPhysics

ResolvedPhysics are the physics the position uses: those of the widget on top of the scroll behavior's.

Flutter: widgets/scrollable.dart ScrollableState.resolvedPhysics

func (*ScrollableState) SaveOffset

func (s *ScrollableState) SaveOffset(float64)

SaveOffset does nothing: state restoration is not supported (SPEC §2).

Flutter: widgets/scrollable.dart ScrollableState.saveOffset

func (*ScrollableState) SetCanDrag

func (s *ScrollableState) SetCanDrag(value bool)

SetCanDrag sets the drag recognizers: one for the axis if the user can drag the scrollable, none otherwise.

Flutter: widgets/scrollable.dart ScrollableState.setCanDrag

func (*ScrollableState) SetIgnorePointer

func (s *ScrollableState) SetIgnorePointer(value bool)

SetIgnorePointer makes the scrollable ignore (or stop ignoring) pointer events.

Flutter: widgets/scrollable.dart ScrollableState.setIgnorePointer

func (*ScrollableState) SetSemanticsActions

func (s *ScrollableState) SetSemanticsActions(actions map[ui.SemanticsAction]struct{})

SetSemanticsActions sets the scroll actions of the gesture detector's semantics.

Flutter: widgets/scrollable.dart ScrollableState.setSemanticsActions

func (*ScrollableState) StorageContext

func (s *ScrollableState) StorageContext() BuildContext

StorageContext is the context of the state.

Flutter: widgets/scrollable.dart ScrollableState.storageContext

func (*ScrollableState) Vsync

Vsync is the state itself: it is the ticker provider.

Flutter: widgets/scrollable.dart ScrollableState.vsync

type ScrollableWidgetBuilder

type ScrollableWidgetBuilder func(bc BuildContext, scrollController ScrollController) Widget

ScrollableWidgetBuilder builds a widget that scrolls with the controller it is given: a scrollable that a sheet drags (the sheet moves instead of the content when the content is at its start).

Flutter: widgets/draggable_scrollable_sheet.dart ScrollableWidgetBuilder

type ScrollbarOrientation

type ScrollbarOrientation int

ScrollbarOrientation is where a scrollbar sits relative to its scrollable.

Flutter: widgets/scrollbar.dart ScrollbarOrientation

const (
	// ScrollbarOrientationUnspecified is the zero value: the default placement,
	// the right (or left, in right-to-left text) side of a vertical scrollable
	// and the bottom of a horizontal one.
	//
	// Flutter: no counterpart
	ScrollbarOrientationUnspecified ScrollbarOrientation = iota
	// ScrollbarOrientationLeft places a vertical scrollbar on the left side.
	//
	// Flutter: widgets/scrollbar.dart ScrollbarOrientation.left
	ScrollbarOrientationLeft
	// ScrollbarOrientationRight places a vertical scrollbar on the right side.
	//
	// Flutter: widgets/scrollbar.dart ScrollbarOrientation.right
	ScrollbarOrientationRight
	// ScrollbarOrientationTop places a horizontal scrollbar at the top.
	//
	// Flutter: widgets/scrollbar.dart ScrollbarOrientation.top
	ScrollbarOrientationTop
	// ScrollbarOrientationBottom places a horizontal scrollbar at the bottom.
	//
	// Flutter: widgets/scrollbar.dart ScrollbarOrientation.bottom
	ScrollbarOrientationBottom
)

func (ScrollbarOrientation) String

func (o ScrollbarOrientation) String() string

String is the name with the enum, such as "ScrollbarOrientation.left".

Flutter: widgets/scrollbar.dart ScrollbarOrientation

type ScrollbarPainter

type ScrollbarPainter struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

ScrollbarPainter paints a scrollbar: the thumb, and optionally the track and its border. It fades with the opacity animation, and updates from the scroll metrics. A RawScrollbar uses it.

Flutter: widgets/scrollbar.dart ScrollbarPainter

func NewScrollbarPainter

func NewScrollbarPainter(color ui.Color, fadeoutOpacityAnimation animation.Animation[float64], opts ...ScrollbarPainterOpts) *ScrollbarPainter

NewScrollbarPainter creates the painter; the color is the color of the thumb and fadeoutOpacityAnimation fades the whole scrollbar. In debug builds it panics with the tag ScrollbarPainterInvalid when the arguments are not valid (a radius and a shape, a negative length, a negative padding, or a directional padding without text direction).

Flutter: widgets/scrollbar.dart ScrollbarPainter.new

func (*ScrollbarPainter) Color

func (p *ScrollbarPainter) Color() ui.Color

Color is the color of the thumb.

Flutter: widgets/scrollbar.dart ScrollbarPainter.color

func (*ScrollbarPainter) CrossAxisMargin

func (p *ScrollbarPainter) CrossAxisMargin() float64

CrossAxisMargin is the margin between the thumb and the edge.

Flutter: widgets/scrollbar.dart ScrollbarPainter.crossAxisMargin

func (*ScrollbarPainter) Dispose

func (p *ScrollbarPainter) Dispose()

Dispose stops listening to the opacity animation.

Flutter: widgets/scrollbar.dart ScrollbarPainter.dispose

func (*ScrollbarPainter) FadeoutOpacityAnimation

func (p *ScrollbarPainter) FadeoutOpacityAnimation() animation.Animation[float64]

FadeoutOpacityAnimation is the animation of the opacity of the scrollbar.

Flutter: widgets/scrollbar.dart ScrollbarPainter.fadeoutOpacityAnimation

func (*ScrollbarPainter) GetThumbScrollOffset

func (p *ScrollbarPainter) GetThumbScrollOffset() float64

GetThumbScrollOffset is the offset of the thumb along the track that corresponds to the scroll position. In debug builds it panics with the tag ScrollbarExtentsInfinite when the extents are not finite.

Flutter: widgets/scrollbar.dart ScrollbarPainter.getThumbScrollOffset

func (*ScrollbarPainter) GetTrackToScroll

func (p *ScrollbarPainter) GetTrackToScroll(thumbOffsetLocal float64) float64

GetTrackToScroll is the scroll offset that corresponds to the offset of the thumb along the track.

Flutter: widgets/scrollbar.dart ScrollbarPainter.getTrackToScroll

func (*ScrollbarPainter) HitTest

func (p *ScrollbarPainter) HitTest(position ui.Offset) foundation.Opt[bool]

HitTest is whether the position is on the track; none before the first paint, and false while the scrollbar is transparent, ignores the pointer or cannot scroll. The scrollbar absorbs pointer signals over it with this.

Flutter: widgets/scrollbar.dart ScrollbarPainter.hitTest

func (*ScrollbarPainter) HitTestInteractive

func (p *ScrollbarPainter) HitTestInteractive(position ui.Offset, kind ui.PointerDeviceKind, forHover ...bool) bool

HitTestInteractive is whether the position is on the part of the scrollbar that the kind of pointer can interact with: the track (with a larger area around the thumb for a touch), including while it is transparent for a hover.

Flutter: widgets/scrollbar.dart ScrollbarPainter.hitTestInteractive

func (*ScrollbarPainter) HitTestOnlyThumbInteractive

func (p *ScrollbarPainter) HitTestOnlyThumbInteractive(position ui.Offset, kind ui.PointerDeviceKind) bool

HitTestOnlyThumbInteractive is whether the position is on the thumb (with a larger area around it for a touch).

Flutter: widgets/scrollbar.dart ScrollbarPainter.hitTestOnlyThumbInteractive

func (*ScrollbarPainter) IgnorePointer

func (p *ScrollbarPainter) IgnorePointer() bool

IgnorePointer is whether the scrollbar ignores the pointer.

Flutter: widgets/scrollbar.dart ScrollbarPainter.ignorePointer

func (*ScrollbarPainter) MainAxisMargin

func (p *ScrollbarPainter) MainAxisMargin() float64

MainAxisMargin is the margin at the ends of the track.

Flutter: widgets/scrollbar.dart ScrollbarPainter.mainAxisMargin

func (*ScrollbarPainter) MinLength

func (p *ScrollbarPainter) MinLength() float64

MinLength is the shortest the thumb gets.

Flutter: widgets/scrollbar.dart ScrollbarPainter.minLength

func (*ScrollbarPainter) MinOverscrollLength

func (p *ScrollbarPainter) MinOverscrollLength() float64

MinOverscrollLength is the shortest the thumb gets while it overscrolls.

Flutter: widgets/scrollbar.dart ScrollbarPainter.minOverscrollLength

func (*ScrollbarPainter) Padding

Padding is the padding around the scrollbar.

Flutter: widgets/scrollbar.dart ScrollbarPainter.padding

func (*ScrollbarPainter) Paint

func (p *ScrollbarPainter) Paint(canvas *ui.Canvas, size ui.Size)

Paint paints the track and the thumb when the content scrolls.

Flutter: widgets/scrollbar.dart ScrollbarPainter.paint

func (*ScrollbarPainter) Radius

func (p *ScrollbarPainter) Radius() foundation.Opt[ui.Radius]

Radius is the corner radius of the thumb.

Flutter: widgets/scrollbar.dart ScrollbarPainter.radius

func (*ScrollbarPainter) ScrollbarOrientation

func (p *ScrollbarPainter) ScrollbarOrientation() ScrollbarOrientation

ScrollbarOrientation is the side the scrollbar sits on.

Flutter: widgets/scrollbar.dart ScrollbarPainter.scrollbarOrientation

func (*ScrollbarPainter) SetColor

func (p *ScrollbarPainter) SetColor(value ui.Color)

SetColor sets the color of the thumb and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.color

func (*ScrollbarPainter) SetCrossAxisMargin

func (p *ScrollbarPainter) SetCrossAxisMargin(value float64)

SetCrossAxisMargin sets the margin between the thumb and the edge and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.crossAxisMargin

func (*ScrollbarPainter) SetIgnorePointer

func (p *ScrollbarPainter) SetIgnorePointer(value bool)

SetIgnorePointer sets whether the scrollbar ignores the pointer and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.ignorePointer

func (*ScrollbarPainter) SetMainAxisMargin

func (p *ScrollbarPainter) SetMainAxisMargin(value float64)

SetMainAxisMargin sets the margin at the ends of the track and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.mainAxisMargin

func (*ScrollbarPainter) SetMinLength

func (p *ScrollbarPainter) SetMinLength(value float64)

SetMinLength sets the shortest the thumb gets and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.minLength

func (*ScrollbarPainter) SetMinOverscrollLength

func (p *ScrollbarPainter) SetMinOverscrollLength(value float64)

SetMinOverscrollLength sets the shortest the thumb gets while it overscrolls and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.minOverscrollLength

func (*ScrollbarPainter) SetPadding

func (p *ScrollbarPainter) SetPadding(value painting.EdgeInsetsGeometry)

SetPadding sets the padding around the scrollbar and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.padding

func (*ScrollbarPainter) SetRadius

func (p *ScrollbarPainter) SetRadius(value foundation.Opt[ui.Radius])

SetRadius sets the corner radius of the thumb and repaints. In debug builds it panics with the tag ScrollbarPainterInvalid when the painter has a shape.

Flutter: widgets/scrollbar.dart ScrollbarPainter.radius

func (*ScrollbarPainter) SetScrollbarOrientation

func (p *ScrollbarPainter) SetScrollbarOrientation(value ScrollbarOrientation)

SetScrollbarOrientation sets the side the scrollbar sits on and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.scrollbarOrientation

func (*ScrollbarPainter) SetShape

func (p *ScrollbarPainter) SetShape(value painting.OutlinedBorder)

SetShape sets the shape of the thumb and repaints. In debug builds it panics with the tag ScrollbarPainterInvalid when the painter has a radius.

Flutter: widgets/scrollbar.dart ScrollbarPainter.shape

func (*ScrollbarPainter) SetTextDirection

func (p *ScrollbarPainter) SetTextDirection(value ui.TextDirection)

SetTextDirection sets the direction of the text and repaints. In debug builds it panics with the tag ScrollbarPainterInvalid when it is unspecified.

Flutter: widgets/scrollbar.dart ScrollbarPainter.textDirection

func (*ScrollbarPainter) SetThickness

func (p *ScrollbarPainter) SetThickness(value float64)

SetThickness sets the thickness of the thumb and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.thickness

func (*ScrollbarPainter) SetTrackBorderColor

func (p *ScrollbarPainter) SetTrackBorderColor(value ui.Color)

SetTrackBorderColor sets the color of the border of the track and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.trackBorderColor

func (*ScrollbarPainter) SetTrackColor

func (p *ScrollbarPainter) SetTrackColor(value ui.Color)

SetTrackColor sets the color of the track and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.trackColor

func (*ScrollbarPainter) SetTrackRadius

func (p *ScrollbarPainter) SetTrackRadius(value foundation.Opt[ui.Radius])

SetTrackRadius sets the corner radius of the track and repaints.

Flutter: widgets/scrollbar.dart ScrollbarPainter.trackRadius

func (*ScrollbarPainter) Shape

Shape is the shape of the thumb.

Flutter: widgets/scrollbar.dart ScrollbarPainter.shape

func (*ScrollbarPainter) ShouldRepaint

func (p *ScrollbarPainter) ShouldRepaint(oldDelegate rendering.CustomPainter) bool

ShouldRepaint is whether any property differs from the old painter's.

Flutter: widgets/scrollbar.dart ScrollbarPainter.shouldRepaint

func (*ScrollbarPainter) String

func (p *ScrollbarPainter) String() string

String is the identity of the painter.

Flutter: widgets/scrollbar.dart ScrollbarPainter.toString

func (*ScrollbarPainter) TextDirection

func (p *ScrollbarPainter) TextDirection() ui.TextDirection

TextDirection is the direction of the text.

Flutter: widgets/scrollbar.dart ScrollbarPainter.textDirection

func (*ScrollbarPainter) Thickness

func (p *ScrollbarPainter) Thickness() float64

Thickness is the thickness of the thumb.

Flutter: widgets/scrollbar.dart ScrollbarPainter.thickness

func (*ScrollbarPainter) ThumbOffset

func (p *ScrollbarPainter) ThumbOffset() float64

ThumbOffset is the position of the thumb along the track, from the start of the scrollbar's box, as of the last paint.

Flutter: widgets/scrollbar.dart ScrollbarPainter._thumbOffset

func (*ScrollbarPainter) TrackBorderColor

func (p *ScrollbarPainter) TrackBorderColor() ui.Color

TrackBorderColor is the color of the border of the track.

Flutter: widgets/scrollbar.dart ScrollbarPainter.trackBorderColor

func (*ScrollbarPainter) TrackColor

func (p *ScrollbarPainter) TrackColor() ui.Color

TrackColor is the color of the track.

Flutter: widgets/scrollbar.dart ScrollbarPainter.trackColor

func (*ScrollbarPainter) TrackRadius

func (p *ScrollbarPainter) TrackRadius() foundation.Opt[ui.Radius]

TrackRadius is the corner radius of the track.

Flutter: widgets/scrollbar.dart ScrollbarPainter.trackRadius

func (*ScrollbarPainter) Update

func (p *ScrollbarPainter) Update(metrics ScrollMetrics, axisDirection painting.AxisDirection)

Update updates the scrollbar from the metrics of the scrollable and repaints if the extents or the axis changed and the scrollbar is, or was, visible.

Flutter: widgets/scrollbar.dart ScrollbarPainter.update

func (*ScrollbarPainter) UpdateThickness

func (p *ScrollbarPainter) UpdateThickness(nextThickness float64, nextRadius ui.Radius)

UpdateThickness changes the thickness and the radius together, as the Material scrollbar does when the pointer hovers it.

Flutter: widgets/scrollbar.dart ScrollbarPainter.updateThickness

type ScrollbarPainterOpts

type ScrollbarPainterOpts struct {
	// TrackColor is the color of the track; the default is transparent.
	TrackColor ui.Color
	// TrackBorderColor is the color of the border of the track; the default is
	// transparent.
	TrackBorderColor ui.Color
	// TextDirection is the direction of the text, to place the scrollbar and
	// resolve the padding.
	TextDirection ui.TextDirection
	// Thickness is the thickness of the thumb; the default is 6.
	Thickness foundation.Opt[float64]
	// Padding is the padding around the scrollbar; the default is zero.
	Padding painting.EdgeInsetsGeometry
	// MainAxisMargin is the margin at the ends of the track; the default is 0.
	MainAxisMargin float64
	// CrossAxisMargin is the margin between the thumb and the edge; the default
	// is 0.
	CrossAxisMargin float64
	// Radius is the corner radius of the thumb.
	Radius foundation.Opt[ui.Radius]
	// TrackRadius is the corner radius of the track.
	TrackRadius foundation.Opt[ui.Radius]
	// Shape is the shape of the thumb, instead of a radius.
	Shape painting.OutlinedBorder
	// MinLength is the shortest the thumb gets; the default is 18.
	MinLength foundation.Opt[float64]
	// MinOverscrollLength is the shortest the thumb gets while it overscrolls;
	// the default is MinLength.
	MinOverscrollLength foundation.Opt[float64]
	// ScrollbarOrientation is the side of the scrollable the scrollbar sits on.
	ScrollbarOrientation ScrollbarOrientation
	// IgnorePointer makes the scrollbar ignore the pointer.
	IgnorePointer bool
}

ScrollbarPainterOpts are the optional parameters of NewScrollbarPainter.

Flutter: widgets/scrollbar.dart ScrollbarPainter.new

type SelectAction

type SelectAction struct{ ActionBase }

SelectAction is an action for SelectIntent; embed it in the action of a control.

Flutter: widgets/actions.dart SelectAction

func (*SelectAction) IntentType

func (a *SelectAction) IntentType() reflect.Type

IntentType is SelectIntent.

Flutter: widgets/actions.dart Action.intentType

type SelectAllTextIntent

type SelectAllTextIntent struct {
	IntentBase
	// Cause is what caused the selection to change.
	//
	// Flutter: widgets/text_editing_intents.dart SelectAllTextIntent.cause
	Cause services.SelectionChangedCause
}

SelectAllTextIntent is an intent that selects all the text.

Flutter: widgets/text_editing_intents.dart SelectAllTextIntent

type SelectIntent

type SelectIntent struct{ IntentBase }

SelectIntent is an intent that selects the focused control.

Flutter: widgets/actions.dart SelectIntent

type SelectableButtonItemsCallbacks

type SelectableButtonItemsCallbacks struct {
	OnCopy, OnSelectAll, OnShare foundation.VoidCallback
}

SelectableButtonItemsCallbacks are the callbacks of the buttons that GetSelectableButtonItems returns; OnShare may be nil.

Flutter: widgets/selectable_region.dart SelectableRegion.getSelectableButtonItems

type SelectableDayPredicate

type SelectableDayPredicate func(day time.Time) bool

SelectableDayPredicate is the signature of a function that says whether a day can be selected in a date picker.

Flutter: widgets/date.dart SelectableDayPredicate

type SelectableRegion

type SelectableRegion struct {
	StatefulWidget
	// contains filtered or unexported fields
}

SelectableRegion is a widget that introduces an area for user selections.

Flutter widgets are not selectable by default. Wrapping a widget subtree with a SelectableRegion enables selection for widgets in the subtree that participate in selection. For example, Text widgets automatically look for selectable regions to enable selection, while widgets such as RichText must be configured with a SelectionRegistrar and a selection color. The wrapped subtree can be selected by users using mouse or touch gestures, e.g. users can select widgets by holding the mouse left-click and dragging across widgets, or they can use long press gestures to select words on touch devices.

Every Selectable under the SelectableRegion can be selected. They form a selection tree structure to handle the selection. The SelectableRegion is a wrapper over SelectionContainer. It listens to user gestures and sends corresponding SelectionEvents to the SelectionContainer it creates. The SelectionContainer created by SelectableRegion is the root node of a selection tree. Each non-leaf node in the tree is a SelectionContainer, and the leaf node is a leaf widget whose render object implements Selectable.

Deviation: the web context menu, the text processing actions and the share button are not ported (SPEC §12.10).

Flutter: widgets/selectable_region.dart SelectableRegion

func NewSelectableRegion

func NewSelectableRegion(selectionControls TextSelectionControls, child Widget, opts ...SelectableRegionOpts) *SelectableRegion

NewSelectableRegion creates a new selectable region. The selectionControls are used for building the selection handles for mobile devices.

Flutter: widgets/selectable_region.dart SelectableRegion.new

func (*SelectableRegion) Child

func (w *SelectableRegion) Child() Widget

Child is the widget this selection area applies to.

Flutter: widgets/selectable_region.dart SelectableRegion.child

func (*SelectableRegion) CreateState

func (w *SelectableRegion) CreateState() State

CreateState creates the state.

Flutter: widgets/selectable_region.dart SelectableRegion.createState

func (*SelectableRegion) MagnifierConfiguration

func (w *SelectableRegion) MagnifierConfiguration() *TextMagnifierConfiguration

MagnifierConfiguration is the configuration for the magnifier used with selections in this region. By default, it is TextMagnifierConfigurationDisabled.

Flutter: widgets/selectable_region.dart SelectableRegion.magnifierConfiguration

func (*SelectableRegion) SelectionControls

func (w *SelectableRegion) SelectionControls() TextSelectionControls

SelectionControls build the selection handles for mobile devices.

Flutter: widgets/selectable_region.dart SelectableRegion.selectionControls

type SelectableRegionContextMenuBuilder

type SelectableRegionContextMenuBuilder func(bc BuildContext, selectableRegionState *SelectableRegionState) Widget

SelectableRegionContextMenuBuilder builds a context menu for the given SelectableRegionState.

Flutter: widgets/selectable_region.dart SelectableRegionContextMenuBuilder

type SelectableRegionOpts

type SelectableRegionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ContextMenuBuilder builds the context menu.
	ContextMenuBuilder SelectableRegionContextMenuBuilder
	// FocusNode is the focus node of the region; the default is one that the
	// state creates.
	FocusNode *FocusNode
	// OnSelectionChanged is called when the selected content changes.
	OnSelectionChanged func(content *rendering.SelectedContent)
	// MagnifierConfiguration is the configuration for the magnifier used with
	// selections in this region; by default (nil) it is
	// TextMagnifierConfigurationDisabled.
	MagnifierConfiguration *TextMagnifierConfiguration
}

SelectableRegionOpts are the optional parameters of NewSelectableRegion.

Flutter: widgets/selectable_region.dart SelectableRegion.new

type SelectableRegionSelectionStatus

type SelectableRegionSelectionStatus int

SelectableRegionSelectionStatus is the status of the selection under a SelectableRegion.

This value under a SelectableRegion is updated frequently during selection gestures such as clicks and taps to select and keyboard shortcuts.

Flutter: widgets/selectable_region.dart SelectableRegionSelectionStatus

const (
	// SelectableRegionSelectionStatusUnspecified is the zero value; the
	// notifier never has it.
	SelectableRegionSelectionStatusUnspecified SelectableRegionSelectionStatus = iota
	// SelectableRegionSelectionStatusChanging indicates that the selection under
	// a SelectableRegion is changing: it is being updated by the user through
	// selection gestures and keyboard shortcuts.
	//
	// Flutter: widgets/selectable_region.dart SelectableRegionSelectionStatus.changing
	SelectableRegionSelectionStatusChanging
	// SelectableRegionSelectionStatusFinalized indicates that the selection
	// under a SelectableRegion is finalized: it is no longer being updated by
	// the user.
	//
	// Flutter: widgets/selectable_region.dart SelectableRegionSelectionStatus.finalized
	SelectableRegionSelectionStatusFinalized
)

func (SelectableRegionSelectionStatus) Name

Name is the name of the status.

Flutter: widgets/selectable_region.dart SelectableRegionSelectionStatus.name

func (SelectableRegionSelectionStatus) String

String is "SelectableRegionSelectionStatus." and the name.

Flutter: widgets/selectable_region.dart SelectableRegionSelectionStatus.toString

type SelectableRegionSelectionStatusScope

type SelectableRegionSelectionStatusScope struct {
	InheritedWidget
	// contains filtered or unexported fields
}

SelectableRegionSelectionStatusScope notifies its listeners when the selection under a SelectableRegion or SelectionArea is being changed or finalized. Its listeners will be called even when the value of the status does not change.

Flutter: widgets/selectable_region.dart SelectableRegionSelectionStatusScope

func (*SelectableRegionSelectionStatusScope) UpdateShouldNotify

func (w *SelectableRegionSelectionStatusScope) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the notifier is another one.

Flutter: widgets/selectable_region.dart SelectableRegionSelectionStatusScope.updateShouldNotify

type SelectableRegionState

type SelectableRegionState struct {
	StateOf[*SelectableRegion]
	// contains filtered or unexported fields
}

SelectableRegionState is the state of a SelectableRegion. It is the registrar of the selection container it creates, and handles the gestures and the actions of the region.

Flutter: widgets/selectable_region.dart SelectableRegionState

func (*SelectableRegionState) Add

func (s *SelectableRegionState) Add(selectable rendering.Selectable)

Add registers the selectable, which is the SelectionContainer of the region.

Flutter: widgets/selectable_region.dart SelectableRegionState.add

func (*SelectableRegionState) Build

Build builds the selection container with the gestures and the actions.

Flutter: widgets/selectable_region.dart SelectableRegionState.build

func (*SelectableRegionState) ClearSelection

func (s *SelectableRegionState) ClearSelection()

ClearSelection removes the ongoing selection for this region.

Flutter: widgets/selectable_region.dart SelectableRegionState.clearSelection

func (*SelectableRegionState) ContextMenuAnchors

func (s *SelectableRegionState) ContextMenuAnchors() TextSelectionToolbarAnchors

ContextMenuAnchors returns the anchor points for the default context menu.

Flutter: widgets/selectable_region.dart SelectableRegionState.contextMenuAnchors

func (*SelectableRegionState) ContextMenuButtonItems

func (s *SelectableRegionState) ContextMenuButtonItems() []ContextMenuButtonItem

ContextMenuButtonItems returns the items representing the buttons in this platform's default selection menu.

Flutter: widgets/selectable_region.dart SelectableRegionState.contextMenuButtonItems

func (*SelectableRegionState) CopySelection

func (s *SelectableRegionState) CopySelection()

CopySelection copies the selected content and clears the selection.

Flutter: widgets/selectable_region.dart SelectableRegionState.copySelection

func (*SelectableRegionState) DidChangeDependencies

func (s *SelectableRegionState) DidChangeDependencies()

DidChangeDependencies hides the toolbar on mobile when the orientation changes.

Flutter: widgets/selectable_region.dart SelectableRegionState.didChangeDependencies

func (*SelectableRegionState) DidUpdateWidget

func (s *SelectableRegionState) DidUpdateWidget(old *SelectableRegion)

DidUpdateWidget moves the listener to the new focus node.

Flutter: widgets/selectable_region.dart SelectableRegionState.didUpdateWidget

func (*SelectableRegionState) Dispose

func (s *SelectableRegionState) Dispose()

Dispose releases the delegate, the overlay and the focus node.

Flutter: widgets/selectable_region.dart SelectableRegionState.dispose

func (*SelectableRegionState) EndGlyphHeight

func (s *SelectableRegionState) EndGlyphHeight() float64

EndGlyphHeight is the line height at the end of the current selection.

Flutter: widgets/selectable_region.dart SelectableRegionState.endGlyphHeight

func (*SelectableRegionState) HideToolbar

func (s *SelectableRegionState) HideToolbar(hideHandles bool)

HideToolbar hides the toolbar, and the handles when hideHandles is set.

Flutter: widgets/selectable_region.dart SelectableRegionState.hideToolbar

func (*SelectableRegionState) InitState

func (s *SelectableRegionState) InitState()

InitState creates the actions and the gesture recognizers.

Flutter: widgets/selectable_region.dart SelectableRegionState.initState

func (*SelectableRegionState) Remove

func (s *SelectableRegionState) Remove(selectable rendering.Selectable)

Remove unregisters the selectable.

Flutter: widgets/selectable_region.dart SelectableRegionState.remove

func (*SelectableRegionState) SelectAll

func (s *SelectableRegionState) SelectAll(cause ...services.SelectionChangedCause)

SelectAll selects all the content of the region. The cause is the toolbar when the handles and the toolbar are shown after it.

Flutter: widgets/selectable_region.dart SelectableRegionState.selectAll

func (*SelectableRegionState) SelectionEndpoints

func (s *SelectableRegionState) SelectionEndpoints() []rendering.TextSelectionPoint

SelectionEndpoints returns the local coordinates of the endpoints of the current selection.

Flutter: widgets/selectable_region.dart SelectableRegionState.selectionEndpoints

func (*SelectableRegionState) SelectionOverlay

func (s *SelectableRegionState) SelectionOverlay() *SelectionOverlay

SelectionOverlay is the overlay that is currently visible on the screen, or nil.

Flutter: widgets/selectable_region.dart SelectableRegionState.selectionOverlay

func (*SelectableRegionState) StartGlyphHeight

func (s *SelectableRegionState) StartGlyphHeight() float64

StartGlyphHeight is the line height at the start of the current selection.

Flutter: widgets/selectable_region.dart SelectableRegionState.startGlyphHeight

type SelectableRegionTapRegionGroupID

type SelectableRegionTapRegionGroupID struct{}

SelectableRegionTapRegionGroupID is the group of the tap regions of a SelectableRegion, its toolbar and its handles: a tap in any of them is a tap inside all of them.

Flutter: widgets/text_selection.dart SelectionOverlay._buildStartHandle (groupId: SelectableRegion)

type SelectionChangedCallback

type SelectionChangedCallback func(selection services.TextSelection, cause services.SelectionChangedCause)

SelectionChangedCallback is the type of the function that EditableText calls when the selection changes.

Flutter: widgets/editable_text.dart SelectionChangedCallback

type SelectionContainer

type SelectionContainer struct {
	StatefulWidget
	// contains filtered or unexported fields
}

SelectionContainer is a container that allows Selectable widgets to participate in the selection of a SelectionArea or a SelectableRegion above it, and lets its delegate decide how the selection of the widgets below it is handled and what content the container gives.

Flutter: widgets/selection_container.dart SelectionContainer

func NewSelectionContainer

func NewSelectionContainer(delegate SelectionContainerDelegate, child Widget, opts ...SelectionContainerOpts) *SelectionContainer

NewSelectionContainer creates a selection container whose delegate handles the selection of the widgets below the child.

Flutter: widgets/selection_container.dart SelectionContainer.new

func NewSelectionContainerDisabled

func NewSelectionContainerDisabled(child Widget, opts ...SelectionContainerOpts) *SelectionContainer

NewSelectionContainerDisabled creates a selection container that disables the selection below it: the Selectables under it do not register.

Flutter: widgets/selection_container.dart SelectionContainer.disabled

func (*SelectionContainer) CreateState

func (w *SelectionContainer) CreateState() State

CreateState creates the state.

Flutter: widgets/selection_container.dart SelectionContainer.createState

type SelectionContainerDelegate

type SelectionContainerDelegate interface {
	rendering.SelectionHandler
	rendering.SelectionRegistrar
	// contains filtered or unexported methods
}

SelectionContainerDelegate is the delegate of a SelectionContainer: it handles the selection events of the container and the Selectables that register with it. Embed SelectionContainerDelegateBase in the implementation.

Flutter: widgets/selection_container.dart SelectionContainerDelegate

type SelectionContainerDelegateBase

type SelectionContainerDelegateBase struct {
	// contains filtered or unexported fields
}

SelectionContainerDelegateBase has what the delegates of a container share: the context of the container, and the transforms and the size relative to it.

Flutter: widgets/selection_container.dart SelectionContainerDelegate

func (*SelectionContainerDelegateBase) ContainerSize

func (b *SelectionContainerDelegateBase) ContainerSize() ui.Size

ContainerSize is the size of the container; it must have been laid out.

Flutter: widgets/selection_container.dart SelectionContainerDelegate.containerSize

func (*SelectionContainerDelegateBase) GetTransformFrom

func (b *SelectionContainerDelegateBase) GetTransformFrom(child rendering.Selectable) *ui.Matrix4

GetTransformFrom is the transform from the child to the container.

Flutter: widgets/selection_container.dart SelectionContainerDelegate.getTransformFrom

func (*SelectionContainerDelegateBase) GetTransformTo

func (b *SelectionContainerDelegateBase) GetTransformTo(ancestor rendering.RenderObject) *ui.Matrix4

GetTransformTo is the transform from the container to the ancestor.

Flutter: widgets/selection_container.dart SelectionContainerDelegate.getTransformTo

func (*SelectionContainerDelegateBase) HasSize

func (b *SelectionContainerDelegateBase) HasSize() bool

HasSize reports whether the container has been laid out.

Flutter: widgets/selection_container.dart SelectionContainerDelegate.hasSize

type SelectionContainerOpts

type SelectionContainerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Registrar is the SelectionRegistrar the container registers with; the
	// default is the nearest registrar above it (SelectionContainerMaybeOf).
	Registrar rendering.SelectionRegistrar
}

SelectionContainerOpts are the optional parameters of NewSelectionContainer.

Flutter: widgets/selection_container.dart SelectionContainer.new

type SelectionOverlay

type SelectionOverlay struct {
	// contains filtered or unexported fields
}

SelectionOverlay builds text editing handles and the toolbar of a text selection in the Overlay.

Deviation: the spell check toolbar and the deprecated buildToolbar path (toolbarLocation, selectionDelegate and clipboardStatus) are not ported (SPEC §12.10).

Flutter: widgets/text_selection.dart SelectionOverlay

func NewSelectionOverlay

func NewSelectionOverlay(bc BuildContext, startHandleType rendering.TextSelectionHandleType, lineHeightAtStart float64,
	endHandleType rendering.TextSelectionHandleType, lineHeightAtEnd float64, selectionEndpoints []rendering.TextSelectionPoint,
	selectionControls TextSelectionControls, startHandleLayerLink, endHandleLayerLink, toolbarLayerLink *rendering.LayerLink,
	opts ...SelectionOverlayOpts) *SelectionOverlay

NewSelectionOverlay creates an object that manages overlay entries for selection handles. The context must have an Overlay as an ancestor.

Flutter: widgets/text_selection.dart SelectionOverlay.new

func (*SelectionOverlay) Context

func (o *SelectionOverlay) Context() BuildContext

Context is the context in which the selection handles should appear.

Flutter: widgets/text_selection.dart SelectionOverlay.context

func (*SelectionOverlay) Dispose

func (o *SelectionOverlay) Dispose()

Dispose disposes this object and releases resources.

Flutter: widgets/text_selection.dart SelectionOverlay.dispose

func (*SelectionOverlay) EndHandleType

EndHandleType is the type of the end selection handle.

Flutter: widgets/text_selection.dart SelectionOverlay.endHandleType

func (*SelectionOverlay) Hide

func (o *SelectionOverlay) Hide()

Hide hides the entire overlay including the toolbar and the handles.

Flutter: widgets/text_selection.dart SelectionOverlay.hide

func (*SelectionOverlay) HideHandles

func (o *SelectionOverlay) HideHandles()

HideHandles destroys the handles by removing them from the overlay.

Flutter: widgets/text_selection.dart SelectionOverlay.hideHandles

func (*SelectionOverlay) HideMagnifier

func (o *SelectionOverlay) HideMagnifier()

HideMagnifier hides the current magnifier. This does nothing if there is no magnifier.

Flutter: widgets/text_selection.dart SelectionOverlay.hideMagnifier

func (*SelectionOverlay) HideToolbar

func (o *SelectionOverlay) HideToolbar()

HideToolbar hides the toolbar part of the overlay. To hide the whole overlay, see Hide.

Flutter: widgets/text_selection.dart SelectionOverlay.hideToolbar

func (*SelectionOverlay) IsDraggingEndHandle

func (o *SelectionOverlay) IsDraggingEndHandle() bool

IsDraggingEndHandle is whether the selection end handle is currently being dragged.

Flutter: widgets/text_selection.dart SelectionOverlay.isDraggingEndHandle

func (*SelectionOverlay) IsDraggingStartHandle

func (o *SelectionOverlay) IsDraggingStartHandle() bool

IsDraggingStartHandle is whether the selection start handle is currently being dragged.

Flutter: widgets/text_selection.dart SelectionOverlay.isDraggingStartHandle

func (*SelectionOverlay) LineHeightAtEnd

func (o *SelectionOverlay) LineHeightAtEnd() float64

LineHeightAtEnd is the line height at the selection end.

Flutter: widgets/text_selection.dart SelectionOverlay.lineHeightAtEnd

func (*SelectionOverlay) LineHeightAtStart

func (o *SelectionOverlay) LineHeightAtStart() float64

LineHeightAtStart is the line height at the selection start.

Flutter: widgets/text_selection.dart SelectionOverlay.lineHeightAtStart

func (*SelectionOverlay) MagnifierConfiguration

func (o *SelectionOverlay) MagnifierConfiguration() *TextMagnifierConfiguration

MagnifierConfiguration is the configuration for the magnifier.

By default, SelectionOverlay's TextMagnifierConfiguration is disabled.

Flutter: widgets/text_selection.dart SelectionOverlay.magnifierConfiguration

func (*SelectionOverlay) MagnifierExists

func (o *SelectionOverlay) MagnifierExists() bool

MagnifierExists is whether the magnifier currently exists.

This differs from MagnifierIsVisible in that the magnifier may exist in the overlay, but not be shown.

Flutter: widgets/text_selection.dart SelectionOverlay.magnifierExists

func (*SelectionOverlay) MagnifierIsVisible

func (o *SelectionOverlay) MagnifierIsVisible() bool

MagnifierIsVisible is whether the magnifier is currently visible.

Flutter: widgets/text_selection.dart SelectionOverlay.magnifierIsVisible

func (*SelectionOverlay) MarkNeedsBuild

func (o *SelectionOverlay) MarkNeedsBuild()

MarkNeedsBuild rebuilds the selection toolbar or handles if they are present.

Flutter: widgets/text_selection.dart SelectionOverlay.markNeedsBuild

func (*SelectionOverlay) SelectionEndpoints

func (o *SelectionOverlay) SelectionEndpoints() []rendering.TextSelectionPoint

SelectionEndpoints are the text selection positions of selection start and end.

Flutter: widgets/text_selection.dart SelectionOverlay.selectionEndpoints

func (*SelectionOverlay) SetEndHandleType

func (o *SelectionOverlay) SetEndHandleType(value rendering.TextSelectionHandleType)

SetEndHandleType sets the type of the end selection handle. Changing the value while the handles are visible causes them to rebuild.

Flutter: widgets/text_selection.dart SelectionOverlay.endHandleType

func (*SelectionOverlay) SetLineHeightAtEnd

func (o *SelectionOverlay) SetLineHeightAtEnd(value float64)

SetLineHeightAtEnd sets the line height at the selection end, which is used for the size of the end handle. Changing the value while the handles are visible causes them to rebuild.

Flutter: widgets/text_selection.dart SelectionOverlay.lineHeightAtEnd

func (*SelectionOverlay) SetLineHeightAtStart

func (o *SelectionOverlay) SetLineHeightAtStart(value float64)

SetLineHeightAtStart sets the line height at the selection start, which is used for the size of the start handle. Changing the value while the handles are visible causes them to rebuild.

Flutter: widgets/text_selection.dart SelectionOverlay.lineHeightAtStart

func (*SelectionOverlay) SetSelectionEndpoints

func (o *SelectionOverlay) SetSelectionEndpoints(value []rendering.TextSelectionPoint)

SetSelectionEndpoints sets the text selection positions of selection start and end, and rebuilds the overlay if they changed.

Flutter: widgets/text_selection.dart SelectionOverlay.selectionEndpoints

func (*SelectionOverlay) SetStartHandleType

func (o *SelectionOverlay) SetStartHandleType(value rendering.TextSelectionHandleType)

SetStartHandleType sets the type of the start selection handle. Changing the value while the handles are visible causes them to rebuild.

Flutter: widgets/text_selection.dart SelectionOverlay.startHandleType

func (*SelectionOverlay) ShowHandles

func (o *SelectionOverlay) ShowHandles()

ShowHandles builds the handles by inserting them into the overlay of the context.

Flutter: widgets/text_selection.dart SelectionOverlay.showHandles

func (*SelectionOverlay) ShowMagnifier

func (o *SelectionOverlay) ShowMagnifier(initialMagnifierInfo MagnifierInfo)

ShowMagnifier shows the magnifier, and hides the toolbar if it was showing when ShowMagnifier was called. This is safe to call on platforms not mobile, since a magnifier builder will not be provided, or the magnifier builder will return nil on platforms not mobile.

This is NOT the source of truth for if the magnifier is up or not, since magnifiers may hide themselves. If this info is needed, check MagnifierIsVisible.

Flutter: widgets/text_selection.dart SelectionOverlay.showMagnifier

func (*SelectionOverlay) ShowSpellCheckSuggestionsToolbar

func (o *SelectionOverlay) ShowSpellCheckSuggestionsToolbar(bc BuildContext, builder WidgetBuilder)

ShowSpellCheckSuggestionsToolbar shows the toolbar with the spell check suggestions of misspelled words that are available for click-and-replace, by inserting it into the overlay of the context. A nil context or builder does nothing.

Flutter: widgets/text_selection.dart SelectionOverlay.showSpellCheckSuggestionsToolbar

func (*SelectionOverlay) ShowToolbar

func (o *SelectionOverlay) ShowToolbar(bc BuildContext, contextMenuBuilder WidgetBuilder)

ShowToolbar shows the toolbar by inserting it into the overlay of the context. A nil contextMenuBuilder does nothing.

Deviation: Flutter also builds the deprecated toolbar of the selection controls when the builder is null; that path is not ported (SPEC §12.10).

Flutter: widgets/text_selection.dart SelectionOverlay.showToolbar

func (*SelectionOverlay) SpellCheckToolbarIsVisible

func (o *SelectionOverlay) SpellCheckToolbarIsVisible() bool

SpellCheckToolbarIsVisible is whether the spell check suggestions toolbar is currently visible.

Flutter: widgets/text_selection.dart SelectionOverlay._spellCheckToolbarController (isShown)

func (*SelectionOverlay) StartHandleType

func (o *SelectionOverlay) StartHandleType() rendering.TextSelectionHandleType

StartHandleType is the type of the start selection handle.

Flutter: widgets/text_selection.dart SelectionOverlay.startHandleType

func (*SelectionOverlay) ToolbarIsVisible

func (o *SelectionOverlay) ToolbarIsVisible() bool

ToolbarIsVisible is whether the toolbar is currently visible. It includes both the text selection toolbar and the spell check menu.

Flutter: widgets/text_selection.dart SelectionOverlay.toolbarIsVisible

func (*SelectionOverlay) UpdateMagnifier

func (o *SelectionOverlay) UpdateMagnifier(magnifierInfo MagnifierInfo)

UpdateMagnifier updates the current magnifier with new selection data, so the magnifier can respond accordingly.

If the magnifier is not shown, this still updates the magnifier position because the magnifier may have hidden itself and is looking for a cue to reshow itself.

If there is no magnifier in the overlay, this does nothing.

Flutter: widgets/text_selection.dart SelectionOverlay.updateMagnifier

type SelectionOverlayOpts

type SelectionOverlayOpts struct {
	// DebugRequiredFor is the widget that requires the overlay, named in the
	// error when there is none.
	DebugRequiredFor Widget
	// StartHandlesVisible is whether the start handle is visible; nil for
	// always visible.
	StartHandlesVisible foundation.ValueListenable[bool]
	// OnStartHandleDragStart is called when the user starts dragging the start handle.
	OnStartHandleDragStart func(gestures.DragStartDetails)
	// OnStartHandleDragUpdate is called when the user drags the start handle.
	OnStartHandleDragUpdate func(gestures.DragUpdateDetails)
	// OnStartHandleDragEnd is called when the user lifts their finger after
	// dragging the start handle.
	OnStartHandleDragEnd func(gestures.DragEndDetails)
	// EndHandlesVisible is whether the end handle is visible; nil for always visible.
	EndHandlesVisible foundation.ValueListenable[bool]
	// OnEndHandleDragStart is called when the user starts dragging the end handle.
	OnEndHandleDragStart func(gestures.DragStartDetails)
	// OnEndHandleDragUpdate is called when the user drags the end handle.
	OnEndHandleDragUpdate func(gestures.DragUpdateDetails)
	// OnEndHandleDragEnd is called when the user lifts their finger after
	// dragging the end handle.
	OnEndHandleDragEnd func(gestures.DragEndDetails)
	// ToolbarVisible is whether the toolbar is visible; nil for always visible.
	ToolbarVisible foundation.ValueListenable[bool]
	// DragStartBehavior is where a handle drag starts; the default is start.
	DragStartBehavior gestures.DragStartBehavior
	// OnSelectionHandleTapped is called when a handle is tapped.
	OnSelectionHandleTapped foundation.VoidCallback
	// MagnifierConfiguration is the configuration for the magnifier. By default
	// (nil), SelectionOverlay's TextMagnifierConfiguration is disabled.
	MagnifierConfiguration *TextMagnifierConfiguration
}

SelectionOverlayOpts are the optional parameters of NewSelectionOverlay.

Flutter: widgets/text_selection.dart SelectionOverlay.new

type SelectionRegistrarScope

type SelectionRegistrarScope struct {
	InheritedWidget
	// contains filtered or unexported fields
}

SelectionRegistrarScope is the inherited widget that gives the registrar of a SelectionContainer to the Selectables below it.

Flutter: widgets/selection_container.dart SelectionRegistrarScope

func NewSelectionRegistrarScope

func NewSelectionRegistrarScope(registrar rendering.SelectionRegistrar, child Widget, opts ...WidgetOpts) *SelectionRegistrarScope

NewSelectionRegistrarScope creates a scope that gives the registrar.

Flutter: widgets/selection_container.dart SelectionRegistrarScope.new

func (*SelectionRegistrarScope) UpdateShouldNotify

func (w *SelectionRegistrarScope) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the registrar is another one.

Flutter: widgets/selection_container.dart SelectionRegistrarScope.updateShouldNotify

type SemanticIndexCallback

type SemanticIndexCallback func(widget Widget, localIndex int) foundation.Opt[int]

SemanticIndexCallback gives the semantic index of the widget at a local index: none for a widget that is not a semantic item (a separator).

Flutter: widgets/scroll_delegate.dart SemanticIndexCallback

type Semantics

type Semantics struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

Semantics annotates the widget tree with a description of the meaning of the widgets: the labels, the flags and the actions that assistive technologies use.

Flutter: widgets/basic.dart Semantics

func NewSemantics

func NewSemantics(child Widget, opts ...SemanticsOpts) *Semantics

NewSemantics creates a widget that annotates its child with semantics. A container widget (Container: true) forms a node of its own; without it the annotations merge into the node of the closest ancestor that has one.

Flutter: widgets/basic.dart Semantics.new

func NewSemanticsFromProperties

func NewSemanticsFromProperties(properties *semantics.SemanticsProperties, child Widget, opts ...SemanticsFromPropertiesOpts) *Semantics

NewSemanticsFromProperties creates a widget with semantics given as a SemanticsProperties.

Flutter: widgets/basic.dart Semantics.fromProperties

func (*Semantics) BlockUserActions

func (w *Semantics) BlockUserActions() bool

BlockUserActions is whether the user actions of the subtree are blocked.

Flutter: widgets/basic.dart Semantics.blockUserActions

func (*Semantics) Container

func (w *Semantics) Container() bool

Container is whether the widget forms a semantic boundary of its own.

Flutter: widgets/basic.dart Semantics.container

func (*Semantics) CreateRenderObject

func (w *Semantics) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Semantics.createRenderObject

func (*Semantics) ExcludeSemantics

func (w *Semantics) ExcludeSemantics() bool

ExcludeSemantics is whether the semantics of the subtree are dropped.

Flutter: widgets/basic.dart Semantics.excludeSemantics

func (*Semantics) ExplicitChildNodes

func (w *Semantics) ExplicitChildNodes() bool

ExplicitChildNodes is whether the children form nodes of their own.

Flutter: widgets/basic.dart Semantics.explicitChildNodes

func (*Semantics) LocaleForSubtree

func (w *Semantics) LocaleForSubtree() foundation.Opt[ui.Locale]

LocaleForSubtree is the locale of the strings of the subtree.

Flutter: widgets/basic.dart Semantics.localeForSubtree

func (*Semantics) Properties

func (w *Semantics) Properties() *semantics.SemanticsProperties

Properties are the semantics properties of the widget.

Flutter: widgets/basic.dart Semantics.properties

func (*Semantics) UpdateRenderObject

func (w *Semantics) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Semantics.updateRenderObject

type SemanticsFromPropertiesOpts

type SemanticsFromPropertiesOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Container is whether the node forms a semantic boundary of its own.
	Container bool
	// ExplicitChildNodes is whether the children form nodes of their own.
	ExplicitChildNodes bool
	// ExcludeSemantics drops the semantics of the subtree.
	ExcludeSemantics bool
	// BlockUserActions blocks the user actions of the subtree.
	BlockUserActions bool
	// LocaleForSubtree is the locale of the strings of the subtree.
	LocaleForSubtree foundation.Opt[ui.Locale]
}

SemanticsFromPropertiesOpts are the optional parameters of NewSemanticsFromProperties.

Flutter: widgets/basic.dart Semantics.fromProperties

type SemanticsGestureDelegate

type SemanticsGestureDelegate interface {
	// AssignSemantics sets the callbacks of the render object.
	//
	// Flutter: widgets/gesture_detector.dart SemanticsGestureDelegate.assignSemantics
	AssignSemantics(renderObject *rendering.RenderSemanticsGestureHandler)
}

SemanticsGestureDelegate is the interface for a delegate that can assign the semantics actions of a RenderSemanticsGestureHandler.

Flutter: widgets/gesture_detector.dart SemanticsGestureDelegate

type SemanticsOpts

type SemanticsOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Container is whether the node forms a semantic boundary of its own, so that
	// it is not merged into its parent.
	Container bool
	// ExplicitChildNodes is whether the children form nodes of their own instead
	// of merging into this one.
	ExplicitChildNodes bool
	// ExcludeSemantics drops the semantics of the subtree.
	ExcludeSemantics bool
	// BlockUserActions blocks the user actions of the subtree.
	BlockUserActions bool
	// LocaleForSubtree is the locale of the strings of the subtree.
	LocaleForSubtree foundation.Opt[ui.Locale]

	// Enabled is the property of the same name of semantics.SemanticsProperties.
	Enabled foundation.Opt[bool]
	// Checked is the property of the same name of semantics.SemanticsProperties.
	Checked foundation.Opt[bool]
	// Mixed is the property of the same name of semantics.SemanticsProperties.
	Mixed foundation.Opt[bool]
	// Expanded is the property of the same name of semantics.SemanticsProperties.
	Expanded foundation.Opt[bool]
	// Selected is the property of the same name of semantics.SemanticsProperties.
	Selected foundation.Opt[bool]
	// Toggled is the property of the same name of semantics.SemanticsProperties.
	Toggled foundation.Opt[bool]
	// Button is the property of the same name of semantics.SemanticsProperties.
	Button foundation.Opt[bool]
	// Link is the property of the same name of semantics.SemanticsProperties.
	Link foundation.Opt[bool]
	// Header is the property of the same name of semantics.SemanticsProperties.
	Header foundation.Opt[bool]
	// TextField is the property of the same name of semantics.SemanticsProperties.
	TextField foundation.Opt[bool]
	// Slider is the property of the same name of semantics.SemanticsProperties.
	Slider foundation.Opt[bool]
	// KeyboardKey is the property of the same name of semantics.SemanticsProperties.
	KeyboardKey foundation.Opt[bool]
	// ReadOnly is the property of the same name of semantics.SemanticsProperties.
	ReadOnly foundation.Opt[bool]
	// Focusable is the property of the same name of semantics.SemanticsProperties.
	Focusable foundation.Opt[bool]
	// Focused is the property of the same name of semantics.SemanticsProperties.
	Focused foundation.Opt[bool]
	// InMutuallyExclusiveGroup is the property of the same name of semantics.SemanticsProperties.
	InMutuallyExclusiveGroup foundation.Opt[bool]
	// Hidden is the property of the same name of semantics.SemanticsProperties.
	Hidden foundation.Opt[bool]
	// Obscured is the property of the same name of semantics.SemanticsProperties.
	Obscured foundation.Opt[bool]
	// Multiline is the property of the same name of semantics.SemanticsProperties.
	Multiline foundation.Opt[bool]
	// ScopesRoute is the property of the same name of semantics.SemanticsProperties.
	ScopesRoute foundation.Opt[bool]
	// NamesRoute is the property of the same name of semantics.SemanticsProperties.
	NamesRoute foundation.Opt[bool]
	// Image is the property of the same name of semantics.SemanticsProperties.
	Image foundation.Opt[bool]
	// LiveRegion is the property of the same name of semantics.SemanticsProperties.
	LiveRegion foundation.Opt[bool]
	// IsRequired is the property of the same name of semantics.SemanticsProperties.
	IsRequired foundation.Opt[bool]
	// LinkURL is the property of the same name of semantics.SemanticsProperties.
	LinkURL foundation.Opt[string]
	// HeadingLevel is the property of the same name of semantics.SemanticsProperties.
	HeadingLevel foundation.Opt[int]
	// AccessibilityFocusBlockType is the property of the same name of semantics.SemanticsProperties.
	AccessibilityFocusBlockType foundation.Opt[semantics.AccessibilityFocusBlockType]
	// MaxValueLength is the property of the same name of semantics.SemanticsProperties.
	MaxValueLength foundation.Opt[int]
	// CurrentValueLength is the property of the same name of semantics.SemanticsProperties.
	CurrentValueLength foundation.Opt[int]
	// Identifier is the property of the same name of semantics.SemanticsProperties.
	Identifier foundation.Opt[string]
	// TraversalParentIdentifier is the property of the same name of semantics.SemanticsProperties.
	TraversalParentIdentifier any
	// TraversalChildIdentifier is the property of the same name of semantics.SemanticsProperties.
	TraversalChildIdentifier any
	// Label is the property of the same name of semantics.SemanticsProperties.
	Label foundation.Opt[string]
	// Value is the property of the same name of semantics.SemanticsProperties.
	Value foundation.Opt[string]
	// IncreasedValue is the property of the same name of semantics.SemanticsProperties.
	IncreasedValue foundation.Opt[string]
	// DecreasedValue is the property of the same name of semantics.SemanticsProperties.
	DecreasedValue foundation.Opt[string]
	// Hint is the property of the same name of semantics.SemanticsProperties.
	Hint foundation.Opt[string]
	// AttributedLabel is the property of the same name of semantics.SemanticsProperties.
	AttributedLabel *semantics.AttributedString
	// AttributedValue is the property of the same name of semantics.SemanticsProperties.
	AttributedValue *semantics.AttributedString
	// AttributedIncreasedValue is the property of the same name of semantics.SemanticsProperties.
	AttributedIncreasedValue *semantics.AttributedString
	// AttributedDecreasedValue is the property of the same name of semantics.SemanticsProperties.
	AttributedDecreasedValue *semantics.AttributedString
	// AttributedHint is the property of the same name of semantics.SemanticsProperties.
	AttributedHint *semantics.AttributedString
	// Tooltip is the property of the same name of semantics.SemanticsProperties.
	Tooltip foundation.Opt[string]
	// HintOverrides is the property of the same name of semantics.SemanticsProperties.
	HintOverrides *semantics.SemanticsHintOverrides
	// TextDirection is the property of the same name of semantics.SemanticsProperties.
	TextDirection ui.TextDirection
	// SortKey is the property of the same name of semantics.SemanticsProperties.
	SortKey semantics.SemanticsSortKey
	// TagForChildren is the property of the same name of semantics.SemanticsProperties.
	TagForChildren foundation.Opt[semantics.SemanticsTag]
	// Role is the property of the same name of semantics.SemanticsProperties.
	Role foundation.Opt[ui.SemanticsRole]
	// ControlsNodes is the property of the same name of semantics.SemanticsProperties.
	ControlsNodes []string
	// InputType is the property of the same name of semantics.SemanticsProperties.
	InputType foundation.Opt[ui.SemanticsInputType]
	// ValidationResult is the property of the same name of semantics.SemanticsProperties.
	ValidationResult ui.SemanticsValidationResult
	// HitTestBehavior is the property of the same name of semantics.SemanticsProperties.
	HitTestBehavior foundation.Opt[ui.SemanticsHitTestBehavior]
	// OnTap is the property of the same name of semantics.SemanticsProperties.
	OnTap func()
	// OnLongPress is the property of the same name of semantics.SemanticsProperties.
	OnLongPress func()
	// OnScrollLeft is the property of the same name of semantics.SemanticsProperties.
	OnScrollLeft func()
	// OnScrollRight is the property of the same name of semantics.SemanticsProperties.
	OnScrollRight func()
	// OnScrollUp is the property of the same name of semantics.SemanticsProperties.
	OnScrollUp func()
	// OnScrollDown is the property of the same name of semantics.SemanticsProperties.
	OnScrollDown func()
	// OnIncrease is the property of the same name of semantics.SemanticsProperties.
	OnIncrease func()
	// OnDecrease is the property of the same name of semantics.SemanticsProperties.
	OnDecrease func()
	// OnCopy is the property of the same name of semantics.SemanticsProperties.
	OnCopy func()
	// OnCut is the property of the same name of semantics.SemanticsProperties.
	OnCut func()
	// OnPaste is the property of the same name of semantics.SemanticsProperties.
	OnPaste func()
	// OnMoveCursorForwardByCharacter is the property of the same name of semantics.SemanticsProperties.
	OnMoveCursorForwardByCharacter semantics.MoveCursorHandler
	// OnMoveCursorBackwardByCharacter is the property of the same name of semantics.SemanticsProperties.
	OnMoveCursorBackwardByCharacter semantics.MoveCursorHandler
	// OnMoveCursorForwardByWord is the property of the same name of semantics.SemanticsProperties.
	OnMoveCursorForwardByWord semantics.MoveCursorHandler
	// OnMoveCursorBackwardByWord is the property of the same name of semantics.SemanticsProperties.
	OnMoveCursorBackwardByWord semantics.MoveCursorHandler
	// OnSetSelection is the property of the same name of semantics.SemanticsProperties.
	OnSetSelection semantics.SetSelectionHandler
	// OnSetText is the property of the same name of semantics.SemanticsProperties.
	OnSetText semantics.SetTextHandler
	// OnDidGainAccessibilityFocus is the property of the same name of semantics.SemanticsProperties.
	OnDidGainAccessibilityFocus func()
	// OnDidLoseAccessibilityFocus is the property of the same name of semantics.SemanticsProperties.
	OnDidLoseAccessibilityFocus func()
	// OnFocus is the property of the same name of semantics.SemanticsProperties.
	OnFocus func()
	// OnDismiss is the property of the same name of semantics.SemanticsProperties.
	OnDismiss func()
	// OnExpand is the property of the same name of semantics.SemanticsProperties.
	OnExpand func()
	// OnCollapse is the property of the same name of semantics.SemanticsProperties.
	OnCollapse func()
	// CustomSemanticsActions is the property of the same name of semantics.SemanticsProperties.
	CustomSemanticsActions map[semantics.CustomSemanticsAction]func()
	// MinValue is the property of the same name of semantics.SemanticsProperties.
	MinValue foundation.Opt[string]
	// MaxValue is the property of the same name of semantics.SemanticsProperties.
	MaxValue foundation.Opt[string]
}

SemanticsOpts are the optional parameters of NewSemantics: the options of the widget and every property of semantics.SemanticsProperties, with the same names (Flutter's Semantics.new has them as named parameters).

Flutter: widgets/basic.dart Semantics.new

type ShaderMask

type ShaderMask struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

ShaderMask applies a mask generated by a shader to its child.

Flutter: widgets/basic.dart ShaderMask

func NewShaderMask

func NewShaderMask(shaderCallback rendering.ShaderCallback, child Widget, opts ...ShaderMaskOpts) *ShaderMask

NewShaderMask creates the widget.

Flutter: widgets/basic.dart ShaderMask.new

func (*ShaderMask) BlendMode

func (w *ShaderMask) BlendMode() ui.BlendMode

BlendMode is the blend mode to use when applying the shader to the child; the default is BlendModeModulate.

Flutter: widgets/basic.dart ShaderMask.blendMode

func (*ShaderMask) CreateRenderObject

func (w *ShaderMask) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart ShaderMask.createRenderObject

func (*ShaderMask) ShaderCallback

func (w *ShaderMask) ShaderCallback() rendering.ShaderCallback

ShaderCallback is called to create the shader for the mask, given the bounds of the child.

Flutter: widgets/basic.dart ShaderMask.shaderCallback

func (*ShaderMask) UpdateRenderObject

func (w *ShaderMask) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart ShaderMask.updateRenderObject

type ShaderMaskOpts

type ShaderMaskOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// BlendMode is the blend mode to use when applying the shader to the child; the default is BlendModeModulate.
	BlendMode ui.BlendMode
}

ShaderMaskOpts are the optional parameters of NewShaderMask.

Flutter: widgets/basic.dart ShaderMask.new

type ShortcutActivator

type ShortcutActivator interface {
	// Triggers are the keys that can trigger the shortcut; the shortcuts manager
	// asks only the activators whose triggers contain the key of an event. A nil
	// result means the activator can be triggered by any key.
	//
	// Flutter: widgets/shortcuts.dart ShortcutActivator.triggers
	Triggers() []services.LogicalKeyboardKey
	// Accepts is whether the key event, with the keyboard state after it, triggers
	// the shortcut.
	//
	// Flutter: widgets/shortcuts.dart ShortcutActivator.accepts
	Accepts(event services.KeyEvent, state *services.HardwareKeyboard) bool
	// DebugDescribeKeys is the keys of the activator as text, such as
	// "Control + Shift + Key C".
	//
	// Flutter: widgets/shortcuts.dart ShortcutActivator.debugDescribeKeys
	DebugDescribeKeys() string
}

ShortcutActivator is the interface for defining the key combination that triggers a shortcut: SingleActivator, CharacterActivator and LogicalKeySet are the ones the framework has. An activator is used as the key of a ShortcutMap, so it must be comparable (a struct without slices, or a pointer).

Flutter: widgets/shortcuts.dart ShortcutActivator

type ShortcutEntry

type ShortcutEntry struct {
	// Activator is the key combination.
	Activator ShortcutActivator
	// Intent is what the combination triggers.
	Intent Intent
}

ShortcutEntry binds an activator to the intent that it triggers.

Flutter: widgets/shortcuts.dart Shortcuts.shortcuts

type ShortcutManager

type ShortcutManager interface {
	foundation.Listenable
	foundation.Diagnosticable
	// Shortcuts is the map of activators to intents.
	//
	// Flutter: widgets/shortcuts.dart ShortcutManager.shortcuts
	Shortcuts() ShortcutMap
	// SetShortcuts replaces the map, and notifies the listeners if it changed.
	//
	// Flutter: widgets/shortcuts.dart ShortcutManager.shortcuts
	SetShortcuts(shortcuts ShortcutMap)
	// Modal is whether the manager stops the keys it has no shortcut for.
	//
	// Flutter: widgets/shortcuts.dart ShortcutManager.modal
	Modal() bool
	// HandleKeypress handles a key event: it finds the intent and the action for it
	// and invokes it.
	//
	// Flutter: widgets/shortcuts.dart ShortcutManager.handleKeypress
	HandleKeypress(bc BuildContext, event services.KeyEvent) KeyEventResult
	// Dispose releases the manager.
	//
	// Flutter: foundation/change_notifier.dart ChangeNotifier.dispose
	Dispose()
	// contains filtered or unexported methods
}

ShortcutManager manages the mapping of activators to intents and handles the key events that its Shortcuts widget gets. Implement it by embedding ShortcutManagerBase to change how key presses are handled.

Flutter: widgets/shortcuts.dart ShortcutManager

type ShortcutManagerBase

type ShortcutManagerBase struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

ShortcutManagerBase implements ShortcutManager. Embed it and call InitShortcutManagerBase with the outer value.

Flutter: widgets/shortcuts.dart ShortcutManager

func NewShortcutManager

func NewShortcutManager(opts ...ShortcutManagerOpts) *ShortcutManagerBase

NewShortcutManager creates a manager.

Flutter: widgets/shortcuts.dart ShortcutManager.new

func (*ShortcutManagerBase) DebugFillProperties

func (m *ShortcutManagerBase) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the shortcuts and whether the manager is modal.

Flutter: widgets/shortcuts.dart ShortcutManager.debugFillProperties

func (*ShortcutManagerBase) HandleKeypress

func (m *ShortcutManagerBase) HandleKeypress(bc BuildContext, event services.KeyEvent) KeyEventResult

HandleKeypress finds the intent for the event and invokes the action bound to it at the primary focus; the result depends on the action. When nothing handles the event, a modal manager skips the remaining handlers and the others ignore the event.

Flutter: widgets/shortcuts.dart ShortcutManager.handleKeypress

func (*ShortcutManagerBase) Modal

func (m *ShortcutManagerBase) Modal() bool

Modal is whether the manager stops the keys it has no shortcut for.

Flutter: widgets/shortcuts.dart ShortcutManager.modal

func (*ShortcutManagerBase) SetShortcuts

func (m *ShortcutManagerBase) SetShortcuts(shortcuts ShortcutMap)

SetShortcuts replaces the map; the listeners are notified if it differs.

Flutter: widgets/shortcuts.dart ShortcutManager.shortcuts

func (*ShortcutManagerBase) Shortcuts

func (m *ShortcutManagerBase) Shortcuts() ShortcutMap

Shortcuts is the map of activators to intents.

Flutter: widgets/shortcuts.dart ShortcutManager.shortcuts

type ShortcutManagerOpts

type ShortcutManagerOpts struct {
	// Shortcuts is the map of activators to intents.
	Shortcuts ShortcutMap
	// Modal makes the manager stop the keys that have no shortcut from reaching
	// the handlers above.
	Modal bool
}

ShortcutManagerOpts are the optional parameters of NewShortcutManager.

Flutter: widgets/shortcuts.dart ShortcutManager.new

type ShortcutMap

type ShortcutMap []ShortcutEntry

ShortcutMap is a map of activators to intents, like Flutter's Map<ShortcutActivator, Intent>. It keeps the order of the entries, which decides which of the activators that accept an event wins; an activator that appears twice keeps the position of its first entry and the intent of its last.

Deviation: an ordered list of entries, not a Go map, because the order matters (SPEC §12.10).

Flutter: widgets/shortcuts.dart Shortcuts.shortcuts

func DefaultTextEditingShortcutMap

func DefaultTextEditingShortcutMap() ShortcutMap

DefaultTextEditingShortcutMap returns the default text editing bindings of the current platform: the Windows bindings when the target platform is Windows, the macOS bindings when it is macOS or iOS, the Linux bindings on every other (see DefaultTextEditingShortcuts).

Flutter: widgets/default_text_editing_shortcuts.dart DefaultTextEditingShortcuts._shortcuts

func WidgetsAppDefaultShortcuts

func WidgetsAppDefaultShortcuts() ShortcutMap

WidgetsAppDefaultShortcuts returns the shortcuts that WidgetsApp uses when it is not given any, for the current target platform: activation, dismissal, the focus traversal by Tab and the arrow keys, and scrolling.

Deviation: GameButtonA activates on macOS and iOS too, where Flutter's map has no such entry: a gamepad makes key events on every platform (SPEC §12.10).

Flutter: widgets/app.dart WidgetsApp.defaultShortcuts

type ShortcutRegistrar

type ShortcutRegistrar struct {
	StatefulWidget
	// contains filtered or unexported fields
}

ShortcutRegistrar is a widget that holds a ShortcutRegistry and handles the shortcuts registered with it. Put one above the app.

Flutter: widgets/shortcuts.dart ShortcutRegistrar

func NewShortcutRegistrar

func NewShortcutRegistrar(child Widget, opts ...WidgetOpts) *ShortcutRegistrar

NewShortcutRegistrar creates the widget.

Flutter: widgets/shortcuts.dart ShortcutRegistrar.new

func (*ShortcutRegistrar) Child

func (w *ShortcutRegistrar) Child() Widget

Child is the widget below.

Flutter: widgets/shortcuts.dart ShortcutRegistrar.child

func (*ShortcutRegistrar) CreateState

func (w *ShortcutRegistrar) CreateState() State

CreateState creates the state.

Flutter: widgets/shortcuts.dart ShortcutRegistrar.createState

type ShortcutRegistry

type ShortcutRegistry struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

ShortcutRegistry is a class used by the ShortcutRegistrar to keep the shortcuts that code anywhere in the app registered: the registrar's manager handles them all.

Flutter: widgets/shortcuts.dart ShortcutRegistry

func NewShortcutRegistry

func NewShortcutRegistry(frames interface{ AddPostFrameCallback(scheduler.FrameCallback) }) *ShortcutRegistry

NewShortcutRegistry creates a registry. The scheduler runs the notification of the listeners after the frame (WidgetsBinding.Scheduler()).

Flutter: widgets/shortcuts.dart ShortcutRegistry.new

func ShortcutRegistryMaybeOf

func ShortcutRegistryMaybeOf(bc BuildContext) *ShortcutRegistry

ShortcutRegistryMaybeOf is ShortcutRegistryOf that returns nil instead of panicking.

Flutter: widgets/shortcuts.dart ShortcutRegistry.maybeOf

func ShortcutRegistryOf

func ShortcutRegistryOf(bc BuildContext) *ShortcutRegistry

ShortcutRegistryOf is the registry of the closest ShortcutRegistrar above the context, and the context depends on it. In debug builds it panics with the tag ShortcutRegistrarNotFound when there is none.

Flutter: widgets/shortcuts.dart ShortcutRegistry.of

func (*ShortcutRegistry) AddAll

AddAll registers the shortcuts and returns the entry to change or remove them. In debug builds it panics with the tag ShortcutRegistryEmpty when there are none and with ShortcutRegistryDuplicate when an activator is already registered.

Flutter: widgets/shortcuts.dart ShortcutRegistry.addAll

func (*ShortcutRegistry) Dispose

func (r *ShortcutRegistry) Dispose()

Dispose releases the registry.

Flutter: widgets/shortcuts.dart ShortcutRegistry.dispose

func (*ShortcutRegistry) Shortcuts

func (r *ShortcutRegistry) Shortcuts() ShortcutMap

Shortcuts are the shortcuts of all the entries.

Flutter: widgets/shortcuts.dart ShortcutRegistry.shortcuts

type ShortcutRegistryEntry

type ShortcutRegistryEntry struct {
	// contains filtered or unexported fields
}

ShortcutRegistryEntry is a token that the code that registered shortcuts keeps to replace or remove them.

Flutter: widgets/shortcuts.dart ShortcutRegistryEntry

func (*ShortcutRegistryEntry) Dispose

func (e *ShortcutRegistryEntry) Dispose()

Dispose removes the shortcuts of the entry; the entry can not be used again.

Flutter: widgets/shortcuts.dart ShortcutRegistryEntry.dispose

func (*ShortcutRegistryEntry) Registry

func (e *ShortcutRegistryEntry) Registry() *ShortcutRegistry

Registry is the registry the entry belongs to.

Flutter: widgets/shortcuts.dart ShortcutRegistryEntry.registry

func (*ShortcutRegistryEntry) ReplaceAll

func (e *ShortcutRegistryEntry) ReplaceAll(value ShortcutMap)

ReplaceAll replaces the shortcuts of the entry.

Flutter: widgets/shortcuts.dart ShortcutRegistryEntry.replaceAll

type ShortcutSerialization

type ShortcutSerialization struct {
	// contains filtered or unexported fields
}

ShortcutSerialization is the parts of a shortcut that a menu shows: either a trigger key or a character, and the modifiers. Dart's nullable booleans of the other kind are false here (use Trigger and Character to tell the kinds apart).

Deviation: Flutter's toChannelRepresentation, a map for the flutter/menu channel, is the unexported menuData here, which fills a ui.PlatformMenuItemData.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization

func NewShortcutSerializationCharacter

func NewShortcutSerializationCharacter(character string, opts ...ShortcutSerializationOpts) ShortcutSerialization

NewShortcutSerializationCharacter serializes a shortcut that is a single character with modifiers. In debug builds it panics with the tag ShortcutSerializationCharacterLength when the character is not one character.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.character

func NewShortcutSerializationModifier

func NewShortcutSerializationModifier(trigger services.LogicalKeyboardKey, opts ...ShortcutSerializationOpts) ShortcutSerialization

NewShortcutSerializationModifier serializes a shortcut that is a trigger key with modifiers. In debug builds it panics with the tag ShortcutSerializationModifierTrigger when the trigger is a modifier key.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.modifier

func (ShortcutSerialization) Alt

func (s ShortcutSerialization) Alt() bool

Alt is whether the Alt key is part of the shortcut.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.alt

func (ShortcutSerialization) Character

func (s ShortcutSerialization) Character() foundation.Opt[string]

Character is the character, if the shortcut is a character with modifiers.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.character

func (ShortcutSerialization) Control

func (s ShortcutSerialization) Control() bool

Control is whether the Control key is part of the shortcut.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.control

func (ShortcutSerialization) Meta

func (s ShortcutSerialization) Meta() bool

Meta is whether the Meta key is part of the shortcut.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.meta

func (ShortcutSerialization) Shift

func (s ShortcutSerialization) Shift() bool

Shift is whether the Shift key is part of the shortcut; it is always false for a character.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.shift

func (ShortcutSerialization) Trigger

Trigger is the trigger key, if the shortcut is a trigger with modifiers.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.trigger

type ShortcutSerializationOpts

type ShortcutSerializationOpts struct {
	// Alt is whether the Alt key is part of the shortcut.
	Alt bool
	// Control is whether the Control key is part of the shortcut.
	Control bool
	// Meta is whether the Meta key is part of the shortcut.
	Meta bool
	// Shift is whether the Shift key is part of the shortcut.
	Shift bool
}

ShortcutSerializationOpts are the modifiers of a ShortcutSerialization; Shift is for the trigger form only, as a character carries its own case.

Flutter: widgets/platform_menu_bar.dart ShortcutSerialization.modifier

type Shortcuts

type Shortcuts struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Shortcuts is a widget that creates key bindings to specific actions for its descendants: when a key event reaches it, the manager maps the event to an intent and the Actions above the primary focus run it.

Flutter: widgets/shortcuts.dart Shortcuts

func NewShortcuts

func NewShortcuts(shortcuts ShortcutMap, child Widget, opts ...ShortcutsOpts) *Shortcuts

NewShortcuts creates a widget with a map of shortcuts.

Flutter: widgets/shortcuts.dart Shortcuts.new

func NewShortcutsManager

func NewShortcutsManager(manager ShortcutManager, child Widget, opts ...ShortcutsOpts) *Shortcuts

NewShortcutsManager creates a widget whose shortcuts and handling are the manager's.

Flutter: widgets/shortcuts.dart Shortcuts.manager

func (*Shortcuts) Child

func (w *Shortcuts) Child() Widget

Child is the widget below.

Flutter: widgets/shortcuts.dart Shortcuts.child

func (*Shortcuts) CreateState

func (w *Shortcuts) CreateState() State

CreateState creates the state.

Flutter: widgets/shortcuts.dart Shortcuts.createState

func (*Shortcuts) DebugFillProperties

func (w *Shortcuts) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the manager and the shortcuts.

Flutter: widgets/shortcuts.dart Shortcuts.debugFillProperties

func (*Shortcuts) DebugLabel

func (w *Shortcuts) DebugLabel() string

DebugLabel is the label that describes the widget.

Flutter: widgets/shortcuts.dart Shortcuts.debugLabel

func (*Shortcuts) IncludeSemantics

func (w *Shortcuts) IncludeSemantics() bool

IncludeSemantics is whether the focus of the widget makes a Semantics node.

Flutter: widgets/shortcuts.dart Shortcuts.includeSemantics

func (*Shortcuts) Manager

func (w *Shortcuts) Manager() ShortcutManager

Manager is the manager the widget was given, or nil.

Flutter: widgets/shortcuts.dart Shortcuts.manager

func (*Shortcuts) Shortcuts

func (w *Shortcuts) Shortcuts() ShortcutMap

Shortcuts is the map of shortcuts: the manager's if there is one.

Flutter: widgets/shortcuts.dart Shortcuts.shortcuts

type ShortcutsOpts

type ShortcutsOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// DebugLabel describes the widget in debug output and names its focus node.
	DebugLabel string
	// ExcludeSemantics leaves out the Semantics node of the widget's Focus
	// (Flutter's includeSemantics is true by default).
	ExcludeSemantics bool
}

ShortcutsOpts are the optional parameters of NewShortcuts and NewShortcutsManager.

Flutter: widgets/shortcuts.dart Shortcuts.new

type ShowGeneralDialogOpts

type ShowGeneralDialogOpts struct {
	// BarrierDismissible is whether tapping the barrier pops the dialog; the
	// default is false.
	BarrierDismissible bool
	// BarrierLabel is the semantic label of the barrier; required when the
	// barrier is dismissible.
	BarrierLabel string
	// BarrierColor is the color of the barrier; the default is 0x80000000.
	BarrierColor foundation.Opt[ui.Color]
	// TransitionDuration is the duration of the transition; the default is 200 ms.
	TransitionDuration foundation.Opt[time.Duration]
	// TransitionBuilder builds the transition of the dialog.
	TransitionBuilder RouteTransitionsBuilder
	// UseRootNavigator pushes the dialog onto the root navigator; the default is
	// true.
	UseRootNavigator foundation.Opt[bool]
	// FullscreenDialog is whether the dialog is fullscreen.
	FullscreenDialog bool
	// RouteSettings are the settings of the route.
	RouteSettings RouteSettings
	// RequestFocus is whether the dialog requests the focus.
	RequestFocus foundation.Opt[bool]
}

ShowGeneralDialogOpts are the optional parameters of ShowGeneralDialog.

Flutter: widgets/routes.dart showGeneralDialog

type ShrinkWrappingViewport

type ShrinkWrappingViewport struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

ShrinkWrappingViewport is a viewport whose extent along the main axis is the extent of its content, up to the constraints. It is slower than Viewport, because it has to lay out all the content to know its size.

Flutter: widgets/viewport.dart ShrinkWrappingViewport

func NewShrinkWrappingViewport

func NewShrinkWrappingViewport(offset rendering.ViewportOffset, slivers []Widget, opts ...ShrinkWrappingViewportOpts) *ShrinkWrappingViewport

NewShrinkWrappingViewport creates a viewport that shows the slivers at the offset and shrinks to them.

Flutter: widgets/viewport.dart ShrinkWrappingViewport.new

func (*ShrinkWrappingViewport) AxisDirection

func (w *ShrinkWrappingViewport) AxisDirection() painting.AxisDirection

AxisDirection is the direction in which the offset increases.

Flutter: widgets/viewport.dart ShrinkWrappingViewport.axisDirection

func (*ShrinkWrappingViewport) CreateRenderObject

func (w *ShrinkWrappingViewport) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/viewport.dart ShrinkWrappingViewport.createRenderObject

func (*ShrinkWrappingViewport) Offset

Offset is the offset of the viewport.

Flutter: widgets/viewport.dart ShrinkWrappingViewport.offset

func (*ShrinkWrappingViewport) UpdateRenderObject

func (w *ShrinkWrappingViewport) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/viewport.dart ShrinkWrappingViewport.updateRenderObject

type ShrinkWrappingViewportOpts

type ShrinkWrappingViewportOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AxisDirection is the direction in which the offset increases; the default
	// is AxisDirectionDown.
	AxisDirection painting.AxisDirection
	// CrossAxisDirection is the direction of the cross axis; see Viewport.
	CrossAxisDirection painting.AxisDirection
	// PaintOrder is the order in which the slivers paint; the default is the
	// first sliver on top.
	PaintOrder rendering.SliverPaintOrder
	// ClipBehavior is how the viewport clips; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// ScrollCacheExtent is how far beyond the viewport the slivers build.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
}

ShrinkWrappingViewportOpts are the optional parameters of NewShrinkWrappingViewport.

Flutter: widgets/viewport.dart ShrinkWrappingViewport.new

type SingleActivator

type SingleActivator struct {
	// contains filtered or unexported fields
}

SingleActivator triggers when a key is pressed with the given modifiers: each modifier must be pressed if it is set, and must not be pressed if it is not. The trigger must not be a modifier.

Flutter: widgets/shortcuts.dart SingleActivator

func NewSingleActivator

func NewSingleActivator(trigger services.LogicalKeyboardKey, opts ...SingleActivatorOpts) SingleActivator

NewSingleActivator creates an activator for the key. It is a value, so that two activators with the same fields are the same map key. In debug builds it panics with the tag SingleActivatorTriggerIsModifier when the trigger is a modifier.

Flutter: widgets/shortcuts.dart SingleActivator.new

func (SingleActivator) Accepts

Accepts is whether the event presses the trigger while the modifiers are as required.

Flutter: widgets/shortcuts.dart SingleActivator.accepts

func (SingleActivator) Alt

func (a SingleActivator) Alt() bool

Alt is whether the Alt key must be pressed.

Flutter: widgets/shortcuts.dart SingleActivator.alt

func (SingleActivator) Control

func (a SingleActivator) Control() bool

Control is whether the Control key must be pressed.

Flutter: widgets/shortcuts.dart SingleActivator.control

func (SingleActivator) DebugDescribeKeys

func (a SingleActivator) DebugDescribeKeys() string

DebugDescribeKeys is the modifiers and the trigger, joined by " + ".

Flutter: widgets/shortcuts.dart SingleActivator.debugDescribeKeys

func (SingleActivator) DebugFillProperties

func (a SingleActivator) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the keys and whether repeats are excluded.

Flutter: widgets/shortcuts.dart SingleActivator.debugFillProperties

func (SingleActivator) IncludeRepeats

func (a SingleActivator) IncludeRepeats() bool

IncludeRepeats is whether the repeats of the key trigger the shortcut too.

Flutter: widgets/shortcuts.dart SingleActivator.includeRepeats

func (SingleActivator) Meta

func (a SingleActivator) Meta() bool

Meta is whether the Meta key must be pressed.

Flutter: widgets/shortcuts.dart SingleActivator.meta

func (SingleActivator) NumLock

func (a SingleActivator) NumLock() LockState

NumLock is the requirement for Num Lock.

Flutter: widgets/shortcuts.dart SingleActivator.numLock

func (SingleActivator) SerializeForMenu

func (a SingleActivator) SerializeForMenu() ShortcutSerialization

SerializeForMenu is the trigger and the modifiers of the activator.

Flutter: widgets/shortcuts.dart SingleActivator.serializeForMenu

func (SingleActivator) Shift

func (a SingleActivator) Shift() bool

Shift is whether the Shift key must be pressed.

Flutter: widgets/shortcuts.dart SingleActivator.shift

func (SingleActivator) Trigger

Trigger is the key that triggers the shortcut.

Flutter: widgets/shortcuts.dart SingleActivator.trigger

func (SingleActivator) Triggers

Triggers is the one trigger key.

Flutter: widgets/shortcuts.dart SingleActivator.triggers

type SingleActivatorOpts

type SingleActivatorOpts struct {
	// Control requires the Control key to be pressed.
	Control bool
	// Shift requires the Shift key to be pressed.
	Shift bool
	// Alt requires the Alt key to be pressed.
	Alt bool
	// Meta requires the Meta key to be pressed.
	Meta bool
	// NumLock requires the Num Lock mode to be on or off; the default ignores it.
	NumLock LockState
	// ExcludeRepeats makes the activator reject the repeats of a key (Flutter's
	// includeRepeats is true by default).
	ExcludeRepeats bool
}

SingleActivatorOpts are the optional parameters of NewSingleActivator.

Flutter: widgets/shortcuts.dart SingleActivator.new

type SingleChildRenderObjectElement

type SingleChildRenderObjectElement struct {
	RenderObjectElement
	// contains filtered or unexported fields
}

SingleChildRenderObjectElement is the element of a SingleChildRenderObjectWidget.

Flutter: widgets/framework.dart SingleChildRenderObjectElement

func NewSingleChildRenderObjectElement

func NewSingleChildRenderObjectElement(w singleChildRenderObjectWidget) *SingleChildRenderObjectElement

NewSingleChildRenderObjectElement creates the element of a render object widget with one child.

Flutter: widgets/framework.dart SingleChildRenderObjectElement.new

func (*SingleChildRenderObjectElement) ForgetChild

func (e *SingleChildRenderObjectElement) ForgetChild(child Element)

ForgetChild drops the child.

Flutter: widgets/framework.dart SingleChildRenderObjectElement.forgetChild

func (*SingleChildRenderObjectElement) InsertRenderObjectChild

func (e *SingleChildRenderObjectElement) InsertRenderObjectChild(child rendering.RenderObject, _ any)

InsertRenderObjectChild sets the child of the render object.

Flutter: widgets/framework.dart SingleChildRenderObjectElement.insertRenderObjectChild

func (*SingleChildRenderObjectElement) Mount

func (e *SingleChildRenderObjectElement) Mount(parent Element, newSlot any)

Mount creates the render object and the child.

Flutter: widgets/framework.dart SingleChildRenderObjectElement.mount

func (*SingleChildRenderObjectElement) MoveRenderObjectChild

func (e *SingleChildRenderObjectElement) MoveRenderObjectChild(rendering.RenderObject, any, any)

MoveRenderObjectChild panics: a single child has no other slot.

Flutter: widgets/framework.dart SingleChildRenderObjectElement.moveRenderObjectChild

func (*SingleChildRenderObjectElement) RemoveRenderObjectChild

func (e *SingleChildRenderObjectElement) RemoveRenderObjectChild(rendering.RenderObject, any)

RemoveRenderObjectChild clears the child of the render object.

Flutter: widgets/framework.dart SingleChildRenderObjectElement.removeRenderObjectChild

func (*SingleChildRenderObjectElement) Update

func (e *SingleChildRenderObjectElement) Update(newWidget Widget)

Update updates the render object and the child.

Flutter: widgets/framework.dart SingleChildRenderObjectElement.update

func (*SingleChildRenderObjectElement) VisitChildren

func (e *SingleChildRenderObjectElement) VisitChildren(visitor ElementVisitor)

VisitChildren visits the child.

Flutter: widgets/framework.dart SingleChildRenderObjectElement.visitChildren

type SingleChildRenderObjectWidget

type SingleChildRenderObjectWidget struct {
	RenderObjectWidget
	// contains filtered or unexported fields
}

SingleChildRenderObjectWidget is a render object widget that has one optional child.

Flutter: widgets/framework.dart SingleChildRenderObjectWidget

func NewSingleChildRenderObjectWidgetBase

func NewSingleChildRenderObjectWidgetBase(child Widget, opts ...WidgetOpts) SingleChildRenderObjectWidget

NewSingleChildRenderObjectWidgetBase creates the base of a render object widget with a child, which may be nil.

Flutter: widgets/framework.dart SingleChildRenderObjectWidget.new

func (*SingleChildRenderObjectWidget) Child

Child is the widget below this one in the tree, or nil.

Flutter: widgets/framework.dart SingleChildRenderObjectWidget.child

type SingleChildScrollView

type SingleChildScrollView struct {
	StatelessWidget
	// contains filtered or unexported fields
}

SingleChildScrollView is a box in which a single widget can be scrolled.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView

func NewSingleChildScrollView

func NewSingleChildScrollView(child Widget, opts ...SingleChildScrollViewOpts) *SingleChildScrollView

NewSingleChildScrollView creates a scrollable box around the child, which may be nil. In debug builds it panics with the tag ScrollViewPrimaryWithController when the view is primary and has a controller.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.new

func (*SingleChildScrollView) Build

Build builds the Scrollable with the viewport of the child.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.build

func (*SingleChildScrollView) Child

func (w *SingleChildScrollView) Child() Widget

Child is the widget that scrolls.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.child

func (*SingleChildScrollView) Controller

func (w *SingleChildScrollView) Controller() ScrollController

Controller reads and controls the scroll position.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.controller

func (*SingleChildScrollView) Padding

Padding is the amount of space by which to inset the child, or nil.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.padding

func (*SingleChildScrollView) Physics

func (w *SingleChildScrollView) Physics() ScrollPhysics

Physics is how the view responds to the user.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.physics

func (*SingleChildScrollView) Primary

func (w *SingleChildScrollView) Primary() foundation.Opt[bool]

Primary is whether this is the primary scroll view, or none for the default.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.primary

func (*SingleChildScrollView) Reverse

func (w *SingleChildScrollView) Reverse() bool

Reverse is whether the view scrolls against the reading direction.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.reverse

func (*SingleChildScrollView) ScrollDirection

func (w *SingleChildScrollView) ScrollDirection() painting.Axis

ScrollDirection is the axis along which the view scrolls.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.scrollDirection

type SingleChildScrollViewOpts

type SingleChildScrollViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ScrollDirection is the axis along which the view scrolls; the default is
	// AxisVertical.
	ScrollDirection painting.Axis
	// Reverse is whether the view scrolls against the reading direction.
	Reverse bool
	// Padding is the amount of space by which to inset the child.
	Padding painting.EdgeInsetsGeometry
	// Primary is whether this is the primary scroll view that uses the
	// PrimaryScrollController above; the default is true for a vertical view
	// with no controller.
	Primary foundation.Opt[bool]
	// Physics is how the view responds to the user.
	Physics ScrollPhysics
	// Controller reads and controls the scroll position.
	Controller ScrollController
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// ClipBehavior is how the view clips its content; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the view behaves during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
	// RestorationID is the identifier for restoring the scroll offset; it has no
	// effect until state restoration is ported.
	RestorationID string
	// KeyboardDismissBehavior is how the view dismisses the keyboard; the default
	// is the one of the ScrollBehavior.
	KeyboardDismissBehavior ScrollViewKeyboardDismissBehavior
}

SingleChildScrollViewOpts are the optional parameters of NewSingleChildScrollView.

Flutter: widgets/single_child_scroll_view.dart SingleChildScrollView.new

type SingleTickerProvider

type SingleTickerProvider struct {
	// contains filtered or unexported fields
}

SingleTickerProvider is embedded in a State that makes one Ticker, usually through one AnimationController: it is the TickerProvider of the controller (pass the state as the vsync), and mutes the ticker when a TickerMode above is disabled.

type spinnerState struct {
	widgets.StateOf[*Spinner]
	widgets.SingleTickerProvider
	controller *animation.AnimationController
}

func (s *spinnerState) InitState() {
	s.controller = animation.NewAnimationController(s, ...)
}

A second CreateTicker panics with the tag SingleTickerProviderMultipleTickers in debug builds; use TickerProvider for a state that makes several. The ticker must be disposed (by disposing its controller) before the state is disposed, or Dispose panics with TickerProviderActiveTicker in debug builds.

Flutter: widgets/ticker_provider.dart SingleTickerProviderStateMixin

func (*SingleTickerProvider) CreateTicker

CreateTicker makes the state's ticker.

Flutter: widgets/ticker_provider.dart SingleTickerProviderStateMixin.createTicker

func (*SingleTickerProvider) DisableAnimations

func (h *SingleTickerProvider) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*SingleTickerProvider) ErrorReporter

func (h *SingleTickerProvider) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

type SizeTransition

type SizeTransition struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

SizeTransition animates its own size and clips and aligns its child.

Flutter: widgets/transitions.dart SizeTransition

func NewSizeTransition

func NewSizeTransition(sizeFactor animation.Animation[float64], child Widget, opts ...SizeTransitionOpts) *SizeTransition

NewSizeTransition creates the widget. In debug builds it panics with the tag SizeTransitionInvalid when the fixed factor is negative, or when both AxisAlignment and Alignment are given.

Flutter: widgets/transitions.dart SizeTransition.new

func (*SizeTransition) Alignment

func (w *SizeTransition) Alignment() painting.AlignmentGeometry

Alignment is how the child is aligned while the size animates, or nil.

Flutter: widgets/transitions.dart SizeTransition.alignment

func (*SizeTransition) Axis

func (w *SizeTransition) Axis() painting.Axis

Axis is the axis the size animates on.

Flutter: widgets/transitions.dart SizeTransition.axis

func (*SizeTransition) Build

Build clips and aligns the child by the current size factor.

Flutter: widgets/transitions.dart SizeTransition.build

func (*SizeTransition) Child

func (w *SizeTransition) Child() Widget

Child is the widget below this one.

Flutter: widgets/transitions.dart SizeTransition.child

func (*SizeTransition) FixedCrossAxisSizeFactor

func (w *SizeTransition) FixedCrossAxisSizeFactor() foundation.Opt[float64]

FixedCrossAxisSizeFactor is the size factor of the other axis.

Flutter: widgets/transitions.dart SizeTransition.fixedCrossAxisSizeFactor

func (*SizeTransition) SizeFactor

func (w *SizeTransition) SizeFactor() animation.Animation[float64]

SizeFactor is the animation of the fraction of the child's size.

Flutter: widgets/transitions.dart SizeTransition.sizeFactor

type SizeTransitionOpts

type SizeTransitionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Axis is the axis the size animates on; the default is AxisVertical.
	Axis painting.Axis
	// AxisAlignment is the alignment on the axis, from -1 (start) to 1 (end).
	//
	// Deprecated: use Alignment, which controls both axes.
	AxisAlignment foundation.Opt[float64]
	// Alignment is how the child is aligned while the size animates; it
	// overrides AxisAlignment.
	Alignment painting.AlignmentGeometry
	// FixedCrossAxisSizeFactor is the size factor of the axis the animation
	// does not run on; without it the child decides that size.
	FixedCrossAxisSizeFactor foundation.Opt[float64]
}

SizeTransitionOpts are the optional parameters of NewSizeTransition.

Flutter: widgets/transitions.dart SizeTransition.new

type SizedBox

type SizedBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SizedBox is a box with a specified size; with a child it forces the child to have a specific width and/or height.

Flutter: widgets/basic.dart SizedBox

func NewSizedBox

func NewSizedBox(child Widget, opts ...SizedBoxOpts) *SizedBox

NewSizedBox creates a fixed size box; the width and height can be unset to leave them free. The child may be nil.

Flutter: widgets/basic.dart SizedBox.new

func NewSizedBoxExpand

func NewSizedBoxExpand(child Widget, opts ...WidgetOpts) *SizedBox

NewSizedBoxExpand creates a box that will become as large as its parent allows.

Flutter: widgets/basic.dart SizedBox.expand

func NewSizedBoxFromSize

func NewSizedBoxFromSize(size ui.Size, child Widget, opts ...WidgetOpts) *SizedBox

NewSizedBoxFromSize creates a box with the given size.

Flutter: widgets/basic.dart SizedBox.fromSize

func NewSizedBoxShrink

func NewSizedBoxShrink(child Widget, opts ...WidgetOpts) *SizedBox

NewSizedBoxShrink creates a box that will become as small as its parent allows.

Flutter: widgets/basic.dart SizedBox.shrink

func NewSizedBoxSquare

func NewSizedBoxSquare(dimension foundation.Opt[float64], child Widget, opts ...WidgetOpts) *SizedBox

NewSizedBoxSquare creates a box with the same width and height.

Flutter: widgets/basic.dart SizedBox.square

func (*SizedBox) CreateRenderObject

func (w *SizedBox) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart SizedBox.createRenderObject

func (*SizedBox) Height

func (w *SizedBox) Height() foundation.Opt[float64]

Height is the height the box forces on its child, if any.

Flutter: widgets/basic.dart SizedBox.height

func (*SizedBox) UpdateRenderObject

func (w *SizedBox) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart SizedBox.updateRenderObject

func (*SizedBox) Width

func (w *SizedBox) Width() foundation.Opt[float64]

Width is the width the box forces on its child, if any.

Flutter: widgets/basic.dart SizedBox.width

type SizedBoxOpts

type SizedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Width is the width the box forces on its child; unset leaves it free.
	Width foundation.Opt[float64]
	// Height is the height the box forces on its child; unset leaves it free.
	Height foundation.Opt[float64]
}

SizedBoxOpts are the optional parameters of NewSizedBox.

Flutter: widgets/basic.dart SizedBox.new

type SizedOverflowBox

type SizedOverflowBox struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SizedOverflowBox is a widget of a given size that lets its child overflow.

Flutter: widgets/basic.dart SizedOverflowBox

func NewSizedOverflowBox

func NewSizedOverflowBox(size ui.Size, child Widget, opts ...SizedOverflowBoxOpts) *SizedOverflowBox

NewSizedOverflowBox creates the widget.

Flutter: widgets/basic.dart SizedOverflowBox.new

func (*SizedOverflowBox) Alignment

Alignment is how to align the child; the default is Alignment.center.

Flutter: widgets/basic.dart SizedOverflowBox.alignment

func (*SizedOverflowBox) CreateRenderObject

func (w *SizedOverflowBox) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart SizedOverflowBox.createRenderObject

func (*SizedOverflowBox) Size

func (w *SizedOverflowBox) Size() ui.Size

Size is the size this widget requests; it is the parent that decides, within the constraints.

Flutter: widgets/basic.dart SizedOverflowBox.size

func (*SizedOverflowBox) UpdateRenderObject

func (w *SizedOverflowBox) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart SizedOverflowBox.updateRenderObject

type SizedOverflowBoxOpts

type SizedOverflowBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment is how to align the child; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
}

SizedOverflowBoxOpts are the optional parameters of NewSizedOverflowBox.

Flutter: widgets/basic.dart SizedOverflowBox.new

type SlideTransition

type SlideTransition struct {
	AnimatedWidget
	// contains filtered or unexported fields
}

SlideTransition animates the position of a widget relative to its normal position: the offset is a fraction of the widget's size.

Flutter: widgets/transitions.dart SlideTransition

func NewSlideTransition

func NewSlideTransition(position animation.Animation[ui.Offset], child Widget, opts ...SlideTransitionOpts) *SlideTransition

NewSlideTransition creates the widget.

Flutter: widgets/transitions.dart SlideTransition.new

func (*SlideTransition) Build

Build translates the child by the current offset.

Flutter: widgets/transitions.dart SlideTransition.build

func (*SlideTransition) Child

func (w *SlideTransition) Child() Widget

Child is the widget below this one.

Flutter: widgets/transitions.dart SlideTransition.child

func (*SlideTransition) Position

func (w *SlideTransition) Position() animation.Animation[ui.Offset]

Position is the animation of the offset, as a fraction of the size.

Flutter: widgets/transitions.dart SlideTransition.position

func (*SlideTransition) TextDirection

func (w *SlideTransition) TextDirection() ui.TextDirection

TextDirection is the direction that flips the horizontal offset when it is right to left.

Flutter: widgets/transitions.dart SlideTransition.textDirection

func (*SlideTransition) TransformHitTests

func (w *SlideTransition) TransformHitTests() bool

TransformHitTests is whether the hit tests are transformed.

Flutter: widgets/transitions.dart SlideTransition.transformHitTests

type SlideTransitionOpts

type SlideTransitionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TransformHitTests is whether the hit tests are transformed too; the
	// default is true.
	TransformHitTests foundation.Opt[bool]
	// TextDirection, when it is right to left, flips the horizontal offset.
	TextDirection ui.TextDirection
}

SlideTransitionOpts are the optional parameters of NewSlideTransition.

Flutter: widgets/transitions.dart SlideTransition.new

type SliverAnimatedGrid

type SliverAnimatedGrid struct {
	StatefulWidget
	// contains filtered or unexported fields
}

SliverAnimatedGrid is a sliver that animates items when they are inserted or removed.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedGrid

func NewSliverAnimatedGrid

func NewSliverAnimatedGrid(itemBuilder AnimatedItemBuilder, gridDelegate rendering.SliverGridDelegate, opts ...SliverAnimatedListOpts) *SliverAnimatedGrid

NewSliverAnimatedGrid creates a sliver grid whose items the builder builds and the delegate lays out.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedGrid.new

func (*SliverAnimatedGrid) CreateState

func (w *SliverAnimatedGrid) CreateState() State

CreateState creates the state.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedGrid.createState

func (*SliverAnimatedGrid) GridDelegate

GridDelegate is the delegate that lays the items out.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedGrid.gridDelegate

type SliverAnimatedGridState

type SliverAnimatedGridState struct {
	StateOf[*SliverAnimatedGrid]
	TickerProvider
	// contains filtered or unexported fields
}

SliverAnimatedGridState is the state of a SliverAnimatedGrid.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedGridState

func SliverAnimatedGridMaybeOf

func SliverAnimatedGridMaybeOf(bc BuildContext) (*SliverAnimatedGridState, bool)

SliverAnimatedGridMaybeOf is the state of the closest SliverAnimatedGrid above the context, and false if there is none.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedGrid.maybeOf

func SliverAnimatedGridOf

func SliverAnimatedGridOf(bc BuildContext) *SliverAnimatedGridState

SliverAnimatedGridOf is the state of the closest SliverAnimatedGrid above the context. In debug builds it panics with the tag SliverAnimatedGridMissing when there is none.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedGrid.of

func (*SliverAnimatedGridState) Build

Build builds the sliver grid.

func (*SliverAnimatedGridState) DisableAnimations

func (h *SliverAnimatedGridState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*SliverAnimatedGridState) Dispose

func (s *SliverAnimatedGridState) Dispose()

Dispose disposes the controllers of the animations.

func (*SliverAnimatedGridState) ErrorReporter

func (h *SliverAnimatedGridState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*SliverAnimatedGridState) InitState

func (s *SliverAnimatedGridState) InitState()

InitState sets up the items.

func (*SliverAnimatedGridState) InsertAllItems

func (b *SliverAnimatedGridState) InsertAllItems(index, length int, opts ...AnimatedItemOpts)

InsertAllItems inserts length items from the index, and animates them in.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState.insertAllItems

func (*SliverAnimatedGridState) InsertItem

func (b *SliverAnimatedGridState) InsertItem(index int, opts ...AnimatedItemOpts)

InsertItem inserts an item at the index, and animates it in. The index is the one the item has after the insertion.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState.insertItem

func (*SliverAnimatedGridState) RemoveAllItems

func (b *SliverAnimatedGridState) RemoveAllItems(builder AnimatedRemovedItemBuilder, opts ...AnimatedItemOpts)

RemoveAllItems removes all the items, and animates them out with the item that the builder builds.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState.removeAllItems

func (*SliverAnimatedGridState) RemoveItem

func (b *SliverAnimatedGridState) RemoveItem(index int, builder AnimatedRemovedItemBuilder, opts ...AnimatedItemOpts)

RemoveItem removes the item at the index, and animates it out with the item that the builder builds.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState.removeItem

type SliverAnimatedList

type SliverAnimatedList struct {
	StatefulWidget
	// contains filtered or unexported fields
}

SliverAnimatedList is a sliver that animates items when they are inserted or removed.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedList

func NewSliverAnimatedList

func NewSliverAnimatedList(itemBuilder AnimatedItemBuilder, opts ...SliverAnimatedListOpts) *SliverAnimatedList

NewSliverAnimatedList creates a sliver list whose items the builder builds.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedList.new

func (*SliverAnimatedList) CreateState

func (w *SliverAnimatedList) CreateState() State

CreateState creates the state.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedList.createState

type SliverAnimatedListOpts

type SliverAnimatedListOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// FindChildIndexCallback finds the index of the item that has a key, so that
	// items that move keep their state.
	FindChildIndexCallback ChildIndexGetter
	// InitialItemCount is the number of items that the sliver starts with.
	InitialItemCount int
}

SliverAnimatedListOpts are the optional parameters of NewSliverAnimatedList and NewSliverAnimatedGrid.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedList.new

type SliverAnimatedListState

type SliverAnimatedListState struct {
	StateOf[*SliverAnimatedList]
	TickerProvider
	// contains filtered or unexported fields
}

SliverAnimatedListState is the state of a SliverAnimatedList.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState

func SliverAnimatedListMaybeOf

func SliverAnimatedListMaybeOf(bc BuildContext) (*SliverAnimatedListState, bool)

SliverAnimatedListMaybeOf is the state of the closest SliverAnimatedList above the context, and false if there is none.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedList.maybeOf

func SliverAnimatedListOf

func SliverAnimatedListOf(bc BuildContext) *SliverAnimatedListState

SliverAnimatedListOf is the state of the closest SliverAnimatedList above the context. In debug builds it panics with the tag SliverAnimatedListMissing when there is none.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedList.of

func (*SliverAnimatedListState) Build

Build builds the sliver list.

func (*SliverAnimatedListState) DisableAnimations

func (h *SliverAnimatedListState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*SliverAnimatedListState) Dispose

func (s *SliverAnimatedListState) Dispose()

Dispose disposes the controllers of the animations.

func (*SliverAnimatedListState) ErrorReporter

func (h *SliverAnimatedListState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*SliverAnimatedListState) InitState

func (s *SliverAnimatedListState) InitState()

InitState sets up the items.

func (*SliverAnimatedListState) InsertAllItems

func (b *SliverAnimatedListState) InsertAllItems(index, length int, opts ...AnimatedItemOpts)

InsertAllItems inserts length items from the index, and animates them in.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState.insertAllItems

func (*SliverAnimatedListState) InsertItem

func (b *SliverAnimatedListState) InsertItem(index int, opts ...AnimatedItemOpts)

InsertItem inserts an item at the index, and animates it in. The index is the one the item has after the insertion.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState.insertItem

func (*SliverAnimatedListState) RemoveAllItems

func (b *SliverAnimatedListState) RemoveAllItems(builder AnimatedRemovedItemBuilder, opts ...AnimatedItemOpts)

RemoveAllItems removes all the items, and animates them out with the item that the builder builds.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState.removeAllItems

func (*SliverAnimatedListState) RemoveItem

func (b *SliverAnimatedListState) RemoveItem(index int, builder AnimatedRemovedItemBuilder, opts ...AnimatedItemOpts)

RemoveItem removes the item at the index, and animates it out with the item that the builder builds.

Flutter: widgets/animated_scroll_view.dart SliverAnimatedListState.removeItem

type SliverAnimatedOpacity

type SliverAnimatedOpacity struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

SliverAnimatedOpacity is the animated version of SliverOpacity: it animates the opacity of its sliver when it changes.

Flutter: widgets/implicit_animations.dart SliverAnimatedOpacity

func NewSliverAnimatedOpacity

func NewSliverAnimatedOpacity(opacity float64, duration time.Duration, sliver Widget, opts ...SliverAnimatedOpacityOpts) *SliverAnimatedOpacity

NewSliverAnimatedOpacity creates the widget; the sliver may be nil. In debug builds it panics with the tag OpacityOutOfRange when the opacity is not between 0 and 1.

Flutter: widgets/implicit_animations.dart SliverAnimatedOpacity.new

func (*SliverAnimatedOpacity) AlwaysIncludeSemantics

func (w *SliverAnimatedOpacity) AlwaysIncludeSemantics() bool

AlwaysIncludeSemantics is whether the semantics of the sliver are included even when it is fully transparent.

Flutter: widgets/implicit_animations.dart SliverAnimatedOpacity.alwaysIncludeSemantics

func (*SliverAnimatedOpacity) CreateState

func (w *SliverAnimatedOpacity) CreateState() State

CreateState creates the state.

Flutter: widgets/implicit_animations.dart SliverAnimatedOpacity.createState

func (*SliverAnimatedOpacity) Opacity

func (w *SliverAnimatedOpacity) Opacity() float64

Opacity is the target opacity, from 0 (transparent) to 1 (opaque).

Flutter: widgets/implicit_animations.dart SliverAnimatedOpacity.opacity

func (*SliverAnimatedOpacity) Sliver

func (w *SliverAnimatedOpacity) Sliver() Widget

Sliver is the sliver below this widget in the tree.

Flutter: widgets/implicit_animations.dart SliverAnimatedOpacity.sliver

type SliverAnimatedOpacityOpts

type SliverAnimatedOpacityOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// AlwaysIncludeSemantics is whether the semantics of the sliver are included
	// even when it is fully transparent.
	AlwaysIncludeSemantics bool
}

SliverAnimatedOpacityOpts are the optional parameters of NewSliverAnimatedOpacity.

Flutter: widgets/implicit_animations.dart SliverAnimatedOpacity.new

type SliverBuilderOpts

type SliverBuilderOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// FindChildIndexCallback finds the index of the child that has a key.
	FindChildIndexCallback ChildIndexGetter
	// ItemCount is the number of items; none means unbounded, until the builder
	// returns nil.
	ItemCount foundation.Opt[int]
	// AddAutomaticKeepAlives is whether to wrap each item in an
	// AutomaticKeepAlive; the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
	// AddRepaintBoundaries is whether to wrap each item in a RepaintBoundary; the
	// default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddSemanticIndexes is whether to wrap each item in an IndexedSemantics; the
	// default is true.
	AddSemanticIndexes foundation.Opt[bool]
	// SemanticIndexOffset is added to the semantic index of every item.
	SemanticIndexOffset int
	// MaintainVisibleContentPosition keeps the items that the user reads where they
	// are on the screen when items are inserted before them, as long as the list
	// is not at its start; at its start the list follows the new items, as in
	// Flutter. It works for the items whose element moves to a new index by its
	// key: with FindChildIndexCallback (or FindItemIndexCallback) on a builder
	// list, or with the keys of the children of a list of children. Without keys
	// it does nothing. It does not apply to grids. The name is the one of React
	// Native's FlatList.
	//
	// Flutter: no counterpart
	MaintainVisibleContentPosition bool
	// EstimateItemOffsets lets a jump into a long list of items of different
	// extents (a click on the scroll bar, a JumpTo) lay out only the items near
	// the new offset. When the offset is more than the viewport and the cache
	// extent away from the items the list has, it does not build the items in
	// between: it builds the item at the index that the average extent of the
	// items it has measured gives for the offset, at the offset that the average
	// gives, and goes on from there. The offsets far from the window shown are
	// estimates, which the list corrects as the user scrolls back: at item 0 the
	// scroll offset is corrected so that the item starts at 0. It applies to
	// SliverList and to a ListView without ItemExtent, ItemExtentBuilder and
	// PrototypeItem (lists with those find an index at once), not to grids.
	//
	// Flutter: no counterpart
	EstimateItemOffsets bool
}

SliverBuilderOpts are the optional parameters of the builder constructors of the slivers with boxes (SliverList, SliverFixedExtentList, SliverVariedExtentList and SliverGrid).

Flutter: widgets/sliver.dart SliverList.builder

type SliverChildBuilderDelegate

type SliverChildBuilderDelegate struct {
	SliverChildDelegateBase
	// contains filtered or unexported fields
}

SliverChildBuilderDelegate is a delegate that builds its children with a function, lazily, as the list scrolls.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate

func NewSliverChildBuilderDelegate

func NewSliverChildBuilderDelegate(builder NullableIndexedWidgetBuilder, opts ...SliverChildBuilderDelegateOpts) *SliverChildBuilderDelegate

NewSliverChildBuilderDelegate creates a delegate that builds children with the builder.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.new

func (*SliverChildBuilderDelegate) AddAutomaticKeepAlives

func (d *SliverChildBuilderDelegate) AddAutomaticKeepAlives() bool

AddAutomaticKeepAlives is whether each child is wrapped in an AutomaticKeepAlive.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.addAutomaticKeepAlives

func (*SliverChildBuilderDelegate) AddRepaintBoundaries

func (d *SliverChildBuilderDelegate) AddRepaintBoundaries() bool

AddRepaintBoundaries is whether each child is wrapped in a RepaintBoundary.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.addRepaintBoundaries

func (*SliverChildBuilderDelegate) AddSemanticIndexes

func (d *SliverChildBuilderDelegate) AddSemanticIndexes() bool

AddSemanticIndexes is whether each child is wrapped in an IndexedSemantics.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.addSemanticIndexes

func (*SliverChildBuilderDelegate) Build

func (d *SliverChildBuilderDelegate) Build(bc BuildContext, index int) Widget

Build builds the child at the index and wraps it. It returns nil for an index outside of the child count, and when the builder returns nil. A panic of the builder becomes an error widget, once reported.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.build

func (*SliverChildBuilderDelegate) Builder

Builder is the function that builds the children.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.builder

func (*SliverChildBuilderDelegate) ChildCount

func (d *SliverChildBuilderDelegate) ChildCount() foundation.Opt[int]

ChildCount is the number of children, or none.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.childCount

func (*SliverChildBuilderDelegate) EstimatedChildCount

func (d *SliverChildBuilderDelegate) EstimatedChildCount() foundation.Opt[int]

EstimatedChildCount is the child count.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.estimatedChildCount

func (*SliverChildBuilderDelegate) FindIndexByKey

func (d *SliverChildBuilderDelegate) FindIndexByKey(key foundation.Key) foundation.Opt[int]

FindIndexByKey asks the callback for the index of the child.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.findIndexByKey

func (*SliverChildBuilderDelegate) SemanticIndexOffset

func (d *SliverChildBuilderDelegate) SemanticIndexOffset() int

SemanticIndexOffset is added to the semantic index of every child.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.semanticIndexOffset

func (*SliverChildBuilderDelegate) ShouldRebuild

ShouldRebuild is true.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.shouldRebuild

func (*SliverChildBuilderDelegate) String

func (d *SliverChildBuilderDelegate) String() string

String describes the delegate.

Flutter: widgets/scroll_delegate.dart SliverChildDelegate.toString

type SliverChildBuilderDelegateOpts

type SliverChildBuilderDelegateOpts struct {
	// FindChildIndexCallback finds the index of the child that has a key, so that
	// children that move keep their state.
	FindChildIndexCallback ChildIndexGetter
	// ChildCount is the number of children; none means unbounded, until the
	// builder returns nil.
	ChildCount foundation.Opt[int]
	// AddAutomaticKeepAlives is whether to wrap each child in an
	// AutomaticKeepAlive; the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
	// AddRepaintBoundaries is whether to wrap each child in a RepaintBoundary;
	// the default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddSemanticIndexes is whether to wrap each child in an IndexedSemantics;
	// the default is true.
	AddSemanticIndexes foundation.Opt[bool]
	// SemanticIndexCallback gives the semantic index of a child; the default is
	// its index.
	SemanticIndexCallback SemanticIndexCallback
	// SemanticIndexOffset is added to the semantic index of every child.
	SemanticIndexOffset int
}

SliverChildBuilderDelegateOpts are the optional parameters of NewSliverChildBuilderDelegate.

Flutter: widgets/scroll_delegate.dart SliverChildBuilderDelegate.new

type SliverChildDelegate

type SliverChildDelegate interface {
	// Build returns the child at the index, or nil if there is none.
	//
	// Flutter: widgets/scroll_delegate.dart SliverChildDelegate.build
	Build(bc BuildContext, index int) Widget
	// EstimatedChildCount is the number of children, or none if it is not known.
	//
	// Flutter: widgets/scroll_delegate.dart SliverChildDelegate.estimatedChildCount
	EstimatedChildCount() foundation.Opt[int]
	// EstimateMaxScrollOffset is an estimate of the maximum scroll extent, or
	// none to let the sliver extrapolate it.
	//
	// Flutter: widgets/scroll_delegate.dart SliverChildDelegate.estimateMaxScrollOffset
	EstimateMaxScrollOffset(firstIndex, lastIndex int, leadingScrollOffset, trailingScrollOffset float64) foundation.Opt[float64]
	// DidFinishLayout is called at the end of the layout of the sliver, with the
	// indices of the first and last children that are live.
	//
	// Flutter: widgets/scroll_delegate.dart SliverChildDelegate.didFinishLayout
	DidFinishLayout(firstIndex, lastIndex int)
	// ShouldRebuild is whether the children must be built again, as this
	// delegate replaces the old one.
	//
	// Flutter: widgets/scroll_delegate.dart SliverChildDelegate.shouldRebuild
	ShouldRebuild(oldDelegate SliverChildDelegate) bool
	// FindIndexByKey is the new index of the child that has the key, or none.
	//
	// Flutter: widgets/scroll_delegate.dart SliverChildDelegate.findIndexByKey
	FindIndexByKey(key foundation.Key) foundation.Opt[int]
}

SliverChildDelegate supplies the children of a sliver list or grid: it builds the child at an index, lazily, and knows how many there are.

Flutter: widgets/scroll_delegate.dart SliverChildDelegate

type SliverChildDelegateBase

type SliverChildDelegateBase struct{}

SliverChildDelegateBase gives the optional methods of a SliverChildDelegate their default: embed it in a delegate of your own.

Flutter: widgets/scroll_delegate.dart SliverChildDelegate

func (SliverChildDelegateBase) DidFinishLayout

func (SliverChildDelegateBase) DidFinishLayout(int, int)

DidFinishLayout does nothing.

Flutter: widgets/scroll_delegate.dart SliverChildDelegate.didFinishLayout

func (SliverChildDelegateBase) EstimateMaxScrollOffset

func (SliverChildDelegateBase) EstimateMaxScrollOffset(int, int, float64, float64) foundation.Opt[float64]

EstimateMaxScrollOffset is none.

Flutter: widgets/scroll_delegate.dart SliverChildDelegate.estimateMaxScrollOffset

func (SliverChildDelegateBase) EstimatedChildCount

func (SliverChildDelegateBase) EstimatedChildCount() foundation.Opt[int]

EstimatedChildCount is none.

Flutter: widgets/scroll_delegate.dart SliverChildDelegate.estimatedChildCount

func (SliverChildDelegateBase) FindIndexByKey

FindIndexByKey is none.

Flutter: widgets/scroll_delegate.dart SliverChildDelegate.findIndexByKey

type SliverChildListDelegate

type SliverChildListDelegate struct {
	SliverChildDelegateBase
	// contains filtered or unexported fields
}

SliverChildListDelegate is a delegate that supplies children from an explicit list.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate

func NewSliverChildListDelegate

func NewSliverChildListDelegate(children []Widget, opts ...SliverChildListDelegateOpts) *SliverChildListDelegate

NewSliverChildListDelegate creates a delegate that supplies the children. The delegate finds children by key lazily, and caches what it learns; the list must not change.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.new

func NewSliverChildListDelegateFixed

func NewSliverChildListDelegateFixed(children []Widget, opts ...SliverChildListDelegateOpts) *SliverChildListDelegate

NewSliverChildListDelegateFixed creates a delegate for a list that never changes: it can not find children by key.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.fixed

func (*SliverChildListDelegate) AddAutomaticKeepAlives

func (d *SliverChildListDelegate) AddAutomaticKeepAlives() bool

AddAutomaticKeepAlives is whether each child is wrapped in an AutomaticKeepAlive.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.addAutomaticKeepAlives

func (*SliverChildListDelegate) AddRepaintBoundaries

func (d *SliverChildListDelegate) AddRepaintBoundaries() bool

AddRepaintBoundaries is whether each child is wrapped in a RepaintBoundary.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.addRepaintBoundaries

func (*SliverChildListDelegate) AddSemanticIndexes

func (d *SliverChildListDelegate) AddSemanticIndexes() bool

AddSemanticIndexes is whether each child is wrapped in an IndexedSemantics.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.addSemanticIndexes

func (*SliverChildListDelegate) Build

func (d *SliverChildListDelegate) Build(_ BuildContext, index int) Widget

Build wraps the child at the index, or returns nil outside of the list.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.build

func (*SliverChildListDelegate) Children

func (d *SliverChildListDelegate) Children() []Widget

Children is the list of children.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.children

func (*SliverChildListDelegate) EstimatedChildCount

func (d *SliverChildListDelegate) EstimatedChildCount() foundation.Opt[int]

EstimatedChildCount is the length of the list.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.estimatedChildCount

func (*SliverChildListDelegate) FindIndexByKey

func (d *SliverChildListDelegate) FindIndexByKey(key foundation.Key) foundation.Opt[int]

FindIndexByKey looks for the child that has the key.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.findIndexByKey

func (*SliverChildListDelegate) ShouldRebuild

func (d *SliverChildListDelegate) ShouldRebuild(oldDelegate SliverChildDelegate) bool

ShouldRebuild is whether the list of children is not the same one: Go slices are compared by their first element and length.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.shouldRebuild

func (*SliverChildListDelegate) String

func (d *SliverChildListDelegate) String() string

String describes the delegate.

Flutter: widgets/scroll_delegate.dart SliverChildDelegate.toString

type SliverChildListDelegateOpts

type SliverChildListDelegateOpts struct {
	// AddAutomaticKeepAlives is whether to wrap each child in an
	// AutomaticKeepAlive; the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
	// AddRepaintBoundaries is whether to wrap each child in a RepaintBoundary;
	// the default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddSemanticIndexes is whether to wrap each child in an IndexedSemantics;
	// the default is true.
	AddSemanticIndexes foundation.Opt[bool]
	// SemanticIndexCallback gives the semantic index of a child; the default is
	// its index.
	SemanticIndexCallback SemanticIndexCallback
	// SemanticIndexOffset is added to the semantic index of every child.
	SemanticIndexOffset int
}

SliverChildListDelegateOpts are the optional parameters of NewSliverChildListDelegate.

Flutter: widgets/scroll_delegate.dart SliverChildListDelegate.new

type SliverConstrainedCrossAxis

type SliverConstrainedCrossAxis struct {
	StatelessWidget
	// contains filtered or unexported fields
}

SliverConstrainedCrossAxis constrains the cross axis extent of its sliver child. It is used in a SliverCrossAxisGroup.

Flutter: widgets/sliver.dart SliverConstrainedCrossAxis

func NewSliverConstrainedCrossAxis

func NewSliverConstrainedCrossAxis(maxExtent float64, sliver Widget, opts ...SliverConstrainedCrossAxisOpts) *SliverConstrainedCrossAxis

NewSliverConstrainedCrossAxis creates a widget that limits the cross axis extent of the sliver to maxExtent.

Flutter: widgets/sliver.dart SliverConstrainedCrossAxis.new

func (*SliverConstrainedCrossAxis) Build

Build wraps the constrained sliver so that it has no flex.

Flutter: widgets/sliver.dart SliverConstrainedCrossAxis.build

func (*SliverConstrainedCrossAxis) MaxExtent

func (w *SliverConstrainedCrossAxis) MaxExtent() float64

MaxExtent is the maximum extent in the cross axis.

Flutter: widgets/sliver.dart SliverConstrainedCrossAxis.maxExtent

func (*SliverConstrainedCrossAxis) Sliver

func (w *SliverConstrainedCrossAxis) Sliver() Widget

Sliver is the sliver below.

Flutter: widgets/sliver.dart SliverConstrainedCrossAxis.sliver

type SliverConstrainedCrossAxisOpts

type SliverConstrainedCrossAxisOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

SliverConstrainedCrossAxisOpts are the optional parameters of NewSliverConstrainedCrossAxis.

Flutter: widgets/sliver.dart SliverConstrainedCrossAxis.new

type SliverCrossAxisExpanded

type SliverCrossAxisExpanded struct {
	ParentDataWidgetOf[*rendering.SliverPhysicalContainerParentData]
	// contains filtered or unexported fields
}

SliverCrossAxisExpanded sets the cross axis flex of a sliver child of a SliverCrossAxisGroup.

Flutter: widgets/sliver.dart SliverCrossAxisExpanded

func NewSliverCrossAxisExpanded

func NewSliverCrossAxisExpanded(flex int, sliver Widget, opts ...SliverCrossAxisExpandedOpts) *SliverCrossAxisExpanded

NewSliverCrossAxisExpanded creates a widget that gives the sliver the flex factor, which must be greater than zero.

Flutter: widgets/sliver.dart SliverCrossAxisExpanded.new

func (*SliverCrossAxisExpanded) ApplyParentData

func (w *SliverCrossAxisExpanded) ApplyParentData(renderObject rendering.RenderObject)

ApplyParentData writes the flex factor to the parent data.

Flutter: widgets/sliver.dart SliverCrossAxisExpanded.applyParentData

func (*SliverCrossAxisExpanded) DebugTypicalAncestorWidgetClass

func (w *SliverCrossAxisExpanded) DebugTypicalAncestorWidgetClass() string

DebugTypicalAncestorWidgetClass names SliverCrossAxisGroup.

Flutter: widgets/sliver.dart SliverCrossAxisExpanded.debugTypicalAncestorWidgetClass

func (*SliverCrossAxisExpanded) Flex

func (w *SliverCrossAxisExpanded) Flex() int

Flex is the flex factor of the sliver.

Flutter: widgets/sliver.dart SliverCrossAxisExpanded.flex

type SliverCrossAxisExpandedOpts

type SliverCrossAxisExpandedOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

SliverCrossAxisExpandedOpts are the optional parameters of NewSliverCrossAxisExpanded.

Flutter: widgets/sliver.dart SliverCrossAxisExpanded.new

type SliverCrossAxisGroup

type SliverCrossAxisGroup struct {
	MultiChildRenderObjectWidget
}

SliverCrossAxisGroup places its sliver children next to each other in the cross axis.

Flutter: widgets/sliver.dart SliverCrossAxisGroup

func NewSliverCrossAxisGroup

func NewSliverCrossAxisGroup(slivers []Widget, opts ...SliverCrossAxisGroupOpts) *SliverCrossAxisGroup

NewSliverCrossAxisGroup creates a widget that lays the slivers out in the cross axis.

Flutter: widgets/sliver.dart SliverCrossAxisGroup.new

func (*SliverCrossAxisGroup) CreateRenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverCrossAxisGroup.createRenderObject

type SliverCrossAxisGroupOpts

type SliverCrossAxisGroupOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

SliverCrossAxisGroupOpts are the optional parameters of NewSliverCrossAxisGroup.

Flutter: widgets/sliver.dart SliverCrossAxisGroup.new

type SliverFadeTransition

type SliverFadeTransition struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SliverFadeTransition animates the opacity of a sliver; the sliver is not rebuilt or repainted while the opacity changes.

Flutter: widgets/transitions.dart SliverFadeTransition

func NewSliverFadeTransition

func NewSliverFadeTransition(opacity animation.Animation[float64], sliver Widget, opts ...SliverFadeTransitionOpts) *SliverFadeTransition

NewSliverFadeTransition creates the widget; the sliver may be nil.

Flutter: widgets/transitions.dart SliverFadeTransition.new

func (*SliverFadeTransition) AlwaysIncludeSemantics

func (w *SliverFadeTransition) AlwaysIncludeSemantics() bool

AlwaysIncludeSemantics is whether the semantics of the sliver are included even when it is fully transparent.

Flutter: widgets/transitions.dart SliverFadeTransition.alwaysIncludeSemantics

func (*SliverFadeTransition) CreateRenderObject

CreateRenderObject creates the render object.

Flutter: widgets/transitions.dart SliverFadeTransition.createRenderObject

func (*SliverFadeTransition) Opacity

Opacity is the animation of the opacity of the sliver.

Flutter: widgets/transitions.dart SliverFadeTransition.opacity

func (*SliverFadeTransition) UpdateRenderObject

func (w *SliverFadeTransition) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/transitions.dart SliverFadeTransition.updateRenderObject

type SliverFadeTransitionOpts

type SliverFadeTransitionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AlwaysIncludeSemantics is whether the semantics of the sliver are included
	// even when it is fully transparent.
	AlwaysIncludeSemantics bool
}

SliverFadeTransitionOpts are the optional parameters of NewSliverFadeTransition.

Flutter: widgets/transitions.dart SliverFadeTransition.new

type SliverFillRemaining

type SliverFillRemaining struct {
	StatelessWidget
	// contains filtered or unexported fields
}

SliverFillRemaining is a sliver that contains a single box child that fills the remaining space in the viewport.

Flutter: widgets/sliver_fill.dart SliverFillRemaining

func NewSliverFillRemaining

func NewSliverFillRemaining(child Widget, opts ...SliverFillRemainingOpts) *SliverFillRemaining

NewSliverFillRemaining creates a sliver that fills the remaining space with the child, which may be nil.

Flutter: widgets/sliver_fill.dart SliverFillRemaining.new

func (*SliverFillRemaining) Build

Build builds the sliver that matches the mode.

Flutter: widgets/sliver_fill.dart SliverFillRemaining.build

func (*SliverFillRemaining) Child

func (w *SliverFillRemaining) Child() Widget

Child is the widget below this one.

Flutter: widgets/sliver_fill.dart SliverFillRemaining.child

func (*SliverFillRemaining) FillOverscroll

func (w *SliverFillRemaining) FillOverscroll() bool

FillOverscroll is whether the child fills the overscroll area.

Flutter: widgets/sliver_fill.dart SliverFillRemaining.fillOverscroll

func (*SliverFillRemaining) HasScrollBody

func (w *SliverFillRemaining) HasScrollBody() bool

HasScrollBody is whether the child has a scrollable body.

Flutter: widgets/sliver_fill.dart SliverFillRemaining.hasScrollBody

type SliverFillRemainingOpts

type SliverFillRemainingOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// HasScrollBody is whether the child has a scrollable body; the default is
	// true.
	HasScrollBody foundation.Opt[bool]
	// FillOverscroll is whether the child is stretched to fill the overscroll
	// area; it is only used when HasScrollBody is false.
	FillOverscroll bool
}

SliverFillRemainingOpts are the optional parameters of NewSliverFillRemaining.

Flutter: widgets/sliver_fill.dart SliverFillRemaining.new

type SliverFillViewport

type SliverFillViewport struct {
	StatelessWidget
	// contains filtered or unexported fields
}

SliverFillViewport is a sliver that contains multiple box children that each fill the viewport.

Flutter: widgets/sliver_fill.dart SliverFillViewport

func NewSliverFillViewport

func NewSliverFillViewport(delegate SliverChildDelegate, opts ...SliverFillViewportOpts) *SliverFillViewport

NewSliverFillViewport creates a sliver whose children, that the delegate supplies, each fill the viewport. In debug builds it panics with the tag ViewportFractionInvalid when the fraction is not positive.

Flutter: widgets/sliver_fill.dart SliverFillViewport.new

func (*SliverFillViewport) Build

Build pads the ends if asked, and builds the sliver.

Flutter: widgets/sliver_fill.dart SliverFillViewport.build

func (*SliverFillViewport) Delegate

Delegate supplies the children.

Flutter: widgets/sliver_fill.dart SliverFillViewport.delegate

func (*SliverFillViewport) PadEnds

func (w *SliverFillViewport) PadEnds() bool

PadEnds is whether the ends of the list are padded.

Flutter: widgets/sliver_fill.dart SliverFillViewport.padEnds

func (*SliverFillViewport) ViewportFraction

func (w *SliverFillViewport) ViewportFraction() float64

ViewportFraction is the fraction of the viewport that each child occupies.

Flutter: widgets/sliver_fill.dart SliverFillViewport.viewportFraction

type SliverFillViewportOpts

type SliverFillViewportOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ViewportFraction is the fraction of the viewport that each child occupies;
	// the default is 1.
	ViewportFraction foundation.Opt[float64]
	// PadEnds is whether to add padding to both ends of the list so that the
	// first and last children can be centered; the default is true.
	PadEnds foundation.Opt[bool]
	// AllowImplicitScrolling is whether the children of the sliver keep their
	// semantics when they are out of view; the default is true.
	AllowImplicitScrolling foundation.Opt[bool]
}

SliverFillViewportOpts are the optional parameters of NewSliverFillViewport.

Flutter: widgets/sliver_fill.dart SliverFillViewport.new

type SliverFixedExtentList

type SliverFixedExtentList struct {
	SliverMultiBoxAdaptorWidget
	// contains filtered or unexported fields
}

SliverFixedExtentList is a sliver that places box children, all with the same main axis extent, in a linear array.

Flutter: widgets/sliver.dart SliverFixedExtentList

func NewSliverFixedExtentList

func NewSliverFixedExtentList(delegate SliverChildDelegate, itemExtent float64, opts ...SliverListWidgetOpts) *SliverFixedExtentList

NewSliverFixedExtentList creates a fixed extent sliver list whose children the delegate supplies.

Flutter: widgets/sliver.dart SliverFixedExtentList.new

func NewSliverFixedExtentListBuilder

func NewSliverFixedExtentListBuilder(itemBuilder NullableIndexedWidgetBuilder, itemExtent float64, opts ...SliverBuilderOpts) *SliverFixedExtentList

NewSliverFixedExtentListBuilder creates a fixed extent sliver list whose items are built lazily.

Flutter: widgets/sliver.dart SliverFixedExtentList.builder

func NewSliverFixedExtentListList

func NewSliverFixedExtentListList(itemExtent float64, children []Widget, opts ...SliverListOpts) *SliverFixedExtentList

NewSliverFixedExtentListList creates a fixed extent sliver list of the children.

Flutter: widgets/sliver.dart SliverFixedExtentList.list

func (*SliverFixedExtentList) CreateElement

func (w *SliverFixedExtentList) CreateElement() Element

CreateElement creates the element.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorWidget.createElement

func (*SliverFixedExtentList) CreateRenderObject

func (w *SliverFixedExtentList) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverFixedExtentList.createRenderObject

func (*SliverFixedExtentList) ItemExtent

func (w *SliverFixedExtentList) ItemExtent() float64

ItemExtent is the extent of every child along the main axis.

Flutter: widgets/sliver.dart SliverFixedExtentList.itemExtent

func (*SliverFixedExtentList) UpdateRenderObject

func (w *SliverFixedExtentList) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject sets the item extent.

Flutter: widgets/sliver.dart SliverFixedExtentList.updateRenderObject

type SliverGrid

type SliverGrid struct {
	SliverMultiBoxAdaptorWidget
	// contains filtered or unexported fields
}

SliverGrid is a sliver that places multiple box children in a two dimensional arrangement.

Flutter: widgets/sliver.dart SliverGrid

func NewSliverGrid

func NewSliverGrid(delegate SliverChildDelegate, gridDelegate rendering.SliverGridDelegate, opts ...SliverListWidgetOpts) *SliverGrid

NewSliverGrid creates a sliver grid whose children the delegate supplies, laid out by the grid delegate.

Flutter: widgets/sliver.dart SliverGrid.new

func NewSliverGridBuilder

func NewSliverGridBuilder(gridDelegate rendering.SliverGridDelegate, itemBuilder NullableIndexedWidgetBuilder, opts ...SliverBuilderOpts) *SliverGrid

NewSliverGridBuilder creates a sliver grid whose items are built lazily.

Flutter: widgets/sliver.dart SliverGrid.builder

func NewSliverGridCount

func NewSliverGridCount(crossAxisCount int, children []Widget, opts ...SliverGridCountOpts) *SliverGrid

NewSliverGridCount creates a sliver grid with a fixed number of tiles in the cross axis.

Flutter: widgets/sliver.dart SliverGrid.count

func NewSliverGridExtent

func NewSliverGridExtent(maxCrossAxisExtent float64, children []Widget, opts ...SliverGridCountOpts) *SliverGrid

NewSliverGridExtent creates a sliver grid with tiles that have a maximum cross axis extent.

Flutter: widgets/sliver.dart SliverGrid.extent

func NewSliverGridList

func NewSliverGridList(gridDelegate rendering.SliverGridDelegate, children []Widget, opts ...SliverListOpts) *SliverGrid

NewSliverGridList creates a sliver grid of the children.

Flutter: widgets/sliver.dart SliverGrid.list

func (*SliverGrid) CreateElement

func (w *SliverGrid) CreateElement() Element

CreateElement creates the element.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorWidget.createElement

func (*SliverGrid) CreateRenderObject

func (w *SliverGrid) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverGrid.createRenderObject

func (*SliverGrid) EstimateMaxScrollOffset

func (w *SliverGrid) EstimateMaxScrollOffset(constraints rendering.SliverConstraints, firstIndex, lastIndex int, leadingScrollOffset, trailingScrollOffset float64) foundation.Opt[float64]

EstimateMaxScrollOffset asks the delegate, then the grid layout.

Flutter: widgets/sliver.dart SliverGrid.estimateMaxScrollOffset

func (*SliverGrid) GridDelegate

func (w *SliverGrid) GridDelegate() rendering.SliverGridDelegate

GridDelegate lays out the children.

Flutter: widgets/sliver.dart SliverGrid.gridDelegate

func (*SliverGrid) UpdateRenderObject

func (w *SliverGrid) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject sets the grid delegate.

Flutter: widgets/sliver.dart SliverGrid.updateRenderObject

type SliverGridCountOpts

type SliverGridCountOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// MainAxisSpacing is the number of logical pixels between each child along
	// the main axis.
	MainAxisSpacing float64
	// CrossAxisSpacing is the number of logical pixels between each child along
	// the cross axis.
	CrossAxisSpacing float64
	// ChildAspectRatio is the ratio of the cross axis to the main axis extent of
	// each child; the default is 1.
	ChildAspectRatio foundation.Opt[float64]
}

SliverGridCountOpts are the optional parameters of NewSliverGridCount and NewSliverGridExtent.

Flutter: widgets/sliver.dart SliverGrid.count

type SliverIgnorePointer

type SliverIgnorePointer struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SliverIgnorePointer is a sliver that is invisible during hit testing.

Deviation: the deprecated ignoringSemantics parameter is not ported (SPEC §12.10).

Flutter: widgets/sliver.dart SliverIgnorePointer

func NewSliverIgnorePointer

func NewSliverIgnorePointer(sliver Widget, opts ...SliverIgnorePointerOpts) *SliverIgnorePointer

NewSliverIgnorePointer creates a widget that is invisible to hit testing while it is ignoring.

Flutter: widgets/sliver.dart SliverIgnorePointer.new

func (*SliverIgnorePointer) CreateRenderObject

func (w *SliverIgnorePointer) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverIgnorePointer.createRenderObject

func (*SliverIgnorePointer) Ignoring

func (w *SliverIgnorePointer) Ignoring() bool

Ignoring is whether this sliver is ignored during hit testing.

Flutter: widgets/sliver.dart SliverIgnorePointer.ignoring

func (*SliverIgnorePointer) UpdateRenderObject

func (w *SliverIgnorePointer) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/sliver.dart SliverIgnorePointer.updateRenderObject

type SliverIgnorePointerOpts

type SliverIgnorePointerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Ignoring is whether this sliver is ignored during hit testing; the default
	// is true.
	Ignoring foundation.Opt[bool]
}

SliverIgnorePointerOpts are the optional parameters of NewSliverIgnorePointer.

Flutter: widgets/sliver.dart SliverIgnorePointer.new

type SliverLayoutBuilder

type SliverLayoutBuilder struct {
	RenderObjectWidget
	// contains filtered or unexported fields
}

SliverLayoutBuilder provides the SliverConstraints of its parent to a builder, which builds a sliver. The builder runs at layout time, whenever the constraints change or the widget is updated.

Flutter: widgets/sliver_layout_builder.dart SliverLayoutBuilder

func NewSliverLayoutBuilder

func NewSliverLayoutBuilder(builder SliverLayoutWidgetBuilder, opts ...LayoutBuilderOpts) *SliverLayoutBuilder

NewSliverLayoutBuilder creates a sliver that builds its child with the constraints of its parent.

Flutter: widgets/sliver_layout_builder.dart SliverLayoutBuilder.new

func (*SliverLayoutBuilder) Builder

Builder is the function that builds the child.

Flutter: widgets/layout_builder.dart ConstrainedLayoutBuilder.builder

func (*SliverLayoutBuilder) CreateElement

func (w *SliverLayoutBuilder) CreateElement() Element

CreateElement creates the element, which builds the child during layout.

Flutter: widgets/layout_builder.dart AbstractLayoutBuilder.createElement

func (*SliverLayoutBuilder) CreateRenderObject

func (w *SliverLayoutBuilder) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver_layout_builder.dart SliverLayoutBuilder.createRenderObject

type SliverLayoutWidgetBuilder

type SliverLayoutWidgetBuilder func(bc BuildContext, constraints rendering.SliverConstraints) Widget

SliverLayoutWidgetBuilder builds a widget for the constraints that a viewport gives to a sliver.

Flutter: widgets/sliver_layout_builder.dart SliverLayoutWidgetBuilder

type SliverList

type SliverList struct {
	SliverMultiBoxAdaptorWidget
}

SliverList is a sliver that places box children in a linear array along the main axis.

Flutter: widgets/sliver.dart SliverList

func NewSliverList

func NewSliverList(delegate SliverChildDelegate, opts ...SliverListWidgetOpts) *SliverList

NewSliverList creates a sliver list whose children the delegate supplies.

Flutter: widgets/sliver.dart SliverList.new

func NewSliverListBuilder

func NewSliverListBuilder(itemBuilder NullableIndexedWidgetBuilder, opts ...SliverBuilderOpts) *SliverList

NewSliverListBuilder creates a sliver list whose items are built lazily.

Flutter: widgets/sliver.dart SliverList.builder

func NewSliverListList

func NewSliverListList(children []Widget, opts ...SliverListOpts) *SliverList

NewSliverListList creates a sliver list of the children.

Flutter: widgets/sliver.dart SliverList.list

func NewSliverListSeparated

func NewSliverListSeparated(itemBuilder, separatorBuilder NullableIndexedWidgetBuilder, opts ...SliverSeparatedOpts) *SliverList

NewSliverListSeparated creates a sliver list with a separator between the items.

Flutter: widgets/sliver.dart SliverList.separated

func (*SliverList) CreateElement

func (w *SliverList) CreateElement() Element

CreateElement creates the element; its moved children leave their index empty.

Flutter: widgets/sliver.dart SliverList.createElement

func (*SliverList) CreateRenderObject

func (w *SliverList) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverList.createRenderObject

type SliverListOpts

type SliverListOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AddAutomaticKeepAlives is whether to wrap each child in an
	// AutomaticKeepAlive; the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
	// AddRepaintBoundaries is whether to wrap each child in a RepaintBoundary; the
	// default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddSemanticIndexes is whether to wrap each child in an IndexedSemantics; the
	// default is true.
	AddSemanticIndexes foundation.Opt[bool]
	// SemanticIndexOffset is added to the semantic index of every child.
	SemanticIndexOffset int
	// MaintainVisibleContentPosition keeps the items that the user reads where they
	// are on the screen when items are inserted before them, as long as the list
	// is not at its start; at its start the list follows the new items, as in
	// Flutter. It works for the items whose element moves to a new index by its
	// key: with FindChildIndexCallback (or FindItemIndexCallback) on a builder
	// list, or with the keys of the children of a list of children. Without keys
	// it does nothing. It does not apply to grids. The name is the one of React
	// Native's FlatList.
	//
	// Flutter: no counterpart
	MaintainVisibleContentPosition bool
	// EstimateItemOffsets lets a jump into a long list of items of different
	// extents (a click on the scroll bar, a JumpTo) lay out only the items near
	// the new offset. When the offset is more than the viewport and the cache
	// extent away from the items the list has, it does not build the items in
	// between: it builds the item at the index that the average extent of the
	// items it has measured gives for the offset, at the offset that the average
	// gives, and goes on from there. The offsets far from the window shown are
	// estimates, which the list corrects as the user scrolls back: at item 0 the
	// scroll offset is corrected so that the item starts at 0. It applies to
	// SliverList and to a ListView without ItemExtent, ItemExtentBuilder and
	// PrototypeItem (lists with those find an index at once), not to grids.
	//
	// Flutter: no counterpart
	EstimateItemOffsets bool
}

SliverListOpts are the optional parameters of the list constructors of the slivers with boxes.

Flutter: widgets/sliver.dart SliverList.list

type SliverListWidgetOpts

type SliverListWidgetOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// MaintainVisibleContentPosition keeps the items that the user reads where they
	// are on the screen when items are inserted before them, as long as the list
	// is not at its start; at its start the list follows the new items, as in
	// Flutter. It works for the items whose element moves to a new index by its
	// key: with FindChildIndexCallback (or FindItemIndexCallback) on a builder
	// list, or with the keys of the children of a list of children. Without keys
	// it does nothing. It does not apply to grids. The name is the one of React
	// Native's FlatList.
	//
	// Flutter: no counterpart
	MaintainVisibleContentPosition bool
	// EstimateItemOffsets lets a jump into a long list of items of different
	// extents (a click on the scroll bar, a JumpTo) lay out only the items near
	// the new offset. When the offset is more than the viewport and the cache
	// extent away from the items the list has, it does not build the items in
	// between: it builds the item at the index that the average extent of the
	// items it has measured gives for the offset, at the offset that the average
	// gives, and goes on from there. The offsets far from the window shown are
	// estimates, which the list corrects as the user scrolls back: at item 0 the
	// scroll offset is corrected so that the item starts at 0. It applies to
	// SliverList and to a ListView without ItemExtent, ItemExtentBuilder and
	// PrototypeItem (lists with those find an index at once), not to grids.
	//
	// Flutter: no counterpart
	EstimateItemOffsets bool
}

SliverListWidgetOpts are the optional parameters of NewSliverList.

Flutter: widgets/sliver.dart SliverList.new

type SliverMainAxisGroup

type SliverMainAxisGroup struct {
	MultiChildRenderObjectWidget
}

SliverMainAxisGroup places its sliver children one after the other in the main axis, as if they were one sliver.

Flutter: widgets/sliver.dart SliverMainAxisGroup

func NewSliverMainAxisGroup

func NewSliverMainAxisGroup(slivers []Widget, opts ...SliverMainAxisGroupOpts) *SliverMainAxisGroup

NewSliverMainAxisGroup creates a widget that lays the slivers out in the main axis.

Flutter: widgets/sliver.dart SliverMainAxisGroup.new

func (*SliverMainAxisGroup) CreateElement

func (w *SliverMainAxisGroup) CreateElement() Element

CreateElement creates the element, which visits only the visible slivers when asked for the onstage children.

Flutter: widgets/sliver.dart SliverMainAxisGroup.createElement

func (*SliverMainAxisGroup) CreateRenderObject

func (w *SliverMainAxisGroup) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverMainAxisGroup.createRenderObject

type SliverMainAxisGroupOpts

type SliverMainAxisGroupOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

SliverMainAxisGroupOpts are the optional parameters of NewSliverMainAxisGroup.

Flutter: widgets/sliver.dart SliverMainAxisGroup.new

type SliverMultiBoxAdaptorElement

type SliverMultiBoxAdaptorElement struct {
	RenderObjectElement
	// contains filtered or unexported fields
}

SliverMultiBoxAdaptorElement is the element of a SliverMultiBoxAdaptorWidget. It is the child manager of its render object: it builds the children, with the delegate, as the render object asks for them while it lays itself out.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement

func NewSliverMultiBoxAdaptorElement

func NewSliverMultiBoxAdaptorElement(w sliverMultiBoxWidget, replaceMovedChildren bool) *SliverMultiBoxAdaptorElement

NewSliverMultiBoxAdaptorElement creates the element of a sliver with boxes. A widget that embeds SliverMultiBoxAdaptorWidget returns it from its CreateElement method; replaceMovedChildren is whether a child that moved leaves its index empty for the delegate to fill (true for SliverList).

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.new

func (*SliverMultiBoxAdaptorElement) ChildCount

func (e *SliverMultiBoxAdaptorElement) ChildCount() int

ChildCount is the number of children, found by a search if the delegate does not know it.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.childCount

func (*SliverMultiBoxAdaptorElement) CreateChild

func (e *SliverMultiBoxAdaptorElement) CreateChild(index int, after rendering.Box)

CreateChild builds the child at the index and puts it after the given one.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.createChild

func (*SliverMultiBoxAdaptorElement) DebugAssertChildListLocked

func (e *SliverMultiBoxAdaptorElement) DebugAssertChildListLocked() bool

DebugAssertChildListLocked is true, and panics in debug builds if a child is being updated.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.debugAssertChildListLocked

func (*SliverMultiBoxAdaptorElement) DebugVisitOnstageChildren

func (e *SliverMultiBoxAdaptorElement) DebugVisitOnstageChildren(visitor ElementVisitor)

DebugVisitOnstageChildren visits the children that overlap the part of the sliver that is on the screen.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.debugVisitOnstageChildren

func (*SliverMultiBoxAdaptorElement) DidAdoptChild

func (e *SliverMultiBoxAdaptorElement) DidAdoptChild(child rendering.Box)

DidAdoptChild records the index of the child in its parent data.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.didAdoptChild

func (*SliverMultiBoxAdaptorElement) DidFinishLayout

func (e *SliverMultiBoxAdaptorElement) DidFinishLayout()

DidFinishLayout tells the delegate the first and last live indices.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.didFinishLayout

func (*SliverMultiBoxAdaptorElement) DidStartLayout

func (e *SliverMultiBoxAdaptorElement) DidStartLayout()

DidStartLayout checks that the child list is not being changed.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.didStartLayout

func (*SliverMultiBoxAdaptorElement) EstimateMaxScrollOffset

EstimateMaxScrollOffset estimates the scroll extent of the list.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.estimateMaxScrollOffset

func (*SliverMultiBoxAdaptorElement) EstimatedChildCount

func (e *SliverMultiBoxAdaptorElement) EstimatedChildCount() foundation.Opt[int]

EstimatedChildCount is the number of children that the delegate says.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.estimatedChildCount

func (*SliverMultiBoxAdaptorElement) EstimatesItemOffsets

func (e *SliverMultiBoxAdaptorElement) EstimatesItemOffsets() bool

EstimatesItemOffsets is whether the widget has the EstimateItemOffsets option on.

Flutter: no counterpart

func (*SliverMultiBoxAdaptorElement) ForgetChild

func (e *SliverMultiBoxAdaptorElement) ForgetChild(child Element)

ForgetChild removes the child from the live ones.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.forgetChild

func (*SliverMultiBoxAdaptorElement) InsertRenderObjectChild

func (e *SliverMultiBoxAdaptorElement) InsertRenderObjectChild(child rendering.RenderObject, slot any)

InsertRenderObjectChild inserts the child after the one before it.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.insertRenderObjectChild

func (*SliverMultiBoxAdaptorElement) KeepsVisibleContentPosition

func (e *SliverMultiBoxAdaptorElement) KeepsVisibleContentPosition() bool

KeepsVisibleContentPosition is whether the widget has the MaintainVisibleContentPosition option on.

Flutter: no counterpart

func (*SliverMultiBoxAdaptorElement) MoveRenderObjectChild

func (e *SliverMultiBoxAdaptorElement) MoveRenderObjectChild(child rendering.RenderObject, _, newSlot any)

MoveRenderObjectChild moves the child after the one before it.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.moveRenderObjectChild

func (*SliverMultiBoxAdaptorElement) PerformRebuild

func (e *SliverMultiBoxAdaptorElement) PerformRebuild()

PerformRebuild builds all the children that are live again.

Deviation: with the MaintainVisibleContentPosition option on and the sliver away from its leading edge, a child that moved to a new index keeps its layout offset and the old offsets are not given to the children that take the old indices, so the visible children stay where they are and the children inserted before them are built only when they come into view. A sliver whose offsets come from the index gets a correction of the scroll offset instead.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.performRebuild

func (*SliverMultiBoxAdaptorElement) RemoveChild

func (e *SliverMultiBoxAdaptorElement) RemoveChild(child rendering.Box)

RemoveChild removes the child that the render object gives up.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.removeChild

func (*SliverMultiBoxAdaptorElement) RemoveRenderObjectChild

func (e *SliverMultiBoxAdaptorElement) RemoveRenderObjectChild(child rendering.RenderObject, _ any)

RemoveRenderObjectChild removes the child.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.removeRenderObjectChild

func (*SliverMultiBoxAdaptorElement) SetDidUnderflow

func (e *SliverMultiBoxAdaptorElement) SetDidUnderflow(value bool)

SetDidUnderflow remembers that the list ran out of children.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.setDidUnderflow

func (*SliverMultiBoxAdaptorElement) TakeScrollOffsetCorrection

func (e *SliverMultiBoxAdaptorElement) TakeScrollOffsetCorrection() float64

TakeScrollOffsetCorrection returns the correction of the scroll offset that the last rebuild worked out for a sliver whose layout offsets come from the index, and forgets it.

Flutter: no counterpart

func (*SliverMultiBoxAdaptorElement) Update

func (e *SliverMultiBoxAdaptorElement) Update(newWidget Widget)

Update rebuilds the children when the delegate says it must.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.update

func (*SliverMultiBoxAdaptorElement) UpdateChild

func (e *SliverMultiBoxAdaptorElement) UpdateChild(child Element, newWidget Widget, newSlot any) Element

UpdateChild updates the child, and keeps the layout offset of the parent data when the child gets a new one.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.updateChild

func (*SliverMultiBoxAdaptorElement) VisitChildren

func (e *SliverMultiBoxAdaptorElement) VisitChildren(visitor ElementVisitor)

VisitChildren visits the live children in order of index.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorElement.visitChildren

type SliverMultiBoxAdaptorWidget

type SliverMultiBoxAdaptorWidget struct {
	RenderObjectWidget
	// contains filtered or unexported fields
}

SliverMultiBoxAdaptorWidget is the base of the slivers that lay out many boxes that a SliverChildDelegate supplies: SliverList, SliverFixedExtentList, SliverVariedExtentList and SliverGrid. Embed it and implement CreateRenderObject.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorWidget

func NewSliverMultiBoxAdaptorWidgetBase

func NewSliverMultiBoxAdaptorWidgetBase(delegate SliverChildDelegate, opts ...WidgetOpts) SliverMultiBoxAdaptorWidget

NewSliverMultiBoxAdaptorWidgetBase creates the embedded base of a sliver with a delegate.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorWidget.new

func (*SliverMultiBoxAdaptorWidget) Delegate

Delegate supplies the children.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorWidget.delegate

func (*SliverMultiBoxAdaptorWidget) EstimateItemOffsets

func (w *SliverMultiBoxAdaptorWidget) EstimateItemOffsets() bool

EstimateItemOffsets is whether the sliver estimates the offset of the items it jumps to. Only SliverList can be given it.

Flutter: no counterpart

func (*SliverMultiBoxAdaptorWidget) EstimateMaxScrollOffset

func (w *SliverMultiBoxAdaptorWidget) EstimateMaxScrollOffset(_ rendering.SliverConstraints, firstIndex, lastIndex int, leadingScrollOffset, trailingScrollOffset float64) foundation.Opt[float64]

EstimateMaxScrollOffset asks the delegate; none lets the sliver extrapolate.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorWidget.estimateMaxScrollOffset

func (*SliverMultiBoxAdaptorWidget) MaintainVisibleContentPosition

func (w *SliverMultiBoxAdaptorWidget) MaintainVisibleContentPosition() bool

MaintainVisibleContentPosition is whether the sliver keeps the children that the user reads in place when items are inserted before them. Only SliverList, SliverFixedExtentList, SliverVariedExtentList and SliverPrototypeExtentList can be given it.

Flutter: no counterpart

type SliverOffstage

type SliverOffstage struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SliverOffstage lays out its sliver child as if it was in the tree, but without painting anything, without making it available for hit testing, and without taking any room in the parent.

Flutter: widgets/sliver.dart SliverOffstage

func NewSliverOffstage

func NewSliverOffstage(sliver Widget, opts ...SliverOffstageOpts) *SliverOffstage

NewSliverOffstage creates a widget that hides its sliver while it is offstage.

Flutter: widgets/sliver.dart SliverOffstage.new

func (*SliverOffstage) CreateElement

func (w *SliverOffstage) CreateElement() Element

CreateElement creates the element, which hides the child from the visitors of the onstage children while it is offstage.

Flutter: widgets/sliver.dart SliverOffstage.createElement

func (*SliverOffstage) CreateRenderObject

func (w *SliverOffstage) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverOffstage.createRenderObject

func (*SliverOffstage) IsOffstage

func (w *SliverOffstage) IsOffstage() bool

IsOffstage is whether the sliver is hidden.

Flutter: widgets/sliver.dart SliverOffstage.offstage

func (*SliverOffstage) UpdateRenderObject

func (w *SliverOffstage) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/sliver.dart SliverOffstage.updateRenderObject

type SliverOffstageOpts

type SliverOffstageOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Offstage is whether the sliver is hidden; the default is true.
	Offstage foundation.Opt[bool]
}

SliverOffstageOpts are the optional parameters of NewSliverOffstage.

Flutter: widgets/sliver.dart SliverOffstage.new

type SliverOpacity

type SliverOpacity struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SliverOpacity makes its sliver child partially transparent.

Flutter: widgets/sliver.dart SliverOpacity

func NewSliverOpacity

func NewSliverOpacity(opacity float64, sliver Widget, opts ...SliverOpacityOpts) *SliverOpacity

NewSliverOpacity creates a widget that paints its sliver with the opacity, from 0 to 1. In debug builds it panics with the tag OpacityOutOfRange when the opacity is outside of that range.

Flutter: widgets/sliver.dart SliverOpacity.new

func (*SliverOpacity) AlwaysIncludeSemantics

func (w *SliverOpacity) AlwaysIncludeSemantics() bool

AlwaysIncludeSemantics is whether the semantics are included when invisible.

Flutter: widgets/sliver.dart SliverOpacity.alwaysIncludeSemantics

func (*SliverOpacity) CreateRenderObject

func (w *SliverOpacity) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverOpacity.createRenderObject

func (*SliverOpacity) Opacity

func (w *SliverOpacity) Opacity() float64

Opacity is the fraction to scale the sliver's alpha value by.

Flutter: widgets/sliver.dart SliverOpacity.opacity

func (*SliverOpacity) UpdateRenderObject

func (w *SliverOpacity) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/sliver.dart SliverOpacity.updateRenderObject

type SliverOpacityOpts

type SliverOpacityOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AlwaysIncludeSemantics is whether the semantics of the sliver are included
	// even when it is invisible (opacity 0).
	AlwaysIncludeSemantics bool
}

SliverOpacityOpts are the optional parameters of NewSliverOpacity.

Flutter: widgets/sliver.dart SliverOpacity.new

type SliverOverlapAbsorber

type SliverOverlapAbsorber struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SliverOverlapAbsorber is a sliver that wraps another, forcing its layout extent to be treated as overlap.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorber

func NewSliverOverlapAbsorber

func NewSliverOverlapAbsorber(handle *SliverOverlapAbsorberHandle, sliver Widget, opts ...SliverOverlapAbsorberOpts) *SliverOverlapAbsorber

NewSliverOverlapAbsorber creates a sliver that absorbs the overlap of its sliver into the handle.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorber.new

func (*SliverOverlapAbsorber) CreateRenderObject

CreateRenderObject creates the render object.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorber.createRenderObject

func (*SliverOverlapAbsorber) Handle

Handle is where the absorbed extent goes.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorber.handle

func (*SliverOverlapAbsorber) UpdateRenderObject

func (w *SliverOverlapAbsorber) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject sets the handle.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorber.updateRenderObject

type SliverOverlapAbsorberHandle

type SliverOverlapAbsorberHandle struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

SliverOverlapAbsorberHandle communicates the extent that a SliverOverlapAbsorber absorbs to the SliverOverlapInjector.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorberHandle

func NestedScrollViewSliverOverlapAbsorberHandleFor

func NestedScrollViewSliverOverlapAbsorberHandleFor(bc BuildContext) *SliverOverlapAbsorberHandle

NestedScrollViewSliverOverlapAbsorberHandleFor is the handle of the closest NestedScrollView above the context; the context depends on it. In debug builds it panics with the tag NestedScrollViewMissing when there is none.

Flutter: widgets/nested_scroll_view.dart NestedScrollView.sliverOverlapAbsorberHandleFor

func NewSliverOverlapAbsorberHandle

func NewSliverOverlapAbsorberHandle() *SliverOverlapAbsorberHandle

NewSliverOverlapAbsorberHandle creates a handle.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorberHandle.new

func (*SliverOverlapAbsorberHandle) LayoutExtent

LayoutExtent is the sum of the layout extents that the absorber absorbed, or none before it is laid out.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorberHandle.layoutExtent

func (*SliverOverlapAbsorberHandle) ScrollExtent

ScrollExtent is the sum of the scroll extents that the absorber absorbed, or none before it is laid out.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorberHandle.scrollExtent

func (*SliverOverlapAbsorberHandle) String

func (h *SliverOverlapAbsorberHandle) String() string

String describes the handle.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorberHandle.toString

type SliverOverlapAbsorberOpts

type SliverOverlapAbsorberOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

SliverOverlapAbsorberOpts are the optional parameters of NewSliverOverlapAbsorber.

Flutter: widgets/nested_scroll_view.dart SliverOverlapAbsorber.new

type SliverOverlapInjector

type SliverOverlapInjector struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SliverOverlapInjector is a sliver that has a sliver geometry based on the values stored in a SliverOverlapAbsorberHandle.

Flutter: widgets/nested_scroll_view.dart SliverOverlapInjector

func NewSliverOverlapInjector

func NewSliverOverlapInjector(handle *SliverOverlapAbsorberHandle, sliver Widget, opts ...SliverOverlapInjectorOpts) *SliverOverlapInjector

NewSliverOverlapInjector creates a sliver that injects the extent of the handle.

Flutter: widgets/nested_scroll_view.dart SliverOverlapInjector.new

func (*SliverOverlapInjector) CreateRenderObject

CreateRenderObject creates the render object.

Flutter: widgets/nested_scroll_view.dart SliverOverlapInjector.createRenderObject

func (*SliverOverlapInjector) Handle

Handle is where the extent comes from.

Flutter: widgets/nested_scroll_view.dart SliverOverlapInjector.handle

func (*SliverOverlapInjector) UpdateRenderObject

func (w *SliverOverlapInjector) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject sets the handle.

Flutter: widgets/nested_scroll_view.dart SliverOverlapInjector.updateRenderObject

type SliverOverlapInjectorOpts

type SliverOverlapInjectorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

SliverOverlapInjectorOpts are the optional parameters of NewSliverOverlapInjector.

Flutter: widgets/nested_scroll_view.dart SliverOverlapInjector.new

type SliverPadding

type SliverPadding struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

SliverPadding insets another sliver by the given padding.

Flutter: widgets/basic.dart SliverPadding

func NewSliverPadding

func NewSliverPadding(padding painting.EdgeInsetsGeometry, sliver Widget, opts ...SliverPaddingOpts) *SliverPadding

NewSliverPadding creates a widget that insets its sliver.

Flutter: widgets/basic.dart SliverPadding.new

func (*SliverPadding) CreateRenderObject

func (w *SliverPadding) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart SliverPadding.createRenderObject

func (*SliverPadding) Padding

Padding is the amount of space by which to inset the child sliver.

Flutter: widgets/basic.dart SliverPadding.padding

func (*SliverPadding) UpdateRenderObject

func (w *SliverPadding) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart SliverPadding.updateRenderObject

type SliverPaddingOpts

type SliverPaddingOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

SliverPaddingOpts are the optional parameters of NewSliverPadding.

Flutter: widgets/basic.dart SliverPadding.new

type SliverPersistentHeader

type SliverPersistentHeader struct {
	StatelessWidget
	// contains filtered or unexported fields
}

SliverPersistentHeader is a sliver whose size varies when the sliver is scrolled to the edge of the viewport opposite the sliver's GrowthDirection.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeader

func NewSliverPersistentHeader

func NewSliverPersistentHeader(delegate SliverPersistentHeaderDelegate, opts ...SliverPersistentHeaderOpts) *SliverPersistentHeader

NewSliverPersistentHeader creates a header that the delegate builds.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeader.new

func (*SliverPersistentHeader) Build

Build builds the header of the kind that the flags say.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeader.build

func (*SliverPersistentHeader) Delegate

Delegate builds the header.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeader.delegate

func (*SliverPersistentHeader) Floating

func (w *SliverPersistentHeader) Floating() bool

Floating is whether the header floats.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeader.floating

func (*SliverPersistentHeader) Pinned

func (w *SliverPersistentHeader) Pinned() bool

Pinned is whether the header is pinned.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeader.pinned

type SliverPersistentHeaderDelegate

type SliverPersistentHeaderDelegate interface {
	// Build builds the header for the offset the sliver has been shrunk by and
	// whether it overlaps the content that follows.
	//
	// Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.build
	Build(bc BuildContext, shrinkOffset float64, overlapsContent bool) Widget
	// MinExtent is the smallest size the header can reach, which a pinned header
	// keeps.
	//
	// Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.minExtent
	MinExtent() float64
	// MaxExtent is the size of the header when it is not shrunk.
	//
	// Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.maxExtent
	MaxExtent() float64
	// Vsync is the ticker provider of the snap animation of a floating header, or
	// nil.
	//
	// Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.vsync
	Vsync() scheduler.TickerProvider
	// SnapConfiguration is how a floating header snaps, or nil.
	//
	// Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.snapConfiguration
	SnapConfiguration() *rendering.FloatingHeaderSnapConfiguration
	// StretchConfiguration is how the header stretches in an overscroll, or nil.
	//
	// Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.stretchConfiguration
	StretchConfiguration() *rendering.OverScrollHeaderStretchConfiguration
	// ShowOnScreenConfiguration is how the header shows on screen, or nil.
	//
	// Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.showOnScreenConfiguration
	ShowOnScreenConfiguration() *rendering.PersistentHeaderShowOnScreenConfiguration
	// ShouldRebuild is whether the header must be built again, as this delegate
	// replaces the old one.
	//
	// Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.shouldRebuild
	ShouldRebuild(oldDelegate SliverPersistentHeaderDelegate) bool
}

SliverPersistentHeaderDelegate builds the child of a SliverPersistentHeader and says how big it can be.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate

type SliverPersistentHeaderDelegateBase

type SliverPersistentHeaderDelegateBase struct{}

SliverPersistentHeaderDelegateBase gives the optional methods of a SliverPersistentHeaderDelegate their default (nil); embed it in a delegate.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate

func (SliverPersistentHeaderDelegateBase) ShowOnScreenConfiguration

ShowOnScreenConfiguration is nil.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.showOnScreenConfiguration

func (SliverPersistentHeaderDelegateBase) SnapConfiguration

SnapConfiguration is nil.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.snapConfiguration

func (SliverPersistentHeaderDelegateBase) StretchConfiguration

StretchConfiguration is nil.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.stretchConfiguration

func (SliverPersistentHeaderDelegateBase) Vsync

Vsync is nil.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeaderDelegate.vsync

type SliverPersistentHeaderOpts

type SliverPersistentHeaderOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Pinned is whether the header stays at the start of the viewport when it
	// would scroll out of view.
	Pinned bool
	// Floating is whether the header appears as soon as the user scrolls back
	// towards it.
	Floating bool
}

SliverPersistentHeaderOpts are the optional parameters of NewSliverPersistentHeader.

Flutter: widgets/sliver_persistent_header.dart SliverPersistentHeader.new

type SliverPrototypeExtentList

type SliverPrototypeExtentList struct {
	SliverMultiBoxAdaptorWidget
	// contains filtered or unexported fields
}

SliverPrototypeExtentList is a sliver that places its box children in a linear array and constrains them to have the same extent as a prototype item along the main axis.

Flutter: widgets/sliver_prototype_extent_list.dart SliverPrototypeExtentList

func NewSliverPrototypeExtentList

func NewSliverPrototypeExtentList(delegate SliverChildDelegate, prototypeItem Widget, opts ...SliverListWidgetOpts) *SliverPrototypeExtentList

NewSliverPrototypeExtentList creates a sliver list whose children the delegate supplies, with the main axis extent of the prototype item.

Flutter: widgets/sliver_prototype_extent_list.dart SliverPrototypeExtentList.new

func NewSliverPrototypeExtentListBuilder

func NewSliverPrototypeExtentListBuilder(itemBuilder NullableIndexedWidgetBuilder, prototypeItem Widget, opts ...SliverBuilderOpts) *SliverPrototypeExtentList

NewSliverPrototypeExtentListBuilder creates a prototype extent sliver list whose items are built lazily.

Flutter: widgets/sliver_prototype_extent_list.dart SliverPrototypeExtentList.builder

func NewSliverPrototypeExtentListList

func NewSliverPrototypeExtentListList(prototypeItem Widget, children []Widget, opts ...SliverListOpts) *SliverPrototypeExtentList

NewSliverPrototypeExtentListList creates a prototype extent sliver list of the children.

Flutter: widgets/sliver_prototype_extent_list.dart SliverPrototypeExtentList.list

func (*SliverPrototypeExtentList) CreateElement

func (w *SliverPrototypeExtentList) CreateElement() Element

CreateElement creates the element, which also builds the prototype.

Flutter: widgets/sliver_prototype_extent_list.dart SliverPrototypeExtentList.createElement

func (*SliverPrototypeExtentList) CreateRenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver_prototype_extent_list.dart SliverPrototypeExtentList.createRenderObject

func (*SliverPrototypeExtentList) PrototypeItem

func (w *SliverPrototypeExtentList) PrototypeItem() Widget

PrototypeItem is the widget that gives the main axis extent of all the items.

Flutter: widgets/sliver_prototype_extent_list.dart SliverPrototypeExtentList.prototypeItem

type SliverReorderableList

type SliverReorderableList struct {
	StatefulWidget
	// contains filtered or unexported fields
}

SliverReorderableList is a sliver list that allows the user to interactively reorder the list items.

Flutter: widgets/reorderable_list.dart SliverReorderableList

func NewSliverReorderableList

func NewSliverReorderableList(itemBuilder IndexedWidgetBuilder, itemCount int, opts ...SliverReorderableListOpts) *SliverReorderableList

NewSliverReorderableList creates the sliver; see NewReorderableList for the errors.

Flutter: widgets/reorderable_list.dart SliverReorderableList.new

func (*SliverReorderableList) CreateState

func (w *SliverReorderableList) CreateState() State

CreateState creates the state.

Flutter: widgets/reorderable_list.dart SliverReorderableList.createState

func (*SliverReorderableList) ItemCount

func (w *SliverReorderableList) ItemCount() int

ItemCount is the number of items.

Flutter: widgets/reorderable_list.dart SliverReorderableList.itemCount

type SliverReorderableListOpts

type SliverReorderableListOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// FindChildIndexCallback finds the index of the item that has a key.
	FindChildIndexCallback ChildIndexGetter
	// OnReorder is called when an item is dropped; see ReorderableListOpts.
	OnReorder ReorderCallback
	// OnReorderItem is called when an item is dropped; see ReorderableListOpts.
	OnReorderItem ReorderCallback
	// OnReorderStart is called when the user starts to drag an item.
	OnReorderStart func(index int)
	// OnReorderEnd is called when the user drops the item.
	OnReorderEnd func(index int)
	// ItemExtent is the extent of all the items.
	ItemExtent foundation.Opt[float64]
	// ItemExtentBuilder gives the extent of each item.
	ItemExtentBuilder rendering.ItemExtentBuilder
	// PrototypeItem is the widget whose extent all the items have.
	PrototypeItem Widget
	// ProxyDecorator decorates the item that is being dragged.
	ProxyDecorator ReorderItemProxyDecorator
	// DragBoundaryProvider gives the boundary the dragged item stays within.
	DragBoundaryProvider ReorderDragBoundaryProvider
	// AutoScrollerVelocityScalar is the speed of the scrolling when an item is
	// dragged to the edge; the default is 50.
	AutoScrollerVelocityScalar foundation.Opt[float64]
}

SliverReorderableListOpts are the optional parameters of NewSliverReorderableList.

Flutter: widgets/reorderable_list.dart SliverReorderableList.new

type SliverReorderableListState

type SliverReorderableListState struct {
	StateOf[*SliverReorderableList]
	TickerProvider
	// contains filtered or unexported fields
}

SliverReorderableListState is the state of a SliverReorderableList: it tracks the item that is dragged and moves the others to make room for it.

Flutter: widgets/reorderable_list.dart SliverReorderableListState

func SliverReorderableListMaybeOf

func SliverReorderableListMaybeOf(bc BuildContext) (*SliverReorderableListState, bool)

SliverReorderableListMaybeOf is the state of the closest SliverReorderableList above the context, and false if there is none.

Flutter: widgets/reorderable_list.dart SliverReorderableList.maybeOf

func SliverReorderableListOf

func SliverReorderableListOf(bc BuildContext) *SliverReorderableListState

SliverReorderableListOf is the state of the closest SliverReorderableList above the context. In debug builds it panics with the tag SliverReorderableListMissing when there is none.

Flutter: widgets/reorderable_list.dart SliverReorderableList.of

func (*SliverReorderableListState) Build

Build builds the list of the items.

func (*SliverReorderableListState) CancelReorder

func (s *SliverReorderableListState) CancelReorder()

CancelReorder cancels the reordering that is in progress.

Flutter: widgets/reorderable_list.dart SliverReorderableListState.cancelReorder

func (*SliverReorderableListState) DidChangeDependencies

func (s *SliverReorderableListState) DidChangeDependencies()

DidChangeDependencies finds the scrollable.

func (*SliverReorderableListState) DidUpdateWidget

func (s *SliverReorderableListState) DidUpdateWidget(oldWidget *SliverReorderableList)

DidUpdateWidget cancels the reordering when the item count changed.

func (*SliverReorderableListState) DisableAnimations

func (h *SliverReorderableListState) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*SliverReorderableListState) Dispose

func (s *SliverReorderableListState) Dispose()

Dispose resets the drag.

func (*SliverReorderableListState) ErrorReporter

func (h *SliverReorderableListState) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

func (*SliverReorderableListState) StartItemDragReorder

func (s *SliverReorderableListState) StartItemDragReorder(index int, event *gestures.PointerDownEvent, recognizer *gestures.MultiDragGestureRecognizer)

StartItemDragReorder starts dragging the item at the index with the pointer of the event, which the recognizer tracks. In debug builds it panics with the tag ReorderableItemNotVisible when the item is not built.

Flutter: widgets/reorderable_list.dart SliverReorderableListState.startItemDragReorder

type SliverSeparatedOpts

type SliverSeparatedOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// FindItemIndexCallback finds the index of the item (not of the child, which
	// counts the separators) that has a key.
	FindItemIndexCallback ChildIndexGetter
	// ItemCount is the number of items; none means unbounded, until the builder
	// returns nil.
	ItemCount foundation.Opt[int]
	// AddAutomaticKeepAlives is whether to wrap each item in an
	// AutomaticKeepAlive; the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
	// AddRepaintBoundaries is whether to wrap each item in a RepaintBoundary; the
	// default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddSemanticIndexes is whether to wrap each item in an IndexedSemantics; the
	// default is true.
	AddSemanticIndexes foundation.Opt[bool]
	// MaintainVisibleContentPosition keeps the items that the user reads where they
	// are on the screen when items are inserted before them, as long as the list
	// is not at its start; at its start the list follows the new items, as in
	// Flutter. It works for the items whose element moves to a new index by its
	// key: with FindChildIndexCallback (or FindItemIndexCallback) on a builder
	// list, or with the keys of the children of a list of children. Without keys
	// it does nothing. It does not apply to grids. The name is the one of React
	// Native's FlatList.
	//
	// Flutter: no counterpart
	MaintainVisibleContentPosition bool
	// EstimateItemOffsets lets a jump into a long list of items of different
	// extents (a click on the scroll bar, a JumpTo) lay out only the items near
	// the new offset. When the offset is more than the viewport and the cache
	// extent away from the items the list has, it does not build the items in
	// between: it builds the item at the index that the average extent of the
	// items it has measured gives for the offset, at the offset that the average
	// gives, and goes on from there. The offsets far from the window shown are
	// estimates, which the list corrects as the user scrolls back: at item 0 the
	// scroll offset is corrected so that the item starts at 0. It applies to
	// SliverList and to a ListView without ItemExtent, ItemExtentBuilder and
	// PrototypeItem (lists with those find an index at once), not to grids.
	//
	// Flutter: no counterpart
	EstimateItemOffsets bool
}

SliverSeparatedOpts are the optional parameters of the separated constructors of the slivers with boxes.

Flutter: widgets/sliver.dart SliverList.separated

type SliverToBoxAdapter

type SliverToBoxAdapter struct {
	SingleChildRenderObjectWidget
}

SliverToBoxAdapter is a sliver that contains a single box widget.

Flutter: widgets/basic.dart SliverToBoxAdapter

func NewSliverToBoxAdapter

func NewSliverToBoxAdapter(child Widget, opts ...SliverToBoxAdapterOpts) *SliverToBoxAdapter

NewSliverToBoxAdapter creates a sliver that contains the box widget; the child may be nil.

Flutter: widgets/basic.dart SliverToBoxAdapter.new

func (*SliverToBoxAdapter) CreateRenderObject

func (w *SliverToBoxAdapter) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart SliverToBoxAdapter.createRenderObject

type SliverToBoxAdapterOpts

type SliverToBoxAdapterOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

SliverToBoxAdapterOpts are the optional parameters of NewSliverToBoxAdapter.

Flutter: widgets/basic.dart SliverToBoxAdapter.new

type SliverVariedExtentList

type SliverVariedExtentList struct {
	SliverMultiBoxAdaptorWidget
	// contains filtered or unexported fields
}

SliverVariedExtentList is a sliver that places box children with the extents that a function gives, in a linear array.

Deviation: the sliver keeps the extents the function gives and their running sums, so the function is asked at most once for each row until the widget is rebuilt or the viewport extent, the cross axis extent or the child count change: it must give the same extents until then, and not depend on the scroll offset or the preceding scroll extent of its dimensions. A jump to the end of a long list is cheap, and, when the child count is known and the function gives every extent, the scroll extent is their total (SPEC §11.4, §12.10).

Flutter: widgets/sliver.dart SliverVariedExtentList

func NewSliverVariedExtentList

func NewSliverVariedExtentList(delegate SliverChildDelegate, itemExtentBuilder rendering.ItemExtentBuilder, opts ...SliverListWidgetOpts) *SliverVariedExtentList

NewSliverVariedExtentList creates a sliver list whose children the delegate supplies, and whose children's extents the function gives.

Flutter: widgets/sliver.dart SliverVariedExtentList.new

func NewSliverVariedExtentListBuilder

func NewSliverVariedExtentListBuilder(itemBuilder NullableIndexedWidgetBuilder, itemExtentBuilder rendering.ItemExtentBuilder, opts ...SliverBuilderOpts) *SliverVariedExtentList

NewSliverVariedExtentListBuilder creates a varied extent sliver list whose items are built lazily.

Flutter: widgets/sliver.dart SliverVariedExtentList.builder

func NewSliverVariedExtentListList

func NewSliverVariedExtentListList(itemExtentBuilder rendering.ItemExtentBuilder, children []Widget, opts ...SliverListOpts) *SliverVariedExtentList

NewSliverVariedExtentListList creates a varied extent sliver list of the children.

Flutter: widgets/sliver.dart SliverVariedExtentList.list

func (*SliverVariedExtentList) CreateElement

func (w *SliverVariedExtentList) CreateElement() Element

CreateElement creates the element.

Flutter: widgets/sliver.dart SliverMultiBoxAdaptorWidget.createElement

func (*SliverVariedExtentList) CreateRenderObject

func (w *SliverVariedExtentList) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/sliver.dart SliverVariedExtentList.createRenderObject

func (*SliverVariedExtentList) ItemExtentBuilder

func (w *SliverVariedExtentList) ItemExtentBuilder() rendering.ItemExtentBuilder

ItemExtentBuilder gives the extent of the child at an index.

Flutter: widgets/sliver.dart SliverVariedExtentList.itemExtentBuilder

func (*SliverVariedExtentList) UpdateRenderObject

func (w *SliverVariedExtentList) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject sets the extent builder, which drops the sums of the extents.

Flutter: widgets/sliver.dart SliverVariedExtentList.updateRenderObject

type SlottedMultiChildRenderObjectWidget

type SlottedMultiChildRenderObjectWidget struct{ RenderObjectWidget }

SlottedMultiChildRenderObjectWidget is the base of a render object widget whose children are in slots.

Flutter: widgets/slotted_render_object_widget.dart SlottedMultiChildRenderObjectWidget

func NewSlottedMultiChildRenderObjectWidgetBase

func NewSlottedMultiChildRenderObjectWidgetBase(opts ...WidgetOpts) SlottedMultiChildRenderObjectWidget

NewSlottedMultiChildRenderObjectWidgetBase creates the base of a render object widget with slots.

Flutter: widgets/slotted_render_object_widget.dart SlottedMultiChildRenderObjectWidget.new

type SlottedRenderObjectElement

type SlottedRenderObjectElement struct {
	RenderObjectElement
	// contains filtered or unexported fields
}

SlottedRenderObjectElement is the element of a SlottedMultiChildRenderObjectWidget.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement

func NewSlottedRenderObjectElement

func NewSlottedRenderObjectElement(w SlottedRenderObjectWidget) *SlottedRenderObjectElement

NewSlottedRenderObjectElement creates the element of a render object widget with slots.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement.new

func (*SlottedRenderObjectElement) ForgetChild

func (e *SlottedRenderObjectElement) ForgetChild(child Element)

ForgetChild forgets the child, which went to another parent.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement.forgetChild

func (*SlottedRenderObjectElement) InsertRenderObjectChild

func (e *SlottedRenderObjectElement) InsertRenderObjectChild(child rendering.RenderObject, slot any)

InsertRenderObjectChild puts the child in the slot of the render object.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement.insertRenderObjectChild

func (*SlottedRenderObjectElement) Mount

func (e *SlottedRenderObjectElement) Mount(parent Element, newSlot any)

Mount creates the render object and the children.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement.mount

func (*SlottedRenderObjectElement) MoveRenderObjectChild

func (e *SlottedRenderObjectElement) MoveRenderObjectChild(child rendering.RenderObject, oldSlot, newSlot any)

MoveRenderObjectChild moves the child to another slot of the render object.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement.moveRenderObjectChild

func (*SlottedRenderObjectElement) RemoveRenderObjectChild

func (e *SlottedRenderObjectElement) RemoveRenderObjectChild(child rendering.RenderObject, slot any)

RemoveRenderObjectChild takes the child out of the slot of the render object.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement.removeRenderObjectChild

func (*SlottedRenderObjectElement) Update

func (e *SlottedRenderObjectElement) Update(newWidget Widget)

Update updates the render object and the children.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement.update

func (*SlottedRenderObjectElement) VisitChildren

func (e *SlottedRenderObjectElement) VisitChildren(visitor ElementVisitor)

VisitChildren visits the children.

Flutter: widgets/slotted_render_object_widget.dart SlottedRenderObjectElement.visitChildren

type SlottedRenderObjectWidget

type SlottedRenderObjectWidget interface {

	// Slots are the slots of the widget; they must not change.
	//
	// Flutter: widgets/slotted_render_object_widget.dart SlottedMultiChildRenderObjectWidgetMixin.slots
	Slots() []any
	// ChildForSlot is the widget in the slot, or nil.
	//
	// Flutter: widgets/slotted_render_object_widget.dart SlottedMultiChildRenderObjectWidgetMixin.childForSlot
	ChildForSlot(slot any) Widget
	// contains filtered or unexported methods
}

SlottedRenderObjectWidget is a render object widget whose children are in named slots, such as the parts of an input decorator. Embed SlottedMultiChildRenderObjectWidget and implement Slots, ChildForSlot, CreateRenderObject and UpdateRenderObject; the render object embeds rendering.SlottedContainer and implements SetSlotChild, MoveSlotChild and SlotChildObject.

Flutter: widgets/slotted_render_object_widget.dart SlottedMultiChildRenderObjectWidget

type Spacer

type Spacer struct {
	StatelessWidget
	// contains filtered or unexported fields
}

Spacer creates an adjustable, empty spacer that can be used to tune the spacing between widgets in a Flex container, like Row or Column.

Flutter: widgets/spacer.dart Spacer

func NewSpacer

func NewSpacer(opts ...SpacerOpts) *Spacer

NewSpacer creates a spacer that takes up space proportional to its flex.

Flutter: widgets/spacer.dart Spacer.new

func (*Spacer) Build

func (w *Spacer) Build(BuildContext) Widget

Build builds an Expanded with an empty box.

Flutter: widgets/spacer.dart Spacer.build

func (*Spacer) Flex

func (w *Spacer) Flex() int

Flex is the flex factor of the space.

Flutter: widgets/spacer.dart Spacer.flex

type SpacerOpts

type SpacerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Flex is the flex factor to use in determining how much space to take up;
	// the default is 1. It must be above zero.
	Flex foundation.Opt[int]
}

SpacerOpts are the optional parameters of NewSpacer.

Flutter: widgets/spacer.dart Spacer.new

type SpellCheckConfiguration

type SpellCheckConfiguration struct {
	// contains filtered or unexported fields
}

SpellCheckConfiguration controls how spell check is performed for a text field: the service, the style of the misspelled words and the toolbar with the suggestions. It is immutable.

Deviation: Dart's operator == compares the toolbar builder by identity; Go cannot compare functions, so Equal compares the code that the functions run (SPEC §12.10).

Flutter: widgets/spell_check.dart SpellCheckConfiguration

func NewSpellCheckConfiguration

func NewSpellCheckConfiguration(opts ...SpellCheckConfigurationOpts) *SpellCheckConfiguration

NewSpellCheckConfiguration creates a configuration that enables spell check.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.new

func NewSpellCheckConfigurationDisabled

func NewSpellCheckConfigurationDisabled() *SpellCheckConfiguration

NewSpellCheckConfigurationDisabled creates a configuration that disables spell check.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.disabled

func (*SpellCheckConfiguration) CopyWith

CopyWith returns a copy of the configuration with the given values replaced. A disabled configuration stays disabled: a new configuration has to be made to enable spell check.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.copyWith

func (*SpellCheckConfiguration) Equal

Equal reports whether the configurations are the same: both enabled or both disabled, with the same service, the same misspelled text style and the same toolbar builder. Two nil configurations are the same.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.==

func (*SpellCheckConfiguration) MisspelledSelectionColor

func (c *SpellCheckConfiguration) MisspelledSelectionColor() foundation.Opt[ui.Color]

MisspelledSelectionColor is the color the selection is painted in while the spell check suggestions toolbar is shown.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.misspelledSelectionColor

func (*SpellCheckConfiguration) MisspelledTextStyle

func (c *SpellCheckConfiguration) MisspelledTextStyle() *painting.TextStyle

MisspelledTextStyle is the style that misspelled words are shown in.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.misspelledTextStyle

func (*SpellCheckConfiguration) SpellCheckEnabled

func (c *SpellCheckConfiguration) SpellCheckEnabled() bool

SpellCheckEnabled is whether spell check is enabled: false for the configuration made by NewSpellCheckConfigurationDisabled.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.spellCheckEnabled

func (*SpellCheckConfiguration) SpellCheckService

func (c *SpellCheckConfiguration) SpellCheckService() services.SpellCheckService

SpellCheckService is the service used to fetch the spell check results for the text of the field; nil when the field is to infer it.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.spellCheckService

func (*SpellCheckConfiguration) SpellCheckSuggestionsToolbarBuilder

func (c *SpellCheckConfiguration) SpellCheckSuggestionsToolbarBuilder() EditableTextContextMenuBuilder

SpellCheckSuggestionsToolbarBuilder builds the toolbar with the suggestions for a misspelled word.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.spellCheckSuggestionsToolbarBuilder

func (*SpellCheckConfiguration) String

func (c *SpellCheckConfiguration) String() string

String describes the configuration.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.toString

type SpellCheckConfigurationCopy

type SpellCheckConfigurationCopy struct {
	SpellCheckService                   services.SpellCheckService
	MisspelledSelectionColor            foundation.Opt[ui.Color]
	MisspelledTextStyle                 *painting.TextStyle
	SpellCheckSuggestionsToolbarBuilder EditableTextContextMenuBuilder
}

SpellCheckConfigurationCopy are the values CopyWith replaces: a nil or unset value keeps the one of the configuration.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.copyWith

type SpellCheckConfigurationOpts

type SpellCheckConfigurationOpts struct {
	// SpellCheckService is the service used to fetch the spell check results for
	// the text of the field. If it is nil, the DefaultSpellCheckService is used when
	// the platform has a spell checker (Android), and spell check is disabled
	// otherwise.
	SpellCheckService services.SpellCheckService
	// MisspelledSelectionColor is the color the selection is painted in while the
	// spell check suggestions toolbar is shown; the default is the selection color
	// of the field.
	MisspelledSelectionColor foundation.Opt[ui.Color]
	// MisspelledTextStyle is the style that misspelled words are shown in. The field
	// needs it when spell check is enabled; a TextField gives the Material one
	// (TextFieldMaterialMisspelledTextStyle) when it is nil.
	MisspelledTextStyle *painting.TextStyle
	// SpellCheckSuggestionsToolbarBuilder builds the toolbar with the suggestions
	// for a misspelled word; a TextField gives the Material one
	// (TextFieldDefaultSpellCheckSuggestionsToolbarBuilder) when it is nil.
	SpellCheckSuggestionsToolbarBuilder EditableTextContextMenuBuilder
}

SpellCheckConfigurationOpts are the optional parameters of NewSpellCheckConfiguration.

Flutter: widgets/spell_check.dart SpellCheckConfiguration.new

type Stack

type Stack struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

Stack positions its children relative to the edges of its box.

Flutter: widgets/basic.dart Stack

func NewStack

func NewStack(children []Widget, opts ...StackOpts) *Stack

NewStack creates the widget.

Flutter: widgets/basic.dart Stack.new

func (*Stack) Alignment

func (w *Stack) Alignment() painting.AlignmentGeometry

Alignment is how to align the non-positioned children; the default is AlignmentDirectional.topStart.

Flutter: widgets/basic.dart Stack.alignment

func (*Stack) ClipBehavior

func (w *Stack) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped when it overflows; the default is ClipHardEdge.

Flutter: widgets/basic.dart Stack.clipBehavior

func (*Stack) CreateRenderObject

func (w *Stack) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Stack.createRenderObject

func (*Stack) Fit

func (w *Stack) Fit() rendering.StackFit

Fit is how to size the non-positioned children; the default is StackFitLoose.

Flutter: widgets/basic.dart Stack.fit

func (*Stack) TextDirection

func (w *Stack) TextDirection() ui.TextDirection

TextDirection is the direction used to resolve a directional alignment; the default is the one of the closest Directionality.

Flutter: widgets/basic.dart Stack.textDirection

func (*Stack) UpdateRenderObject

func (w *Stack) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Stack.updateRenderObject

type StackOpts

type StackOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Alignment is how to align the non-positioned children; the default is AlignmentDirectional.topStart.
	Alignment painting.AlignmentGeometry
	// TextDirection is the direction used to resolve a directional alignment; the default is the one of the closest Directionality.
	TextDirection ui.TextDirection
	// Fit is how to size the non-positioned children; the default is StackFitLoose.
	Fit rendering.StackFit
	// ClipBehavior is whether the content is clipped when it overflows; the default is ClipHardEdge.
	ClipBehavior ui.Clip
}

StackOpts are the optional parameters of NewStack.

Flutter: widgets/basic.dart Stack.new

type StandardComponentType

type StandardComponentType int

StandardComponentType identifies a standard user interface component, such as a back button, so that tests and tools can find it by its key.

Flutter: widgets/standard_component_type.dart StandardComponentType

const (
	// StandardComponentTypeUnspecified is the zero value: no standard component.
	//
	// Flutter: no counterpart (the zero value of the Go enum)
	StandardComponentTypeUnspecified StandardComponentType = iota
	// StandardComponentTypeBackButton indicates that the associated widget is a
	// standard back button, typically used to navigate back to the previous
	// screen.
	//
	// Flutter: widgets/standard_component_type.dart StandardComponentType.backButton
	StandardComponentTypeBackButton
	// StandardComponentTypeCloseButton indicates that the associated widget is a
	// close button, typically used to dismiss a dialog or modal sheet.
	//
	// Flutter: widgets/standard_component_type.dart StandardComponentType.closeButton
	StandardComponentTypeCloseButton
	// StandardComponentTypeMoreButton indicates that the associated widget is a
	// "more" button, typically used to display a menu of additional options.
	//
	// Flutter: widgets/standard_component_type.dart StandardComponentType.moreButton
	StandardComponentTypeMoreButton
	// StandardComponentTypeDrawerButton indicates that the associated widget is
	// a drawer button, typically used to open a drawer.
	//
	// Flutter: widgets/standard_component_type.dart StandardComponentType.drawerButton
	StandardComponentTypeDrawerButton
)

func (StandardComponentType) Key

Key returns a ValueKey for this type: attach it to a widget to indicate that it is a standard UI component.

Flutter: widgets/standard_component_type.dart StandardComponentType.key

type State

type State interface {
	// Build describes the part of the user interface represented by the
	// widget.
	//
	// Flutter: widgets/framework.dart State.build
	Build(bc BuildContext) Widget
	// contains filtered or unexported methods
}

State is the logic and internal state for a StatefulWidget. A state type embeds StateOf[W], implements Build, and implements any of the optional lifecycle interfaces it needs:

  • InitState()
  • DidChangeDependencies()
  • DidUpdateWidget(old W)
  • Deactivate()
  • Activate()
  • Dispose()
  • Reassemble()

The framework does its own bookkeeping, so there is nothing like Flutter's super.initState() to call.

Flutter: widgets/framework.dart State

type StateLifecycle

type StateLifecycle int

StateLifecycle is the stage of a State's life, kept for debug checks.

Flutter: widgets/framework.dart _StateLifecycle

const (
	// StateLifecycleCreated is a state that has been created and not yet
	// initialized.
	//
	// Flutter: widgets/framework.dart _StateLifecycle.created
	StateLifecycleCreated StateLifecycle = iota
	// StateLifecycleInitialized is a state whose InitState has run.
	//
	// Flutter: widgets/framework.dart _StateLifecycle.initialized
	StateLifecycleInitialized
	// StateLifecycleReady is a state that is built and in the tree.
	//
	// Flutter: widgets/framework.dart _StateLifecycle.ready
	StateLifecycleReady
	// StateLifecycleDefunct is a state that has been disposed.
	//
	// Flutter: widgets/framework.dart _StateLifecycle.defunct
	StateLifecycleDefunct
)

func (StateLifecycle) Name

func (l StateLifecycle) Name() string

Name is the name of the stage, for diagnostics.

func (StateLifecycle) String

func (l StateLifecycle) String() string

String is the name of the stage ("ready").

type StateOf

type StateOf[W Widget] struct {
	// contains filtered or unexported fields
}

StateOf is the embedded base of a State for the widget type W. It gives the state its widget, its context and SetState.

type counterState struct {
	widgets.StateOf[*Counter]
	count int
}

Flutter: widgets/framework.dart State

func (*StateOf[W]) Context

func (s *StateOf[W]) Context() BuildContext

Context is the location in the tree where this widget builds. It panics with the tag StateContextUnmounted in debug builds once the state is unmounted.

Flutter: widgets/framework.dart State.context

func (*StateOf[W]) DebugFillProperties

func (s *StateOf[W]) DebugFillProperties(properties *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the lifecycle state, the widget and the element.

Flutter: widgets/framework.dart State.debugFillProperties

func (*StateOf[W]) DebugLifecycleState

func (s *StateOf[W]) DebugLifecycleState() StateLifecycle

DebugLifecycleState is the stage of the state's life. Flutter keeps it only in debug builds.

Flutter: widgets/framework.dart State._debugLifecycleState

func (*StateOf[W]) Go

func (s *StateOf[W]) Go(fn func(ctx context.Context))

Go runs fn on a new goroutine with the Lifetime of the state as its context, which is cancelled when the state is disposed. A panic in fn does not crash the program: it is recovered and reported as a CallbackPanicked error through the framework's error reporter, on the UI thread, like the panics in the other callbacks (SPEC §14.2). Call Go on the UI thread, after InitState began; in debug builds calling it before the state is built panics with the tag StateGoBeforeMount. Inside fn, use SetState to touch the UI.

Flutter: no counterpart (SPEC §12.6)

func (*StateOf[W]) Lifetime

func (s *StateOf[W]) Lifetime() context.Context

Lifetime is a context.Context that is cancelled when the state is disposed. Goroutines that outlive a single call should stop when it is done.

Flutter: no counterpart (SPEC §12.6)

func (*StateOf[W]) Mounted

func (s *StateOf[W]) Mounted() bool

Mounted is whether this state is currently in the tree: true from the moment the framework attaches it until Dispose. Check it before SetState after any asynchronous gap.

Flutter: widgets/framework.dart State.mounted

func (*StateOf[W]) SetState

func (s *StateOf[W]) SetState(fn func())

SetState notifies the framework that the internal state of this object has changed in a way that may affect the user interface: it runs fn and marks the element dirty, so that Build runs again.

SetState is safe to call from any goroutine (SPEC §13). On another goroutine it posts fn and the rebuild to the UI thread, where they run in order; if the state has been unmounted by then, both are dropped. Without a Post on the build owner it must be called on the UI thread.

Calling it after Dispose panics with the tag SetStateAfterDispose, and calling it before the state is in the tree panics with SetStateBeforeMount (debug builds).

Flutter: widgets/framework.dart State.setState

func (*StateOf[W]) String

func (s *StateOf[W]) String() string

String describes the state, such as "_CounterState#1a2b3(lifecycle state: created, no widget, not mounted)". A state that is mounted and ready has nothing to add to its short description.

Flutter: foundation/diagnostics.dart Diagnosticable.toString

func (*StateOf[W]) ToStringShort

func (s *StateOf[W]) ToStringShort() string

ToStringShort describes the state by its type and short hash.

func (*StateOf[W]) Widget

func (s *StateOf[W]) Widget() W

Widget is the current configuration of the state. A state is created before its widget is known; the framework sets it before InitState.

Flutter: widgets/framework.dart State.widget

type StateSetter

type StateSetter func(fn func())

StateSetter is the function that StatefulBuilder gives its builder to rebuild the subtree: the function it is given runs, and then the builder runs again.

Flutter: widgets/framework.dart StateSetter

type StatefulBuilder

type StatefulBuilder struct {
	StatefulWidget
	// contains filtered or unexported fields
}

StatefulBuilder is a platonic widget that calls a closure to obtain its child widget, and lets that closure rebuild it with a setState function.

Flutter: widgets/basic.dart StatefulBuilder

func NewStatefulBuilder

func NewStatefulBuilder(builder StatefulBuilderFunc, opts ...WidgetOpts) *StatefulBuilder

NewStatefulBuilder creates a widget that has the state that the builder changes with setState.

Flutter: widgets/basic.dart StatefulBuilder.new

func (*StatefulBuilder) Builder

func (w *StatefulBuilder) Builder() StatefulBuilderFunc

Builder is the function that builds the child.

Flutter: widgets/basic.dart StatefulBuilder.builder

func (*StatefulBuilder) CreateState

func (w *StatefulBuilder) CreateState() State

CreateState creates the state.

Flutter: widgets/basic.dart StatefulBuilder.createState

type StatefulBuilderFunc

type StatefulBuilderFunc func(bc BuildContext, setState StateSetter) Widget

StatefulBuilderFunc is the builder of a StatefulBuilder.

Flutter: widgets/basic.dart StatefulWidgetBuilder

type StatefulElement

type StatefulElement struct {
	ComponentElement
	// contains filtered or unexported fields
}

StatefulElement is the element of a StatefulWidget. It owns the State.

Flutter: widgets/framework.dart StatefulElement

func NewStatefulElement

func NewStatefulElement(w statefulWidget) *StatefulElement

NewStatefulElement creates the element of a widget that has CreateState and the state the widget creates. It panics with the tag CreateStateReturnedNil when CreateState returns nil, with CreateStateWrongType when the state is for another widget type, and with CreateStateReturnedUsedState when the state already belongs to an element.

Flutter: widgets/framework.dart StatefulElement.new

func (*StatefulElement) Activate

func (e *StatefulElement) Activate()

Activate calls the Activate hook of the state and rebuilds, so that the state can allocate the resources that Deactivate released.

Flutter: widgets/framework.dart StatefulElement.activate

func (*StatefulElement) Build

func (e *StatefulElement) Build() Widget

Build calls the Build method of the state.

Flutter: widgets/framework.dart StatefulElement.build

func (*StatefulElement) Deactivate

func (e *StatefulElement) Deactivate()

Deactivate calls the Deactivate hook of the state, and then the ones of its mixins: in Dart a state's deactivate ends with super.deactivate(), which is the mixin's. The order matters to AutomaticKeepAliveClient: a state that disposes its own things (the highlights of an InkResponse) calls UpdateKeepAlive while it still has its handle, so no notification is sent from the deactivated element.

Flutter: widgets/framework.dart StatefulElement.deactivate

func (*StatefulElement) DebugFillProperties

func (e *StatefulElement) DebugFillProperties(properties *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the state.

Flutter: widgets/framework.dart StatefulElement.debugFillProperties

func (*StatefulElement) DependOnInheritedElement

func (e *StatefulElement) DependOnInheritedElement(ancestor InheritedElementSelf, aspect any) Widget

DependOnInheritedElement checks, in debug builds, that InitState has run, then registers the dependency. It panics with the tag DependOnInheritedBeforeInitState. (Flutter also rejects a dependency after dispose; here the element is already defunct then, and the lookup panics with AncestorLookupOnInactiveElement.)

Flutter: widgets/framework.dart StatefulElement.dependOnInheritedElement

func (*StatefulElement) DidChangeDependencies

func (e *StatefulElement) DidChangeDependencies()

DidChangeDependencies marks the element dirty and remembers to tell the state.

Flutter: widgets/framework.dart StatefulElement.didChangeDependencies

func (*StatefulElement) PerformRebuild

func (e *StatefulElement) PerformRebuild()

PerformRebuild calls DidChangeDependencies on the state first if a dependency changed.

Flutter: widgets/framework.dart StatefulElement.performRebuild

func (*StatefulElement) Reassemble

func (e *StatefulElement) Reassemble()

Reassemble calls the Reassemble hook of the state and marks the subtree dirty.

Flutter: widgets/framework.dart StatefulElement.reassemble

func (*StatefulElement) State

func (e *StatefulElement) State() State

State is the state of the widget. It panics with the tag ElementStateUnmounted once the element is unmounted.

Flutter: widgets/framework.dart StatefulElement.state

func (*StatefulElement) Unmount

func (e *StatefulElement) Unmount()

Unmount calls the Dispose hook of the state and cancels its Lifetime.

Flutter: widgets/framework.dart StatefulElement.unmount

func (*StatefulElement) Update

func (e *StatefulElement) Update(newWidget Widget)

Update gives the new widget to the state, calls its DidUpdateWidget hook with the old one, and rebuilds.

Flutter: widgets/framework.dart StatefulElement.update

type StatefulWidget

type StatefulWidget struct{ WidgetBase }

StatefulWidget is a widget that has mutable state. Embed it in a widget type and implement CreateState:

type Counter struct {
	widgets.StatefulWidget
}
func (c *Counter) CreateState() widgets.State { return &counterState{} }

Flutter: widgets/framework.dart StatefulWidget

func NewStatefulWidgetBase

func NewStatefulWidgetBase(opts ...WidgetOpts) StatefulWidget

NewStatefulWidgetBase creates the embedded base of a stateful widget.

Flutter: widgets/framework.dart StatefulWidget.new

type StatelessElement

type StatelessElement struct {
	ComponentElement
}

StatelessElement is the element of a StatelessWidget.

Flutter: widgets/framework.dart StatelessElement

func NewStatelessElement

func NewStatelessElement(w statelessWidget) *StatelessElement

NewStatelessElement creates the element of a widget that has a Build method.

Flutter: widgets/framework.dart StatelessElement.new

func (*StatelessElement) Build

func (e *StatelessElement) Build() Widget

Build calls the Build method of the widget with this element as the context.

Flutter: widgets/framework.dart StatelessElement.build

func (*StatelessElement) Update

func (e *StatelessElement) Update(newWidget Widget)

Update replaces the widget and rebuilds.

Flutter: widgets/framework.dart StatelessElement.update

type StatelessWidget

type StatelessWidget struct{ WidgetBase }

StatelessWidget is a widget that does not require mutable state. Embed it in a widget type and implement Build:

type Greeting struct {
	widgets.StatelessWidget
	name string
}
func (g *Greeting) Build(bc widgets.BuildContext) widgets.Widget { ... }

Flutter: widgets/framework.dart StatelessWidget

func NewStatelessWidgetBase

func NewStatelessWidgetBase(opts ...WidgetOpts) StatelessWidget

NewStatelessWidgetBase creates the embedded base of a stateless widget.

Flutter: widgets/framework.dart StatelessWidget.new

type StaticDelegate

type StaticDelegate interface {
	MultiSelectableDelegate
}

StaticDelegate is what a delegate that embeds StaticSelectionContainerDelegate implements: the MultiSelectableDelegate.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate

type StaticSelectionContainerDelegate

type StaticSelectionContainerDelegate struct {
	MultiSelectableSelectionContainerDelegate
	// contains filtered or unexported fields
}

StaticSelectionContainerDelegate is a delegate that manages updating multiple Selectable children where the Selectables do not change or move around frequently.

This delegate keeps track of the Selectables that received start or end SelectionEvents and the global locations of those events to accurately synthesize SelectionEvents for children Selectables when needed.

When a new SelectionEdgeUpdateEvent is dispatched to a Selectable, this delegate checks whether the Selectable has already received a selection update for each edge that currently exists, and synthesizes an event for the edges that have not yet received an update. This synthesized event is dispatched before dispatching the new event.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate

func NewStaticSelectionContainerDelegate

func NewStaticSelectionContainerDelegate() *StaticSelectionContainerDelegate

NewStaticSelectionContainerDelegate creates the delegate.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.new

func (*StaticSelectionContainerDelegate) ClearInternalSelectionState

func (d *StaticSelectionContainerDelegate) ClearInternalSelectionState()

ClearInternalSelectionState clears the internal selection state: no selectable child under this delegate has received start or end events, and the tracked global locations are reset.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.clearInternalSelectionState

func (*StaticSelectionContainerDelegate) ClearInternalSelectionStateForSelectable

func (d *StaticSelectionContainerDelegate) ClearInternalSelectionStateForSelectable(selectable rendering.Selectable)

ClearInternalSelectionStateForSelectable clears the internal selection state for a given selectable.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.clearInternalSelectionStateForSelectable

func (*StaticSelectionContainerDelegate) DidChangeSelectables

func (d *StaticSelectionContainerDelegate) DidChangeSelectables()

DidChangeSelectables updates the edges for the new set of selectables.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.didChangeSelectables

func (*StaticSelectionContainerDelegate) DidReceiveSelectionBoundaryEvents

func (d *StaticSelectionContainerDelegate) DidReceiveSelectionBoundaryEvents()

DidReceiveSelectionBoundaryEvents updates the internal selection state after a selection event that selects a boundary such as a word, a paragraph or all.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.didReceiveSelectionBoundaryEvents

func (*StaticSelectionContainerDelegate) DidReceiveSelectionEventFor

func (d *StaticSelectionContainerDelegate) DidReceiveSelectionEventFor(selectable rendering.Selectable, forEnd *bool)

DidReceiveSelectionEventFor tracks whether a selection edge update event for a given selectable was received. When forEnd is true, the selectable is registered as having received an end event. When false, the selectable is registered as having received a start event. When forEnd is None, the selectable is registered as having received both. Call it when a selection event is dispatched to a child selectable managed by this delegate.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.didReceiveSelectionEventFor

func (*StaticSelectionContainerDelegate) DispatchSelectionEventToChild

func (d *StaticSelectionContainerDelegate) DispatchSelectionEventToChild(selectable rendering.Selectable, event rendering.SelectionEvent) rendering.SelectionResult

DispatchSelectionEventToChild tracks the events that the child received.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.dispatchSelectionEventToChild

func (*StaticSelectionContainerDelegate) Dispose

func (d *StaticSelectionContainerDelegate) Dispose()

Dispose clears the internal state and releases the resources.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.dispose

func (*StaticSelectionContainerDelegate) EnsureChildUpdated

func (d *StaticSelectionContainerDelegate) EnsureChildUpdated(selectable rendering.Selectable)

EnsureChildUpdated ensures the selectable child has received the most up to date selection events. It is called when a new selectable is added to the delegate, and its screen location falls into the previous selection, and before a start or end edge update, or an extend selection event is dispatched to a child.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.ensureChildUpdated

func (*StaticSelectionContainerDelegate) HandleClearSelection

HandleClearSelection clears the selection and the internal state.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.handleClearSelection

func (*StaticSelectionContainerDelegate) HandleSelectAll

HandleSelectAll selects all and tracks the boundary events.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.handleSelectAll

func (*StaticSelectionContainerDelegate) HandleSelectParagraph

HandleSelectParagraph selects a paragraph and tracks the boundary events.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.handleSelectParagraph

func (*StaticSelectionContainerDelegate) HandleSelectWord

HandleSelectWord selects a word and tracks the boundary events.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.handleSelectWord

func (*StaticSelectionContainerDelegate) HandleSelectionEdgeUpdate

HandleSelectionEdgeUpdate remembers the location of the edge and updates it.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.handleSelectionEdgeUpdate

func (*StaticSelectionContainerDelegate) Remove

Remove removes the selectable and its state.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.remove

func (*StaticSelectionContainerDelegate) UpdateLastSelectionEdgeLocation

func (d *StaticSelectionContainerDelegate) UpdateLastSelectionEdgeLocation(globalSelectionEdgeLocation ui.Offset, forEnd bool)

UpdateLastSelectionEdgeLocation updates the last selection edge location of the edge specified by forEnd to the provided global location.

Flutter: widgets/selectable_region.dart StaticSelectionContainerDelegate.updateLastSelectionEdgeLocation

type StatusBarTapObserver

type StatusBarTapObserver interface {
	// HandleStatusBarTap is called when the user taps the status bar.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.handleStatusBarTap
	HandleStatusBarTap()
}

StatusBarTapObserver is an observer that wants to know when the user taps the status bar (on iOS, the gesture that scrolls a page to its top). A WidgetsBindingObserver that has the method is called by HandleStatusBarTap.

Flutter: widgets/binding.dart WidgetsBindingObserver.handleStatusBarTap

type StreamBuilder

type StreamBuilder[T any] struct {
	StreamBuilderBase[T, AsyncSnapshot[T]]
	// contains filtered or unexported fields
}

StreamBuilder is a widget that builds itself based on the latest snapshot of interaction with a channel.

Flutter: widgets/async.dart StreamBuilder

func NewStreamBuilder

func NewStreamBuilder[T any](stream <-chan T, builder AsyncWidgetBuilder[T], opts ...StreamBuilderOpts[T]) *StreamBuilder[T]

NewStreamBuilder creates a widget that builds with the latest value received from the channel. The channel may be nil. The builder sees the connection state: waiting after the channel is connected, active after each value, done once the channel is closed.

Flutter: widgets/async.dart StreamBuilder.new

func (*StreamBuilder[T]) Builder

func (w *StreamBuilder[T]) Builder() AsyncWidgetBuilder[T]

Builder is the function that builds the widget for a snapshot.

Flutter: widgets/async.dart StreamBuilder.builder

func (*StreamBuilder[T]) InitialData

func (w *StreamBuilder[T]) InitialData() foundation.Opt[T]

InitialData is the data of the initial snapshot, if any.

Flutter: widgets/async.dart StreamBuilder.initialData

type StreamBuilderBase

type StreamBuilderBase[T, S any] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

StreamBuilderBase is a widget that builds itself based on the latest snapshot of interaction with a stream, in a summary of type S.

Deviation: a Go channel carries no errors, so there is no afterError (SPEC §12.10).

Flutter: widgets/async.dart StreamBuilderBase

func NewStreamBuilderBase

func NewStreamBuilderBase[T, S any](stream <-chan T, initial func() S, afterData func(current S, data T) S,
	build func(bc BuildContext, summary S) Widget, opts ...StreamBuilderBaseOpts[T, S]) *StreamBuilderBase[T, S]

NewStreamBuilderBase creates a widget that keeps a summary of the values of the stream: initial makes the first one, afterData folds each value into it, and build builds the widget for it. The stream may be nil.

Flutter: widgets/async.dart StreamBuilderBase.new

func (*StreamBuilderBase[T, S]) CreateState

func (w *StreamBuilderBase[T, S]) CreateState() State

CreateState creates the state.

Flutter: widgets/async.dart StreamBuilderBase.createState

func (*StreamBuilderBase[T, S]) Stream

func (w *StreamBuilderBase[T, S]) Stream() <-chan T

Stream is the channel to listen to; nil for none.

Flutter: widgets/async.dart StreamBuilderBase.stream

type StreamBuilderBaseOpts

type StreamBuilderBaseOpts[T, S any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AfterConnected transforms the summary when the stream is connected; the
	// default keeps it.
	AfterConnected func(current S) S
	// AfterDone transforms the summary when the stream is closed; the default
	// keeps it.
	AfterDone func(current S) S
	// AfterDisconnected transforms the summary when the widget stops listening to
	// the stream; the default keeps it.
	AfterDisconnected func(current S) S
}

StreamBuilderBaseOpts are the optional parameters of NewStreamBuilderBase.

Flutter: widgets/async.dart StreamBuilderBase.new

type StreamBuilderOpts

type StreamBuilderOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// InitialData is the data that will be used to create the initial snapshot.
	InitialData foundation.Opt[T]
}

StreamBuilderOpts are the optional parameters of NewStreamBuilder.

Flutter: widgets/async.dart StreamBuilder.new

type StretchEffect

type StretchEffect struct {
	StatelessWidget
	// contains filtered or unexported fields
}

StretchEffect is a widget that applies a stretching visual effect to its child, when the user overscrolls horizontally or vertically.

Flutter replicates the native Android stretch overscroll effect with a fragment shader when the engine supports shader image filters, and approximates it with a matrix transform otherwise. StretchingOverscrollIndicator uses it.

Deviation: ui has no shader image filters (custom fragment shaders are a non-goal, SPEC §2), so the effect is always the matrix transform of Flutter's fallback (SPEC §12.10).

Flutter: widgets/stretch_effect.dart StretchEffect

func NewStretchEffect

func NewStretchEffect(axis painting.Axis, child Widget, opts ...StretchEffectOpts) *StretchEffect

NewStretchEffect creates a widget that applies a stretch effect along the axis. In debug builds it panics with the tag StretchEffectStrengthInvalid when the strength is not between -1.0 and 1.0.

Flutter: widgets/stretch_effect.dart StretchEffect.new

func (*StretchEffect) Axis

func (w *StretchEffect) Axis() painting.Axis

Axis is the axis along which the stretching overscroll effect is applied.

Flutter: widgets/stretch_effect.dart StretchEffect.axis

func (*StretchEffect) Build

func (w *StretchEffect) Build(bc BuildContext) Widget

Build scales the child along the axis around the edge it is pulled from.

Flutter: widgets/stretch_effect.dart StretchEffect.build

func (*StretchEffect) Child

func (w *StretchEffect) Child() Widget

Child is the child widget that the stretching overscroll effect applies to.

Flutter: widgets/stretch_effect.dart StretchEffect.child

func (*StretchEffect) StretchStrength

func (w *StretchEffect) StretchStrength() float64

StretchStrength is the overscroll strength applied for the stretching effect, between -1.0 and 1.0.

Flutter: widgets/stretch_effect.dart StretchEffect.stretchStrength

type StretchEffectOpts

type StretchEffectOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// StretchStrength is the overscroll strength applied for the stretching
	// effect, between -1.0 and 1.0 inclusive; the default is 0. For the
	// horizontal axis, positive values apply a pull/stretch from left to right,
	// where 1.0 is the maximum stretch to the right, and negative values from
	// right to left. For the vertical axis, positive values apply a pull/stretch
	// from top to bottom, where 1.0 is the maximum stretch downward, and
	// negative values from bottom to top.
	StretchStrength float64
}

StretchEffectOpts are the optional parameters of NewStretchEffect.

Flutter: widgets/stretch_effect.dart StretchEffect.new

type StretchingOverscrollIndicator

type StretchingOverscrollIndicator struct {
	StatefulWidget
	// contains filtered or unexported fields
}

StretchingOverscrollIndicator is a Material Design visual indication that a scroll view has overscrolled.

It listens for ScrollNotifications in order to stretch the content of the Scrollable. These notifications are typically generated by a ScrollView, such as a ListView or a GridView.

When triggered, it dispatches an OverscrollIndicatorNotification before showing an overscroll indication. To prevent the indicator from showing the indication, call OverscrollIndicatorNotification.DisallowIndicator on the notification.

MaterialScrollBehavior.BuildOverscrollIndicator creates it on the platforms (Android) that commonly use this type of overscroll indication when ThemeData.UseMaterial3 is true. Otherwise, when UseMaterial3 is false, a GlowingOverscrollIndicator is used instead.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator

func NewStretchingOverscrollIndicator

func NewStretchingOverscrollIndicator(axisDirection painting.AxisDirection, child Widget, opts ...StretchingOverscrollIndicatorOpts) *StretchingOverscrollIndicator

NewStretchingOverscrollIndicator creates a visual indication that a scroll view has overscrolled by applying a stretch transformation to the content. In order for the widget to display an overscroll indication, the child must contain a widget that generates a ScrollNotification, such as a ListView or a GridView. The child may be nil.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator.new

func (*StretchingOverscrollIndicator) Axis

Axis is the axis along which scrolling occurs in the Scrollable whose overscrolls are to be visualized.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator.axis

func (*StretchingOverscrollIndicator) AxisDirection

AxisDirection is the direction of positive scroll offsets in the Scrollable whose overscrolls are to be visualized.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator.axisDirection

func (*StretchingOverscrollIndicator) Child

Child is the widget below this widget in the tree. The overscroll indicator applies a stretch effect to it. It may be nil.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator.child

func (*StretchingOverscrollIndicator) ClipBehavior

func (w *StretchingOverscrollIndicator) ClipBehavior() ui.Clip

ClipBehavior is whether the stretched content is clipped, and how; the default is ClipHardEdge.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator.clipBehavior

func (*StretchingOverscrollIndicator) CreateState

func (w *StretchingOverscrollIndicator) CreateState() State

CreateState creates the state.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator.createState

func (*StretchingOverscrollIndicator) NotificationPredicate

NotificationPredicate is the check that specifies whether a ScrollNotification should be handled by this widget.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator.notificationPredicate

type StretchingOverscrollIndicatorOpts

type StretchingOverscrollIndicatorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// NotificationPredicate is a check that specifies whether a
	// ScrollNotification should be handled by this widget; the default is
	// DefaultScrollNotificationPredicate (the depth is 0).
	NotificationPredicate ScrollNotificationPredicate
	// ClipBehavior is whether the stretched content is clipped, and how; the
	// default is ClipHardEdge.
	ClipBehavior ui.Clip
}

StretchingOverscrollIndicatorOpts are the optional parameters of NewStretchingOverscrollIndicator.

Flutter: widgets/overscroll_indicator.dart StretchingOverscrollIndicator.new

type SystemTextScaler

type SystemTextScaler struct {
	// contains filtered or unexported fields
}

SystemTextScaler is a TextScaler that reflects the user's font scale preferences from the platform's accessibility settings. Its Scale asks the platform dispatcher, which converts the size the way the platform does (not linearly on Android 14 and later). A MediaQueryData made from a view has one.

Flutter: widgets/media_query.dart SystemTextScaler

func (SystemTextScaler) Clamp

Clamp returns a scaler that limits the factor of this one.

Flutter: painting/text_scaler.dart TextScaler.clamp

func (SystemTextScaler) EqualTextScaler

func (s SystemTextScaler) EqualTextScaler(other painting.TextScaler) bool

EqualTextScaler is the == of Flutter's SystemTextScaler, which painting.TextScalerEqual calls. The system's text scale factor is used for the check because the output of Scale increases monotonically with it. When the factor is 1, the scaler is equal to no scaling, since the two are extensionally equivalent.

Flutter: widgets/media_query.dart SystemTextScaler.==

func (SystemTextScaler) Scale

func (s SystemTextScaler) Scale(fontSize float64) float64

Scale returns the font size scaled by the platform.

Flutter: widgets/media_query.dart SystemTextScaler.scale

func (SystemTextScaler) String

func (s SystemTextScaler) String() string

String describes the scaler.

Flutter: widgets/media_query.dart SystemTextScaler.toString

func (SystemTextScaler) TextScaleFactor

func (s SystemTextScaler) TextScaleFactor() float64

TextScaleFactor is a value that represents the current user preference for the scaling factor for fonts. It is used to compare SystemTextScalers: two with the same factor are equal as their Scale produces the same output for the same input. It should not be used in arithmetic.

Flutter: widgets/media_query.dart SystemTextScaler.textScaleFactor

type Table

type Table struct {
	RenderObjectWidget
	// contains filtered or unexported fields
}

Table implements the table layout algorithm: a grid of widgets, with rows of the same number of cells.

Flutter: widgets/table.dart Table

func NewTable

func NewTable(children []TableRow, opts ...TableOpts) *Table

NewTable creates a table. In debug builds it panics with the tags TableBaselineMissing (the baseline alignment without a baseline), TableRowKeysDuplicate, TableRowsIrregular, TableRowEmpty and ChildrenHaveDuplicateKeys (for the cells).

Flutter: widgets/table.dart Table.new

func (*Table) Border

func (w *Table) Border() *rendering.TableBorder

Border is the style of the boundary and the divisions of the table.

Flutter: widgets/table.dart Table.border

func (*Table) Children

func (w *Table) Children() []TableRow

Children are the rows of the table.

Flutter: widgets/table.dart Table.children

func (*Table) ColumnWidths

func (w *Table) ColumnWidths() map[int]rendering.TableColumnWidth

ColumnWidths are the widths of the columns that have their own.

Flutter: widgets/table.dart Table.columnWidths

func (*Table) CreateElement

func (w *Table) CreateElement() Element

CreateElement creates the element, which keeps the cells in rows.

Flutter: widgets/table.dart Table.createElement

func (*Table) CreateRenderObject

func (w *Table) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/table.dart Table.createRenderObject

func (*Table) DefaultColumnWidth

func (w *Table) DefaultColumnWidth() rendering.TableColumnWidth

DefaultColumnWidth is the width of the columns that have no entry in ColumnWidths.

Flutter: widgets/table.dart Table.defaultColumnWidth

func (*Table) DefaultVerticalAlignment

func (w *Table) DefaultVerticalAlignment() rendering.TableCellVerticalAlignment

DefaultVerticalAlignment is how the cells are aligned vertically by default.

Flutter: widgets/table.dart Table.defaultVerticalAlignment

func (*Table) TextBaseline

func (w *Table) TextBaseline() ui.TextBaseline

TextBaseline is the baseline used when the vertical alignment is baseline.

Flutter: widgets/table.dart Table.textBaseline

func (*Table) TextDirection

func (w *Table) TextDirection() ui.TextDirection

TextDirection is the direction in which the columns are laid out.

Flutter: widgets/table.dart Table.textDirection

func (*Table) UpdateRenderObject

func (w *Table) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/table.dart Table.updateRenderObject

type TableCell

type TableCell struct {
	StatelessWidget
	// contains filtered or unexported fields
}

TableCell controls how a cell of a Table is aligned vertically.

Flutter: widgets/table.dart TableCell

func NewTableCell

func NewTableCell(child Widget, opts ...TableCellOpts) *TableCell

NewTableCell creates a cell of a table.

Flutter: widgets/table.dart TableCell.new

func (*TableCell) Build

func (w *TableCell) Build(BuildContext) Widget

Build builds the parent data widget around the child.

Flutter: widgets/table.dart TableCell.build

func (*TableCell) Child

func (w *TableCell) Child() Widget

Child is the widget in the cell.

Flutter: widgets/table.dart TableCell.child

func (*TableCell) VerticalAlignment

func (w *TableCell) VerticalAlignment() rendering.TableCellVerticalAlignment

VerticalAlignment is how this cell is aligned vertically.

Flutter: widgets/table.dart TableCell.verticalAlignment

type TableCellOpts

type TableCellOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// VerticalAlignment is how this cell is aligned vertically; unspecified uses
	// the default of the table.
	VerticalAlignment rendering.TableCellVerticalAlignment
}

TableCellOpts are the optional parameters of NewTableCell.

Flutter: widgets/table.dart TableCell.new

type TableOpts

type TableOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ColumnWidths says how wide the columns are, by index; the other columns use
	// DefaultColumnWidth.
	ColumnWidths map[int]rendering.TableColumnWidth
	// DefaultColumnWidth is how wide a column is when ColumnWidths has nothing for
	// it; the default is FlexColumnWidth.
	DefaultColumnWidth rendering.TableColumnWidth
	// TextDirection is the direction in which the columns are laid out; the
	// default is the one of the closest Directionality.
	TextDirection ui.TextDirection
	// Border is the style to use when painting the boundary and interior divisions
	// of the table.
	Border *rendering.TableBorder
	// DefaultVerticalAlignment is how the cells are aligned vertically by default;
	// the default is TableCellVerticalAlignmentTop.
	DefaultVerticalAlignment rendering.TableCellVerticalAlignment
	// TextBaseline is the baseline to use when the vertical alignment is baseline.
	TextBaseline ui.TextBaseline
}

TableOpts are the optional parameters of NewTable.

Flutter: widgets/table.dart Table.new

type TableRow

type TableRow struct {
	// Key is the key of the row, which lets the table keep the cells of a row
	// when the rows are reordered.
	Key foundation.Key
	// Decoration is the decoration to paint behind the row.
	Decoration painting.Decoration
	// Children are the widgets that fill the cells of the row.
	Children []Widget
}

TableRow defines the configuration of a row in a Table: an optional key, an optional decoration and the cells.

Flutter: widgets/table.dart TableRow

func NewTableRow

func NewTableRow(children []Widget, opts ...TableRowOpts) TableRow

NewTableRow creates a row from the cells.

Flutter: widgets/table.dart TableRow.new

func (TableRow) String

func (r TableRow) String() string

String describes the row.

Flutter: widgets/table.dart TableRow.toString

type TableRowOpts

type TableRowOpts struct {
	// Key is the key of the row.
	Key foundation.Key
	// Decoration is the decoration to paint behind the row.
	Decoration painting.Decoration
}

TableRowOpts are the optional parameters of NewTableRow.

Flutter: widgets/table.dart TableRow.new

type TapRegion

type TapRegion struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

TapRegion is a widget that tells its callbacks when a pointer goes down or up inside or outside of it, and of the regions of its group.

Flutter: widgets/tap_region.dart TapRegion

func NewTapRegion

func NewTapRegion(child Widget, opts ...TapRegionOpts) *TapRegion

NewTapRegion creates the widget.

Flutter: widgets/tap_region.dart TapRegion.new

func NewTextFieldTapRegion

func NewTextFieldTapRegion(child Widget, opts ...TextFieldTapRegionOpts) *TapRegion

NewTextFieldTapRegion creates a TapRegion that belongs to the group of the text fields, so that a tap on a text field's toolbar is not a tap outside of the field.

Flutter: widgets/tap_region.dart TextFieldTapRegion.new

func (*TapRegion) CreateRenderObject

func (w *TapRegion) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the region.

Flutter: widgets/tap_region.dart TapRegion.createRenderObject

func (*TapRegion) DebugFillProperties

func (w *TapRegion) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the region.

Flutter: widgets/tap_region.dart TapRegion.debugFillProperties

func (*TapRegion) Enabled

func (w *TapRegion) Enabled() bool

Enabled is whether the region registers with the surface.

Flutter: widgets/tap_region.dart TapRegion.enabled

func (*TapRegion) GroupID

func (w *TapRegion) GroupID() any

GroupID is the group of the region.

Flutter: widgets/tap_region.dart TapRegion.groupId

func (*TapRegion) UpdateRenderObject

func (w *TapRegion) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the region.

Flutter: widgets/tap_region.dart TapRegion.updateRenderObject

type TapRegionCallback

type TapRegionCallback func(event *gestures.PointerDownEvent)

TapRegionCallback is the type of the callbacks of a TapRegion for a pointer that goes down.

Flutter: widgets/tap_region.dart TapRegionCallback

type TapRegionOpts

type TapRegionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Disabled turns the region off: it doesn't register with the surface
	// (Flutter's enabled is true by default).
	Disabled bool
	// Behavior is how the region behaves during hit testing; the default is
	// HitTestBehaviorDeferToChild.
	Behavior rendering.HitTestBehavior
	// OnTapOutside is called when a pointer goes down outside the region.
	OnTapOutside TapRegionCallback
	// OnTapInside is called when a pointer goes down inside the region.
	OnTapInside TapRegionCallback
	// OnTapUpOutside is called when a pointer goes up outside the region.
	OnTapUpOutside TapRegionUpCallback
	// OnTapUpInside is called when a pointer goes up inside the region.
	OnTapUpInside TapRegionUpCallback
	// GroupID makes the regions with the same ID one: a tap inside any of them is
	// inside all of them.
	GroupID any
	// ConsumeOutsideTaps stops the pointer outside the region from doing
	// anything else, such as a tap on a button.
	ConsumeOutsideTaps bool
	// DebugLabel names the region in debug output.
	DebugLabel string
}

TapRegionOpts are the optional parameters of NewTapRegion.

Flutter: widgets/tap_region.dart TapRegion.new

type TapRegionRegistry

type TapRegionRegistry interface {
	// RegisterTapRegion adds a region to the registry.
	//
	// Flutter: widgets/tap_region.dart TapRegionRegistry.registerTapRegion
	RegisterTapRegion(region *RenderTapRegion)
	// UnregisterTapRegion removes a region from the registry.
	//
	// Flutter: widgets/tap_region.dart TapRegionRegistry.unregisterTapRegion
	UnregisterTapRegion(region *RenderTapRegion)
}

TapRegionRegistry is the interface of the object that tracks the TapRegions: the RenderTapRegionSurface.

Flutter: widgets/tap_region.dart TapRegionRegistry

func TapRegionRegistryMaybeOf

func TapRegionRegistryMaybeOf(bc BuildContext) TapRegionRegistry

TapRegionRegistryMaybeOf is the registry of the nearest TapRegionSurface above the context, or nil.

Flutter: widgets/tap_region.dart TapRegionRegistry.maybeOf

func TapRegionRegistryOf

func TapRegionRegistryOf(bc BuildContext) TapRegionRegistry

TapRegionRegistryOf is the registry of the nearest TapRegionSurface above the context. It panics with the tag TapRegionRegistryMissing in debug builds when there is none.

Flutter: widgets/tap_region.dart TapRegionRegistry.of

type TapRegionSurface

type TapRegionSurface struct {
	SingleChildRenderObjectWidget
}

TapRegionSurface is the widget that tracks the pointer events for the TapRegions below it, and tells them whether the pointer went down or up inside or outside of them. A WidgetsApp has one.

Flutter: widgets/tap_region.dart TapRegionSurface

func NewTapRegionSurface

func NewTapRegionSurface(child Widget, opts ...WidgetOpts) *TapRegionSurface

NewTapRegionSurface creates the widget.

Flutter: widgets/tap_region.dart TapRegionSurface.new

func (*TapRegionSurface) CreateRenderObject

func (w *TapRegionSurface) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the surface.

Flutter: widgets/tap_region.dart TapRegionSurface.createRenderObject

type TapRegionUpCallback

type TapRegionUpCallback func(event *gestures.PointerUpEvent)

TapRegionUpCallback is the type of the callbacks of a TapRegion for a pointer that goes up.

Flutter: widgets/tap_region.dart TapRegionUpCallback

type Text

type Text struct {
	StatelessWidget
	// contains filtered or unexported fields
}

Text displays a string of text with a single style.

Deviation: the MediaQuery text spacing overrides (line height, letter and word spacing) are not applied (SPEC §12.10).

Flutter: widgets/text.dart Text

func NewText

func NewText(data string, opts ...TextOpts) *Text

NewText creates a text widget showing the string.

Flutter: widgets/text.dart Text.new

func NewTextRich

func NewTextRich(textSpan painting.InlineSpan, opts ...TextOpts) *Text

NewTextRich creates a text widget showing the span, which can have several styles.

Flutter: widgets/text.dart Text.rich

func (*Text) Build

func (w *Text) Build(bc BuildContext) Widget

Build makes the RichText with the default text style merged in.

Flutter: widgets/text.dart Text.build

func (*Text) Data

func (w *Text) Data() foundation.Opt[string]

Data is the text to display, if the widget was made by NewText.

Flutter: widgets/text.dart Text.data

func (*Text) PlainText

func (w *Text) PlainText() string

PlainText is the text of the widget without styles.

Flutter: no counterpart (used by finders)

func (*Text) Style

func (w *Text) Style() *painting.TextStyle

Style is the style to use for the text.

Flutter: widgets/text.dart Text.style

func (*Text) TextSpan

func (w *Text) TextSpan() painting.InlineSpan

TextSpan is the span to display, if the widget was made by NewTextRich.

Flutter: widgets/text.dart Text.textSpan

type TextEditingController

type TextEditingController struct {
	foundation.ValueNotifier[services.TextEditingValue]
	// contains filtered or unexported fields
}

TextEditingController is a controller for an editable text field: it holds the text, the selection and the composing range, and notifies its listeners when they change.

Deviation: Dart subclasses override buildTextSpan; here SetBuildTextSpan installs the function that does (SPEC §12.10).

Flutter: widgets/editable_text.dart TextEditingController

func NewTextEditingController

func NewTextEditingController(text ...string) *TextEditingController

NewTextEditingController creates a controller with no selection that holds the text, which may be empty.

Flutter: widgets/editable_text.dart TextEditingController.new

func NewTextEditingControllerFromValue

func NewTextEditingControllerFromValue(value services.TextEditingValue) *TextEditingController

NewTextEditingControllerFromValue creates a controller with the value. In debug builds it panics with the tag TextEditingControllerComposingInvalid when the value has a composing range that is not valid for its text.

Flutter: widgets/editable_text.dart TextEditingController.fromValue

func (*TextEditingController) BuildTextSpan

func (c *TextEditingController) BuildTextSpan(bc BuildContext, style *painting.TextStyle, withComposing bool) *painting.TextSpan

BuildTextSpan builds the span that the field shows for the text. The default underlines the composing range when withComposing is set.

Flutter: widgets/editable_text.dart TextEditingController.buildTextSpan

func (*TextEditingController) Clear

func (c *TextEditingController) Clear()

Clear sets the value to an empty text with the caret at the start.

Flutter: widgets/editable_text.dart TextEditingController.clear

func (*TextEditingController) ClearComposing

func (c *TextEditingController) ClearComposing()

ClearComposing removes the composing range.

Flutter: widgets/editable_text.dart TextEditingController.clearComposing

func (*TextEditingController) Selection

Selection is the currently selected range of Text.

Flutter: widgets/editable_text.dart TextEditingController.selection

func (*TextEditingController) SetBuildTextSpan

func (c *TextEditingController) SetBuildTextSpan(f BuildTextSpanFunc)

SetBuildTextSpan installs the function that builds the text span, in place of the default (which underlines the composing range); nil restores the default.

func (*TextEditingController) SetSelection

func (c *TextEditingController) SetSelection(newSelection services.TextSelection)

SetSelection sets the selection. It panics with the tag TextEditingControllerSelectionInvalid when the selection is outside the text. The composing range is kept only if the selection is inside it.

Flutter: widgets/editable_text.dart TextEditingController.selection=

func (*TextEditingController) SetText

func (c *TextEditingController) SetText(newText string)

SetText replaces the text and clears the selection and the composing range.

Flutter: widgets/editable_text.dart TextEditingController.text=

func (*TextEditingController) SetValue

func (c *TextEditingController) SetValue(newValue services.TextEditingValue)

SetValue replaces the value; the composing range of it must be valid for its text (the tag TextEditingControllerComposingInvalid in debug builds).

Flutter: widgets/editable_text.dart TextEditingController.value=

func (*TextEditingController) Text

func (c *TextEditingController) Text() string

Text is the current text.

Flutter: widgets/editable_text.dart TextEditingController.text

type TextFieldTapRegionGroupID

type TextFieldTapRegionGroupID struct{}

TextFieldTapRegionGroupID is the group ID of the tap regions of text fields (Flutter's EditableText type): a tap in any of them doesn't unfocus the others' field, such as the toolbar's buttons.

Flutter: widgets/tap_region.dart TextFieldTapRegion.groupId

type TextFieldTapRegionOpts

type TextFieldTapRegionOpts struct {
	TapRegionOpts
	// NoGroupID leaves the region out of the group of the text fields; the
	// default group is TextFieldTapRegionGroupID.
	NoGroupID bool
}

TextFieldTapRegionOpts are the optional parameters of NewTextFieldTapRegion.

Flutter: widgets/tap_region.dart TextFieldTapRegion.new

type TextMagnifierConfiguration

type TextMagnifierConfiguration struct {
	// contains filtered or unexported fields
}

TextMagnifierConfiguration is a configuration object for a magnifier (e.g. in a text field).

In general, most features of the magnifier can be configured by controlling the widgets built by the magnifier builder.

A configuration is compared by identity (Dart has no == for it): the same *TextMagnifierConfiguration is the same configuration.

Flutter: widgets/magnifier.dart TextMagnifierConfiguration

func NewTextMagnifierConfiguration

func NewTextMagnifierConfiguration(opts ...TextMagnifierConfigurationOpts) *TextMagnifierConfiguration

NewTextMagnifierConfiguration constructs a TextMagnifierConfiguration from parts.

If the magnifier builder is nil, a default MagnifierBuilder will be used that does not build a magnifier.

Flutter: widgets/magnifier.dart TextMagnifierConfiguration.new

func (*TextMagnifierConfiguration) MagnifierBuilder

func (c *TextMagnifierConfiguration) MagnifierBuilder() MagnifierBuilder

MagnifierBuilder is the builder callback that creates the widget that renders the magnifier: the default one builds nothing.

Flutter: widgets/magnifier.dart TextMagnifierConfiguration.magnifierBuilder

func (*TextMagnifierConfiguration) ShouldDisplayHandlesInMagnifier

func (c *TextMagnifierConfiguration) ShouldDisplayHandlesInMagnifier() bool

ShouldDisplayHandlesInMagnifier is whether a magnifier should show the text editing handles or not.

This flag is used by SelectionOverlay.ShowMagnifier to control the order of layers in the rendering; specifically, whether to place the layer containing the handles above or below the layer containing the magnifier in the Overlay.

Flutter: widgets/magnifier.dart TextMagnifierConfiguration.shouldDisplayHandlesInMagnifier

type TextMagnifierConfigurationOpts

type TextMagnifierConfigurationOpts struct {
	// MagnifierBuilder is the builder callback that creates the widget that
	// renders the magnifier. When it is nil, a default builder that does not
	// build a magnifier is used.
	MagnifierBuilder MagnifierBuilder
	// HideHandlesInMagnifier stops a magnifier from showing the text editing
	// handles (Flutter's shouldDisplayHandlesInMagnifier is true by default).
	HideHandlesInMagnifier bool
}

TextMagnifierConfigurationOpts are the optional parameters of NewTextMagnifierConfiguration.

Flutter: widgets/magnifier.dart TextMagnifierConfiguration.new

type TextOpts

type TextOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Style is the style to use; when its Inherit is true, it is merged into the
	// default text style.
	Style *painting.TextStyle
	// StrutStyle is the strut style to use.
	StrutStyle *painting.StrutStyle
	// TextAlign is how the text is aligned horizontally; unspecified means the
	// default text style's, or start.
	TextAlign ui.TextAlign
	// TextDirection is the direction of the text; the default is the one of the
	// closest Directionality.
	TextDirection ui.TextDirection
	// Locale is the locale used to select region specific glyphs.
	Locale foundation.Opt[ui.Locale]
	// SoftWrap is whether the text wraps at the box width; the default comes
	// from the default text style.
	SoftWrap foundation.Opt[bool]
	// Overflow is how visual overflow is handled.
	Overflow painting.TextOverflow
	// TextScaler is how the font size is scaled; the default is the one of the
	// MediaQuery.
	TextScaler painting.TextScaler
	// MaxLines is the maximum number of lines.
	MaxLines foundation.Opt[int]
	// SemanticsLabel replaces the text in the semantics tree.
	SemanticsLabel foundation.Opt[string]
	// SemanticsIdentifier is the identifier of the semantics node.
	SemanticsIdentifier foundation.Opt[string]
	// TextWidthBasis is how the width of the text is measured.
	TextWidthBasis painting.TextWidthBasis
	// TextHeightBehavior says how the line height applies to the first ascent
	// and the last descent.
	TextHeightBehavior *ui.TextHeightBehavior
	// SelectionColor is the color of the selection highlight.
	SelectionColor foundation.Opt[ui.Color]
}

TextOpts are the optional parameters of NewText and NewTextRich.

Flutter: widgets/text.dart Text.new

type TextSelectionControls

type TextSelectionControls interface {
	// BuildHandle builds a selection handle of the given type. The handle
	// should call onTap, if given, when it is tapped.
	//
	// Flutter: widgets/text_selection.dart TextSelectionControls.buildHandle
	BuildHandle(bc BuildContext, handleType rendering.TextSelectionHandleType, textLineHeight float64, onTap foundation.VoidCallback) Widget
	// GetHandleAnchor gets the position of the text selection handles' anchor
	// relative to the handle's top left corner.
	//
	// Flutter: widgets/text_selection.dart TextSelectionControls.getHandleAnchor
	GetHandleAnchor(handleType rendering.TextSelectionHandleType, textLineHeight float64) ui.Offset
	// GetHandleSize gets the size of a selection handle given the line height.
	//
	// Flutter: widgets/text_selection.dart TextSelectionControls.getHandleSize
	GetHandleSize(textLineHeight float64) ui.Size
}

TextSelectionControls is the interface that builds the selection handles of a text field.

Deviation: Flutter's class also builds a toolbar (buildToolbar) and tests whether a selection can be cut, copied, pasted or all selected (canCut ...), which are deprecated in favor of the context menu builder; they are not ported, so every text selection controls is Flutter's TextSelectionHandleControls (SPEC §12.10).

Flutter: widgets/text_selection.dart TextSelectionControls

type TextSelectionGestureDetector

type TextSelectionGestureDetector struct {
	StatefulWidget
	// contains filtered or unexported fields
}

TextSelectionGestureDetector is a gesture detector for the selection of a text field: taps, double and triple taps, drags and long presses. The consecutive taps are counted by the platform's rules.

Flutter: widgets/text_selection.dart TextSelectionGestureDetector

func NewTextSelectionGestureDetector

func NewTextSelectionGestureDetector(child Widget, opts ...TextSelectionGestureDetectorOpts) *TextSelectionGestureDetector

NewTextSelectionGestureDetector creates the widget.

Flutter: widgets/text_selection.dart TextSelectionGestureDetector.new

func (*TextSelectionGestureDetector) CreateState

func (w *TextSelectionGestureDetector) CreateState() State

CreateState creates the state.

Flutter: widgets/text_selection.dart TextSelectionGestureDetector.createState

type TextSelectionGestureDetectorBuildOpts

type TextSelectionGestureDetectorBuildOpts struct {
	// Key is the key of the detector.
	Key foundation.Key
	// Behavior is how the detector behaves during hit testing.
	Behavior rendering.HitTestBehavior
}

TextSelectionGestureDetectorBuildOpts are the optional parameters of BuildGestureDetector.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.buildGestureDetector

type TextSelectionGestureDetectorBuilder

type TextSelectionGestureDetectorBuilder struct {
	// contains filtered or unexported fields
}

TextSelectionGestureDetectorBuilder builds the gesture detector of a text field: a tap puts the caret, a double tap selects a word, a triple tap selects a line (a paragraph on some platforms), a drag selects a range, and a long press selects a word. Embed it in the builder of a text field and call InitTextSelectionGestureDetectorBuilder.

Deviation: the floating cursor, the stylus handwriting, the force press and the spell check toolbar of the mobile platforms are not ported (SPEC §12.10).

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder

func NewTextSelectionGestureDetectorBuilder

func NewTextSelectionGestureDetectorBuilder(delegate TextSelectionGestureDetectorBuilderDelegate) *TextSelectionGestureDetectorBuilder

NewTextSelectionGestureDetectorBuilder creates a builder with the default behavior.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.new

func (*TextSelectionGestureDetectorBuilder) BuildGestureDetector

BuildGestureDetector builds the detector for the text field's child.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.buildGestureDetector

func (*TextSelectionGestureDetectorBuilder) EditableText

EditableText is the state of the EditableText.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.editableText

func (*TextSelectionGestureDetectorBuilder) OnDoubleTapDown

OnDoubleTapDown handles the second tap of a double tap, which selects a word.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onDoubleTapDown

func (*TextSelectionGestureDetectorBuilder) OnDragSelectionEnd

func (b *TextSelectionGestureDetectorBuilder) OnDragSelectionEnd(details gestures.TapDragEndDetails)

OnDragSelectionEnd handles the end of a drag that selects.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onDragSelectionEnd

func (*TextSelectionGestureDetectorBuilder) OnDragSelectionStart

func (b *TextSelectionGestureDetectorBuilder) OnDragSelectionStart(details gestures.TapDragStartDetails)

OnDragSelectionStart handles the start of a drag that selects.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onDragSelectionStart

func (*TextSelectionGestureDetectorBuilder) OnDragSelectionUpdate

func (b *TextSelectionGestureDetectorBuilder) OnDragSelectionUpdate(details gestures.TapDragUpdateDetails)

OnDragSelectionUpdate handles the move of a drag that selects.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onDragSelectionUpdate

func (*TextSelectionGestureDetectorBuilder) OnSecondaryTap

func (b *TextSelectionGestureDetectorBuilder) OnSecondaryTap()

OnSecondaryTap handles a tap with the secondary button, which shows the context menu.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onSecondaryTap

func (*TextSelectionGestureDetectorBuilder) OnSecondaryTapDown

func (b *TextSelectionGestureDetectorBuilder) OnSecondaryTapDown(details gestures.TapDownDetails)

OnSecondaryTapDown handles a pointer that goes down with the secondary button.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onSecondaryTapDown

func (*TextSelectionGestureDetectorBuilder) OnSingleLongTapCancel

func (b *TextSelectionGestureDetectorBuilder) OnSingleLongTapCancel()

OnSingleLongTapCancel handles a cancelled long press.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onSingleLongTapCancel

func (*TextSelectionGestureDetectorBuilder) OnSingleLongTapEnd

OnSingleLongTapEnd handles the end of a long press.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onSingleLongTapEnd

func (*TextSelectionGestureDetectorBuilder) OnSingleLongTapMoveUpdate

func (b *TextSelectionGestureDetectorBuilder) OnSingleLongTapMoveUpdate(details gestures.LongPressMoveUpdateDetails)

OnSingleLongTapMoveUpdate handles the move of a long press, which selects the words from the start to the pointer.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onSingleLongTapMoveUpdate

func (*TextSelectionGestureDetectorBuilder) OnSingleLongTapStart

func (b *TextSelectionGestureDetectorBuilder) OnSingleLongTapStart(details gestures.LongPressStartDetails)

OnSingleLongTapStart handles the start of a long press, which selects a word.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onSingleLongTapStart

func (*TextSelectionGestureDetectorBuilder) OnSingleTapCancel

func (b *TextSelectionGestureDetectorBuilder) OnSingleTapCancel()

OnSingleTapCancel is called when a tap is cancelled.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onSingleTapCancel

func (*TextSelectionGestureDetectorBuilder) OnSingleTapUp

OnSingleTapUp handles a tap that is released and is not part of a double tap.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onSingleTapUp

func (*TextSelectionGestureDetectorBuilder) OnTapDown

OnTapDown handles a pointer that goes down, which might be a tap.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onTapDown

func (*TextSelectionGestureDetectorBuilder) OnTapTrackReset

func (b *TextSelectionGestureDetectorBuilder) OnTapTrackReset()

OnTapTrackReset forgets that Shift was pressed.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onTapTrackReset

func (*TextSelectionGestureDetectorBuilder) OnTapTrackStart

func (b *TextSelectionGestureDetectorBuilder) OnTapTrackStart()

OnTapTrackStart remembers whether Shift is pressed.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onTapTrackStart

func (*TextSelectionGestureDetectorBuilder) OnTertiaryTapUp

func (b *TextSelectionGestureDetectorBuilder) OnTertiaryTapUp(details gestures.TapUpDetails)

OnTertiaryTapUp handles a tap with the tertiary (middle) button: on Linux desktops it puts the caret where the pointer is and pastes the primary selection there.

Flutter: no counterpart

func (*TextSelectionGestureDetectorBuilder) OnTripleTapDown

OnTripleTapDown handles the third tap of a triple tap, which selects a line (a paragraph on some platforms, all the text in a single line field).

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onTripleTapDown

func (*TextSelectionGestureDetectorBuilder) OnUserTap

func (b *TextSelectionGestureDetectorBuilder) OnUserTap()

OnUserTap is called for a tap; a text field overrides it to call its onTap.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onUserTap

func (*TextSelectionGestureDetectorBuilder) OnUserTapAlwaysCalled

func (b *TextSelectionGestureDetectorBuilder) OnUserTapAlwaysCalled() bool

OnUserTapAlwaysCalled is whether OnUserTap is called for every tap rather than the single ones.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.onUserTapAlwaysCalled

func (*TextSelectionGestureDetectorBuilder) RenderEditable

RenderEditable is the render object of the EditableText.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.renderEditable

func (*TextSelectionGestureDetectorBuilder) ShouldShowSelectionHandles

func (b *TextSelectionGestureDetectorBuilder) ShouldShowSelectionHandles() bool

ShouldShowSelectionHandles is whether the last gesture asks for the handles.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.shouldShowSelectionHandles

func (*TextSelectionGestureDetectorBuilder) ShouldShowSelectionToolbar

func (b *TextSelectionGestureDetectorBuilder) ShouldShowSelectionToolbar() bool

ShouldShowSelectionToolbar is whether the last gesture asks for the toolbar.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder.shouldShowSelectionToolbar

type TextSelectionGestureDetectorBuilderDelegate

type TextSelectionGestureDetectorBuilderDelegate interface {
	// EditableTextKey is the key of the EditableText of the text field.
	//
	// Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilderDelegate.editableTextKey
	EditableTextKey() *GlobalKey[*EditableTextState]
	// ForcePressEnabled is whether a force press selects a word. It is for iOS and
	// not ported: the detector has no force press recognizer.
	//
	// Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilderDelegate.forcePressEnabled
	ForcePressEnabled() bool
	// SelectionEnabled is whether the user can select text.
	//
	// Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilderDelegate.selectionEnabled
	SelectionEnabled() bool
}

TextSelectionGestureDetectorBuilderDelegate is the interface of a text field that a TextSelectionGestureDetectorBuilder works for.

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilderDelegate

type TextSelectionGestureDetectorOpts

type TextSelectionGestureDetectorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// OnTapTrackStart is called when a pointer goes down, before a tap.
	OnTapTrackStart func()
	// OnTapTrackReset is called when the tracking of a tap ends.
	OnTapTrackReset func()
	// OnTapDown is called when a pointer goes down, with the count of the
	// consecutive taps.
	OnTapDown gestures.GestureTapDragDownCallback
	// OnSecondaryTap is called for a tap with the secondary button.
	OnSecondaryTap gestures.GestureTapCallback
	// OnSecondaryTapDown is called when the secondary button goes down.
	OnSecondaryTapDown gestures.GestureTapDownCallback
	// OnTertiaryTapUp is called for a tap with the tertiary (middle) button.
	//
	// Flutter: no counterpart
	OnTertiaryTapUp gestures.GestureTapUpCallback
	// OnSingleTapUp is called when a tap that is not part of a double tap ends.
	OnSingleTapUp gestures.GestureTapDragUpCallback
	// OnSingleTapCancel is called when a tap is cancelled.
	OnSingleTapCancel gestures.GestureCancelCallback
	// OnUserTap is called for a single tap, after OnSingleTapUp.
	OnUserTap gestures.GestureTapCallback
	// OnSingleLongTapStart is called when a long press starts.
	OnSingleLongTapStart gestures.GestureLongPressStartCallback
	// OnSingleLongTapMoveUpdate is called when a long press moves.
	OnSingleLongTapMoveUpdate gestures.GestureLongPressMoveUpdateCallback
	// OnSingleLongTapEnd is called when a long press ends.
	OnSingleLongTapEnd gestures.GestureLongPressEndCallback
	// OnSingleLongTapCancel is called when a long press is cancelled.
	OnSingleLongTapCancel gestures.GestureLongPressCancelCallback
	// OnDoubleTapDown is called when the second tap of a double tap goes down.
	OnDoubleTapDown gestures.GestureTapDragDownCallback
	// OnTripleTapDown is called when the third tap of a triple tap goes down.
	OnTripleTapDown gestures.GestureTapDragDownCallback
	// OnDragSelectionStart is called when a drag starts.
	OnDragSelectionStart gestures.GestureTapDragStartCallback
	// OnDragSelectionUpdate is called when a drag moves.
	OnDragSelectionUpdate gestures.GestureTapDragUpdateCallback
	// OnDragSelectionEnd is called when a drag ends.
	OnDragSelectionEnd gestures.GestureTapDragEndCallback
	// OnUserTapAlwaysCalled makes OnUserTap run for every tap.
	OnUserTapAlwaysCalled bool
	// Behavior is how the detector behaves during hit testing.
	Behavior rendering.HitTestBehavior
}

TextSelectionGestureDetectorOpts are the optional parameters of NewTextSelectionGestureDetector.

Flutter: widgets/text_selection.dart TextSelectionGestureDetector.new

type TextSelectionGestureHandler

type TextSelectionGestureHandler interface {
	OnTapTrackStart()
	OnTapTrackReset()
	OnTapDown(details gestures.TapDragDownDetails)
	OnUserTapAlwaysCalled() bool
	OnUserTap()
	OnSingleTapUp(details gestures.TapDragUpDetails)
	OnSingleTapCancel()
	OnSingleLongTapStart(details gestures.LongPressStartDetails)
	OnSingleLongTapMoveUpdate(details gestures.LongPressMoveUpdateDetails)
	OnSingleLongTapEnd(details gestures.LongPressEndDetails)
	OnSingleLongTapCancel()
	OnSecondaryTap()
	OnSecondaryTapDown(details gestures.TapDownDetails)
	OnDoubleTapDown(details gestures.TapDragDownDetails)
	OnTripleTapDown(details gestures.TapDragDownDetails)
	OnDragSelectionStart(details gestures.TapDragStartDetails)
	OnDragSelectionUpdate(details gestures.TapDragUpdateDetails)
	OnDragSelectionEnd(details gestures.TapDragEndDetails)
}

TextSelectionGestureHandler is the set of the callbacks that a text field's selection gesture detector builder implements. The base builder implements all of them; a builder for a text field embeds it and overrides the ones it needs (its self value is what the detector calls).

Flutter: widgets/text_selection.dart TextSelectionGestureDetectorBuilder

type TextSelectionOverlay

type TextSelectionOverlay struct {
	// contains filtered or unexported fields
}

TextSelectionOverlay manages a pair of text selection handles, and the toolbar, of a RenderEditable. The selection handles are displayed in the Overlay that most closely encloses the given BuildContext.

Deviation: the spell check suggestions toolbar is not ported (SPEC §12.10).

Flutter: widgets/text_selection.dart TextSelectionOverlay

func NewTextSelectionOverlay

func NewTextSelectionOverlay(value services.TextEditingValue, bc BuildContext, toolbarLayerLink, startHandleLayerLink, endHandleLayerLink *rendering.LayerLink,
	renderObject *rendering.RenderEditable, selectionDelegate services.TextSelectionDelegate, opts ...TextSelectionOverlayOpts) *TextSelectionOverlay

NewTextSelectionOverlay creates an object that manages overlay entries for selection handles.

The context must have an Overlay as an ancestor because this object will display the text selection handles in that Overlay.

Flutter: widgets/text_selection.dart TextSelectionOverlay.new

func (*TextSelectionOverlay) Context

func (t *TextSelectionOverlay) Context() BuildContext

Context is the context in which the selection handles should appear.

Flutter: widgets/text_selection.dart TextSelectionOverlay.context

func (*TextSelectionOverlay) Dispose

func (t *TextSelectionOverlay) Dispose()

Dispose disposes this object and releases resources.

Flutter: widgets/text_selection.dart TextSelectionOverlay.dispose

func (*TextSelectionOverlay) HandlesAreVisible

func (t *TextSelectionOverlay) HandlesAreVisible() bool

HandlesAreVisible is whether the handles are currently visible.

Flutter: widgets/text_selection.dart TextSelectionOverlay.handlesAreVisible

func (*TextSelectionOverlay) HandlesVisible

func (t *TextSelectionOverlay) HandlesVisible() bool

HandlesVisible is whether selection handles are visible.

Flutter: widgets/text_selection.dart TextSelectionOverlay.handlesVisible

func (*TextSelectionOverlay) Hide

func (t *TextSelectionOverlay) Hide()

Hide hides the entire overlay including the toolbar and the handles.

Flutter: widgets/text_selection.dart TextSelectionOverlay.hide

func (*TextSelectionOverlay) HideHandles

func (t *TextSelectionOverlay) HideHandles()

HideHandles destroys the handles by removing them from the Overlay.

Flutter: widgets/text_selection.dart TextSelectionOverlay.hideHandles

func (*TextSelectionOverlay) HideMagnifier

func (t *TextSelectionOverlay) HideMagnifier()

HideMagnifier hides the current magnifier. This does nothing if there is no magnifier.

Flutter: widgets/text_selection.dart TextSelectionOverlay.hideMagnifier

func (*TextSelectionOverlay) HideToolbar

func (t *TextSelectionOverlay) HideToolbar()

HideToolbar hides the toolbar part of the overlay.

Flutter: widgets/text_selection.dart TextSelectionOverlay.hideToolbar

func (*TextSelectionOverlay) MagnifierExists

func (t *TextSelectionOverlay) MagnifierExists() bool

MagnifierExists is whether the magnifier currently exists.

This differs from MagnifierIsVisible in that the magnifier may exist in the overlay, but not be shown.

Flutter: widgets/text_selection.dart TextSelectionOverlay.magnifierExists

func (*TextSelectionOverlay) MagnifierIsVisible

func (t *TextSelectionOverlay) MagnifierIsVisible() bool

MagnifierIsVisible is whether the magnifier is currently visible.

Flutter: widgets/text_selection.dart TextSelectionOverlay.magnifierIsVisible

func (*TextSelectionOverlay) RenderObject

func (t *TextSelectionOverlay) RenderObject() *rendering.RenderEditable

RenderObject is the editable text in which the selection handles are anchored.

Flutter: widgets/text_selection.dart TextSelectionOverlay.renderObject

func (*TextSelectionOverlay) SelectionControls

func (t *TextSelectionOverlay) SelectionControls() TextSelectionControls

SelectionControls builds the text selection handles.

Flutter: widgets/text_selection.dart TextSelectionOverlay.selectionControls

func (*TextSelectionOverlay) SetHandlesVisible

func (t *TextSelectionOverlay) SetHandlesVisible(visible bool)

SetHandlesVisible sets whether selection handles are visible. Set to false if you want to hide the handles. Use this property to show or hide the handle without rebuilding them.

Flutter: widgets/text_selection.dart TextSelectionOverlay.handlesVisible

func (*TextSelectionOverlay) ShowHandles

func (t *TextSelectionOverlay) ShowHandles()

ShowHandles builds the handles by inserting them into the Overlay.

Flutter: widgets/text_selection.dart TextSelectionOverlay.showHandles

func (*TextSelectionOverlay) ShowMagnifier

func (t *TextSelectionOverlay) ShowMagnifier(positionToShow ui.Offset)

ShowMagnifier shows the magnifier, and hides the toolbar if it was showing, following the text position at positionToShow (global coordinates).

Flutter: widgets/text_selection.dart TextSelectionOverlay.showMagnifier

func (*TextSelectionOverlay) ShowSpellCheckSuggestionsToolbar

func (t *TextSelectionOverlay) ShowSpellCheckSuggestionsToolbar(spellCheckSuggestionsToolbarBuilder WidgetBuilder)

ShowSpellCheckSuggestionsToolbar shows the toolbar with the spell check suggestions of misspelled words that are available for click-and-replace, and hides the handles.

Flutter: widgets/text_selection.dart TextSelectionOverlay.showSpellCheckSuggestionsToolbar

func (*TextSelectionOverlay) ShowToolbar

func (t *TextSelectionOverlay) ShowToolbar()

ShowToolbar shows the toolbar by inserting it into the Overlay. It must not be called during the build or layout phase.

Flutter: widgets/text_selection.dart TextSelectionOverlay.showToolbar

func (*TextSelectionOverlay) SpellCheckToolbarIsVisible

func (t *TextSelectionOverlay) SpellCheckToolbarIsVisible() bool

SpellCheckToolbarIsVisible is whether the spell check menu is currently visible. ToolbarIsVisible is whether any toolbar is visible.

Flutter: widgets/text_selection.dart TextSelectionOverlay.spellCheckToolbarIsVisible

func (*TextSelectionOverlay) ToolbarIsVisible

func (t *TextSelectionOverlay) ToolbarIsVisible() bool

ToolbarIsVisible is whether the toolbar is currently visible.

Flutter: widgets/text_selection.dart TextSelectionOverlay.toolbarIsVisible

func (*TextSelectionOverlay) Update

func (t *TextSelectionOverlay) Update(newValue services.TextEditingValue)

Update updates the text selection to the new value.

Flutter: widgets/text_selection.dart TextSelectionOverlay.update

func (*TextSelectionOverlay) UpdateForScroll

func (t *TextSelectionOverlay) UpdateForScroll()

UpdateForScroll causes the overlay to update its rendering. This is intended to be called when the RenderEditable scrolls.

Flutter: widgets/text_selection.dart TextSelectionOverlay.updateForScroll

func (*TextSelectionOverlay) UpdateMagnifier

func (t *TextSelectionOverlay) UpdateMagnifier(positionToShow ui.Offset)

UpdateMagnifier updates the current magnifier with a new position, so the magnifier can respond accordingly. If there is no magnifier, this does nothing.

Flutter: widgets/text_selection.dart TextSelectionOverlay.updateMagnifier

func (*TextSelectionOverlay) Value

Value is the text editing value the handles show the selection of.

Flutter: widgets/text_selection.dart TextSelectionOverlay.value

type TextSelectionOverlayOpts

type TextSelectionOverlayOpts struct {
	// DebugRequiredFor is the widget that requires the overlay, named in the
	// error when there is none.
	DebugRequiredFor Widget
	// SelectionControls build the selection handles; none for no handles.
	SelectionControls TextSelectionControls
	// HandlesVisible is whether the handles are visible; the default is false.
	HandlesVisible bool
	// DragStartBehavior is when a handle drag starts; the default is start.
	DragStartBehavior gestures.DragStartBehavior
	// OnSelectionHandleTapped is called when a handle is tapped.
	OnSelectionHandleTapped foundation.VoidCallback
	// ContextMenuBuilder builds the context menu of the toolbar.
	ContextMenuBuilder WidgetBuilder
	// MagnifierConfiguration is the configuration for the magnifier; nil is
	// TextMagnifierConfigurationDisabled.
	MagnifierConfiguration *TextMagnifierConfiguration
}

TextSelectionOverlayOpts are the optional parameters of NewTextSelectionOverlay.

Flutter: widgets/text_selection.dart TextSelectionOverlay.new

type TextSelectionToolbarAnchors

type TextSelectionToolbarAnchors struct {
	// PrimaryAnchor is the location that the toolbar should attempt to position
	// itself at. If the toolbar doesn't fit at this location, use SecondaryAnchor
	// if it exists.
	//
	// Flutter: widgets/text_selection_toolbar_anchors.dart TextSelectionToolbarAnchors.primaryAnchor
	PrimaryAnchor ui.Offset
	// SecondaryAnchor is the fallback position that should be used if
	// PrimaryAnchor doesn't work.
	//
	// Flutter: widgets/text_selection_toolbar_anchors.dart TextSelectionToolbarAnchors.secondaryAnchor
	SecondaryAnchor foundation.Opt[ui.Offset]
}

TextSelectionToolbarAnchors is the position information for a text selection toolbar.

Typically, a menu will attempt to position itself at PrimaryAnchor, and if that's not possible, then it will use SecondaryAnchor instead, if it exists.

Flutter: widgets/text_selection_toolbar_anchors.dart TextSelectionToolbarAnchors

func NewTextSelectionToolbarAnchorsFromSelection

func NewTextSelectionToolbarAnchorsFromSelection(renderBox rendering.Box, startGlyphHeight, endGlyphHeight float64,
	selectionEndpoints []rendering.TextSelectionPoint) TextSelectionToolbarAnchors

NewTextSelectionToolbarAnchorsFromSelection creates the anchors for some selection.

Flutter: widgets/text_selection_toolbar_anchors.dart TextSelectionToolbarAnchors.fromSelection

type TextSelectionToolbarLayoutDelegate

type TextSelectionToolbarLayoutDelegate struct {
	rendering.SingleChildLayoutDelegateBase
	// contains filtered or unexported fields
}

TextSelectionToolbarLayoutDelegate is a SingleChildLayoutDelegate for use with CustomSingleChildLayout that positions its child above anchorAbove if it fits, or otherwise below anchorBelow.

Primarily intended for use with toolbars or context menus.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate

func NewTextSelectionToolbarLayoutDelegate

func NewTextSelectionToolbarLayoutDelegate(anchorAbove, anchorBelow ui.Offset, opts ...TextSelectionToolbarLayoutDelegateOpts) *TextSelectionToolbarLayoutDelegate

NewTextSelectionToolbarLayoutDelegate creates the delegate of a toolbar with the anchors given in the local coordinates of the box that the delegate lays out.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.new

func (*TextSelectionToolbarLayoutDelegate) AnchorAbove

func (d *TextSelectionToolbarLayoutDelegate) AnchorAbove() ui.Offset

AnchorAbove is the focal point above which the toolbar attempts to position itself, in local coordinates.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.anchorAbove

func (*TextSelectionToolbarLayoutDelegate) AnchorBelow

func (d *TextSelectionToolbarLayoutDelegate) AnchorBelow() ui.Offset

AnchorBelow is the focal point below which the toolbar attempts to position itself, if it does not fit above the AnchorAbove, in local coordinates.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.anchorBelow

func (*TextSelectionToolbarLayoutDelegate) FitsAbove

FitsAbove is whether the child should be considered to fit above the AnchorAbove: typically used to force the child to be drawn at the AnchorAbove even when it does not fit, such as when the Material TextSelectionToolbar draws an open overflow menu. When none, it is calculated.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.fitsAbove

func (*TextSelectionToolbarLayoutDelegate) GetConstraintsForChild

GetConstraintsForChild loosens the constraints.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.getConstraintsForChild

func (*TextSelectionToolbarLayoutDelegate) GetPositionForChild

func (d *TextSelectionToolbarLayoutDelegate) GetPositionForChild(size, childSize ui.Size) ui.Offset

GetPositionForChild centers the child on the anchor, above it if it fits and below otherwise.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.getPositionForChild

func (*TextSelectionToolbarLayoutDelegate) ShouldRelayout

ShouldRelayout is whether an anchor or fitsAbove changed.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.shouldRelayout

type TextSelectionToolbarLayoutDelegateOpts

type TextSelectionToolbarLayoutDelegateOpts struct {
	// FitsAbove is whether the child should be considered to fit above the
	// anchorAbove; when none, it is calculated.
	FitsAbove foundation.Opt[bool]
}

TextSelectionToolbarLayoutDelegateOpts are the optional parameters of NewTextSelectionToolbarLayoutDelegate.

Flutter: widgets/text_selection_toolbar_layout_delegate.dart TextSelectionToolbarLayoutDelegate.new

type Texture

type Texture struct {
	LeafRenderObjectWidget
	// contains filtered or unexported fields
}

Texture is a rectangle upon which a texture of package gpu is shown (SPEC §27.4). The texture is registered with Device.RegisterTexture, which gives its id. The widget takes as much room as its parent gives; wrap it in a SizedBox or an AspectRatio to size it.

Flutter: widgets/texture.dart Texture

func NewTexture

func NewTexture(textureID int64, opts ...TextureOpts) *Texture

NewTexture creates a widget that shows the texture with the id.

Flutter: widgets/texture.dart Texture.new

func (*Texture) CreateRenderObject

func (w *Texture) CreateRenderObject(BuildContext) rendering.RenderObject

CreateRenderObject creates the render box.

Flutter: widgets/texture.dart Texture.createRenderObject

func (*Texture) FilterQuality

func (w *Texture) FilterQuality() ui.FilterQuality

FilterQuality is the quality of the scaling.

Flutter: widgets/texture.dart Texture.filterQuality

func (*Texture) Freeze

func (w *Texture) Freeze() bool

Freeze says that the widget keeps showing the texture's last frame while the app resizes it.

Flutter: widgets/texture.dart Texture.freeze

func (*Texture) TextureID

func (w *Texture) TextureID() int64

TextureID is the id the registry gave the texture.

Flutter: widgets/texture.dart Texture.textureId

func (*Texture) UpdateRenderObject

func (w *Texture) UpdateRenderObject(_ BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render box.

Flutter: widgets/texture.dart Texture.updateRenderObject

type TextureOpts

type TextureOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Freeze, when true, keeps the texture's last frame while the app resizes it; the default is false.
	Freeze bool
	// FilterQuality is the quality of the scaling; the default is FilterQualityLow.
	FilterQuality ui.FilterQuality
}

TextureOpts are the optional parameters of NewTexture.

Flutter: widgets/texture.dart Texture.new

type TickerMode

type TickerMode struct {
	StatefulWidget
	// contains filtered or unexported fields
}

TickerMode enables or disables the tickers (and with them the animations) of the widgets below it. A disabled ticker is muted: it keeps its time but does not tick, so the animations of the routes that are not visible don't run.

Flutter: widgets/ticker_provider.dart TickerMode

func NewTickerMode

func NewTickerMode(enabled bool, child Widget, opts ...TickerModeOpts) *TickerMode

NewTickerMode creates the widget. The mode it makes is the combination of its own and the ones above: enabled only if every one is, and forcing frames if any does.

Flutter: widgets/ticker_provider.dart TickerMode.new

func (*TickerMode) Child

func (w *TickerMode) Child() Widget

Child is the widget below this one.

Flutter: widgets/ticker_provider.dart TickerMode.child

func (*TickerMode) CreateState

func (w *TickerMode) CreateState() State

CreateState creates the state.

Flutter: widgets/ticker_provider.dart TickerMode.createState

func (*TickerMode) Enabled

func (w *TickerMode) Enabled() bool

Enabled is whether the tickers below are enabled (if the modes above allow).

Flutter: widgets/ticker_provider.dart TickerMode.enabled

func (*TickerMode) ForceFrames

func (w *TickerMode) ForceFrames() bool

ForceFrames is whether the tickers below force frames.

Flutter: widgets/ticker_provider.dart TickerMode.forceFrames

type TickerModeData

type TickerModeData struct {
	// Enabled is whether tickers below tick; a disabled ticker is muted.
	//
	// Flutter: widgets/ticker_provider.dart TickerModeData.enabled
	Enabled bool
	// ForceFrames is whether tickers below schedule frames even when frames are
	// disabled (see scheduler.Ticker.ForceFrames).
	//
	// Flutter: widgets/ticker_provider.dart TickerModeData.forceFrames
	ForceFrames bool
}

TickerModeData is the effective ticker mode at a place in the tree: whether tickers tick and whether they force frames.

Flutter: widgets/ticker_provider.dart TickerModeData

func TickerModeValuesOf

func TickerModeValuesOf(bc BuildContext) TickerModeData

TickerModeValuesOf is the ticker mode at the context, or the fallback. The context depends on the mode.

Flutter: widgets/ticker_provider.dart TickerMode.valuesOf

type TickerModeMergeOpts

type TickerModeMergeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Enabled replaces the enabled flag; the default is the one above.
	Enabled foundation.Opt[bool]
	// ForceFrames replaces the forceFrames flag; the default is the one above.
	ForceFrames foundation.Opt[bool]
}

TickerModeMergeOpts are the optional parameters of NewTickerModeMerge.

Flutter: widgets/ticker_provider.dart TickerMode.merge

type TickerModeOpts

type TickerModeOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ForceFrames is whether the tickers below schedule frames even when frames
	// are disabled.
	ForceFrames bool
}

TickerModeOpts are the optional parameters of NewTickerMode.

Flutter: widgets/ticker_provider.dart TickerMode.new

type TickerProvider

type TickerProvider struct {
	// contains filtered or unexported fields
}

TickerProvider is embedded in a State that makes several Tickers (several controllers, or controllers that come and go). Like SingleTickerProvider it mutes the tickers when a TickerMode above is disabled.

A ticker that is still active when the state is disposed makes Dispose panic with the tag TickerProviderActiveTicker in debug builds.

Flutter: widgets/ticker_provider.dart TickerProviderStateMixin

func (*TickerProvider) CreateTicker

func (p *TickerProvider) CreateTicker(onTick scheduler.TickerCallback) *scheduler.Ticker

CreateTicker makes a ticker for the state.

Flutter: widgets/ticker_provider.dart TickerProviderStateMixin.createTicker

func (*TickerProvider) DisableAnimations

func (h *TickerProvider) DisableAnimations() bool

DisableAnimations is whether the system asks for animations to be off. A provider is the animation.Environment of the controllers that use it.

Flutter: semantics/binding.dart SemanticsBinding.disableAnimations

func (*TickerProvider) ErrorReporter

func (h *TickerProvider) ErrorReporter() foundation.ErrorReporter

ErrorReporter is where the errors of the listeners of the controllers go: the error reporter of the app's binding.

Flutter: foundation/assertions.dart FlutterError.onError

type Title

type Title struct {
	StatefulWidget
	// contains filtered or unexported fields
}

Title describes the application to the system: the title that the task switcher shows and the primary color. It builds its child.

Flutter: widgets/title.dart Title

func NewTitle

func NewTitle(color ui.Color, child Widget, opts ...TitleOpts) *Title

NewTitle creates the widget. In debug builds it panics with the tag TitleColorNotOpaque when the color is not opaque.

Flutter: widgets/title.dart Title.new

func (*Title) Color

func (w *Title) Color() ui.Color

Color is the primary color of the application.

Flutter: widgets/title.dart Title.color

func (*Title) CreateState

func (w *Title) CreateState() State

CreateState creates the state.

Flutter: widgets/title.dart Title.createState

func (*Title) Title

func (w *Title) Title() string

Title is the label of the application.

Flutter: widgets/title.dart Title.title

type TitleOpts

type TitleOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Title is the label of the application.
	Title string
}

TitleOpts are the optional parameters of NewTitle.

Flutter: widgets/title.dart Title.new

type ToggleableOpts

type ToggleableOpts struct {
	// FocusNode is the focus node of the widget; nil for the detector's own.
	FocusNode *FocusNode
	// OnFocusChange is called when the focus of the widget changes.
	OnFocusChange func(focused bool)
	// Autofocus asks for the focus when the widget is built.
	Autofocus bool
	// MouseCursor is the cursor over the widget, resolved with the states; nil
	// for the basic cursor.
	MouseCursor WidgetStateProperty[services.MouseCursor]
}

ToggleableOpts are the optional parameters of BuildToggleable and BuildToggleableWithChild.

Flutter: widgets/toggleable.dart ToggleableStateMixin.buildToggleable

type ToggleableOwner

type ToggleableOwner interface {
	// SetState schedules a rebuild after running the function.
	SetState(fn func())
	// Context is the build context of the state.
	Context() BuildContext
	// ToggleableOnChanged is the callback that the widget calls when the value
	// changes; nil when the widget is not interactive.
	//
	// Flutter: widgets/toggleable.dart ToggleableStateMixin.onChanged
	ToggleableOnChanged() func(value foundation.Opt[bool])
	// ToggleableValue is the value of the widget: none is the mixed (null) value.
	//
	// Flutter: widgets/toggleable.dart ToggleableStateMixin.value
	ToggleableValue() foundation.Opt[bool]
	// ToggleableTristate is whether the widget cycles through none too.
	//
	// Flutter: widgets/toggleable.dart ToggleableStateMixin.tristate
	ToggleableTristate() bool
}

ToggleableOwner is what a state that embeds a ToggleableStateMixin provides: the abstract members of Flutter's ToggleableStateMixin. The state also is the vsync of the animations, so it must embed a TickerProvider.

Flutter: widgets/toggleable.dart ToggleableStateMixin

type ToggleablePainter

type ToggleablePainter struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

ToggleablePainter is the base of the painters of the toggleable widgets: it has the animations and the colors that the radial reaction needs, and notifies its listeners when any of them changes. Embed it in the painter and implement Paint.

Flutter: widgets/toggleable.dart ToggleablePainter

func (*ToggleablePainter) ActiveColor

func (p *ToggleablePainter) ActiveColor() ui.Color

ActiveColor is the color of the widget when it is on.

Flutter: widgets/toggleable.dart ToggleablePainter.activeColor

func (*ToggleablePainter) Dispose

func (p *ToggleablePainter) Dispose()

Dispose removes the listeners from the animations.

Flutter: widgets/toggleable.dart ToggleablePainter.dispose

func (*ToggleablePainter) DownPosition

func (p *ToggleablePainter) DownPosition() foundation.Opt[ui.Offset]

DownPosition is where the pointer is pressed, if it is.

Flutter: widgets/toggleable.dart ToggleablePainter.downPosition

func (*ToggleablePainter) FocusColor

func (p *ToggleablePainter) FocusColor() ui.Color

FocusColor is the color of the focus highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.focusColor

func (*ToggleablePainter) HitTest

HitTest defers to the default.

Flutter: widgets/toggleable.dart ToggleablePainter.hitTest

func (*ToggleablePainter) HoverColor

func (p *ToggleablePainter) HoverColor() ui.Color

HoverColor is the color of the hover highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.hoverColor

func (*ToggleablePainter) InactiveColor

func (p *ToggleablePainter) InactiveColor() ui.Color

InactiveColor is the color of the widget when it is off.

Flutter: widgets/toggleable.dart ToggleablePainter.inactiveColor

func (*ToggleablePainter) InactiveReactionColor

func (p *ToggleablePainter) InactiveReactionColor() ui.Color

InactiveReactionColor is the color of the radial reaction when the widget is off.

Flutter: widgets/toggleable.dart ToggleablePainter.inactiveReactionColor

func (*ToggleablePainter) IsActive

func (p *ToggleablePainter) IsActive() bool

IsActive is whether the widget is on.

Flutter: widgets/toggleable.dart ToggleablePainter.isActive

func (*ToggleablePainter) IsFocused

func (p *ToggleablePainter) IsFocused() bool

IsFocused is whether the widget has the focus highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.isFocused

func (*ToggleablePainter) IsHovered

func (p *ToggleablePainter) IsHovered() bool

IsHovered is whether the widget has the hover highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.isHovered

func (*ToggleablePainter) PaintRadialReaction

func (p *ToggleablePainter) PaintRadialReaction(canvas *ui.Canvas, offset, origin ui.Offset)

PaintRadialReaction paints the radial reaction: the splash of a press, and the hover and focus highlights.

Flutter: widgets/toggleable.dart ToggleablePainter.paintRadialReaction

func (*ToggleablePainter) Position

Position is the animation of the toggle.

Flutter: widgets/toggleable.dart ToggleablePainter.position

func (*ToggleablePainter) Reaction

Reaction is the animation of the radial reaction.

Flutter: widgets/toggleable.dart ToggleablePainter.reaction

func (*ToggleablePainter) ReactionColor

func (p *ToggleablePainter) ReactionColor() ui.Color

ReactionColor is the color of the radial reaction when the widget is on.

Flutter: widgets/toggleable.dart ToggleablePainter.reactionColor

func (*ToggleablePainter) ReactionFocusFade

func (p *ToggleablePainter) ReactionFocusFade() animation.Animation[float64]

ReactionFocusFade is the animation of the focus highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.reactionFocusFade

func (*ToggleablePainter) ReactionHoverFade

func (p *ToggleablePainter) ReactionHoverFade() animation.Animation[float64]

ReactionHoverFade is the animation of the hover highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.reactionHoverFade

func (*ToggleablePainter) SetActiveColor

func (p *ToggleablePainter) SetActiveColor(v ui.Color)

SetActiveColor sets the color of the widget when it is on.

Flutter: widgets/toggleable.dart ToggleablePainter.activeColor

func (*ToggleablePainter) SetDownPosition

func (p *ToggleablePainter) SetDownPosition(v foundation.Opt[ui.Offset])

SetDownPosition sets where the pointer is pressed.

Flutter: widgets/toggleable.dart ToggleablePainter.downPosition

func (*ToggleablePainter) SetFocusColor

func (p *ToggleablePainter) SetFocusColor(v ui.Color)

SetFocusColor sets the color of the focus highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.focusColor

func (*ToggleablePainter) SetHoverColor

func (p *ToggleablePainter) SetHoverColor(v ui.Color)

SetHoverColor sets the color of the hover highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.hoverColor

func (*ToggleablePainter) SetInactiveColor

func (p *ToggleablePainter) SetInactiveColor(v ui.Color)

SetInactiveColor sets the color of the widget when it is off.

Flutter: widgets/toggleable.dart ToggleablePainter.inactiveColor

func (*ToggleablePainter) SetInactiveReactionColor

func (p *ToggleablePainter) SetInactiveReactionColor(v ui.Color)

SetInactiveReactionColor sets the color of the radial reaction when the widget is off.

Flutter: widgets/toggleable.dart ToggleablePainter.inactiveReactionColor

func (*ToggleablePainter) SetIsActive

func (p *ToggleablePainter) SetIsActive(v bool)

SetIsActive sets whether the widget is on.

Flutter: widgets/toggleable.dart ToggleablePainter.isActive

func (*ToggleablePainter) SetIsFocused

func (p *ToggleablePainter) SetIsFocused(v bool)

SetIsFocused sets whether the widget has the focus highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.isFocused

func (*ToggleablePainter) SetIsHovered

func (p *ToggleablePainter) SetIsHovered(v bool)

SetIsHovered sets whether the widget has the hover highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.isHovered

func (*ToggleablePainter) SetPosition

func (p *ToggleablePainter) SetPosition(v animation.Animation[float64])

SetPosition sets the animation of the toggle.

Flutter: widgets/toggleable.dart ToggleablePainter.position

func (*ToggleablePainter) SetReaction

func (p *ToggleablePainter) SetReaction(v animation.Animation[float64])

SetReaction sets the animation of the radial reaction.

Flutter: widgets/toggleable.dart ToggleablePainter.reaction

func (*ToggleablePainter) SetReactionColor

func (p *ToggleablePainter) SetReactionColor(v ui.Color)

SetReactionColor sets the color of the radial reaction when the widget is on.

Flutter: widgets/toggleable.dart ToggleablePainter.reactionColor

func (*ToggleablePainter) SetReactionFocusFade

func (p *ToggleablePainter) SetReactionFocusFade(v animation.Animation[float64])

SetReactionFocusFade sets the animation of the focus highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.reactionFocusFade

func (*ToggleablePainter) SetReactionHoverFade

func (p *ToggleablePainter) SetReactionHoverFade(v animation.Animation[float64])

SetReactionHoverFade sets the animation of the hover highlight.

Flutter: widgets/toggleable.dart ToggleablePainter.reactionHoverFade

func (*ToggleablePainter) SetSplashRadius

func (p *ToggleablePainter) SetSplashRadius(v float64)

SetSplashRadius sets the radius of the radial reaction.

Flutter: widgets/toggleable.dart ToggleablePainter.splashRadius

func (*ToggleablePainter) ShouldRepaint

func (p *ToggleablePainter) ShouldRepaint(rendering.CustomPainter) bool

ShouldRepaint is true: the painter notifies its own listeners when it needs to paint again.

Flutter: widgets/toggleable.dart ToggleablePainter.shouldRepaint

func (*ToggleablePainter) SplashRadius

func (p *ToggleablePainter) SplashRadius() float64

SplashRadius is the radius of the radial reaction.

Flutter: widgets/toggleable.dart ToggleablePainter.splashRadius

type ToggleableStateMixin

type ToggleableStateMixin struct {
	// contains filtered or unexported fields
}

ToggleableStateMixin has the animations and the gestures that the state of a toggleable widget (a checkbox, a radio button, a switch) shares: the position of the toggle, the radial reaction, the hover and focus fades, the activation by tap or key, and the states for the properties. Embed it in the state, next to a TickerProvider, and call Init from InitState and DisposeToggleable from Dispose.

Flutter: widgets/toggleable.dart ToggleableStateMixin

func (*ToggleableStateMixin) AnimateToValue

func (m *ToggleableStateMixin) AnimateToValue()

AnimateToValue runs the position animation to the value of the widget.

Flutter: widgets/toggleable.dart ToggleableStateMixin.animateToValue

func (*ToggleableStateMixin) BuildToggleable

func (m *ToggleableStateMixin) BuildToggleable(size ui.Size, painter rendering.CustomPainter, opts ...ToggleableOpts) Widget

BuildToggleable builds the detector of focus, hover, keys and taps around a box of the given size that the painter paints.

Flutter: widgets/toggleable.dart ToggleableStateMixin.buildToggleable

func (*ToggleableStateMixin) BuildToggleableWithChild

func (m *ToggleableStateMixin) BuildToggleableWithChild(child Widget, opts ...ToggleableOpts) Widget

BuildToggleableWithChild builds the detector of focus, hover, keys and taps around the child.

Flutter: widgets/toggleable.dart ToggleableStateMixin.buildToggleableWithChild

func (*ToggleableStateMixin) DisposeToggleable

func (m *ToggleableStateMixin) DisposeToggleable()

DisposeToggleable disposes the animations. Call it from Dispose.

Flutter: widgets/toggleable.dart ToggleableStateMixin.dispose

func (*ToggleableStateMixin) DownPosition

func (m *ToggleableStateMixin) DownPosition() foundation.Opt[ui.Offset]

DownPosition is where the pointer is pressed on the widget, if it is.

Flutter: widgets/toggleable.dart ToggleableStateMixin.downPosition

func (*ToggleableStateMixin) Init

Init creates the animations. Call it from InitState; the owner is the state itself and the vsync is its TickerProvider (usually the same value).

Flutter: widgets/toggleable.dart ToggleableStateMixin.initState

func (*ToggleableStateMixin) IsInteractive

func (m *ToggleableStateMixin) IsInteractive() bool

IsInteractive is whether the widget responds to input.

Flutter: widgets/toggleable.dart ToggleableStateMixin.isInteractive

func (*ToggleableStateMixin) Position

Position is the animation of the toggle from 0 (off) to 1 (on).

Flutter: widgets/toggleable.dart ToggleableStateMixin.position

func (*ToggleableStateMixin) PositionController

func (m *ToggleableStateMixin) PositionController() *animation.AnimationController

PositionController is the controller of the position animation.

Flutter: widgets/toggleable.dart ToggleableStateMixin.positionController

func (*ToggleableStateMixin) Reaction

Reaction is the animation of the radial reaction while the widget is pressed.

Flutter: widgets/toggleable.dart ToggleableStateMixin.reaction

func (*ToggleableStateMixin) ReactionAnimationDuration

func (m *ToggleableStateMixin) ReactionAnimationDuration() time.Duration

ReactionAnimationDuration is the duration of the radial reaction.

Flutter: widgets/toggleable.dart ToggleableStateMixin.reactionAnimationDuration

func (*ToggleableStateMixin) ReactionController

func (m *ToggleableStateMixin) ReactionController() *animation.AnimationController

ReactionController is the controller of the radial reaction animation.

Flutter: widgets/toggleable.dart ToggleableStateMixin.reactionController

func (*ToggleableStateMixin) ReactionFocusFade

func (m *ToggleableStateMixin) ReactionFocusFade() *animation.CurvedAnimation

ReactionFocusFade is the animation of the focus highlight.

Flutter: widgets/toggleable.dart ToggleableStateMixin.reactionFocusFade

func (*ToggleableStateMixin) ReactionHoverFade

func (m *ToggleableStateMixin) ReactionHoverFade() *animation.CurvedAnimation

ReactionHoverFade is the animation of the hover highlight.

Flutter: widgets/toggleable.dart ToggleableStateMixin.reactionHoverFade

func (*ToggleableStateMixin) States

func (m *ToggleableStateMixin) States() WidgetStates

States are the states of the widget, for resolving its properties.

Flutter: widgets/toggleable.dart ToggleableStateMixin.states

func (*ToggleableStateMixin) Value

Value is the value of the widget that the mixin belongs to: none is the mixed value. A builder that paints the widget from the state of its toggle (a radio's RadioBuilder) reads it here.

Flutter: widgets/toggleable.dart ToggleableStateMixin.value

type ToggleableStateMixinOpts

type ToggleableStateMixinOpts struct {
	// ReactionAnimationDuration is the duration of the radial reaction; the
	// default is 100 ms.
	//
	// Flutter: widgets/toggleable.dart ToggleableStateMixin.reactionAnimationDuration
	ReactionAnimationDuration time.Duration
	// IsInteractive overrides the answer of whether the widget responds to input;
	// the default is whether ToggleableOnChanged is not nil.
	//
	// Flutter: widgets/toggleable.dart ToggleableStateMixin.isInteractive
	IsInteractive func() bool
}

ToggleableStateMixinOpts are the optional parameters of ToggleableStateMixin.Init.

Flutter: widgets/toggleable.dart ToggleableStateMixin

type ToolbarBuilder

type ToolbarBuilder func(bc BuildContext, child Widget) Widget

ToolbarBuilder builds a toolbar around the child.

Flutter: widgets/text_selection.dart ToolbarBuilder

type ToolbarItemsParentData

type ToolbarItemsParentData struct {
	rendering.ContainerBoxParentData[rendering.Box]
	// ShouldPaint is whether the item is painted.
	//
	// Flutter: widgets/text_selection.dart ToolbarItemsParentData.shouldPaint
	ShouldPaint bool
}

ToolbarItemsParentData is the parent data of the items of a text selection toolbar: the offset and whether the item is painted.

Flutter: widgets/text_selection.dart ToolbarItemsParentData

func (*ToolbarItemsParentData) String

func (d *ToolbarItemsParentData) String() string

String describes the parent data.

Flutter: widgets/text_selection.dart ToolbarItemsParentData.toString

type TooltipComponentBuilder

type TooltipComponentBuilder func(bc BuildContext, animation animation.Animation[float64]) Widget

TooltipComponentBuilder is the type of the function that builds the tooltip component of a RawTooltip; the animation goes from 0 to 1 as the tooltip shows.

Flutter: widgets/raw_tooltip.dart TooltipComponentBuilder

type TooltipPositionContext

type TooltipPositionContext struct {
	// Target is the center of the widget that the tooltip is for, in the
	// coordinates of the overlay.
	//
	// Flutter: widgets/raw_tooltip.dart TooltipPositionContext.target
	Target ui.Offset
	// TargetSize is the size of the widget that the tooltip is for.
	//
	// Flutter: widgets/raw_tooltip.dart TooltipPositionContext.targetSize
	TargetSize ui.Size
	// TooltipSize is the size of the tooltip.
	//
	// Flutter: widgets/raw_tooltip.dart TooltipPositionContext.tooltipSize
	TooltipSize ui.Size
	// VerticalOffset is the vertical distance between the target and the tooltip.
	//
	// Flutter: widgets/raw_tooltip.dart TooltipPositionContext.verticalOffset
	VerticalOffset float64
	// NoPreferBelow makes the tooltip prefer to be above the target (Flutter's
	// preferBelow is true by default).
	NoPreferBelow bool
	// OverlaySize is the size of the overlay; the default (zero) is unbounded.
	//
	// Flutter: widgets/raw_tooltip.dart TooltipPositionContext.overlaySize
	OverlaySize ui.Size
}

TooltipPositionContext is the context for a TooltipPositionDelegate.

Flutter: widgets/raw_tooltip.dart TooltipPositionContext

func (TooltipPositionContext) PreferBelow

func (c TooltipPositionContext) PreferBelow() bool

PreferBelow is whether the tooltip prefers to be below the target.

Flutter: widgets/raw_tooltip.dart TooltipPositionContext.preferBelow

type TooltipPositionDelegate

type TooltipPositionDelegate func(context TooltipPositionContext) ui.Offset

TooltipPositionDelegate is the type of the function that gives the position of the tooltip, in the coordinates of the overlay.

Flutter: widgets/raw_tooltip.dart TooltipPositionDelegate

type TooltipTriggerMode

type TooltipTriggerMode int

TooltipTriggerMode is the mode of the gesture that triggers a tooltip.

Flutter: widgets/raw_tooltip.dart TooltipTriggerMode

const (
	// TooltipTriggerModeUnspecified is the zero value: the default, long press.
	TooltipTriggerModeUnspecified TooltipTriggerMode = iota
	// TooltipTriggerModeManual does not trigger the tooltip with a gesture: it
	// shows on hover, or when ensureTooltipVisible is called.
	//
	// Flutter: widgets/raw_tooltip.dart TooltipTriggerMode.manual
	TooltipTriggerModeManual
	// TooltipTriggerModeLongPress triggers the tooltip with a long press.
	//
	// Flutter: widgets/raw_tooltip.dart TooltipTriggerMode.longPress
	TooltipTriggerModeLongPress
	// TooltipTriggerModeTap triggers the tooltip with a tap.
	//
	// Flutter: widgets/raw_tooltip.dart TooltipTriggerMode.tap
	TooltipTriggerModeTap
)

func (TooltipTriggerMode) Name

func (m TooltipTriggerMode) Name() string

Name is the name of the mode.

Flutter: widgets/raw_tooltip.dart TooltipTriggerMode.name

func (TooltipTriggerMode) String

func (m TooltipTriggerMode) String() string

String is "TooltipTriggerMode." and the name.

Flutter: widgets/raw_tooltip.dart TooltipTriggerMode.toString

type TrackingScrollController

type TrackingScrollController struct {
	ScrollControllerBase
	// contains filtered or unexported fields
}

TrackingScrollController is a controller that remembers the last position that was updated, and starts new positions at its offset. Several scrollables can share it.

Flutter: widgets/scroll_controller.dart TrackingScrollController

func NewTrackingScrollController

func NewTrackingScrollController(opts ...ScrollControllerOpts) *TrackingScrollController

NewTrackingScrollController creates the controller.

Flutter: widgets/scroll_controller.dart TrackingScrollController.new

func (*TrackingScrollController) Attach

func (c *TrackingScrollController) Attach(position ScrollPosition)

Attach registers the position and tracks its updates.

Flutter: widgets/scroll_controller.dart TrackingScrollController.attach

func (*TrackingScrollController) Detach

func (c *TrackingScrollController) Detach(position ScrollPosition)

Detach unregisters the position and stops tracking it.

Flutter: widgets/scroll_controller.dart TrackingScrollController.detach

func (*TrackingScrollController) Dispose

func (c *TrackingScrollController) Dispose()

Dispose stops tracking the positions.

Flutter: widgets/scroll_controller.dart TrackingScrollController.dispose

func (*TrackingScrollController) InitialScrollOffset

func (c *TrackingScrollController) InitialScrollOffset() float64

InitialScrollOffset is the offset of the last position that updated, or the initial offset.

Flutter: widgets/scroll_controller.dart TrackingScrollController.initialScrollOffset

func (*TrackingScrollController) MostRecentlyUpdatedPosition

func (c *TrackingScrollController) MostRecentlyUpdatedPosition() ScrollPosition

MostRecentlyUpdatedPosition is the position that notified last, or nil.

Flutter: widgets/scroll_controller.dart TrackingScrollController.mostRecentlyUpdatedPosition

type Transform

type Transform struct {
	SingleChildRenderObjectWidget
	// contains filtered or unexported fields
}

Transform applies a transformation before painting its child.

Flutter: widgets/basic.dart Transform

func NewTransform

func NewTransform(transform *ui.Matrix4, child Widget, opts ...TransformOpts) *Transform

NewTransform creates the widget.

Flutter: widgets/basic.dart Transform.new

func NewTransformFlip

func NewTransformFlip(child Widget, opts ...TransformFlipOpts) *Transform

NewTransformFlip creates a widget that mirrors its child.

Flutter: widgets/basic.dart Transform.flip

func NewTransformRotate

func NewTransformRotate(angle float64, child Widget, opts ...TransformOpts) *Transform

NewTransformRotate creates a widget that rotates its child by the angle, in radians, around the alignment (the center by default).

Flutter: widgets/basic.dart Transform.rotate

func NewTransformScale

func NewTransformScale(child Widget, opts ...TransformScaleOpts) *Transform

NewTransformScale creates a widget that scales its child around the alignment (the center by default). In debug builds it panics with the tag TransformScaleInvalid when Scale is given together with ScaleX or ScaleY, or when none of them is.

Flutter: widgets/basic.dart Transform.scale

func NewTransformTranslate

func NewTransformTranslate(offset ui.Offset, child Widget, opts ...TransformOpts) *Transform

NewTransformTranslate creates a widget that translates its child.

Flutter: widgets/basic.dart Transform.translate

func (*Transform) Alignment

func (w *Transform) Alignment() painting.AlignmentGeometry

Alignment is the alignment of the origin, relative to the size of the box.

Flutter: widgets/basic.dart Transform.alignment

func (*Transform) CreateRenderObject

func (w *Transform) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Transform.createRenderObject

func (*Transform) FilterQuality

func (w *Transform) FilterQuality() foundation.Opt[ui.FilterQuality]

FilterQuality is the filter quality used when the child is painted into a layer with the transform.

Flutter: widgets/basic.dart Transform.filterQuality

func (*Transform) Origin

func (w *Transform) Origin() foundation.Opt[ui.Offset]

Origin is the origin of the coordinate system, relative to the upper left corner, in which to apply the matrix.

Flutter: widgets/basic.dart Transform.origin

func (*Transform) Transform

func (w *Transform) Transform() *ui.Matrix4

Transform is the matrix to transform the child by during painting.

Flutter: widgets/basic.dart Transform.transform

func (*Transform) TransformHitTests

func (w *Transform) TransformHitTests() foundation.Opt[bool]

TransformHitTests is whether to apply the transformation when performing hit tests; the default is true.

Flutter: widgets/basic.dart Transform.transformHitTests

func (*Transform) UpdateRenderObject

func (w *Transform) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Transform.updateRenderObject

type TransformCallback

type TransformCallback func(animationValue float64) *ui.Matrix4

TransformCallback computes a matrix from the animation's value.

Flutter: widgets/transitions.dart TransformCallback

type TransformFlipOpts

type TransformFlipOpts struct {
	TransformOpts
	// FlipX mirrors the child around the vertical axis.
	FlipX bool
	// FlipY mirrors the child around the horizontal axis.
	FlipY bool
}

TransformFlipOpts are the optional parameters of NewTransformFlip.

Flutter: widgets/basic.dart Transform.flip

type TransformOpts

type TransformOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Origin is the origin of the coordinate system, relative to the upper left corner, in which to apply the matrix.
	Origin foundation.Opt[ui.Offset]
	// Alignment is the alignment of the origin, relative to the size of the box.
	Alignment painting.AlignmentGeometry
	// TransformHitTests is whether to apply the transformation when performing hit tests; the default is true.
	TransformHitTests foundation.Opt[bool]
	// FilterQuality is the filter quality used when the child is painted into a layer with the transform.
	FilterQuality foundation.Opt[ui.FilterQuality]
}

TransformOpts are the optional parameters of NewTransform.

Flutter: widgets/basic.dart Transform.new

type TransformScaleOpts

type TransformScaleOpts struct {
	TransformOpts
	// Scale scales both axes by the same amount; it excludes ScaleX and ScaleY.
	Scale foundation.Opt[float64]
	// ScaleX scales the x axis.
	ScaleX foundation.Opt[float64]
	// ScaleY scales the y axis.
	ScaleY foundation.Opt[float64]
}

TransformScaleOpts are the optional parameters of NewTransformScale.

Flutter: widgets/basic.dart Transform.scale

type TransformationController

type TransformationController struct {
	foundation.ValueNotifier[*ui.Matrix4]
}

TransformationController is the controller of the transformation of an InteractiveViewer: it holds the matrix.

Flutter: widgets/interactive_viewer.dart TransformationController

func NewTransformationController

func NewTransformationController(value *ui.Matrix4) *TransformationController

NewTransformationController creates a controller with the matrix, or the identity if it is nil.

Flutter: widgets/interactive_viewer.dart TransformationController.new

func (*TransformationController) ToScene

func (c *TransformationController) ToScene(viewportPoint ui.Offset) ui.Offset

ToScene transforms a point in the coordinate system of the viewport to the one of the scene (the child).

Flutter: widgets/interactive_viewer.dart TransformationController.toScene

type TransitionBuilder

type TransitionBuilder func(bc BuildContext, child Widget) Widget

TransitionBuilder builds a widget for a ListenableBuilder or an AnimatedBuilder.

Flutter: widgets/transitions.dart TransitionBuilder

type TransitionDelegate

type TransitionDelegate interface {
	// Resolve decides how the new page routes enter and the exiting ones leave:
	// it marks every route that waits for a decision and returns every route that
	// stays in the history, in order: the entering routes in the order of
	// newPageRouteHistory, with the exiting routes inserted anywhere.
	//
	// locationToExitingPageRoute maps a page route (nil for the bottom of the
	// history) to the exiting page route right above it, and pageRouteToPagelessRoutes
	// maps a page route (nil for the bottom) to the routes that were pushed above
	// it without a page.
	//
	// Flutter: widgets/navigator.dart TransitionDelegate.resolve
	Resolve(newPageRouteHistory []RouteTransitionRecord, locationToExitingPageRoute map[RouteTransitionRecord]RouteTransitionRecord, pageRouteToPagelessRoutes map[RouteTransitionRecord][]RouteTransitionRecord) []RouteTransitionRecord
}

TransitionDelegate decides how the routes of the pages that entered or left the Navigator.pages list transition in or out.

Flutter: widgets/navigator.dart TransitionDelegate

type TransitionRoute

type TransitionRoute interface {
	OverlayRoute
	// Completed returns a channel that gets the result of the route when its
	// transition is done and it is disposed.
	//
	// Flutter: widgets/routes.dart TransitionRoute.completed
	Completed() <-chan any
	// TransitionDuration is the duration of the transition in.
	//
	// Flutter: widgets/routes.dart TransitionRoute.transitionDuration
	TransitionDuration() time.Duration
	// ReverseTransitionDuration is the duration of the transition out; it
	// defaults to TransitionDuration.
	//
	// Flutter: widgets/routes.dart TransitionRoute.reverseTransitionDuration
	ReverseTransitionDuration() time.Duration
	// Opaque is whether the route obscures the previous one when the transition
	// is complete.
	//
	// Flutter: widgets/routes.dart TransitionRoute.opaque
	Opaque() bool
	// AllowSnapshotting is whether the route's transitions may be snapshotted.
	//
	// Flutter: widgets/routes.dart TransitionRoute.allowSnapshotting
	AllowSnapshotting() bool
	// Animation drives the transition of the route.
	//
	// Flutter: widgets/routes.dart TransitionRoute.animation
	Animation() animation.Animation[float64]
	// SecondaryAnimation drives the transition of the route when another route
	// is pushed on top of it.
	//
	// Flutter: widgets/routes.dart TransitionRoute.secondaryAnimation
	SecondaryAnimation() animation.Animation[float64]
	// Controller is the controller of the animation.
	//
	// Flutter: widgets/routes.dart TransitionRoute.controller
	Controller() *animation.AnimationController
	// CreateAnimationController creates the controller for the animation.
	//
	// Flutter: widgets/routes.dart TransitionRoute.createAnimationController
	CreateAnimationController() *animation.AnimationController
	// CreateAnimation creates the animation of the route from the controller.
	//
	// Flutter: widgets/routes.dart TransitionRoute.createAnimation
	CreateAnimation() animation.Animation[float64]
	// CreateSimulation creates a simulation to drive the animation instead of a
	// duration; nil means the controller runs for the duration.
	//
	// Flutter: widgets/routes.dart TransitionRoute.createSimulation
	CreateSimulation(forward bool) physics.Simulation
	// CanTransitionTo is whether this route can transition to the next one,
	// animating its secondary animation.
	//
	// Flutter: widgets/routes.dart TransitionRoute.canTransitionTo
	CanTransitionTo(nextRoute TransitionRoute) bool
	// CanTransitionFrom is whether this route can transition from the previous
	// one.
	//
	// Flutter: widgets/routes.dart TransitionRoute.canTransitionFrom
	CanTransitionFrom(previousRoute TransitionRoute) bool
	// DebugLabel names the route for diagnostics.
	//
	// Flutter: widgets/routes.dart TransitionRoute.debugLabel
	DebugLabel() string
	// PopGestureEnabled is whether a back gesture may pop the route.
	//
	// Flutter: widgets/routes.dart PredictiveBackRoute.popGestureEnabled
	PopGestureEnabled() bool
	// HandleStartBackGesture starts a back gesture at the progress.
	//
	// Flutter: widgets/routes.dart PredictiveBackRoute.handleStartBackGesture
	HandleStartBackGesture(progress float64)
	// HandleUpdateBackGestureProgress updates the progress of a back gesture.
	//
	// Flutter: widgets/routes.dart PredictiveBackRoute.handleUpdateBackGestureProgress
	HandleUpdateBackGestureProgress(progress float64)
	// HandleCommitBackGesture pops the route at the end of a back gesture.
	//
	// Flutter: widgets/routes.dart PredictiveBackRoute.handleCommitBackGesture
	HandleCommitBackGesture()
	// HandleCancelBackGesture brings the route back at the end of a back gesture.
	//
	// Flutter: widgets/routes.dart PredictiveBackRoute.handleCancelBackGesture
	HandleCancelBackGesture()
	// contains filtered or unexported methods
}

TransitionRoute is an overlay route with an animation: it animates in when it is pushed and out when it is popped.

Flutter: widgets/routes.dart TransitionRoute

type TransitionRouteBase

type TransitionRouteBase struct {
	OverlayRouteBase
	// contains filtered or unexported fields
}

TransitionRouteBase implements the parts of TransitionRoute that are shared. Embed it and call InitTransitionRouteBase; implement TransitionDuration, Opaque and CreateOverlayEntries.

Flutter: widgets/routes.dart TransitionRoute

func (*TransitionRouteBase) AllowSnapshotting

func (b *TransitionRouteBase) AllowSnapshotting() bool

AllowSnapshotting is true.

Flutter: widgets/routes.dart TransitionRoute.allowSnapshotting

func (*TransitionRouteBase) Animation

Animation drives the transition of the route.

Flutter: widgets/routes.dart TransitionRoute.animation

func (*TransitionRouteBase) CanTransitionFrom

func (b *TransitionRouteBase) CanTransitionFrom(previousRoute TransitionRoute) bool

CanTransitionFrom is true.

Flutter: widgets/routes.dart TransitionRoute.canTransitionFrom

func (*TransitionRouteBase) CanTransitionTo

func (b *TransitionRouteBase) CanTransitionTo(nextRoute TransitionRoute) bool

CanTransitionTo is true.

Flutter: widgets/routes.dart TransitionRoute.canTransitionTo

func (*TransitionRouteBase) Completed

func (b *TransitionRouteBase) Completed() <-chan any

Completed returns a channel that gets the result of the route once its transition is done and the route is disposed.

Flutter: widgets/routes.dart TransitionRoute.completed

func (*TransitionRouteBase) Controller

Controller is the controller of the animation.

Flutter: widgets/routes.dart TransitionRoute.controller

func (*TransitionRouteBase) CreateAnimation

func (b *TransitionRouteBase) CreateAnimation() animation.Animation[float64]

CreateAnimation is the view of the controller.

Flutter: widgets/routes.dart TransitionRoute.createAnimation

func (*TransitionRouteBase) CreateAnimationController

func (b *TransitionRouteBase) CreateAnimationController() *animation.AnimationController

CreateAnimationController creates the controller of the route, with the navigator as its vsync.

Flutter: widgets/routes.dart TransitionRoute.createAnimationController

func (*TransitionRouteBase) CreateSimulation

func (b *TransitionRouteBase) CreateSimulation(forward bool) physics.Simulation

CreateSimulation is nil: the controller runs for the duration.

Flutter: widgets/routes.dart TransitionRoute.createSimulation

func (*TransitionRouteBase) DebugLabel

func (b *TransitionRouteBase) DebugLabel() string

DebugLabel names the route for diagnostics.

Flutter: widgets/routes.dart TransitionRoute.debugLabel

func (*TransitionRouteBase) DidAdd

func (b *TransitionRouteBase) DidAdd()

DidAdd completes the transition at once.

Flutter: widgets/routes.dart TransitionRoute.didAdd

func (*TransitionRouteBase) DidChangeNext

func (b *TransitionRouteBase) DidChangeNext(nextRoute Route)

DidChangeNext updates the secondary animation.

Flutter: widgets/routes.dart TransitionRoute.didChangeNext

func (*TransitionRouteBase) DidPop

func (b *TransitionRouteBase) DidPop(result any) bool

DidPop starts the transition out.

Flutter: widgets/routes.dart TransitionRoute.didPop

func (*TransitionRouteBase) DidPopNext

func (b *TransitionRouteBase) DidPopNext(nextRoute Route)

DidPopNext updates the secondary animation.

Flutter: widgets/routes.dart TransitionRoute.didPopNext

func (*TransitionRouteBase) DidPush

DidPush starts the transition in.

Flutter: widgets/routes.dart TransitionRoute.didPush

func (*TransitionRouteBase) DidReplace

func (b *TransitionRouteBase) DidReplace(oldRoute Route)

DidReplace takes the value of the controller of the route it replaces.

Flutter: widgets/routes.dart TransitionRoute.didReplace

func (*TransitionRouteBase) Dispose

func (b *TransitionRouteBase) Dispose()

Dispose disposes the controller and completes the channel of Completed.

Flutter: widgets/routes.dart TransitionRoute.dispose

func (*TransitionRouteBase) FinishedWhenPopped

func (b *TransitionRouteBase) FinishedWhenPopped() bool

FinishedWhenPopped is whether the controller is dismissed already and the pop was not finalized yet. This keeps a route that reached the dismissed state while still current disposable when it is eventually popped (this happens with the iOS dismiss gesture).

Flutter: widgets/routes.dart TransitionRoute.finishedWhenPopped

func (*TransitionRouteBase) HandleCancelBackGesture

func (b *TransitionRouteBase) HandleCancelBackGesture()

HandleCancelBackGesture animates the route back in.

Flutter: widgets/routes.dart TransitionRoute.handleCancelBackGesture

func (*TransitionRouteBase) HandleCommitBackGesture

func (b *TransitionRouteBase) HandleCommitBackGesture()

HandleCommitBackGesture pops the route.

Flutter: widgets/routes.dart TransitionRoute.handleCommitBackGesture

func (*TransitionRouteBase) HandleStartBackGesture

func (b *TransitionRouteBase) HandleStartBackGesture(progress float64)

HandleStartBackGesture sets the controller to the progress and tells the navigator that a user gesture started.

Flutter: widgets/routes.dart TransitionRoute.handleStartBackGesture

func (*TransitionRouteBase) HandleUpdateBackGestureProgress

func (b *TransitionRouteBase) HandleUpdateBackGestureProgress(progress float64)

HandleUpdateBackGestureProgress sets the controller to the progress, unless another navigation happened during the gesture.

Flutter: widgets/routes.dart TransitionRoute.handleUpdateBackGestureProgress

func (*TransitionRouteBase) Install

func (b *TransitionRouteBase) Install()

Install creates the controller and the animation, and the overlay entries.

Flutter: widgets/routes.dart TransitionRoute.install

func (*TransitionRouteBase) PopGestureEnabled

func (b *TransitionRouteBase) PopGestureEnabled() bool

PopGestureEnabled is false.

Flutter: widgets/routes.dart PredictiveBackRoute.popGestureEnabled

func (*TransitionRouteBase) ReverseTransitionDuration

func (b *TransitionRouteBase) ReverseTransitionDuration() time.Duration

ReverseTransitionDuration is the TransitionDuration.

Flutter: widgets/routes.dart TransitionRoute.reverseTransitionDuration

func (*TransitionRouteBase) SecondaryAnimation

func (b *TransitionRouteBase) SecondaryAnimation() animation.Animation[float64]

SecondaryAnimation drives the transition when another route is pushed on top.

Flutter: widgets/routes.dart TransitionRoute.secondaryAnimation

func (*TransitionRouteBase) SetWillDisposeAnimationController

func (b *TransitionRouteBase) SetWillDisposeAnimationController(value bool)

SetWillDisposeAnimationController changes whether the route disposes the controller of the animation.

Flutter: widgets/routes.dart TransitionRoute.willDisposeAnimationController

func (*TransitionRouteBase) String

func (b *TransitionRouteBase) String() string

String describes the route.

Flutter: widgets/routes.dart TransitionRoute.toString

func (*TransitionRouteBase) WillDisposeAnimationController

func (b *TransitionRouteBase) WillDisposeAnimationController() bool

WillDisposeAnimationController is whether the route disposes the controller of the animation when it is disposed; the default is true.

Flutter: widgets/routes.dart TransitionRoute.willDisposeAnimationController

type TransposeCharactersIntent

type TransposeCharactersIntent struct{ IntentBase }

TransposeCharactersIntent is an intent that swaps the characters around the caret.

Flutter: widgets/text_editing_intents.dart TransposeCharactersIntent

type TraversalDirection

type TraversalDirection int

TraversalDirection is a direction in which the focus can move.

Flutter: widgets/focus_traversal.dart TraversalDirection

const (
	// TraversalDirectionUnspecified is the zero value: no direction.
	//
	// Flutter: no counterpart
	TraversalDirectionUnspecified TraversalDirection = iota
	// TraversalDirectionUp moves the focus up.
	//
	// Flutter: widgets/focus_traversal.dart TraversalDirection.up
	TraversalDirectionUp
	// TraversalDirectionRight moves the focus to the right.
	//
	// Flutter: widgets/focus_traversal.dart TraversalDirection.right
	TraversalDirectionRight
	// TraversalDirectionDown moves the focus down.
	//
	// Flutter: widgets/focus_traversal.dart TraversalDirection.down
	TraversalDirectionDown
	// TraversalDirectionLeft moves the focus to the left.
	//
	// Flutter: widgets/focus_traversal.dart TraversalDirection.left
	TraversalDirectionLeft
)

The values of TraversalDirection follow Flutter's declaration order.

func (TraversalDirection) Name

func (d TraversalDirection) Name() string

Name is the name of the direction without the type, such as "right".

Flutter: widgets/focus_traversal.dart TraversalDirection

func (TraversalDirection) String

func (d TraversalDirection) String() string

String is the name of the direction, like Dart's enum toString.

Flutter: widgets/focus_traversal.dart TraversalDirection

type TraversalEdgeBehavior

type TraversalEdgeBehavior int

TraversalEdgeBehavior is what the focus does when traversal reaches the edge of a scope.

Flutter: widgets/focus_traversal.dart TraversalEdgeBehavior

const (
	// TraversalEdgeBehaviorUnspecified is the zero value: the default of the
	// scope (closed loop for next and previous focus, stop for directional focus).
	//
	// Flutter: no counterpart
	TraversalEdgeBehaviorUnspecified TraversalEdgeBehavior = iota
	// TraversalEdgeBehaviorClosedLoop wraps the focus around inside the scope.
	//
	// Flutter: widgets/focus_traversal.dart TraversalEdgeBehavior.closedLoop
	TraversalEdgeBehaviorClosedLoop
	// TraversalEdgeBehaviorLeaveFlutterView lets the focus leave the view: the
	// focus is removed from the scope and traversal ends.
	//
	// Flutter: widgets/focus_traversal.dart TraversalEdgeBehavior.leaveFlutterView
	TraversalEdgeBehaviorLeaveFlutterView
	// TraversalEdgeBehaviorParentScope moves the focus on in the parent scope.
	//
	// Flutter: widgets/focus_traversal.dart TraversalEdgeBehavior.parentScope
	TraversalEdgeBehaviorParentScope
	// TraversalEdgeBehaviorStop keeps the focus where it is.
	//
	// Flutter: widgets/focus_traversal.dart TraversalEdgeBehavior.stop
	TraversalEdgeBehaviorStop
)

The values of TraversalEdgeBehavior follow Flutter's declaration order.

func (TraversalEdgeBehavior) String

func (b TraversalEdgeBehavior) String() string

String is the name of the behavior, like Dart's enum toString.

Flutter: widgets/focus_traversal.dart TraversalEdgeBehavior

type TraversalRequestFocusCallback

type TraversalRequestFocusCallback func(node *FocusNode, opts TraversalRequestFocusOpts)

TraversalRequestFocusCallback is the function a traversal policy calls to give the focus to a node.

Flutter: widgets/focus_traversal.dart TraversalRequestFocusCallback

type TraversalRequestFocusOpts

type TraversalRequestFocusOpts struct {
	// AlignmentPolicy is how the node is aligned in the scrollables around it; the
	// default is ScrollPositionAlignmentPolicyExplicit.
	AlignmentPolicy ScrollPositionAlignmentPolicy
	// Alignment is where in the viewport the node ends up; the default is 1.
	Alignment foundation.Opt[float64]
	// Duration is the length of the scroll animation; the default is zero.
	Duration time.Duration
	// Curve is the curve of the scroll animation; the default is Curves.ease.
	Curve animation.Curve
}

TraversalRequestFocusOpts are the optional parameters of a TraversalRequestFocusCallback.

Flutter: widgets/focus_traversal.dart TraversalRequestFocusCallback

type TreeSliver

type TreeSliver[T any] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

TreeSliver is a sliver that shows a tree of nodes as a list of rows, each indented by its depth. A parent node expands to show its children and collapses to hide them, with an animation; give it to a CustomScrollView. A TreeSliverController does the toggling from code, and TreeSliverWrapChildToToggleNode makes a widget that toggles its node when it is tapped.

Deviation: the sliver keeps the extents of its rows (the ItemExtentBuilder) and their running sums, so the builder is asked at most once for each row until the tree is rebuilt or the viewport extent, the cross axis extent or the number of rows change: it must give the same extents until then, and not depend on the scroll offset or the preceding scroll extent of its dimensions (SPEC §11.4, §12.10).

Flutter: widgets/sliver_tree.dart TreeSliver

func NewTreeSliver

func NewTreeSliver[T any](tree []*TreeSliverNode[T], opts ...TreeSliverOpts[T]) *TreeSliver[T]

NewTreeSliver creates a sliver that shows the nodes of the tree.

Flutter: widgets/sliver_tree.dart TreeSliver.new

func (*TreeSliver[T]) Controller

func (w *TreeSliver[T]) Controller() *TreeSliverController[T]

Controller is the controller that was given, if any.

Flutter: widgets/sliver_tree.dart TreeSliver.controller

func (*TreeSliver[T]) CreateState

func (w *TreeSliver[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/sliver_tree.dart TreeSliver.createState

func (*TreeSliver[T]) Indentation

func (w *TreeSliver[T]) Indentation() rendering.TreeSliverIndentationType

Indentation is how far each level is indented.

Flutter: widgets/sliver_tree.dart TreeSliver.indentation

func (*TreeSliver[T]) ToggleAnimationStyle

func (w *TreeSliver[T]) ToggleAnimationStyle() foundation.Opt[animation.AnimationStyle]

ToggleAnimationStyle is the style of the toggle animation, if one was given.

Flutter: widgets/sliver_tree.dart TreeSliver.toggleAnimationStyle

func (*TreeSliver[T]) Tree

func (w *TreeSliver[T]) Tree() []*TreeSliverNode[T]

Tree is the root nodes of the tree.

Flutter: widgets/sliver_tree.dart TreeSliver.tree

type TreeSliverController

type TreeSliverController[T any] struct {
	// contains filtered or unexported fields
}

TreeSliverController expands and collapses the nodes of a TreeSliver, and answers questions about them. Give it to a TreeSliver in TreeSliverOpts.Controller, or find the one of the tree above a context with TreeSliverControllerOf. A controller can belong to one tree.

Flutter: widgets/sliver_tree.dart TreeSliverController

func NewTreeSliverController

func NewTreeSliverController[T any]() *TreeSliverController[T]

NewTreeSliverController creates a controller that is not attached to a tree yet.

Flutter: widgets/sliver_tree.dart TreeSliverController.new

func TreeSliverControllerMaybeOf

func TreeSliverControllerMaybeOf[T any](bc BuildContext) (*TreeSliverController[T], bool)

TreeSliverControllerMaybeOf is the controller of the closest TreeSliver of content type T above the context, or false.

Flutter: widgets/sliver_tree.dart TreeSliverController.maybeOf

func TreeSliverControllerOf

func TreeSliverControllerOf[T any](bc BuildContext) *TreeSliverController[T]

TreeSliverControllerOf is the controller of the closest TreeSliver of content type T above the context. It panics with TreeSliverControllerNotFound when there is none; use a Builder to get a context below the TreeSliver when the context is the one of the widget that builds it.

Flutter: widgets/sliver_tree.dart TreeSliverController.of

func (*TreeSliverController[T]) CollapseAll

func (c *TreeSliverController[T]) CollapseAll()

CollapseAll collapses every node of the tree.

Flutter: widgets/sliver_tree.dart TreeSliverController.collapseAll

func (*TreeSliverController[T]) CollapseNode

func (c *TreeSliverController[T]) CollapseNode(node *TreeSliverNode[T])

CollapseNode collapses the node when it is expanded.

Flutter: widgets/sliver_tree.dart TreeSliverController.collapseNode

func (*TreeSliverController[T]) ExpandAll

func (c *TreeSliverController[T]) ExpandAll()

ExpandAll expands every node of the tree.

Flutter: widgets/sliver_tree.dart TreeSliverController.expandAll

func (*TreeSliverController[T]) ExpandNode

func (c *TreeSliverController[T]) ExpandNode(node *TreeSliverNode[T])

ExpandNode expands the node when it is collapsed.

Flutter: widgets/sliver_tree.dart TreeSliverController.expandNode

func (*TreeSliverController[T]) GetActiveIndexFor

func (c *TreeSliverController[T]) GetActiveIndexFor(node *TreeSliverNode[T]) foundation.Opt[int]

GetActiveIndexFor is the index of the node in the list of the nodes that are shown; none when it is not shown.

Flutter: widgets/sliver_tree.dart TreeSliverController.getActiveIndexFor

func (*TreeSliverController[T]) GetNodeFor

func (c *TreeSliverController[T]) GetNodeFor(content T) *TreeSliverNode[T]

GetNodeFor finds the node that holds the content, looking through the tree one level after the other; nil when there is none.

Flutter: widgets/sliver_tree.dart TreeSliverController.getNodeFor

func (*TreeSliverController[T]) IsActive

func (c *TreeSliverController[T]) IsActive(node *TreeSliverNode[T]) bool

IsActive is whether the node is shown now: its parents are expanded (or animating).

Flutter: widgets/sliver_tree.dart TreeSliverController.isActive

func (*TreeSliverController[T]) IsExpanded

func (c *TreeSliverController[T]) IsExpanded(node *TreeSliverNode[T]) bool

IsExpanded is whether the node is expanded; a node that is not in the tree is not.

Flutter: widgets/sliver_tree.dart TreeSliverController.isExpanded

func (*TreeSliverController[T]) ToggleNode

func (c *TreeSliverController[T]) ToggleNode(node *TreeSliverNode[T])

ToggleNode expands the node, or collapses it. The node must be active (TreeSliverNodeNotActive).

Flutter: widgets/sliver_tree.dart TreeSliverController.toggleNode

type TreeSliverNode

type TreeSliverNode[T any] struct {
	// contains filtered or unexported fields
}

TreeSliverNode is a node of the tree that a TreeSliver shows: a content, and the child nodes that it holds. The sliver tells each active node its depth and its parent.

Flutter: widgets/sliver_tree.dart TreeSliverNode

func NewTreeSliverNode

func NewTreeSliverNode[T any](content T, opts ...TreeSliverNodeOpts[T]) *TreeSliverNode[T]

NewTreeSliverNode creates a node that holds the content.

Flutter: widgets/sliver_tree.dart TreeSliverNode.new

func (*TreeSliverNode[T]) AddChild

func (n *TreeSliverNode[T]) AddChild(child *TreeSliverNode[T])

AddChild adds a node below this one, after the others. Dart's children is a list that the app changes; here the node has methods (AddChild, InsertChild, RemoveChild, SetChildren), and the TreeSliver that shows the node is told, so it shows the change at once, as Flutter's does when the list is changed and the tree is built again.

Deviation: Flutter's children is mutable (SPEC §12.10).

Flutter: widgets/sliver_tree.dart TreeSliverNode.children

func (*TreeSliverNode[T]) Children

func (n *TreeSliverNode[T]) Children() []*TreeSliverNode[T]

Children are the nodes below this one.

Flutter: widgets/sliver_tree.dart TreeSliverNode.children

func (*TreeSliverNode[T]) Content

func (n *TreeSliverNode[T]) Content() T

Content is the content the node holds.

Flutter: widgets/sliver_tree.dart TreeSliverNode.content

func (*TreeSliverNode[T]) Depth

func (n *TreeSliverNode[T]) Depth() foundation.Opt[int]

Depth is how deep the node is in the tree, 0 for a root node; none until the TreeSliver that has the node has made it active.

Flutter: widgets/sliver_tree.dart TreeSliverNode.depth

func (*TreeSliverNode[T]) HasChildren

func (n *TreeSliverNode[T]) HasChildren() bool

HasChildren is whether the node has children, or is a lazy node whose children are not read yet.

Deviation: Flutter's node has children or has none (SPEC §12.10).

Flutter: widgets/sliver_tree.dart TreeSliverNode.children

func (*TreeSliverNode[T]) InsertChild

func (n *TreeSliverNode[T]) InsertChild(index int, child *TreeSliverNode[T])

InsertChild adds a node below this one at the index (0 to the number of children; the end for a larger one).

Flutter: widgets/sliver_tree.dart TreeSliverNode.children

func (*TreeSliverNode[T]) IsExpanded

func (n *TreeSliverNode[T]) IsExpanded() bool

IsExpanded is whether the children are shown (or being shown).

Flutter: widgets/sliver_tree.dart TreeSliverNode.isExpanded

func (*TreeSliverNode[T]) Parent

func (n *TreeSliverNode[T]) Parent() *TreeSliverNode[T]

Parent is the node that holds this one, nil for a root node (or before the node was active).

Flutter: widgets/sliver_tree.dart TreeSliverNode.parent

func (*TreeSliverNode[T]) RemoveChild

func (n *TreeSliverNode[T]) RemoveChild(child *TreeSliverNode[T]) bool

RemoveChild removes the node from the children of this one, and reports whether it was one. The removed node has no parent and no depth, and its subtree leaves the tree with it, whatever its state. A node that held its last child is collapsed (a lazy node is not).

Flutter: widgets/sliver_tree.dart TreeSliverNode.children

func (*TreeSliverNode[T]) SetChildren

func (n *TreeSliverNode[T]) SetChildren(children []*TreeSliverNode[T])

SetChildren replaces the children of this one. The old children that are not among the new ones have no parent and no depth any more. A node left with no children is collapsed (a lazy node is not).

Flutter: widgets/sliver_tree.dart TreeSliverNode.children

func (*TreeSliverNode[T]) SetExpanded

func (n *TreeSliverNode[T]) SetExpanded(expanded bool)

SetExpanded sets whether the children are shown, for a node that is shown or not. A node with no children that is not a lazy node (HasChildren) stays collapsed, as NewTreeSliverNode makes it. Setting the value the node has changes nothing. When the node is shown by a TreeSliver, the tree makes its active nodes again at once, with no animation of the rows (so Parent and Depth are right for the rows that come or go); the arrow of the default node builder still turns, as it has an animation of its own. The tree's controller (ExpandNode, CollapseNode, ToggleNode) animates and calls OnNodeToggle, which SetExpanded does not. A node that is hidden keeps the value until its ancestors are expanded. Call it on the UI thread.

A TreeSliver that has a NodeKey keeps the expansion of the old nodes for new nodes with the same key; a node whose expansion the app gave with SetExpanded (even with the value the node had) before the tree took it in keeps the app's value instead, so an app that builds its nodes again can set the expansion from its model.

Deviation: Flutter's TreeSliverNode._expanded is private, and Dart apps build the nodes again to change the expansion; Go apps keep the state of their tree in a model (SPEC §12.10).

Flutter: widgets/sliver_tree.dart TreeSliverNode._expanded

func (*TreeSliverNode[T]) String

func (n *TreeSliverNode[T]) String() string

String describes the node.

Flutter: widgets/sliver_tree.dart TreeSliverNode.toString

type TreeSliverNodeBuilder

type TreeSliverNodeBuilder[T any] func(bc BuildContext, node *TreeSliverNode[T], animationStyle animation.AnimationStyle) Widget

TreeSliverNodeBuilder builds the widget of a node. The animation style is the one of the tree's toggle animation, for the widgets that show whether the node is expanded.

Deviation: Flutter's TreeSliverNode<Object?> is the node of any tree; Go has no covariance, so the builder is generic in the content (SPEC §12.10).

Flutter: widgets/sliver_tree.dart TreeSliverNodeBuilder

type TreeSliverNodeCallback

type TreeSliverNodeCallback[T any] func(node *TreeSliverNode[T])

TreeSliverNodeCallback is called with a node, for example when it is toggled.

Flutter: widgets/sliver_tree.dart TreeSliverNodeCallback

type TreeSliverNodeOpts

type TreeSliverNodeOpts[T any] struct {
	// Children are the nodes below this one; none for a leaf.
	Children []*TreeSliverNode[T]
	// Expanded is whether the children are shown. A node without children is never expanded, unless
	// HasChildren is set.
	Expanded bool
	// HasChildren makes the node one that has children that are not read yet (a lazy node, such as a folder
	// whose entries are listed when it opens): it can be toggled with no children, and the default node
	// builder shows its arrow. Toggling it calls OnNodeToggle, where the app adds the children (SetChildren),
	// which the node then shows, with the animation of the sliver when they are there at once.
	//
	// Deviation: Flutter's node has children or has none (SPEC §12.10).
	HasChildren bool
}

TreeSliverNodeOpts are the optional parameters of NewTreeSliverNode.

Flutter: widgets/sliver_tree.dart TreeSliverNode.new

type TreeSliverOpts

type TreeSliverOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TreeNodeBuilder builds the widget of a node; the default is TreeSliverDefaultTreeNodeBuilder.
	TreeNodeBuilder TreeSliverNodeBuilder[T]
	// TreeRowExtentBuilder gives the height of a row; the default is 40.
	TreeRowExtentBuilder TreeSliverRowExtentBuilder[T]
	// Controller expands and collapses the nodes; the tree makes its own when there is none.
	Controller *TreeSliverController[T]
	// OnNodeToggle is called when a node is toggled, after its state changed.
	OnNodeToggle TreeSliverNodeCallback[T]
	// NodeKey gives the key of the content of a node: GetNodeFor and IsExpanded find the node whose key is
	// the key of the content, and a tree that is built again with new node objects keeps the expansion of the
	// nodes whose keys were in the tree before. The keys must be comparable. Without it, contents are compared
	// with reflect.DeepEqual and the new nodes keep their own state.
	//
	// Deviation: Flutter compares the contents with ==, and its nodes are kept by the app (SPEC §12.10).
	NodeKey func(content T) any
	// ToggleAnimationStyle is the curve and the duration of the animation of a toggle; AnimationStyleNoAnimation, or
	// a zero duration, skips it. The default is TreeSliverDefaultToggleAnimationStyle.
	ToggleAnimationStyle foundation.Opt[animation.AnimationStyle]
	// Indentation is how far each level is indented; the default is TreeSliverIndentationTypeStandard.
	Indentation foundation.Opt[rendering.TreeSliverIndentationType]
	// AddAutomaticKeepAlives is whether to wrap each row in an AutomaticKeepAlive; the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
	// AddRepaintBoundaries is whether to wrap each row in a RepaintBoundary; the default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddSemanticIndexes is whether to wrap each row in an IndexedSemantics; the default is true.
	AddSemanticIndexes foundation.Opt[bool]
	// SemanticIndexCallback gives the semantic index of a row; the default is its index.
	SemanticIndexCallback SemanticIndexCallback
	// SemanticIndexOffset is added to the semantic index of every row.
	SemanticIndexOffset int
	// FindChildIndexCallback finds the index of the row that has a key.
	FindChildIndexCallback ChildIndexGetter
}

TreeSliverOpts are the optional parameters of NewTreeSliver.

Flutter: widgets/sliver_tree.dart TreeSliver.new

type TreeSliverRowExtentBuilder

type TreeSliverRowExtentBuilder[T any] func(node *TreeSliverNode[T], dimensions rendering.SliverLayoutDimensions) float64

TreeSliverRowExtentBuilder gives the height of the row of a node.

Flutter: widgets/sliver_tree.dart TreeSliverRowExtentBuilder

type TweenAnimationBuilder

type TweenAnimationBuilder[T any] struct {
	ImplicitlyAnimatedWidget
	// contains filtered or unexported fields
}

TweenAnimationBuilder is a widget builder that animates a property of its subtree to a target value whenever the target changes: the tween's end is the target, and the builder is called with the animated value on every frame of the animation.

The tween is kept, and changed, by the widget: pass a new one only to change how the value is interpolated for the first time. A tween made with animation.NewTweenEnd (or NewTweenFuncEnd) has no beginning: the widget starts at its end, so nothing animates at first.

Flutter: widgets/tween_animation_builder.dart TweenAnimationBuilder

func NewTweenAnimationBuilder

func NewTweenAnimationBuilder[T any](tween *animation.Tween[T], duration time.Duration, builder ValueWidgetBuilder[T], child Widget,
	opts ...TweenAnimationBuilderOpts[T]) *TweenAnimationBuilder[T]

NewTweenAnimationBuilder creates the widget. The child, which may be nil, is the part of the subtree that does not depend on the value: it is given to the builder.

Flutter: widgets/tween_animation_builder.dart TweenAnimationBuilder.new

func (*TweenAnimationBuilder[T]) Builder

func (w *TweenAnimationBuilder[T]) Builder() ValueWidgetBuilder[T]

Builder is the function that builds the subtree with the animated value.

Flutter: widgets/tween_animation_builder.dart TweenAnimationBuilder.builder

func (*TweenAnimationBuilder[T]) Child

func (w *TweenAnimationBuilder[T]) Child() Widget

Child is the part of the subtree that does not depend on the value.

Flutter: widgets/tween_animation_builder.dart TweenAnimationBuilder.child

func (*TweenAnimationBuilder[T]) CreateState

func (w *TweenAnimationBuilder[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/tween_animation_builder.dart TweenAnimationBuilder.createState

func (*TweenAnimationBuilder[T]) Tween

func (w *TweenAnimationBuilder[T]) Tween() *animation.Tween[T]

Tween is the tween that interpolates the value; its end is the target.

Flutter: widgets/tween_animation_builder.dart TweenAnimationBuilder.tween

type TweenAnimationBuilderOpts

type TweenAnimationBuilderOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Curve is the curve of the animation; the default is Curves.Linear.
	Curve animation.Curve
	// OnEnd is called every time an animation completes.
	OnEnd func()
	// Equal compares two values of the tween to see whether the target changed;
	// the default is foundation.ValuesEqual (Go's == for comparable values).
	// Give one for a type that has its own notion of equality, such as a
	// pointer to a struct.
	Equal func(a, b T) bool
}

TweenAnimationBuilderOpts are the optional parameters of NewTweenAnimationBuilder.

Flutter: widgets/tween_animation_builder.dart TweenAnimationBuilder.new

type TweenVisitor

type TweenVisitor struct {
	// contains filtered or unexported fields
}

TweenVisitor is given to ForEachTween of an implicitly animated state. The state calls VisitTween for each of its tweens. The framework runs the visit twice: first to create the tweens and see whether any target changed, then, if one did, to start every tween from the value it has now.

Flutter: widgets/implicit_animations.dart TweenVisitor

type TwoDimensionalChildBuilderDelegate

type TwoDimensionalChildBuilderDelegate struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

TwoDimensionalChildBuilderDelegate supplies the children of a two-dimensional viewport lazily, from a builder, up to optional greatest indices.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate

func NewTwoDimensionalChildBuilderDelegate

NewTwoDimensionalChildBuilderDelegate creates a delegate. In debug builds it panics with the tag TwoDimensionalIndexInvalid when a maximum index is less than -1.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate.new

func (*TwoDimensionalChildBuilderDelegate) Build

Build builds the child at the vicinity, or returns nil beyond the greatest indices or where the builder has none.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate.build

func (*TwoDimensionalChildBuilderDelegate) MaxXIndex

MaxXIndex is the greatest x index of a child, or none.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate.maxXIndex

func (*TwoDimensionalChildBuilderDelegate) MaxYIndex

MaxYIndex is the greatest y index of a child, or none.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate.maxYIndex

func (*TwoDimensionalChildBuilderDelegate) SetMaxXIndex

func (d *TwoDimensionalChildBuilderDelegate) SetMaxXIndex(value foundation.Opt[int])

SetMaxXIndex changes the greatest x index and notifies the listeners.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate.maxXIndex

func (*TwoDimensionalChildBuilderDelegate) SetMaxYIndex

func (d *TwoDimensionalChildBuilderDelegate) SetMaxYIndex(value foundation.Opt[int])

SetMaxYIndex changes the greatest y index and notifies the listeners.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate.maxYIndex

func (*TwoDimensionalChildBuilderDelegate) ShouldRebuild

ShouldRebuild is true.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate.shouldRebuild

type TwoDimensionalChildBuilderDelegateOpts

type TwoDimensionalChildBuilderDelegateOpts struct {
	// MaxXIndex is the greatest x index of a child; none means unbounded.
	MaxXIndex foundation.Opt[int]
	// MaxYIndex is the greatest y index of a child; none means unbounded.
	MaxYIndex foundation.Opt[int]
	// AddRepaintBoundaries is whether to wrap each child in a RepaintBoundary;
	// the default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddAutomaticKeepAlives is whether to wrap each child in an
	// AutomaticKeepAlive; the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
}

TwoDimensionalChildBuilderDelegateOpts are the optional parameters of NewTwoDimensionalChildBuilderDelegate.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildBuilderDelegate.new

type TwoDimensionalChildDelegate

type TwoDimensionalChildDelegate interface {
	rendering.TwoDimensionalChildDelegate
	// Build builds the widget at the vicinity, or returns nil if there is none.
	//
	// Flutter: widgets/scroll_delegate.dart TwoDimensionalChildDelegate.build
	Build(bc BuildContext, vicinity ChildVicinity) Widget
}

TwoDimensionalChildDelegate supplies the children of a two-dimensional viewport. It notifies its listeners when the children change.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildDelegate

type TwoDimensionalChildListDelegate

type TwoDimensionalChildListDelegate struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

TwoDimensionalChildListDelegate supplies the children of a two-dimensional viewport from a list of rows (the first index is y, the second one x).

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildListDelegate

func NewTwoDimensionalChildListDelegate

func NewTwoDimensionalChildListDelegate(children [][]Widget, opts ...TwoDimensionalChildListDelegateOpts) *TwoDimensionalChildListDelegate

NewTwoDimensionalChildListDelegate creates a delegate of the rows of children.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildListDelegate.new

func (*TwoDimensionalChildListDelegate) Build

Build returns the child at the vicinity, or nil beyond the lists.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildListDelegate.build

func (*TwoDimensionalChildListDelegate) Children

func (d *TwoDimensionalChildListDelegate) Children() [][]Widget

Children are the rows of children.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildListDelegate.children

func (*TwoDimensionalChildListDelegate) ShouldRebuild

ShouldRebuild is whether the children are not the same lists.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildListDelegate.shouldRebuild

type TwoDimensionalChildListDelegateOpts

type TwoDimensionalChildListDelegateOpts struct {
	// AddRepaintBoundaries is whether to wrap each child in a RepaintBoundary;
	// the default is true.
	AddRepaintBoundaries foundation.Opt[bool]
	// AddAutomaticKeepAlives is whether to wrap each child in an
	// AutomaticKeepAlive; the default is true.
	AddAutomaticKeepAlives foundation.Opt[bool]
}

TwoDimensionalChildListDelegateOpts are the optional parameters of NewTwoDimensionalChildListDelegate.

Flutter: widgets/scroll_delegate.dart TwoDimensionalChildListDelegate.new

type TwoDimensionalIndexedWidgetBuilder

type TwoDimensionalIndexedWidgetBuilder func(bc BuildContext, vicinity ChildVicinity) Widget

TwoDimensionalIndexedWidgetBuilder builds the widget at the vicinity, or returns nil if there is none.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalIndexedWidgetBuilder

type TwoDimensionalScrollView

type TwoDimensionalScrollView struct {
	StatelessWidget
	// contains filtered or unexported fields
}

TwoDimensionalScrollView is the base of the scroll views that scroll along two axes: it builds a TwoDimensionalScrollable that builds the viewport. The concrete widget embeds it, calls InitTwoDimensionalScrollView, and implements BuildViewport.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView

func (*TwoDimensionalScrollView) Build

Build builds the TwoDimensionalScrollable that builds the viewport.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.build

func (*TwoDimensionalScrollView) ClipBehavior

func (v *TwoDimensionalScrollView) ClipBehavior() ui.Clip

ClipBehavior is how the view clips.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.clipBehavior

func (*TwoDimensionalScrollView) Delegate

Delegate supplies the children.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.delegate

func (*TwoDimensionalScrollView) DiagonalDragBehavior

func (v *TwoDimensionalScrollView) DiagonalDragBehavior() DiagonalDragBehavior

DiagonalDragBehavior is how the view responds to a diagonal drag.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.diagonalDragBehavior

func (*TwoDimensionalScrollView) DragStartBehavior

func (v *TwoDimensionalScrollView) DragStartBehavior() gestures.DragStartBehavior

DragStartBehavior is where a drag starts.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.dragStartBehavior

func (*TwoDimensionalScrollView) HorizontalDetails

func (v *TwoDimensionalScrollView) HorizontalDetails() ScrollableDetails

HorizontalDetails are the details of the horizontal axis.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.horizontalDetails

func (*TwoDimensionalScrollView) MainAxis

func (v *TwoDimensionalScrollView) MainAxis() painting.Axis

MainAxis is the axis the children are ordered by.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.mainAxis

func (*TwoDimensionalScrollView) ScrollCacheExtent

ScrollCacheExtent is how far beyond the viewport children are built, or none.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.scrollCacheExtent

func (*TwoDimensionalScrollView) VerticalDetails

func (v *TwoDimensionalScrollView) VerticalDetails() ScrollableDetails

VerticalDetails are the details of the vertical axis.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.verticalDetails

type TwoDimensionalScrollViewOpts

type TwoDimensionalScrollViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Primary is whether this is the primary scroll view for the main axis; the
	// default is true when it has no controller there and the main axis is vertical.
	Primary foundation.Opt[bool]
	// MainAxis is the axis the children are ordered by; the default is vertical.
	MainAxis painting.Axis
	// VerticalDetails are the details of the vertical axis; the default is
	// ScrollableDetails vertical.
	VerticalDetails foundation.Opt[ScrollableDetails]
	// HorizontalDetails are the details of the horizontal axis; the default is
	// ScrollableDetails horizontal.
	HorizontalDetails foundation.Opt[ScrollableDetails]
	// ScrollCacheExtent is how far beyond the viewport children are built.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
	// DiagonalDragBehavior is how the view responds to a diagonal drag.
	DiagonalDragBehavior DiagonalDragBehavior
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// KeyboardDismissBehavior is how the view dismisses the keyboard.
	KeyboardDismissBehavior ScrollViewKeyboardDismissBehavior
	// ClipBehavior is how the view clips; the default is ClipHardEdge.
	ClipBehavior ui.Clip
	// HitTestBehavior is how the view behaves during hit testing; the default is
	// HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
}

TwoDimensionalScrollViewOpts are the optional parameters of InitTwoDimensionalScrollView.

Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.new

type TwoDimensionalScrollViewSelf

type TwoDimensionalScrollViewSelf interface {
	// BuildViewport builds the viewport with the offset of each axis.
	//
	// Flutter: widgets/two_dimensional_scroll_view.dart TwoDimensionalScrollView.buildViewport
	BuildViewport(bc BuildContext, verticalOffset, horizontalOffset rendering.ViewportOffset) Widget
}

TwoDimensionalScrollViewSelf is what TwoDimensionalScrollView needs of the type that embeds it.

Flutter: no counterpart

type TwoDimensionalScrollable

type TwoDimensionalScrollable struct {
	StatefulWidget
	// contains filtered or unexported fields
}

TwoDimensionalScrollable is a widget with two Scrollables, one nested in the other, that scrolls along both axes: it builds a viewport with the offset of each of them.

Deviation: it has no restorationId (SPEC §12.10).

Flutter: widgets/scrollable.dart TwoDimensionalScrollable

func NewTwoDimensionalScrollable

func NewTwoDimensionalScrollable(horizontalDetails, verticalDetails ScrollableDetails, viewportBuilder TwoDimensionalViewportBuilder, opts ...TwoDimensionalScrollableOpts) *TwoDimensionalScrollable

NewTwoDimensionalScrollable creates the widget.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.new

func (*TwoDimensionalScrollable) CreateState

func (w *TwoDimensionalScrollable) CreateState() State

CreateState creates the state.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.createState

func (*TwoDimensionalScrollable) DiagonalDragBehavior

func (w *TwoDimensionalScrollable) DiagonalDragBehavior() DiagonalDragBehavior

DiagonalDragBehavior is how the scrollable responds to a diagonal drag.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.diagonalDragBehavior

func (*TwoDimensionalScrollable) DragStartBehavior

func (w *TwoDimensionalScrollable) DragStartBehavior() gestures.DragStartBehavior

DragStartBehavior is where a drag starts.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.dragStartBehavior

func (*TwoDimensionalScrollable) HorizontalDetails

func (w *TwoDimensionalScrollable) HorizontalDetails() ScrollableDetails

HorizontalDetails are the details of the horizontal axis.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.horizontalDetails

func (*TwoDimensionalScrollable) VerticalDetails

func (w *TwoDimensionalScrollable) VerticalDetails() ScrollableDetails

VerticalDetails are the details of the vertical axis.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.verticalDetails

type TwoDimensionalScrollableOpts

type TwoDimensionalScrollableOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// IncrementCalculator calculates how far to scroll for a keyboard scroll.
	IncrementCalculator ScrollIncrementCalculator
	// ExcludeFromSemantics is whether to leave the scrollables out of the
	// semantics tree.
	ExcludeFromSemantics bool
	// DiagonalDragBehavior is how the scrollable responds to a diagonal drag;
	// the default is DiagonalDragBehaviorNone.
	DiagonalDragBehavior DiagonalDragBehavior
	// DragStartBehavior is where a drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior gestures.DragStartBehavior
	// HitTestBehavior is how the scrollables behave during hit testing; the
	// default is HitTestBehaviorOpaque.
	HitTestBehavior rendering.HitTestBehavior
}

TwoDimensionalScrollableOpts are the optional parameters of NewTwoDimensionalScrollable.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.new

type TwoDimensionalScrollableState

type TwoDimensionalScrollableState struct {
	StateOf[*TwoDimensionalScrollable]
	// contains filtered or unexported fields
}

TwoDimensionalScrollableState is the state of a TwoDimensionalScrollable.

Flutter: widgets/scrollable.dart TwoDimensionalScrollableState

func TwoDimensionalScrollableMaybeOf

func TwoDimensionalScrollableMaybeOf(bc BuildContext) (*TwoDimensionalScrollableState, bool)

TwoDimensionalScrollableMaybeOf is the state of the closest TwoDimensionalScrollable above the context, and false if there is none.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.maybeOf

func TwoDimensionalScrollableOf

func TwoDimensionalScrollableOf(bc BuildContext) *TwoDimensionalScrollableState

TwoDimensionalScrollableOf is the state of the closest TwoDimensionalScrollable above the context. In debug builds it panics with the tag TwoDimensionalScrollableMissing when there is none.

Flutter: widgets/scrollable.dart TwoDimensionalScrollable.of

func (*TwoDimensionalScrollableState) Build

Build builds the two nested scrollables.

func (*TwoDimensionalScrollableState) DidUpdateWidget

func (s *TwoDimensionalScrollableState) DidUpdateWidget(oldWidget *TwoDimensionalScrollable)

DidUpdateWidget handles the changes in the provided and fallback controllers.

func (*TwoDimensionalScrollableState) Dispose

func (s *TwoDimensionalScrollableState) Dispose()

Dispose disposes the fallback controllers.

func (*TwoDimensionalScrollableState) HorizontalScrollable

func (s *TwoDimensionalScrollableState) HorizontalScrollable() *ScrollableState

HorizontalScrollable is the state of the horizontal scrollable.

Flutter: widgets/scrollable.dart TwoDimensionalScrollableState.horizontalScrollable

func (*TwoDimensionalScrollableState) InitState

func (s *TwoDimensionalScrollableState) InitState()

InitState makes the fallback controllers for the details without a controller.

func (*TwoDimensionalScrollableState) VerticalScrollable

func (s *TwoDimensionalScrollableState) VerticalScrollable() *ScrollableState

VerticalScrollable is the state of the vertical scrollable.

Flutter: widgets/scrollable.dart TwoDimensionalScrollableState.verticalScrollable

type TwoDimensionalViewport

type TwoDimensionalViewport struct {
	RenderObjectWidget
	// contains filtered or unexported fields
}

TwoDimensionalViewport is the base of the widgets that create a RenderTwoDimensionalViewport. The concrete widget embeds it, creates the render object in CreateRenderObject (giving the context, which is the child manager, to the render object) and updates it in UpdateRenderObject, and defines CreateElement as NewTwoDimensionalViewportElement(w).

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport

func NewTwoDimensionalViewportBase

func NewTwoDimensionalViewportBase(verticalOffset rendering.ViewportOffset, verticalAxisDirection painting.AxisDirection,
	horizontalOffset rendering.ViewportOffset, horizontalAxisDirection painting.AxisDirection,
	delegate TwoDimensionalChildDelegate, mainAxis painting.Axis, opts ...TwoDimensionalViewportOpts) TwoDimensionalViewport

NewTwoDimensionalViewportBase creates the base of a two-dimensional viewport widget. In debug builds it panics with the tag TwoDimensionalViewportAxisInvalid when a direction is along the wrong axis.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.new

func (*TwoDimensionalViewport) ClipBehavior

func (w *TwoDimensionalViewport) ClipBehavior() ui.Clip

ClipBehavior is how the viewport clips.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.clipBehavior

func (*TwoDimensionalViewport) Delegate

Delegate supplies the children.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.delegate

func (*TwoDimensionalViewport) HorizontalAxisDirection

func (w *TwoDimensionalViewport) HorizontalAxisDirection() painting.AxisDirection

HorizontalAxisDirection is the direction in which the horizontal offset grows.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.horizontalAxisDirection

func (*TwoDimensionalViewport) HorizontalOffset

func (w *TwoDimensionalViewport) HorizontalOffset() rendering.ViewportOffset

HorizontalOffset is the offset of the horizontal axis.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.horizontalOffset

func (*TwoDimensionalViewport) MainAxis

func (w *TwoDimensionalViewport) MainAxis() painting.Axis

MainAxis is the axis the children are ordered by.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.mainAxis

func (*TwoDimensionalViewport) ScrollCacheExtent

ScrollCacheExtent is how far beyond the viewport children are built, or none for the default.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.scrollCacheExtent

func (*TwoDimensionalViewport) UpdateViewport

UpdateViewport copies the properties of the widget to the render object. A concrete widget calls it from UpdateRenderObject, then sets its own.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.updateRenderObject

func (*TwoDimensionalViewport) VerticalAxisDirection

func (w *TwoDimensionalViewport) VerticalAxisDirection() painting.AxisDirection

VerticalAxisDirection is the direction in which the vertical offset grows.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.verticalAxisDirection

func (*TwoDimensionalViewport) VerticalOffset

func (w *TwoDimensionalViewport) VerticalOffset() rendering.ViewportOffset

VerticalOffset is the offset of the vertical axis.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.verticalOffset

type TwoDimensionalViewportBuilder

type TwoDimensionalViewportBuilder func(bc BuildContext, verticalPosition, horizontalPosition rendering.ViewportOffset) Widget

TwoDimensionalViewportBuilder builds the viewport of a TwoDimensionalScrollable with the offset of each axis.

Flutter: widgets/scrollable.dart TwoDimensionalViewportBuilder

type TwoDimensionalViewportOpts

type TwoDimensionalViewportOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ScrollCacheExtent is how far beyond the viewport children are built; the
	// default is 250 pixels.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
	// ClipBehavior is how the viewport clips; the default is ClipHardEdge.
	ClipBehavior ui.Clip
}

TwoDimensionalViewportOpts are the optional parameters of NewTwoDimensionalViewportBase.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewport.new

type TwoDimensionalViewportParentData

type TwoDimensionalViewportParentData = rendering.TwoDimensionalViewportParentData

TwoDimensionalViewportParentData is the parent data of the children of a two-dimensional viewport.

Flutter: widgets/two_dimensional_viewport.dart TwoDimensionalViewportParentData

type UnconstrainedBox

type UnconstrainedBox struct {
	StatelessWidget
	// contains filtered or unexported fields
}

UnconstrainedBox imposes no constraints on its child, allowing it to render at its natural size.

Flutter: widgets/basic.dart UnconstrainedBox

func NewUnconstrainedBox

func NewUnconstrainedBox(child Widget, opts ...UnconstrainedBoxOpts) *UnconstrainedBox

NewUnconstrainedBox creates the widget.

Flutter: widgets/basic.dart UnconstrainedBox.new

func (*UnconstrainedBox) Alignment

Alignment is how to align the child; the default is Alignment.center.

Flutter: widgets/basic.dart UnconstrainedBox.alignment

func (*UnconstrainedBox) Build

Build builds a ConstraintsTransformBox with the transform of the axis.

Flutter: widgets/basic.dart UnconstrainedBox.build

func (*UnconstrainedBox) Child

func (w *UnconstrainedBox) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/basic.dart UnconstrainedBox.child

func (*UnconstrainedBox) ClipBehavior

func (w *UnconstrainedBox) ClipBehavior() ui.Clip

ClipBehavior is whether the child is clipped when it overflows; the default is ClipNone.

Flutter: widgets/basic.dart UnconstrainedBox.clipBehavior

func (*UnconstrainedBox) ConstrainedAxis

func (w *UnconstrainedBox) ConstrainedAxis() painting.Axis

ConstrainedAxis is the axis on which to keep the constraints, if any; the zero value keeps neither.

Flutter: widgets/basic.dart UnconstrainedBox.constrainedAxis

func (*UnconstrainedBox) TextDirection

func (w *UnconstrainedBox) TextDirection() ui.TextDirection

TextDirection is the direction used to resolve a directional alignment.

Flutter: widgets/basic.dart UnconstrainedBox.textDirection

type UnconstrainedBoxOpts

type UnconstrainedBoxOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// TextDirection is the direction used to resolve a directional alignment.
	TextDirection ui.TextDirection
	// Alignment is how to align the child; the default is Alignment.center.
	Alignment painting.AlignmentGeometry
	// ConstrainedAxis is the axis on which to keep the constraints, if any; the zero value keeps neither.
	ConstrainedAxis painting.Axis
	// ClipBehavior is whether the child is clipped when it overflows; the default is ClipNone.
	ClipBehavior ui.Clip
}

UnconstrainedBoxOpts are the optional parameters of NewUnconstrainedBox.

Flutter: widgets/basic.dart UnconstrainedBox.new

type UndoHistory

type UndoHistory[T comparable] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

UndoHistory keeps the history of the values of a Listenable value and undoes and redoes them for the UndoTextIntent and RedoTextIntent below it. The changes in quick succession (500 ms) count as one.

Deviation: Flutter's iOS UndoManager integration doesn't exist (SPEC §12.10).

Flutter: widgets/undo_history.dart UndoHistory

func NewUndoHistory

func NewUndoHistory[T comparable](value foundation.ValueListenable[T], onTriggered func(value T), focusNode *FocusNode, child Widget, opts ...UndoHistoryOpts[T]) *UndoHistory[T]

NewUndoHistory creates the widget: onTriggered receives the value to go back to or forward to, and focusNode is the focus of the field.

Flutter: widgets/undo_history.dart UndoHistory.new

func (*UndoHistory[T]) Child

func (w *UndoHistory[T]) Child() Widget

Child is the widget below this one in the tree.

Flutter: widgets/undo_history.dart UndoHistory.child

func (*UndoHistory[T]) CreateState

func (w *UndoHistory[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/undo_history.dart UndoHistory.createState

func (*UndoHistory[T]) Value

func (w *UndoHistory[T]) Value() foundation.ValueListenable[T]

Value is the value that is tracked.

Flutter: widgets/undo_history.dart UndoHistory.value

type UndoHistoryController

type UndoHistoryController struct {
	foundation.ValueNotifier[UndoHistoryValue]
	// OnUndo notifies the UndoHistory to undo.
	//
	// Flutter: widgets/undo_history.dart UndoHistoryController.onUndo
	OnUndo *foundation.ChangeNotifier
	// OnRedo notifies the UndoHistory to redo.
	//
	// Flutter: widgets/undo_history.dart UndoHistoryController.onRedo
	OnRedo *foundation.ChangeNotifier
}

UndoHistoryController controls an UndoHistory from outside, and tells whether it can undo and redo.

Flutter: widgets/undo_history.dart UndoHistoryController

func NewUndoHistoryController

func NewUndoHistoryController() *UndoHistoryController

NewUndoHistoryController creates a controller that can neither undo nor redo.

Flutter: widgets/undo_history.dart UndoHistoryController.new

func (*UndoHistoryController) Dispose

func (c *UndoHistoryController) Dispose()

Dispose releases the controller.

Flutter: widgets/undo_history.dart UndoHistoryController.dispose

func (*UndoHistoryController) Redo

func (c *UndoHistoryController) Redo()

Redo asks the UndoHistory to go forward, when it can.

Flutter: widgets/undo_history.dart UndoHistoryController.redo

func (*UndoHistoryController) Undo

func (c *UndoHistoryController) Undo()

Undo asks the UndoHistory to go back, when it can.

Flutter: widgets/undo_history.dart UndoHistoryController.undo

type UndoHistoryOpts

type UndoHistoryOpts[T comparable] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// ShouldChangeUndoStack says whether a new value goes on the undo stack,
	// given the last value (hasOld is false when there is none); the default
	// accepts every value.
	ShouldChangeUndoStack func(oldValue T, hasOld bool, newValue T) bool
	// UndoStackModifier changes a value before it goes on the stack; the default
	// keeps it as it is.
	UndoStackModifier func(value T) T
	// Controller can undo and redo from outside the widget, and tells whether
	// they are possible.
	Controller *UndoHistoryController
}

UndoHistoryOpts are the optional parameters of NewUndoHistory.

Flutter: widgets/undo_history.dart UndoHistory.new

type UndoHistoryState

type UndoHistoryState[T comparable] struct {
	StateOf[*UndoHistory[T]]
	// contains filtered or unexported fields
}

UndoHistoryState is the state of an UndoHistory.

Flutter: widgets/undo_history.dart UndoHistoryState

func (*UndoHistoryState[T]) Build

func (s *UndoHistoryState[T]) Build(bc BuildContext) Widget

Build binds the actions for the undo and redo intents.

Flutter: widgets/undo_history.dart UndoHistoryState.build

func (*UndoHistoryState[T]) CanRedo

func (s *UndoHistoryState[T]) CanRedo() bool

CanRedo is whether there is a value to go forward to.

Flutter: widgets/undo_history.dart UndoHistoryState.canRedo

func (*UndoHistoryState[T]) CanUndo

func (s *UndoHistoryState[T]) CanUndo() bool

CanUndo is whether there is a value to go back to.

Flutter: widgets/undo_history.dart UndoHistoryState.canUndo

func (*UndoHistoryState[T]) DidUpdateWidget

func (s *UndoHistoryState[T]) DidUpdateWidget(old *UndoHistory[T])

DidUpdateWidget moves the listeners to the new value, focus node and controller; a new value clears the stack.

Flutter: widgets/undo_history.dart UndoHistoryState.didUpdateWidget

func (*UndoHistoryState[T]) Dispose

func (s *UndoHistoryState[T]) Dispose()

Dispose stops listening and cancels the push that is waiting.

Flutter: widgets/undo_history.dart UndoHistoryState.dispose

func (*UndoHistoryState[T]) InitState

func (s *UndoHistoryState[T]) InitState()

InitState starts to listen to the value, the focus and the controller.

Flutter: widgets/undo_history.dart UndoHistoryState.initState

func (*UndoHistoryState[T]) Redo

func (s *UndoHistoryState[T]) Redo()

Redo goes forward one value.

Flutter: widgets/undo_history.dart UndoHistoryState.redo

func (*UndoHistoryState[T]) Undo

func (s *UndoHistoryState[T]) Undo()

Undo goes back one value.

Flutter: widgets/undo_history.dart UndoHistoryState.undo

type UndoHistoryValue

type UndoHistoryValue struct {
	// CanUndo is whether there is a value to go back to.
	CanUndo bool
	// CanRedo is whether there is a value to go forward to.
	CanRedo bool
}

UndoHistoryValue is the state of an UndoHistoryController: whether it can undo and redo.

Flutter: widgets/undo_history.dart UndoHistoryValue

func (UndoHistoryValue) String

func (v UndoHistoryValue) String() string

String describes the value.

type UndoTextIntent

type UndoTextIntent struct {
	IntentBase
	// Cause is what caused the selection to change.
	//
	// Flutter: widgets/text_editing_intents.dart UndoTextIntent.cause
	Cause services.SelectionChangedCause
}

UndoTextIntent is an intent that undoes the last change.

Flutter: widgets/text_editing_intents.dart UndoTextIntent

type UnfocusDisposition

type UnfocusDisposition int

UnfocusDisposition is where the focus goes when a node is unfocused.

Flutter: widgets/focus_manager.dart UnfocusDisposition

const (
	// UnfocusDispositionUnspecified is the zero value: the default, scope.
	//
	// Flutter: no counterpart
	UnfocusDispositionUnspecified UnfocusDisposition = iota
	// UnfocusDispositionScope focuses the nearest focusable enclosing scope.
	//
	// Flutter: widgets/focus_manager.dart UnfocusDisposition.scope
	UnfocusDispositionScope
	// UnfocusDispositionPreviouslyFocusedChild focuses the previously focused
	// child of the nearest scope, or the scope itself if there is none.
	//
	// Flutter: widgets/focus_manager.dart UnfocusDisposition.previouslyFocusedChild
	UnfocusDispositionPreviouslyFocusedChild
)

The values of UnfocusDisposition follow Flutter's declaration order.

type UpdateChildrenOpts

type UpdateChildrenOpts struct {
	// ForgottenChildren are old children that have moved to another parent, so
	// they must not be updated or deactivated here.
	ForgottenChildren map[Element]struct{}
	// Slots are the slots of the new children, one for each new widget. When it
	// is nil the slot of a child is an IndexedSlot of its index and previous
	// sibling.
	Slots []any
}

UpdateChildrenOpts are the optional parameters of ElementBase.UpdateChildren.

Flutter: widgets/framework.dart Element.updateChildren

type UpdateSelectionIntent

type UpdateSelectionIntent struct {
	IntentBase
	// CurrentTextEditingValue is the value whose selection is set.
	//
	// Flutter: widgets/text_editing_intents.dart UpdateSelectionIntent.currentTextEditingValue
	CurrentTextEditingValue services.TextEditingValue
	// NewSelection is the selection to set.
	//
	// Flutter: widgets/text_editing_intents.dart UpdateSelectionIntent.newSelection
	NewSelection services.TextSelection
	// Cause is what caused the change.
	//
	// Flutter: widgets/text_editing_intents.dart UpdateSelectionIntent.cause
	Cause services.SelectionChangedCause
}

UpdateSelectionIntent is an intent that sets the selection of a value.

Flutter: widgets/text_editing_intents.dart UpdateSelectionIntent

func NewUpdateSelectionIntent

func NewUpdateSelectionIntent(currentTextEditingValue services.TextEditingValue, newSelection services.TextSelection, cause services.SelectionChangedCause) UpdateSelectionIntent

NewUpdateSelectionIntent creates the intent.

Flutter: widgets/text_editing_intents.dart UpdateSelectionIntent.new

type UserScrollNotification

type UserScrollNotification struct {
	ScrollNotificationBase
	// Direction is the direction in which the user is scrolling.
	//
	// Flutter: widgets/scroll_notification.dart UserScrollNotification.direction
	Direction rendering.ScrollDirection
}

UserScrollNotification indicates that the user has changed the direction in which they are scrolling.

Flutter: widgets/scroll_notification.dart UserScrollNotification

func NewUserScrollNotification

func NewUserScrollNotification(metrics ScrollMetrics, context BuildContext, direction rendering.ScrollDirection) *UserScrollNotification

NewUserScrollNotification creates the notification.

Flutter: widgets/scroll_notification.dart UserScrollNotification.new

func (*UserScrollNotification) String

func (n *UserScrollNotification) String() string

String describes the notification.

Flutter: widgets/scroll_notification.dart UserScrollNotification.debugFillDescription

type ValueListenableBuilder

type ValueListenableBuilder[T any] struct {
	StatefulWidget
	// contains filtered or unexported fields
}

ValueListenableBuilder rebuilds its subtree when the value of a ValueListenable changes.

Flutter: widgets/value_listenable_builder.dart ValueListenableBuilder

func NewValueListenableBuilder

func NewValueListenableBuilder[T any](valueListenable foundation.ValueListenable[T], builder ValueWidgetBuilder[T], child Widget,
	opts ...ValueListenableBuilderOpts) *ValueListenableBuilder[T]

NewValueListenableBuilder creates a widget that builds with the value of the listenable and builds again each time it changes. The child, which may be nil, is the part of the subtree that does not depend on the value: it is given to the builder, which puts it in what it builds.

Flutter: widgets/value_listenable_builder.dart ValueListenableBuilder.new

func (*ValueListenableBuilder[T]) Builder

func (w *ValueListenableBuilder[T]) Builder() ValueWidgetBuilder[T]

Builder is the function that builds the widget for the value.

Flutter: widgets/value_listenable_builder.dart ValueListenableBuilder.builder

func (*ValueListenableBuilder[T]) Child

func (w *ValueListenableBuilder[T]) Child() Widget

Child is the part of the subtree that does not depend on the value.

Flutter: widgets/value_listenable_builder.dart ValueListenableBuilder.child

func (*ValueListenableBuilder[T]) CreateState

func (w *ValueListenableBuilder[T]) CreateState() State

CreateState creates the state.

Flutter: widgets/value_listenable_builder.dart ValueListenableBuilder.createState

func (*ValueListenableBuilder[T]) ValueListenable

func (w *ValueListenableBuilder[T]) ValueListenable() foundation.ValueListenable[T]

ValueListenable is the listenable whose value is built.

Flutter: widgets/value_listenable_builder.dart ValueListenableBuilder.valueListenable

type ValueListenableBuilderOpts

type ValueListenableBuilderOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

ValueListenableBuilderOpts are the optional parameters of NewValueListenableBuilder.

Flutter: widgets/value_listenable_builder.dart ValueListenableBuilder.new

type ValueWidgetBuilder

type ValueWidgetBuilder[T any] func(bc BuildContext, value T, child Widget) Widget

ValueWidgetBuilder builds a widget for the value of a ValueListenable.

Flutter: widgets/value_listenable_builder.dart ValueWidgetBuilder

type View

type View struct {
	StatefulWidget
	// contains filtered or unexported fields
}

View is the bridge between the widget tree and a view of the platform: it shows its child in the view (a window), makes the view available to the descendants with ViewOf and MaybeViewOf, and provides the MediaQuery of the view. RunApp wraps the app in a View for the first window.

Deviation: the key of the internal widget is an ObjectKey of the view, not a GlobalKey (SPEC §12.10).

Flutter: widgets/view.dart View

func NewView

func NewView(view *ui.View, child Widget, opts ...ViewOpts) *View

NewView creates a View that shows the child in the view.

Flutter: widgets/view.dart View.new

func (*View) Child

func (w *View) Child() Widget

Child is the widget shown in the view.

Flutter: widgets/view.dart View.child

func (*View) CreateState

func (w *View) CreateState() State

CreateState creates the state of the View.

Flutter: widgets/view.dart View.createState

func (*View) UIView

func (w *View) UIView() *ui.View

UIView is the view the widget shows its child in.

Flutter: widgets/view.dart View.view

type ViewAnchor

type ViewAnchor struct {
	StatelessWidget
	// contains filtered or unexported fields
}

ViewAnchor decorates a child with a side View. It needs a View above it, into which the child is rendered; the widget in the view slot (typically a View or a ViewCollection) starts new render trees, and has access to the inherited widgets above the anchor. A tooltip that extends beyond the bounds of the main view is an example: the tooltip is a View anchored to the button.

Flutter: widgets/view.dart ViewAnchor

func NewViewAnchor

func NewViewAnchor(child Widget, opts ...ViewAnchorOpts) *ViewAnchor

NewViewAnchor creates an anchor that renders the child into the surrounding view and the View option into a view of its own.

Flutter: widgets/view.dart ViewAnchor.new

func (*ViewAnchor) Build

func (w *ViewAnchor) Build(BuildContext) Widget

Build makes the component that has the child and the view.

Flutter: widgets/view.dart ViewAnchor.build

func (*ViewAnchor) Child

func (w *ViewAnchor) Child() Widget

Child is the widget rendered into the surrounding view.

Flutter: widgets/view.dart ViewAnchor.child

func (*ViewAnchor) ViewSlot

func (w *ViewAnchor) ViewSlot() Widget

ViewSlot is the widget that defines the view anchored to the child.

Flutter: widgets/view.dart ViewAnchor.view

type ViewAnchorOpts

type ViewAnchorOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// View is the widget that defines the view anchored to the child, typically a
	// View or a ViewCollection; nil for none.
	View Widget
}

ViewAnchorOpts are the optional parameters of NewViewAnchor.

Flutter: widgets/view.dart ViewAnchor.new

type ViewCollection

type ViewCollection struct {
	// contains filtered or unexported fields
}

ViewCollection is a collection of sibling Views. It can be used where a View is allowed, in a non-rendering zone of the widget tree: at the root of the tree outside of any View, as a child of another ViewCollection, or in the view slot of a ViewAnchor. Other widgets that are not render object widgets (such as an InheritedWidget) may appear in between. The views of the collection must be Views, wrapped or not in such widgets.

Flutter: widgets/view.dart ViewCollection

func NewViewCollection

func NewViewCollection(views []Widget, opts ...ViewCollectionOpts) *ViewCollection

NewViewCollection creates a collection of the views.

Flutter: widgets/view.dart ViewCollection.new

func (*ViewCollection) CreateElement

func (w *ViewCollection) CreateElement() Element

CreateElement creates the element of the collection.

Flutter: widgets/view.dart _MultiChildComponentWidget.createElement

func (*ViewCollection) Views

func (w *ViewCollection) Views() []Widget

Views are the View descendants of the collection.

Flutter: widgets/view.dart ViewCollection.views

type ViewCollectionOpts

type ViewCollectionOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

ViewCollectionOpts are the optional parameters of NewViewCollection.

Flutter: widgets/view.dart ViewCollection.new

type ViewOpts

type ViewOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

ViewOpts are the optional parameters of NewView.

Flutter: widgets/view.dart View.new

type Viewport

type Viewport struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

Viewport is the widget of a viewport that shows part of a list of slivers, the part that its offset (the scroll position) says. Its offset is usually the position of a Scrollable.

Deviation: Flutter's has the deprecated cacheExtent and cacheExtentStyle; only ScrollCacheExtent is ported (SPEC §12.10).

Flutter: widgets/viewport.dart Viewport

func NewViewport

func NewViewport(offset rendering.ViewportOffset, slivers []Widget, opts ...ViewportOpts) *Viewport

NewViewport creates a viewport that shows the slivers at the offset. In debug builds it panics with the tag ViewportCenterInvalid when the center key is not the key of exactly one of the slivers.

Flutter: widgets/viewport.dart Viewport.new

func (*Viewport) Anchor

func (w *Viewport) Anchor() float64

Anchor is the relative position of the zero scroll offset.

Flutter: widgets/viewport.dart Viewport.anchor

func (*Viewport) AxisDirection

func (w *Viewport) AxisDirection() painting.AxisDirection

AxisDirection is the direction in which the offset increases.

Flutter: widgets/viewport.dart Viewport.axisDirection

func (*Viewport) Center

func (w *Viewport) Center() foundation.Key

Center is the key of the sliver at the zero scroll offset, or nil.

Flutter: widgets/viewport.dart Viewport.center

func (*Viewport) ClipBehavior

func (w *Viewport) ClipBehavior() ui.Clip

ClipBehavior is how the viewport clips.

Flutter: widgets/viewport.dart Viewport.clipBehavior

func (*Viewport) CreateElement

func (w *Viewport) CreateElement() Element

CreateElement creates the element.

Flutter: widgets/viewport.dart Viewport.createElement

func (*Viewport) CreateRenderObject

func (w *Viewport) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/viewport.dart Viewport.createRenderObject

func (*Viewport) CrossAxisDirection

func (w *Viewport) CrossAxisDirection() painting.AxisDirection

CrossAxisDirection is the direction of the cross axis, or unspecified for the default.

Flutter: widgets/viewport.dart Viewport.crossAxisDirection

func (*Viewport) Offset

func (w *Viewport) Offset() rendering.ViewportOffset

Offset is the offset of the viewport.

Flutter: widgets/viewport.dart Viewport.offset

func (*Viewport) PaintOrder

func (w *Viewport) PaintOrder() rendering.SliverPaintOrder

PaintOrder is the order in which the slivers paint.

Flutter: widgets/viewport.dart Viewport.paintOrder

func (*Viewport) ScrollCacheExtent

func (w *Viewport) ScrollCacheExtent() foundation.Opt[rendering.ScrollCacheExtent]

ScrollCacheExtent is how far beyond the viewport the slivers build.

Flutter: widgets/viewport.dart Viewport.scrollCacheExtent

func (*Viewport) UpdateRenderObject

func (w *Viewport) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/viewport.dart Viewport.updateRenderObject

type ViewportBuilder

type ViewportBuilder func(bc BuildContext, position rendering.ViewportOffset) Widget

ViewportBuilder builds the viewport of a Scrollable, given the position that the viewport must listen to.

Flutter: widgets/scrollable.dart ViewportBuilder

type ViewportNotification

type ViewportNotification interface {
	// Depth is the number of viewports the notification has bubbled through.
	//
	// Flutter: widgets/scroll_notification.dart ViewportNotificationMixin.depth
	Depth() int
	// IncrementDepth adds one to the depth. A viewport's element calls it
	// (ViewportElementOnNotification).
	//
	// Flutter: widgets/scroll_notification.dart ViewportElementMixin.onNotification
	IncrementDepth()
}

ViewportNotification is a notification that a viewport counts: each viewport it bubbles through adds one to its depth, so that a listener can tell the notifications of its own scrollable (depth 0) from the ones of nested scrollables.

Flutter: widgets/scroll_notification.dart ViewportNotificationMixin

type ViewportNotificationMixin

type ViewportNotificationMixin struct {
	// contains filtered or unexported fields
}

ViewportNotificationMixin implements ViewportNotification; a notification that bubbles through viewports embeds it.

Flutter: widgets/scroll_notification.dart ViewportNotificationMixin

func (*ViewportNotificationMixin) Depth

func (m *ViewportNotificationMixin) Depth() int

Depth is the number of viewports the notification has bubbled through.

Flutter: widgets/scroll_notification.dart ViewportNotificationMixin.depth

func (*ViewportNotificationMixin) IncrementDepth

func (m *ViewportNotificationMixin) IncrementDepth()

IncrementDepth adds one to the depth.

Flutter: widgets/scroll_notification.dart ViewportElementMixin.onNotification

type ViewportOpts

type ViewportOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// AxisDirection is the direction in which the offset increases; the default
	// is AxisDirectionDown.
	AxisDirection painting.AxisDirection
	// CrossAxisDirection is the direction of the cross axis; the default follows
	// the text direction (down or up) or is down (left or right).
	CrossAxisDirection painting.AxisDirection
	// Anchor is the relative position of the zero scroll offset, from 0 (the
	// leading edge) to 1 (the trailing edge).
	Anchor float64
	// Center is the key of the sliver at the zero scroll offset; the default is
	// the first sliver.
	Center foundation.Key
	// ScrollCacheExtent is how far beyond the viewport the slivers build; the
	// default is 250 pixels.
	ScrollCacheExtent foundation.Opt[rendering.ScrollCacheExtent]
	// PaintOrder is the order in which the slivers paint; the default is the
	// first sliver on top.
	PaintOrder rendering.SliverPaintOrder
	// ClipBehavior is how the viewport clips; the default is ClipHardEdge.
	ClipBehavior ui.Clip
}

ViewportOpts are the optional parameters of NewViewport.

Flutter: widgets/viewport.dart Viewport.new

type Visibility

type Visibility struct {
	StatelessWidget
	// contains filtered or unexported fields
}

Visibility controls whether its child is included in the subtree or not.

Flutter: widgets/indexed_stack.dart Visibility

func NewVisibility

func NewVisibility(child Widget, opts ...VisibilityOpts) *Visibility

NewVisibility creates a widget that shows or hides its child. In debug builds it panics with the tag VisibilityMaintainInvalid when a Maintain flag is set without the one it needs.

Flutter: widgets/indexed_stack.dart Visibility.new

func NewVisibilityMaintain

func NewVisibilityMaintain(child Widget, opts ...VisibilityOpts) *Visibility

NewVisibilityMaintain creates a Visibility that keeps everything of the child when it is hidden: its state, animations, size, semantics, interactivity and focusability.

Flutter: widgets/indexed_stack.dart Visibility.maintain

func (*Visibility) Build

func (w *Visibility) Build(BuildContext) Widget

Build builds the child for the current configuration.

Flutter: widgets/indexed_stack.dart Visibility.build

func (*Visibility) Child

func (w *Visibility) Child() Widget

Child is the widget to show or hide.

Flutter: widgets/indexed_stack.dart Visibility.child

func (*Visibility) MaintainAnimation

func (w *Visibility) MaintainAnimation() bool

MaintainAnimation is whether the animations of the child keep running when it is hidden.

Flutter: widgets/indexed_stack.dart Visibility.maintainAnimation

func (*Visibility) MaintainFocusability

func (w *Visibility) MaintainFocusability() bool

MaintainFocusability is whether the child can take the focus when it is hidden.

Flutter: widgets/indexed_stack.dart Visibility.maintainFocusability

func (*Visibility) MaintainInteractivity

func (w *Visibility) MaintainInteractivity() bool

MaintainInteractivity is whether the child takes pointers when it is hidden.

Flutter: widgets/indexed_stack.dart Visibility.maintainInteractivity

func (*Visibility) MaintainSemantics

func (w *Visibility) MaintainSemantics() bool

MaintainSemantics is whether the semantics of the child are kept when it is hidden.

Flutter: widgets/indexed_stack.dart Visibility.maintainSemantics

func (*Visibility) MaintainSize

func (w *Visibility) MaintainSize() bool

MaintainSize is whether the space of the child is kept when it is hidden.

Flutter: widgets/indexed_stack.dart Visibility.maintainSize

func (*Visibility) MaintainState

func (w *Visibility) MaintainState() bool

MaintainState is whether the state of the child is kept when it is hidden.

Flutter: widgets/indexed_stack.dart Visibility.maintainState

func (*Visibility) Replacement

func (w *Visibility) Replacement() Widget

Replacement is the widget that takes the place of the child when it is hidden and its state is not maintained.

Flutter: widgets/indexed_stack.dart Visibility.replacement

func (*Visibility) Visible

func (w *Visibility) Visible() bool

Visible is whether the child is visible.

Flutter: widgets/indexed_stack.dart Visibility.visible

type VisibilityOpts

type VisibilityOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Replacement is the widget to use when the child is not visible and its
	// state is not maintained; the default is a SizedBox.shrink.
	Replacement Widget
	// Visible is whether the child is visible; the default is true.
	Visible foundation.Opt[bool]
	// MaintainState is whether to maintain the state of the child when it is not
	// visible.
	MaintainState bool
	// MaintainAnimation is whether to keep the animations of the child running
	// when it is not visible; it needs MaintainState.
	MaintainAnimation bool
	// MaintainSize is whether to keep the space of the child when it is not
	// visible; it needs MaintainAnimation.
	MaintainSize bool
	// MaintainSemantics is whether to keep the semantics of the child when it
	// is not visible; it needs MaintainSize.
	MaintainSemantics bool
	// MaintainInteractivity is whether the child still takes pointers when it is
	// not visible; it needs MaintainSize.
	MaintainInteractivity bool
	// MaintainFocusability is whether the child can still take the focus when it
	// is not visible; it needs MaintainState.
	MaintainFocusability bool
}

VisibilityOpts are the optional parameters of NewVisibility.

Flutter: widgets/indexed_stack.dart Visibility.new

type VoidCallbackAction

type VoidCallbackAction struct{ ActionBase }

VoidCallbackAction is the action that calls the function of a VoidCallbackIntent.

Flutter: widgets/actions.dart VoidCallbackAction

func NewVoidCallbackAction

func NewVoidCallbackAction() *VoidCallbackAction

NewVoidCallbackAction creates the action.

Flutter: widgets/actions.dart VoidCallbackAction.new

func (*VoidCallbackAction) IntentType

func (a *VoidCallbackAction) IntentType() reflect.Type

IntentType is VoidCallbackIntent.

Flutter: widgets/actions.dart Action.intentType

func (*VoidCallbackAction) Invoke

func (a *VoidCallbackAction) Invoke(intent Intent) any

Invoke calls the callback of the intent.

Flutter: widgets/actions.dart VoidCallbackAction.invoke

type VoidCallbackIntent

type VoidCallbackIntent struct {
	IntentBase
	// Callback is the function to call.
	//
	// Flutter: widgets/actions.dart VoidCallbackIntent.callback
	Callback func()
}

VoidCallbackIntent is an intent that carries a function to call.

Flutter: widgets/actions.dart VoidCallbackIntent

type Widget

type Widget interface {
	// Key controls how this widget replaces another widget in the tree.
	//
	// Flutter: widgets/framework.dart Widget.key
	Key() foundation.Key
	// contains filtered or unexported methods
}

Widget describes the configuration for an Element. Widgets are immutable after construction; the framework builds, updates and compares them by pointer, so a widget type is always used as a pointer (the constructors return *X).

A widget type of your own embeds one of the base structs (StatelessWidget, StatefulWidget, and the ones of the proxy and render object widgets). The base carries the key; the framework chooses the element from the interfaces the outer type implements (SPEC §12.5).

Flutter: widgets/framework.dart Widget

func AnimatedCrossFadeDefaultLayoutBuilder

func AnimatedCrossFadeDefaultLayoutBuilder(topChild Widget, topChildKey foundation.Key, bottomChild Widget, bottomChildKey foundation.Key) Widget

AnimatedCrossFadeDefaultLayoutBuilder is the layout builder of an AnimatedCrossFade that has none: the bottom child is positioned at the top and stretched to the width, and the top child decides the size.

Flutter: widgets/animated_cross_fade.dart AnimatedCrossFade.defaultLayoutBuilder

func AnimatedSwitcherDefaultLayoutBuilder

func AnimatedSwitcherDefaultLayoutBuilder(currentChild Widget, previousChildren []Widget) Widget

AnimatedSwitcherDefaultLayoutBuilder is the layout builder of an AnimatedSwitcher that has none: a Stack with the previous children below the current one, centered.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.defaultLayoutBuilder

func AnimatedSwitcherDefaultTransitionBuilder

func AnimatedSwitcherDefaultTransitionBuilder(child Widget, animation animation.Animation[float64]) Widget

AnimatedSwitcherDefaultTransitionBuilder is the transition builder of an AnimatedSwitcher that has none: a FadeTransition keyed with the key of the child.

Flutter: widgets/animated_switcher.dart AnimatedSwitcher.defaultTransitionBuilder

func CaptureAllThemes

func CaptureAllThemes(bc BuildContext, child Widget, to BuildContext) Widget

CaptureAllThemes wraps the child in copies of all the themes between the contexts.

Flutter: widgets/inherited_theme.dart InheritedTheme.captureAll

func ExtractWidgetsFromInlineSpan

func ExtractWidgetsFromInlineSpan(span painting.InlineSpan, textScaler painting.TextScaler) []Widget

ExtractWidgetsFromInlineSpan makes the children of a RichText for the widget spans in the span and its descendants, in order: each is wrapped to say which span it belongs to and to scale it with the text.

Flutter: widgets/widget_span.dart WidgetSpan.extractFromInlineSpan

func KeyedSubtreeWrapList

func KeyedSubtreeWrapList(items []Widget, baseIndex int) []Widget

KeyedSubtreeWrapList wraps each item of the list in a KeyedSubtree, with indices that start at baseIndex.

Flutter: widgets/framework.dart KeyedSubtree.ensureUniqueKeysForList

func NewDefaultSelectionStyleMerge

func NewDefaultSelectionStyleMerge(child Widget, opts ...DefaultSelectionStyleOpts) Widget

NewDefaultSelectionStyleMerge creates a default selection style that overrides the selection styles in scope at this point in the widget tree. Any arguments that are not set replace nothing: the corresponding properties of the default selection style for the context where the widget is inserted are kept.

Flutter: widgets/default_selection_style.dart DefaultSelectionStyle.merge

func NewDefaultTextStyleMerge

func NewDefaultTextStyleMerge(child Widget, opts ...DefaultTextStyleMergeOpts) Widget

NewDefaultTextStyleMerge creates a widget that merges the options with the default text style of the closest ancestor.

Flutter: widgets/text.dart DefaultTextStyle.merge

func NewIconThemeMerge

func NewIconThemeMerge(data IconThemeData, child Widget, opts ...WidgetOpts) Widget

NewIconThemeMerge creates a widget that merges the data with the icon theme of the closest ancestor.

Flutter: widgets/icon_theme.dart IconTheme.merge

func NewMediaQueryFromView

func NewMediaQueryFromView(view *ui.View, child Widget, opts ...WidgetOpts) Widget

NewMediaQueryFromView creates a widget that makes a MediaQuery from the view and keeps it up to date as the metrics and the platform settings of the view change. View uses it. If there is a MediaQuery above, its settings (brightness, text scaler, accessibility) win over the platform's.

Flutter: widgets/media_query.dart MediaQuery.fromView

func NewMediaQueryWithClampedTextScaling

func NewMediaQueryWithClampedTextScaling(child Widget, opts ...MediaQueryClampedTextScalingOpts) Widget

NewMediaQueryWithClampedTextScaling creates a MediaQuery that is like the one above but limits the text scaling to the factors in the options.

Flutter: widgets/media_query.dart MediaQuery.withClampedTextScaling

func NewMediaQueryWithNoTextScaling

func NewMediaQueryWithNoTextScaling(child Widget, opts ...WidgetOpts) Widget

NewMediaQueryWithNoTextScaling creates a MediaQuery that is like the one above but does not scale the text.

Flutter: widgets/media_query.dart MediaQuery.withNoTextScaling

func NewOverlayWrap

func NewOverlayWrap(child Widget, opts ...OverlayWrapOpts) Widget

NewOverlayWrap creates an overlay with one opaque entry that contains the child and can size the overlay, so that the overlay is as big as the child.

Flutter: widgets/overlay.dart Overlay.wrap

func NewTickerModeMerge

func NewTickerModeMerge(child Widget, opts ...TickerModeMergeOpts) Widget

NewTickerModeMerge creates a TickerMode that takes the flags it doesn't set from the TickerMode above it.

Flutter: widgets/ticker_provider.dart TickerMode.merge

func RepaintBoundaryWrapAll

func RepaintBoundaryWrapAll(widgets []Widget) []Widget

RepaintBoundaryWrapAll wraps every widget in a RepaintBoundary with NewRepaintBoundaryWrap.

Flutter: widgets/basic.dart RepaintBoundary.wrapAll

func TreeSliverDefaultTreeNodeBuilder

func TreeSliverDefaultTreeNodeBuilder[T any](bc BuildContext, node *TreeSliverNode[T], toggleAnimationStyle animation.AnimationStyle) Widget

TreeSliverDefaultTreeNodeBuilder builds a row with an arrow that turns when the node expands, which toggles the node when tapped, and the text of the node's content.

Flutter: widgets/sliver_tree.dart TreeSliver.defaultTreeNodeBuilder

func TreeSliverWrapChildToToggleNode

func TreeSliverWrapChildToToggleNode[T any](node *TreeSliverNode[T], child Widget) Widget

TreeSliverWrapChildToToggleNode wraps the widget so that a tap on it toggles the node.

Flutter: widgets/sliver_tree.dart TreeSliver.wrapChildToToggleNode

type WidgetBase

type WidgetBase struct {
	// contains filtered or unexported fields
}

WidgetBase holds what every widget has: its key. It is embedded in the base structs of the widget kinds.

Flutter: widgets/framework.dart Widget

func NewWidgetBase

func NewWidgetBase(opts ...WidgetOpts) WidgetBase

NewWidgetBase creates a base with the given key.

Flutter: widgets/framework.dart Widget.new

func (*WidgetBase) Key

func (w *WidgetBase) Key() foundation.Key

Key is the key of the widget, or nil.

Flutter: widgets/framework.dart Widget.key

type WidgetBuilder

type WidgetBuilder func(bc BuildContext) Widget

WidgetBuilder is a function that builds a widget.

Flutter: widgets/framework.dart WidgetBuilder

type WidgetOpts

type WidgetOpts struct {
	// Key controls how this widget replaces another widget in the tree.
	Key foundation.Key
}

WidgetOpts are the optional parameters shared by the constructors of the widget base structs (NewStatelessWidgetBase and the like).

Flutter: widgets/framework.dart Widget.new

type WidgetOrderTraversalPolicy

type WidgetOrderTraversalPolicy struct {
	FocusTraversalPolicyBase
}

WidgetOrderTraversalPolicy traverses the nodes in the order the widgets were built (the order of the focus tree).

Flutter: widgets/focus_traversal.dart WidgetOrderTraversalPolicy

func NewWidgetOrderTraversalPolicy

func NewWidgetOrderTraversalPolicy(opts ...FocusTraversalPolicyOpts) *WidgetOrderTraversalPolicy

NewWidgetOrderTraversalPolicy creates the policy.

Flutter: widgets/focus_traversal.dart WidgetOrderTraversalPolicy.new

func (*WidgetOrderTraversalPolicy) SortDescendants

func (p *WidgetOrderTraversalPolicy) SortDescendants(descendants []*FocusNode, _ *FocusNode) []*FocusNode

SortDescendants keeps the order of the nodes.

Flutter: widgets/focus_traversal.dart WidgetOrderTraversalPolicy.sortDescendants

type WidgetPropertyResolver

type WidgetPropertyResolver[T any] func(states WidgetStates) T

WidgetPropertyResolver is the signature for the functions that resolve a property from a set of states.

Flutter: widgets/widget_state.dart WidgetPropertyResolver

type WidgetSpan

type WidgetSpan struct {
	painting.PlaceholderSpanBase
	// contains filtered or unexported fields
}

WidgetSpan is an immutable placeholder that is embedded inline within text: a widget laid out in the line of text. Use it as a child of RichText or Text.

Flutter: widgets/widget_span.dart WidgetSpan

func NewWidgetSpan

func NewWidgetSpan(child Widget, opts ...WidgetSpanOpts) *WidgetSpan

NewWidgetSpan creates the span. In debug builds it panics with the tag WidgetSpanNoBaseline when the alignment is relative to the baseline but there is no baseline.

Flutter: widgets/widget_span.dart WidgetSpan.new

func (*WidgetSpan) Build

func (s *WidgetSpan) Build(builder *ui.ParagraphBuilder, opts ...painting.SpanBuildOpts)

Build adds the placeholder, with the style of the span, to the builder. The dimensions in the options must have the size of every placeholder.

Flutter: widgets/widget_span.dart WidgetSpan.build

func (*WidgetSpan) Child

func (s *WidgetSpan) Child() Widget

Child is the widget to embed.

Flutter: widgets/widget_span.dart WidgetSpan.child

func (*WidgetSpan) CodeUnitAtVisitor

func (s *WidgetSpan) CodeUnitAtVisitor(index int, offset *painting.Accumulator) (byte, bool)

CodeUnitAtVisitor is the placeholder code unit when the index is at this span.

Flutter: widgets/widget_span.dart WidgetSpan.codeUnitAtVisitor

func (*WidgetSpan) CompareTo

CompareTo describes the difference between this span and another.

Flutter: widgets/widget_span.dart WidgetSpan.compareTo

func (*WidgetSpan) DebugAssertIsValid

func (s *WidgetSpan) DebugAssertIsValid() bool

DebugAssertIsValid is always true: the constructor already checked the span.

Flutter: widgets/widget_span.dart WidgetSpan.debugAssertIsValid

func (*WidgetSpan) DebugDescribeChildren

func (s *WidgetSpan) DebugDescribeChildren() []foundation.DiagnosticsNode

DebugDescribeChildren has no children.

Flutter: widgets/widget_span.dart WidgetSpan.debugDescribeChildren

func (*WidgetSpan) DebugFillProperties

func (s *WidgetSpan) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the placeholder and the widget.

Flutter: widgets/widget_span.dart WidgetSpan.debugFillProperties

func (*WidgetSpan) Equal

func (s *WidgetSpan) Equal(other painting.InlineSpan) bool

Equal is Dart's == on spans.

Flutter: widgets/widget_span.dart WidgetSpan.operator ==

func (*WidgetSpan) GetSpanForPositionVisitor

func (s *WidgetSpan) GetSpanForPositionVisitor(position ui.TextPosition, offset *painting.Accumulator) painting.InlineSpan

GetSpanForPositionVisitor returns this span if the position is at it.

Flutter: widgets/widget_span.dart WidgetSpan.getSpanForPositionVisitor

func (*WidgetSpan) String

func (s *WidgetSpan) String() string

String describes the span.

Flutter: widgets/widget_span.dart WidgetSpan.toString

func (*WidgetSpan) ToStringShort

func (s *WidgetSpan) ToStringShort() string

ToStringShort names the span.

Flutter: widgets/widget_span.dart WidgetSpan.toStringShort

func (*WidgetSpan) VisitChildren

func (s *WidgetSpan) VisitChildren(visitor painting.InlineSpanVisitor) bool

VisitChildren calls the visitor on this span.

Flutter: widgets/widget_span.dart WidgetSpan.visitChildren

func (*WidgetSpan) VisitDirectChildren

func (s *WidgetSpan) VisitDirectChildren(visitor painting.InlineSpanVisitor) bool

VisitDirectChildren does nothing: a widget span has no child spans.

Flutter: widgets/widget_span.dart WidgetSpan.visitDirectChildren

type WidgetSpanOpts

type WidgetSpanOpts struct {
	// Alignment is how the widget aligns with the text; the default is
	// PlaceholderAlignmentBottom.
	Alignment ui.PlaceholderAlignment
	// Baseline is the text baseline to align to when Alignment is baseline,
	// aboveBaseline or belowBaseline; it is required then.
	Baseline ui.TextBaseline
	// Style is the style of the span.
	Style *painting.TextStyle
}

WidgetSpanOpts are the optional parameters of NewWidgetSpan.

Flutter: widgets/widget_span.dart WidgetSpan.new

type WidgetState

type WidgetState int

WidgetState is an interactive state that a widget can be in: a button is pressed, a text field has an error.

Flutter: widgets/widget_state.dart WidgetState

const (
	// WidgetStateUnspecified is the zero value.
	//
	// Flutter: no counterpart
	WidgetStateUnspecified WidgetState = iota
	// WidgetStateHovered: the state when the user drags their mouse cursor over
	// the given widget.
	//
	// Flutter: widgets/widget_state.dart WidgetState.hovered
	WidgetStateHovered
	// WidgetStateFocused: the state when the user navigates with the keyboard to
	// a given widget.
	//
	// Flutter: widgets/widget_state.dart WidgetState.focused
	WidgetStateFocused
	// WidgetStatePressed: the state when the user is actively pressing down on
	// the given widget.
	//
	// Flutter: widgets/widget_state.dart WidgetState.pressed
	WidgetStatePressed
	// WidgetStateDragged: the state when this widget is being dragged from one
	// place to another by the user.
	//
	// Flutter: widgets/widget_state.dart WidgetState.dragged
	WidgetStateDragged
	// WidgetStateSelected: the state when this item has been selected.
	//
	// Flutter: widgets/widget_state.dart WidgetState.selected
	WidgetStateSelected
	// WidgetStateScrolledUnder: the state when this widget overlaps the content of
	// a scrollable below.
	//
	// Flutter: widgets/widget_state.dart WidgetState.scrolledUnder
	WidgetStateScrolledUnder
	// WidgetStateDisabled: the state when this widget is disabled and cannot be
	// interacted with.
	//
	// Flutter: widgets/widget_state.dart WidgetState.disabled
	WidgetStateDisabled
	// WidgetStateError: the state when the widget has entered some form of
	// invalid state.
	//
	// Flutter: widgets/widget_state.dart WidgetState.error
	WidgetStateError
)

The widget states, in the order of Flutter's enum. WidgetStateUnspecified is the zero value and is not a state.

func (WidgetState) IsSatisfiedBy

func (s WidgetState) IsSatisfiedBy(states WidgetStates) bool

IsSatisfiedBy reports whether the state is in the set.

Flutter: widgets/widget_state.dart WidgetState.isSatisfiedBy

func (WidgetState) String

func (s WidgetState) String() string

String is the name of the state, as Dart prints it: WidgetState.hovered.

Flutter: widgets/widget_state.dart WidgetState

type WidgetStateMap

type WidgetStateMap[T any] []WidgetStateMapEntry[T]

WidgetStateMap is a map of constraints to values, kept in order: the first entry whose constraint holds for a set of states is the value of that set (Dart's Map<WidgetStatesConstraint, T> keeps the order of insertion).

Flutter: widgets/widget_state.dart WidgetStateMap

type WidgetStateMapEntry

type WidgetStateMapEntry[T any] struct {
	// Key is the constraint of the entry.
	Key WidgetStatesConstraint
	// Value is the value of the entry.
	Value T
}

WidgetStateMapEntry is an entry of a WidgetStateMap.

Flutter: widgets/widget_state.dart WidgetStateMap

type WidgetStateMapper

type WidgetStateMapper[T any] struct {
	// contains filtered or unexported fields
}

WidgetStateMapper is a property that resolves with the first entry of a map whose constraint the states satisfy. When none does, the value is the zero value of a nullable T (a pointer, an interface, a slice, a map, a function or a foundation.Opt), and for any other T it panics with the tag WidgetStateMapperNoMatch: add the WidgetStateAny key to the map.

Flutter: widgets/widget_state.dart WidgetStateMapper

func NewWidgetStateMapper

func NewWidgetStateMapper[T any](m WidgetStateMap[T]) *WidgetStateMapper[T]

NewWidgetStateMapper creates a mapper (Flutter's WidgetStateProperty.fromMap).

Flutter: widgets/widget_state.dart WidgetStateMapper.new

func (*WidgetStateMapper[T]) DebugFillProperties

func (p *WidgetStateMapper[T]) DebugFillProperties(properties *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the map.

Flutter: widgets/widget_state.dart WidgetStateMapper.debugFillProperties

func (*WidgetStateMapper[T]) Equal

func (p *WidgetStateMapper[T]) Equal(other *WidgetStateMapper[T]) bool

Equal reports whether the other mapper has the same entries, in the same order.

Flutter: widgets/widget_state.dart WidgetStateMapper.==

func (*WidgetStateMapper[T]) Resolve

func (p *WidgetStateMapper[T]) Resolve(states WidgetStates) T

Resolve is the value of the first entry whose constraint the states satisfy.

Flutter: widgets/widget_state.dart WidgetStateMapper.resolve

func (*WidgetStateMapper[T]) String

func (p *WidgetStateMapper[T]) String() string

String describes the mapper.

Flutter: widgets/widget_state.dart WidgetStateMapper.toString

type WidgetStateMouseCursor

type WidgetStateMouseCursor interface {
	services.MouseCursor
	WidgetStateProperty[services.MouseCursor]
}

WidgetStateMouseCursor is a mouse cursor that is also a property that resolves to a mouse cursor for a set of states. As a cursor, it is the cursor of the empty set of states.

Flutter: widgets/widget_state.dart WidgetStateMouseCursor

func WidgetStateMouseCursorFromMap

func WidgetStateMouseCursorFromMap(m WidgetStateMap[services.MouseCursor]) WidgetStateMouseCursor

WidgetStateMouseCursorFromMap is a mouse cursor that resolves with a map.

Flutter: widgets/widget_state.dart WidgetStateMouseCursor.fromMap

func WidgetStateMouseCursorResolveWith

func WidgetStateMouseCursorResolveWith(callback WidgetPropertyResolver[services.MouseCursor], description ...string) WidgetStateMouseCursor

WidgetStateMouseCursorResolveWith is a mouse cursor that resolves with the callback. The description is the debug description of the cursor; the default is WidgetStateMouseCursor().

Flutter: widgets/widget_state.dart WidgetStateMouseCursor.resolveWith

type WidgetStateProperty

type WidgetStateProperty[T any] interface {
	// Resolve is the value for the set of states.
	//
	// Flutter: widgets/widget_state.dart WidgetStateProperty.resolve
	Resolve(states WidgetStates) T
}

WidgetStateProperty is an interface for classes that resolve to a value of type T based on a widget's interactive state. Widgets whose parameter is documented to be a WidgetStateProperty resolve it with the states they are in.

Flutter: widgets/widget_state.dart WidgetStateProperty

var WidgetStateColorTransparent WidgetStateProperty[ui.Color] = NewWidgetStatePropertyAll(ui.NewColor(0x00000000))

WidgetStateColorTransparent is the property that resolves to transparent black for every state. It is read-only.

Flutter: widgets/widget_state.dart WidgetStateColor.transparent

func WidgetStateBorderSideFromMap

WidgetStateBorderSideFromMap is a property of border sides that resolves with a map.

Flutter: widgets/widget_state.dart WidgetStateBorderSide.fromMap

func WidgetStateBorderSideLerp

WidgetStateBorderSideLerp linearly interpolates between two properties of border sides. A side that is None grows from, or shrinks to, a transparent side of width 0. It is nil when both properties are nil, and a when they are the same.

Flutter: widgets/widget_state.dart WidgetStateBorderSide.lerp

func WidgetStateBorderSideResolveWith

WidgetStateBorderSideResolveWith is a property of border sides (None is Dart's null) that resolves with the callback.

Flutter: widgets/widget_state.dart WidgetStateBorderSide.resolveWith

func WidgetStateColorFromMap

func WidgetStateColorFromMap(m WidgetStateMap[ui.Color]) WidgetStateProperty[ui.Color]

WidgetStateColorFromMap is a property of colors that resolves with a map.

Flutter: widgets/widget_state.dart WidgetStateColor.fromMap

func WidgetStateColorResolveWith

func WidgetStateColorResolveWith(callback WidgetPropertyResolver[ui.Color]) WidgetStateProperty[ui.Color]

WidgetStateColorResolveWith is a property of colors that resolves with the callback. Dart's WidgetStateColor is a Color that is also a property; ui.Color is a plain value, so the colors are properties only (SPEC §12.10).

Flutter: widgets/widget_state.dart WidgetStateColor.resolveWith

func WidgetStateOutlinedBorderFromMap

WidgetStateOutlinedBorderFromMap is a property of outlined borders that resolves with a map.

Flutter: widgets/widget_state.dart WidgetStateOutlinedBorder.fromMap

func WidgetStateOutlinedBorderResolveWith

func WidgetStateOutlinedBorderResolveWith(callback WidgetPropertyResolver[painting.OutlinedBorder]) WidgetStateProperty[painting.OutlinedBorder]

WidgetStateOutlinedBorderResolveWith is a property of outlined borders (nil is Dart's null) that resolves with the callback.

Flutter: widgets/widget_state.dart WidgetStateOutlinedBorder.resolveWith

func WidgetStatePropertyLerp

func WidgetStatePropertyLerp[T any](a, b WidgetStateProperty[T], t float64,
	lerp func(a, b foundation.Opt[T], t float64) foundation.Opt[T]) WidgetStateProperty[foundation.Opt[T]]

WidgetStatePropertyLerp linearly interpolates between two properties, with the lerp function of their values. A nil property resolves to None, which the lerp function handles as Dart's null. It is nil when both are nil.

Flutter: widgets/widget_state.dart WidgetStateProperty.lerp

func WidgetStatePropertyResolveWith

func WidgetStatePropertyResolveWith[T any](callback WidgetPropertyResolver[T]) WidgetStateProperty[T]

WidgetStatePropertyResolveWith is a property that resolves with the callback.

Flutter: widgets/widget_state.dart WidgetStateProperty.resolveWith

func WidgetStateTextStyleFromMap

func WidgetStateTextStyleFromMap(m WidgetStateMap[*painting.TextStyle]) WidgetStateProperty[*painting.TextStyle]

WidgetStateTextStyleFromMap is a property of text styles that resolves with a map.

Flutter: widgets/widget_state.dart WidgetStateTextStyle.fromMap

func WidgetStateTextStyleResolveWith

func WidgetStateTextStyleResolveWith(callback WidgetPropertyResolver[*painting.TextStyle]) WidgetStateProperty[*painting.TextStyle]

WidgetStateTextStyleResolveWith is a property of text styles that resolves with the callback.

Flutter: widgets/widget_state.dart WidgetStateTextStyle.resolveWith

type WidgetStatePropertyAll

type WidgetStatePropertyAll[T any] struct {
	// Value is the value that every set of states resolves to.
	//
	// Flutter: widgets/widget_state.dart WidgetStatePropertyAll.value
	Value T
}

WidgetStatePropertyAll is a property that resolves to the same value for every set of states.

Flutter: widgets/widget_state.dart WidgetStatePropertyAll

func NewWidgetStatePropertyAll

func NewWidgetStatePropertyAll[T any](value T) *WidgetStatePropertyAll[T]

NewWidgetStatePropertyAll creates a property that always resolves to the value (Flutter's WidgetStateProperty.all).

Flutter: widgets/widget_state.dart WidgetStatePropertyAll.new

func (*WidgetStatePropertyAll[T]) Equal

func (p *WidgetStatePropertyAll[T]) Equal(other *WidgetStatePropertyAll[T]) bool

Equal reports whether the other property holds an equal value.

Flutter: widgets/widget_state.dart WidgetStatePropertyAll.==

func (*WidgetStatePropertyAll[T]) Resolve

func (p *WidgetStatePropertyAll[T]) Resolve(WidgetStates) T

Resolve is the value.

Flutter: widgets/widget_state.dart WidgetStatePropertyAll.resolve

func (*WidgetStatePropertyAll[T]) String

func (p *WidgetStatePropertyAll[T]) String() string

String describes the property: WidgetStatePropertyAll(value), a double with the digits that Flutter's debugFormatDouble keeps.

Flutter: widgets/widget_state.dart WidgetStatePropertyAll.toString

type WidgetStates

type WidgetStates uint16

WidgetStates is a set of widget states (Dart's Set<WidgetState>). It is a value that can be compared with ==. The zero value is the empty set.

Flutter: widgets/widget_state.dart WidgetState

func NewWidgetStates

func NewWidgetStates(states ...WidgetState) WidgetStates

NewWidgetStates makes the set of the states.

Flutter: widgets/widget_state.dart WidgetState

func (WidgetStates) Has

func (s WidgetStates) Has(state WidgetState) bool

Has reports whether the state is in the set.

Flutter: widgets/widget_state.dart WidgetState

func (WidgetStates) Len

func (s WidgetStates) Len() int

Len is the number of states in the set.

Flutter: widgets/widget_state.dart WidgetState

func (WidgetStates) Slice

func (s WidgetStates) Slice() []WidgetState

Slice is the states in the order of the enum.

Flutter: widgets/widget_state.dart WidgetState

func (WidgetStates) String

func (s WidgetStates) String() string

String lists the states, as Dart prints a set: {WidgetState.hovered, WidgetState.pressed}.

Flutter: widgets/widget_state.dart WidgetState

func (WidgetStates) With

func (s WidgetStates) With(state WidgetState) WidgetStates

With is the set with the state added.

Flutter: widgets/widget_state.dart WidgetState

func (WidgetStates) Without

func (s WidgetStates) Without(state WidgetState) WidgetStates

Without is the set with the state removed.

Flutter: widgets/widget_state.dart WidgetState

type WidgetStatesConstraint

type WidgetStatesConstraint interface {
	// IsSatisfiedBy reports whether the constraint holds for the set of states.
	//
	// Flutter: widgets/widget_state.dart WidgetStatesConstraint.isSatisfiedBy
	IsSatisfiedBy(states WidgetStates) bool
}

WidgetStatesConstraint is a condition on a set of widget states: a state (it must be in the set), WidgetStateAny, or a combination made with WidgetStatesAnd, WidgetStatesOr and WidgetStatesNot (Dart's operators &, | and ~). Constraints can be compared with ==.

Flutter: widgets/widget_state.dart WidgetStatesConstraint

var WidgetStateAny WidgetStatesConstraint = anyWidgetStates{}

WidgetStateAny is the constraint that every set of states satisfies, the empty set too. It is read-only.

Flutter: widgets/widget_state.dart WidgetState.any

func WidgetStatesAnd

func WidgetStatesAnd(a, b WidgetStatesConstraint) WidgetStatesConstraint

WidgetStatesAnd is the constraint that holds when both constraints do (Dart's operator &).

Flutter: widgets/widget_state.dart WidgetStatesConstraint.operator &

func WidgetStatesNot

WidgetStatesNot is the constraint that holds when the constraint does not (Dart's operator ~).

Flutter: widgets/widget_state.dart WidgetStatesConstraint.operator ~

func WidgetStatesOr

WidgetStatesOr is the constraint that holds when either constraint does (Dart's operator |).

Flutter: widgets/widget_state.dart WidgetStatesConstraint.operator |

type WidgetStatesController

type WidgetStatesController struct {
	*foundation.ValueNotifier[WidgetStates]
}

WidgetStatesController manages a set of WidgetState s and notifies listeners of changes.

Flutter: widgets/widget_state.dart WidgetStatesController

func NewWidgetStatesController

func NewWidgetStatesController(states ...WidgetState) *WidgetStatesController

NewWidgetStatesController creates a controller with the states.

Flutter: widgets/widget_state.dart WidgetStatesController.new

func (*WidgetStatesController) Update

func (c *WidgetStatesController) Update(state WidgetState, add bool)

Update adds the state to the set, or removes it, and notifies the listeners when that changes the set.

Flutter: widgets/widget_state.dart WidgetStatesController.update

type WidgetsApp

type WidgetsApp struct {
	StatefulWidget
	// contains filtered or unexported fields
}

WidgetsApp is a convenience widget that wraps a number of widgets that applications commonly require: a Navigator (or a Router) for the pages, the Localizations of the app, a Title, the default Shortcuts and Actions of the platform, the default text editing shortcuts and a focus traversal group in reading order. It does not draw anything itself; MaterialApp builds on it.

Deviation: the restoration scope, SharedAppData, TapRegionSurface, the window manager, the performance overlay, the semantics debugger, the widget inspector and the checked-mode banner are not part of it yet; each is added by the step that ports the widget it needs (SPEC §12.10).

Flutter: widgets/app.dart WidgetsApp

func NewWidgetsApp

func NewWidgetsApp(color ui.Color, opts ...WidgetsAppOpts) *WidgetsApp

NewWidgetsApp creates an app that navigates with a Navigator. In debug builds it panics when the parameters contradict each other, with the tags WidgetsAppHomeRedundant, WidgetsAppHomeAndDefaultRoute, WidgetsAppNoRoute, WidgetsAppBuilderOnly, WidgetsAppPageRouteBuilderMissing and WidgetsAppSupportedLocalesEmpty.

Flutter: widgets/app.dart WidgetsApp.new

func NewWidgetsAppRouter

func NewWidgetsAppRouter[T any](color ui.Color, opts ...WidgetsAppRouterOpts[T]) *WidgetsApp

NewWidgetsAppRouter creates an app that navigates with a Router. In debug builds it panics with the tags WidgetsAppRouterConfigConflict, WidgetsAppRouterDelegateMissing, WidgetsAppRouterParserMissing or WidgetsAppSupportedLocalesEmpty when the parameters contradict each other.

Flutter: widgets/app.dart WidgetsApp.router

func (*WidgetsApp) Actions

func (w *WidgetsApp) Actions() ActionMap

Actions is the map that replaces the default actions, or nil.

Flutter: widgets/app.dart WidgetsApp.actions

func (*WidgetsApp) Color

func (w *WidgetsApp) Color() ui.Color

Color is the primary color of the app, given to the Title.

Flutter: widgets/app.dart WidgetsApp.color

func (*WidgetsApp) CreateState

func (w *WidgetsApp) CreateState() State

CreateState creates the state.

Flutter: widgets/app.dart WidgetsApp.createState

func (*WidgetsApp) Shortcuts

func (w *WidgetsApp) Shortcuts() ShortcutMap

Shortcuts is the map that replaces the default shortcuts, or nil.

Flutter: widgets/app.dart WidgetsApp.shortcuts

func (*WidgetsApp) SupportedLocales

func (w *WidgetsApp) SupportedLocales() []ui.Locale

SupportedLocales are the locales the app supports.

Flutter: widgets/app.dart WidgetsApp.supportedLocales

type WidgetsAppOpts

type WidgetsAppOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// NavigatorKey is the key of the navigator of the app; the default is a key
	// the app makes.
	NavigatorKey AnyGlobalKey
	// OnGenerateRoute makes the routes that Home and Routes do not cover.
	OnGenerateRoute RouteFactory
	// OnGenerateInitialRoutes makes the routes to start with; the default is
	// NavigatorDefaultGenerateInitialRoutes. It can not be used with Home.
	OnGenerateInitialRoutes InitialRouteListFactory
	// OnUnknownRoute makes the route when nothing else covers the name.
	OnUnknownRoute RouteFactory
	// OnNavigationNotification handles the NavigationNotifications of the
	// navigators below; the default tells the system whether the framework can
	// handle a pop (SystemNavigator.SetFrameworkHandlesBack).
	OnNavigationNotification NotificationListenerCallback[NavigationNotification]
	// NavigatorObservers are the observers of the navigator.
	NavigatorObservers []NavigatorObserver
	// InitialRoute is the name of the first route; the default is "/".
	InitialRoute string
	// PageRouteBuilder makes the routes of Home and Routes. It is required when
	// either of them is set.
	PageRouteBuilder PageRouteFactory
	// Home is the widget of the "/" route.
	Home Widget
	// Routes is the table of the named routes.
	Routes map[string]WidgetBuilder
	// Builder wraps the navigator (the child is nil when the app has none).
	Builder TransitionBuilder
	// Title is the one-line description of the app for the system.
	Title string
	// OnGenerateTitle makes the title from the context, and replaces Title.
	OnGenerateTitle GenerateAppTitle
	// TextStyle is the default text style of the app.
	TextStyle *painting.TextStyle
	// Locale forces the locale of the app.
	Locale foundation.Opt[ui.Locale]
	// LocalizationsDelegates produce the localized resources of the app.
	LocalizationsDelegates []LocalizationsDelegate
	// LocaleListResolutionCallback resolves the locale from the preferred ones.
	LocaleListResolutionCallback LocaleListResolutionCallback
	// LocaleResolutionCallback resolves the locale from the first preferred one.
	LocaleResolutionCallback LocaleResolutionCallback
	// SupportedLocales are the locales the app supports; the default is en_US.
	SupportedLocales []ui.Locale
	// Shortcuts replaces the default shortcuts of the app (WidgetsAppDefaultShortcuts).
	Shortcuts ShortcutMap
	// Actions replaces the default actions of the app (WidgetsAppDefaultActions).
	Actions ActionMap
	// DebugShowCheckedModeBanner turns on a little "DEBUG" banner in debug builds;
	// the default is true.
	DebugShowCheckedModeBanner foundation.Opt[bool]
	// ShowPerformanceOverlay turns on an overlay at the top of the app with the graphs
	// and the statistics of the time to build and to draw each frame.
	ShowPerformanceOverlay bool
}

WidgetsAppOpts are the optional parameters of NewWidgetsApp.

Flutter: widgets/app.dart WidgetsApp.new

type WidgetsAppRouterOpts

type WidgetsAppRouterOpts[T any] struct {
	// Key is the key of the widget.
	Key foundation.Key
	// RouteInformationProvider provides the route information; with a parser and
	// without a provider the app uses the one of the platform.
	RouteInformationProvider RouteInformationProvider
	// RouteInformationParser parses the route information.
	RouteInformationParser RouteInformationParser[T]
	// RouterDelegate builds the pages of the app.
	RouterDelegate RouterDelegate[T]
	// RouterConfig holds the four router objects at once; it excludes them.
	RouterConfig *RouterConfig[T]
	// BackButtonDispatcher tells the router that the platform wants to pop; the
	// default is a RootBackButtonDispatcher.
	BackButtonDispatcher BackButtonDispatcher
	// Builder wraps the router.
	Builder TransitionBuilder
	// Title is the one-line description of the app for the system.
	Title string
	// OnGenerateTitle makes the title from the context, and replaces Title.
	OnGenerateTitle GenerateAppTitle
	// OnNavigationNotification handles the NavigationNotifications below.
	OnNavigationNotification NotificationListenerCallback[NavigationNotification]
	// TextStyle is the default text style of the app.
	TextStyle *painting.TextStyle
	// Locale forces the locale of the app.
	Locale foundation.Opt[ui.Locale]
	// LocalizationsDelegates produce the localized resources of the app.
	LocalizationsDelegates []LocalizationsDelegate
	// LocaleListResolutionCallback resolves the locale from the preferred ones.
	LocaleListResolutionCallback LocaleListResolutionCallback
	// LocaleResolutionCallback resolves the locale from the first preferred one.
	LocaleResolutionCallback LocaleResolutionCallback
	// SupportedLocales are the locales the app supports; the default is en_US.
	SupportedLocales []ui.Locale
	// Shortcuts replaces the default shortcuts of the app.
	Shortcuts ShortcutMap
	// Actions replaces the default actions of the app.
	Actions ActionMap
	// DebugShowCheckedModeBanner turns on a little "DEBUG" banner in debug builds;
	// the default is true.
	DebugShowCheckedModeBanner foundation.Opt[bool]
	// ShowPerformanceOverlay turns on an overlay at the top of the app with the graphs
	// and the statistics of the time to build and to draw each frame.
	ShowPerformanceOverlay bool
}

WidgetsAppRouterOpts are the optional parameters of NewWidgetsAppRouter.

Flutter: widgets/app.dart WidgetsApp.router

type WidgetsBinding

type WidgetsBinding struct {
	// contains filtered or unexported fields
}

WidgetsBinding is the glue between the widgets layer and the engine. It owns the bindings of the layers below (scheduler, gestures, painting, rendering), the build owner and the root element, builds the widgets before each frame lays out and paints, and tells the WidgetsBindingObservers what the platform changed. An app has one; RunApp makes it, and widgets reach it with WidgetsBindingOf.

Deviation: Flutter's is a mixin on BindingBase with a static instance; this one is a struct made from the other bindings and reached through the BuildContext (SPEC §12.10, §13).

Flutter: widgets/binding.dart WidgetsBinding

func MaybeWidgetsBindingOf

func MaybeWidgetsBindingOf(bc BuildContext) *WidgetsBinding

MaybeWidgetsBindingOf is WidgetsBindingOf that returns nil instead of panicking.

Flutter: widgets/binding.dart WidgetsBinding.instance

func NewWidgetsBinding

func NewWidgetsBinding(ctx context.Context, d *ui.PlatformDispatcher, opts ...WidgetsBindingOpts) *WidgetsBinding

NewWidgetsBinding creates the binding for a dispatcher, with the scheduler, gesture, painting and rendering bindings under it. Call it on the UI thread. ctx bounds the work of the painting binding (image loading).

Frames stay off until the root widget is attached (AttachRootWidget).

Flutter: widgets/binding.dart WidgetsBinding.initInstances

func WidgetsBindingOf

func WidgetsBindingOf(bc BuildContext) *WidgetsBinding

WidgetsBindingOf is the widgets binding of the app that the context belongs to. It panics with the tag WidgetsBindingMissing when the context's build owner was not made by a binding.

Flutter: widgets/binding.dart WidgetsBinding.instance

func (*WidgetsBinding) AddObserver

func (b *WidgetsBinding) AddObserver(observer WidgetsBindingObserver)

AddObserver registers an observer. An observer registered twice is called twice.

Flutter: widgets/binding.dart WidgetsBinding.addObserver

func (*WidgetsBinding) ApplicationSwitcherDescription

func (b *WidgetsBinding) ApplicationSwitcherDescription() ApplicationSwitcherDescription

ApplicationSwitcherDescription is the description that the last Title widget set.

Deviation: Flutter's SystemChrome sends it to the embedder through a platform channel; here the binding keeps it, and the window title is wired to it in step 10 (SPEC §12.10).

Flutter: services/system_chrome.dart SystemChrome.setApplicationSwitcherDescription

func (*WidgetsBinding) AttachRootWidget

func (b *WidgetsBinding) AttachRootWidget(root Widget)

AttachRootWidget makes the widget the root of the tree: the first call creates the root element and mounts the widget below it; later calls replace the widget. It makes the binding produce frames and schedules the first one.

Flutter: widgets/binding.dart WidgetsBinding.attachRootWidget

func (*WidgetsBinding) AttachToBuildOwner

func (b *WidgetsBinding) AttachToBuildOwner(root *RootWidget)

AttachToBuildOwner attaches the root widget to the build owner.

Flutter: widgets/binding.dart WidgetsBinding.attachToBuildOwner

func (*WidgetsBinding) BrowserContextMenu

func (b *WidgetsBinding) BrowserContextMenu() *services.BrowserContextMenu

BrowserContextMenu controls the browser's context menu on the web; it does nothing elsewhere. See services.BrowserContextMenu.

Flutter: services/browser_context_menu.dart BrowserContextMenu

func (*WidgetsBinding) BuildOwner

func (b *WidgetsBinding) BuildOwner() *BuildOwner

BuildOwner is the build owner of the app's widget tree.

Flutter: widgets/binding.dart WidgetsBinding.buildOwner

func (*WidgetsBinding) Clipboard

func (b *WidgetsBinding) Clipboard() *services.Clipboard

Clipboard is the system clipboard; see services.Clipboard.

Flutter: services/clipboard.dart Clipboard

func (*WidgetsBinding) DebugBuildingDirtyElements

func (b *WidgetsBinding) DebugBuildingDirtyElements() bool

DebugBuildingDirtyElements is whether the binding is building, laying out and painting a frame (debug builds only).

Flutter: widgets/binding.dart WidgetsBinding.debugBuildingDirtyElements

func (*WidgetsBinding) DebugDescribeApp

func (b *WidgetsBinding) DebugDescribeApp() string

DebugDescribeApp describes the element tree of the app: the text that DebugDumpApp prints.

Flutter: widgets/binding.dart debugDumpApp

func (*WidgetsBinding) DebugOptions

func (b *WidgetsBinding) DebugOptions() *DebugOptions

DebugOptions are the debug flags of the app.

Flutter: widgets/debug.dart

func (*WidgetsBinding) DetachRootWidget

func (b *WidgetsBinding) DetachRootWidget()

DetachRootWidget takes the app out of the tree: the root widget gets no child, so every element below it is unmounted, every State is disposed and the render objects are detached. RunApp does it when the app ends, before the renderer is closed, so that what a state holds (the targets of a GPU view, the resources an app made in OnInit) is released while the device is still open. It does nothing when no widget is attached.

Flutter: no counterpart

func (*WidgetsBinding) ErrorReporter

func (b *WidgetsBinding) ErrorReporter() foundation.ErrorReporter

ErrorReporter is the reporter that every part of the framework reports to.

Flutter: foundation/assertions.dart FlutterError.onError

func (*WidgetsBinding) ExitApplication

func (b *WidgetsBinding) ExitApplication(exitType ui.AppExitType) ui.AppExitResponse

ExitApplication ends the app. A cancelable exit asks the observers first and does nothing if one cancels; a required exit does not ask. It returns the response.

Flutter: services/binding.dart ServicesBinding.exitApplication

func (*WidgetsBinding) Extension

func (b *WidgetsBinding) Extension(key any, create func() any) any

Extension returns the value that the package of the key keeps in the binding, made by create on the first call: the way a package outside widgets (desktop) has state of its own for each app without a package-level variable. It is safe to call from any goroutine; the key is any comparable value, usually a private struct type of the calling package.

Flutter: no counterpart

func (*WidgetsBinding) FirstFrameRasterized

func (b *WidgetsBinding) FirstFrameRasterized() bool

FirstFrameRasterized is whether the first frame was sent to the engine.

Deviation: Flutter waits for the engine to report the frame rasterized; the engine has no such report, so a frame counts when View.Render returned (SPEC §12.10).

Flutter: widgets/binding.dart WidgetsBinding.firstFrameRasterized

func (*WidgetsBinding) FocusManager

func (b *WidgetsBinding) FocusManager() *FocusManager

FocusManager is the focus manager of the binding.

Flutter: widgets/binding.dart WidgetsBinding.focusManager

func (*WidgetsBinding) Gestures

func (b *WidgetsBinding) Gestures() *gestures.GestureBinding

Gestures is the gesture binding.

Flutter: gestures/binding.dart GestureBinding.instance

func (*WidgetsBinding) HandleCancelBackGesture

func (b *WidgetsBinding) HandleCancelBackGesture()

HandleCancelBackGesture tells the observers that took the start of the gesture that it was canceled.

Flutter: widgets/binding.dart WidgetsBinding._handleCancelBackGesture

func (*WidgetsBinding) HandleCommitBackGesture

func (b *WidgetsBinding) HandleCommitBackGesture()

HandleCommitBackGesture tells the observers that took the start of the gesture that it finished. If none did, the route is popped like a normal, non-predictive back (HandlePopRoute): this happens when a back gesture occurs but no predictive back route transition exists to handle it.

Flutter: widgets/binding.dart WidgetsBinding._handleCommitBackGesture

func (*WidgetsBinding) HandleMemoryPressure

func (b *WidgetsBinding) HandleMemoryPressure()

HandleMemoryPressure tells the painting binding to drop its image cache and the observers about it. The dispatcher calls it when the system is low on memory (Android).

Flutter: widgets/binding.dart WidgetsBinding.handleMemoryPressure

func (*WidgetsBinding) HandlePopRoute

func (b *WidgetsBinding) HandlePopRoute() bool

HandlePopRoute tells the observers, in order of registration, that the system asks to pop the current route; the first that returns true handles it. It reports whether one did. If none does, the app asks to exit, as Flutter's SystemNavigator.pop does.

Flutter: widgets/binding.dart WidgetsBinding.handlePopRoute

func (*WidgetsBinding) HandlePushRouteInformation

func (b *WidgetsBinding) HandlePushRouteInformation(routeInformation *RouteInformation) bool

HandlePushRouteInformation tells the observers, in order of registration, that the system pushes a route; the first that returns true handles it. It reports whether one did.

Flutter: widgets/binding.dart WidgetsBinding.handlePushRoute

func (*WidgetsBinding) HandleRequestAppExit

func (b *WidgetsBinding) HandleRequestAppExit() ui.AppExitResponse

HandleRequestAppExit asks the observers whether the app may exit: the answer is Cancel if any observer says Cancel, else Exit. It does not exit.

Flutter: widgets/binding.dart WidgetsBinding.handleRequestAppExit

func (*WidgetsBinding) HandleStartBackGesture

func (b *WidgetsBinding) HandleStartBackGesture(backEvent services.PredictiveBackEvent) bool

HandleStartBackGesture tells the observers, in order of registration, that a predictive back gesture starts. The observers that return true are the only ones that hear of the rest of the gesture. It reports whether one did.

Flutter: widgets/binding.dart WidgetsBinding._handleStartBackGesture

func (*WidgetsBinding) HandleStatusBarTap

func (b *WidgetsBinding) HandleStatusBarTap()

HandleStatusBarTap tells the observers that have a HandleStatusBarTap method that the user tapped the status bar. The engine of a platform that has such a gesture (iOS) calls it.

Flutter: widgets/binding.dart WidgetsBinding.handleStatusBarTap

func (*WidgetsBinding) HandleUpdateBackGestureProgress

func (b *WidgetsBinding) HandleUpdateBackGestureProgress(backEvent services.PredictiveBackEvent)

HandleUpdateBackGestureProgress tells the observers that took the start of the gesture that it moved.

Flutter: widgets/binding.dart WidgetsBinding._handleUpdateBackGestureProgress

func (*WidgetsBinding) HapticFeedback

func (b *WidgetsBinding) HapticFeedback() *services.HapticFeedback

HapticFeedback gives haptic feedback; see services.HapticFeedback. It does something on Android only.

Flutter: services/haptic_feedback.dart HapticFeedback

func (*WidgetsBinding) IsIdle

func (b *WidgetsBinding) IsIdle() bool

IsIdle is whether the app has nothing more to show: the root widget is attached, no frame is scheduled, no animation is running and no image is loading. The self-capture of GLUTTER_SCREENSHOT waits for it.

Flutter: no counterpart

func (*WidgetsBinding) IsRootWidgetAttached

func (b *WidgetsBinding) IsRootWidgetAttached() bool

IsRootWidgetAttached is whether the root widget was attached.

Flutter: widgets/binding.dart WidgetsBinding.isRootWidgetAttached

func (*WidgetsBinding) Keyboard

func (b *WidgetsBinding) Keyboard() *services.HardwareKeyboard

Keyboard is the hardware keyboard: the keys that are pressed, the lock modes, and the handlers that see the key events first. The binding feeds it the engine's key data.

Flutter: services/binding.dart ServicesBinding.keyboard

func (*WidgetsBinding) Painting

func (b *WidgetsBinding) Painting() *painting.PaintingBinding

Painting is the painting binding.

Flutter: painting/binding.dart PaintingBinding.instance

func (*WidgetsBinding) PlatformDispatcher

func (b *WidgetsBinding) PlatformDispatcher() *ui.PlatformDispatcher

PlatformDispatcher is the dispatcher the binding listens to.

Flutter: widgets/binding.dart WidgetsBinding.platformDispatcher

func (*WidgetsBinding) PlatformMenuDelegate

func (b *WidgetsBinding) PlatformMenuDelegate() PlatformMenuDelegate

PlatformMenuDelegate is the delegate that PlatformMenuBar uses to put its menus in the platform's menu bar; it is a DefaultPlatformMenuDelegate unless SetPlatformMenuDelegate replaced it.

Flutter: widgets/binding.dart WidgetsBinding.platformMenuDelegate

func (*WidgetsBinding) PointerLock

func (b *WidgetsBinding) PointerLock() *PointerLock

PointerLock returns the pointer lock of the binding.

Flutter: no counterpart

func (*WidgetsBinding) Post

func (b *WidgetsBinding) Post(fn func())

Post runs fn on the UI thread; it is safe to call from any goroutine (SPEC §13).

Flutter: no counterpart

func (*WidgetsBinding) Reassemble

func (b *WidgetsBinding) Reassemble()

Reassemble marks every element for a rebuild and every render object for layout and paint, as after a hot reload.

Flutter: widgets/binding.dart WidgetsBinding.performReassemble

func (*WidgetsBinding) RemoveObserver

func (b *WidgetsBinding) RemoveObserver(observer WidgetsBindingObserver) bool

RemoveObserver removes an observer and reports whether it was registered.

Flutter: widgets/binding.dart WidgetsBinding.removeObserver

func (*WidgetsBinding) Renderer

func (b *WidgetsBinding) Renderer() *rendering.RendererBinding

Renderer is the renderer binding.

Flutter: rendering/binding.dart RendererBinding.instance

func (*WidgetsBinding) RootElement

func (b *WidgetsBinding) RootElement() *RootElement

RootElement is the root of the widget tree, or nil before AttachRootWidget.

Flutter: widgets/binding.dart WidgetsBinding.rootElement

func (*WidgetsBinding) RunPostFrame

func (b *WidgetsBinding) RunPostFrame(fn func(timeStamp time.Duration))

RunPostFrame calls fn after the current frame, or after the next one if none is running. It is a short form of Scheduler().AddPostFrameCallback.

Flutter: scheduler/binding.dart SchedulerBinding.addPostFrameCallback

func (*WidgetsBinding) Scheduler

func (b *WidgetsBinding) Scheduler() *scheduler.SchedulerBinding

Scheduler is the scheduler binding.

Flutter: scheduler/binding.dart SchedulerBinding.instance

func (*WidgetsBinding) SetApplicationSwitcherDescription

func (b *WidgetsBinding) SetApplicationSwitcherDescription(d ApplicationSwitcherDescription)

SetApplicationSwitcherDescription sets the description of the app.

Flutter: services/system_chrome.dart SystemChrome.setApplicationSwitcherDescription

func (*WidgetsBinding) SetPlatformMenuDelegate

func (b *WidgetsBinding) SetPlatformMenuDelegate(d PlatformMenuDelegate)

SetPlatformMenuDelegate replaces the delegate that PlatformMenuBar uses, which tests do to see the menus. The menus that the old delegate has set stay where they are.

Flutter: widgets/binding.dart WidgetsBinding.platformMenuDelegate=

func (*WidgetsBinding) SystemChrome

func (b *WidgetsBinding) SystemChrome() *services.SystemChrome

SystemChrome controls the system's interface around the app (the orientations, the status bar and the navigation bar); see services.SystemChrome. It does something on Android only.

Flutter: services/system_chrome.dart SystemChrome

func (*WidgetsBinding) SystemNavigator

func (b *WidgetsBinding) SystemNavigator() *services.SystemNavigator

SystemNavigator is the navigation of the system around the app. Its Pop ends the app.

Flutter: services/system_navigator.dart SystemNavigator

func (*WidgetsBinding) SystemSound

func (b *WidgetsBinding) SystemSound() *services.SystemSound

SystemSound plays the sounds of the system; see services.SystemSound.

Flutter: services/system_sound.dart SystemSound

func (*WidgetsBinding) TextInput

func (b *WidgetsBinding) TextInput() *services.TextInput

TextInput is the text input service: the text fields attach to it to use the input method (IME) of the platform; see services.TextInput.

Flutter: services/text_input.dart TextInput

func (*WidgetsBinding) UIThread

func (b *WidgetsBinding) UIThread() *foundation.UIThread

UIThread is the UI thread of the app.

Flutter: no counterpart

func (*WidgetsBinding) WaitUntilFirstFrameRasterized

func (b *WidgetsBinding) WaitUntilFirstFrameRasterized() <-chan struct{}

WaitUntilFirstFrameRasterized returns a channel that is closed when the first frame was sent to the engine.

Flutter: widgets/binding.dart WidgetsBinding.waitUntilFirstFrameRasterized

func (*WidgetsBinding) WindowingOwner

func (b *WidgetsBinding) WindowingOwner() *WindowingOwner

WindowingOwner is the owner of the windows of the app.

Flutter: widgets/binding.dart WidgetsBinding.windowingOwner

func (*WidgetsBinding) WrapWithDefaultView

func (b *WidgetsBinding) WrapWithDefaultView(root Widget) Widget

WrapWithDefaultView wraps the widget in a View for the implicit view of the dispatcher, as RunApp does for the app. It panics with the tag ImplicitViewMissing when the platform gave no implicit view.

Flutter: widgets/binding.dart WidgetsBinding.wrapWithDefaultView

func (*WidgetsBinding) WrapWithWindowScope

func (b *WidgetsBinding) WrapWithWindowScope(root Widget) Widget

WrapWithWindowScope wraps the widget in a WindowScope for the controller of the implicit view, so that its descendants reach the first window with WindowScopeOf and a dialog can name it as its parent. RunApp does it for the app; the widget is returned as it is when there is no implicit view.

Flutter: no counterpart

type WidgetsBindingObserver

type WidgetsBindingObserver interface {
	// DidPopRoute is called when the system asks to pop the current route
	// (the back button). Return true to handle it.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didPopRoute
	DidPopRoute() bool
	// DidPushRouteInformation is called when the system pushes a new route (a
	// link that opens the app). Return true to handle it.
	//
	// Deviation: Flutter's default calls the deprecated didPushRoute with the URI
	// string; that method is not ported (SPEC §12.10).
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didPushRouteInformation
	DidPushRouteInformation(routeInformation *RouteInformation) bool
	// HandleStartBackGesture is called at the start of a predictive back gesture.
	// Observers are notified in registration order until all have been notified;
	// each that returns true, and only those, is notified of the subsequent events
	// of the same gesture (HandleUpdateBackGestureProgress and the rest). Return
	// true if the notification was handled, for example by starting a predictive
	// back animation. If every observer returns false, a pop results when
	// HandleCommitBackGesture would be called, as in a non-predictive system back
	// gesture. Used only on Android devices that support predictive back.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.handleStartBackGesture
	HandleStartBackGesture(backEvent services.PredictiveBackEvent) bool
	// HandleUpdateBackGestureProgress is called when a predictive back gesture
	// moves, on the observers that took its start.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.handleUpdateBackGestureProgress
	HandleUpdateBackGestureProgress(backEvent services.PredictiveBackEvent)
	// HandleCommitBackGesture is called when a predictive back gesture finishes
	// successfully, meaning that the current route should be popped, on the
	// observers that took its start. If there is none, the binding pops as in a
	// non-predictive system back gesture.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.handleCommitBackGesture
	HandleCommitBackGesture()
	// HandleCancelBackGesture is called when a predictive back gesture is
	// canceled, meaning that no navigation should occur, on the observers that
	// took its start.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.handleCancelBackGesture
	HandleCancelBackGesture()
	// DidChangeMetrics is called when the metrics of a view change.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeMetrics
	DidChangeMetrics()
	// DidChangeViewFocus is called when a view gets or loses the focus of the
	// platform (the keyboard focus of its window).
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeViewFocus
	DidChangeViewFocus(event ui.ViewFocusEvent)
	// DidChangeTextScaleFactor is called when the system text scale factor
	// changes.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeTextScaleFactor
	DidChangeTextScaleFactor()
	// DidChangePlatformBrightness is called when the system brightness changes.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didChangePlatformBrightness
	DidChangePlatformBrightness()
	// DidChangeLocales is called when the system locales change.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeLocales
	DidChangeLocales(locales []ui.Locale)
	// DidChangeAppLifecycleState is called when the app lifecycle state changes.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeAppLifecycleState
	DidChangeAppLifecycleState(state ui.AppLifecycleState)
	// DidRequestAppExit is called when the app is asked to exit; the answer
	// Cancel keeps the app running (when the exit is cancelable).
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didRequestAppExit
	DidRequestAppExit() ui.AppExitResponse
	// DidHaveMemoryPressure is called when the system is low on memory.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didHaveMemoryPressure
	DidHaveMemoryPressure()
	// DidChangeAccessibilityFeatures is called when the accessibility features
	// change.
	//
	// Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeAccessibilityFeatures
	DidChangeAccessibilityFeatures()
}

WidgetsBindingObserver is an object that wants to know about changes of the system that the binding hears of: the metrics of the views, the text scale factor, the brightness, the locales, the accessibility features, the app lifecycle, the memory pressure, the pop of a route and the request to exit.

Embed WidgetsBindingObserverBase to get a no-op for each method and override the ones you need, then add the observer with WidgetsBinding.AddObserver.

Deviation: DidRequestAppExit returns its answer where Flutter's returns a Future (SPEC §12.10).

Flutter: widgets/binding.dart WidgetsBindingObserver

type WidgetsBindingObserverBase

type WidgetsBindingObserverBase struct{}

WidgetsBindingObserverBase implements WidgetsBindingObserver with methods that do nothing (DidRequestAppExit lets the app exit). Embed it in an observer.

Flutter: widgets/binding.dart WidgetsBindingObserver

func (WidgetsBindingObserverBase) DidChangeAccessibilityFeatures

func (WidgetsBindingObserverBase) DidChangeAccessibilityFeatures()

DidChangeAccessibilityFeatures does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeAccessibilityFeatures

func (WidgetsBindingObserverBase) DidChangeAppLifecycleState

func (WidgetsBindingObserverBase) DidChangeAppLifecycleState(ui.AppLifecycleState)

DidChangeAppLifecycleState does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeAppLifecycleState

func (WidgetsBindingObserverBase) DidChangeLocales

func (WidgetsBindingObserverBase) DidChangeLocales([]ui.Locale)

DidChangeLocales does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeLocales

func (WidgetsBindingObserverBase) DidChangeMetrics

func (WidgetsBindingObserverBase) DidChangeMetrics()

DidChangeMetrics does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeMetrics

func (WidgetsBindingObserverBase) DidChangePlatformBrightness

func (WidgetsBindingObserverBase) DidChangePlatformBrightness()

DidChangePlatformBrightness does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.didChangePlatformBrightness

func (WidgetsBindingObserverBase) DidChangeTextScaleFactor

func (WidgetsBindingObserverBase) DidChangeTextScaleFactor()

DidChangeTextScaleFactor does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeTextScaleFactor

func (WidgetsBindingObserverBase) DidChangeViewFocus

func (WidgetsBindingObserverBase) DidChangeViewFocus(ui.ViewFocusEvent)

DidChangeViewFocus does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.didChangeViewFocus

func (WidgetsBindingObserverBase) DidHaveMemoryPressure

func (WidgetsBindingObserverBase) DidHaveMemoryPressure()

DidHaveMemoryPressure does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.didHaveMemoryPressure

func (WidgetsBindingObserverBase) DidPopRoute

func (WidgetsBindingObserverBase) DidPopRoute() bool

DidPopRoute does not handle the pop.

Flutter: widgets/binding.dart WidgetsBindingObserver.didPopRoute

func (WidgetsBindingObserverBase) DidPushRouteInformation

func (WidgetsBindingObserverBase) DidPushRouteInformation(*RouteInformation) bool

DidPushRouteInformation does not handle the route.

Flutter: widgets/binding.dart WidgetsBindingObserver.didPushRouteInformation

func (WidgetsBindingObserverBase) DidRequestAppExit

func (WidgetsBindingObserverBase) DidRequestAppExit() ui.AppExitResponse

DidRequestAppExit lets the app exit.

Flutter: widgets/binding.dart WidgetsBindingObserver.didRequestAppExit

func (WidgetsBindingObserverBase) HandleCancelBackGesture

func (WidgetsBindingObserverBase) HandleCancelBackGesture()

HandleCancelBackGesture does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.handleCancelBackGesture

func (WidgetsBindingObserverBase) HandleCommitBackGesture

func (WidgetsBindingObserverBase) HandleCommitBackGesture()

HandleCommitBackGesture does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.handleCommitBackGesture

func (WidgetsBindingObserverBase) HandleStartBackGesture

HandleStartBackGesture does not take the gesture.

Flutter: widgets/binding.dart WidgetsBindingObserver.handleStartBackGesture

func (WidgetsBindingObserverBase) HandleUpdateBackGestureProgress

func (WidgetsBindingObserverBase) HandleUpdateBackGestureProgress(services.PredictiveBackEvent)

HandleUpdateBackGestureProgress does nothing.

Flutter: widgets/binding.dart WidgetsBindingObserver.handleUpdateBackGestureProgress

type WidgetsBindingOpts

type WidgetsBindingOpts struct {
	// Debug are the debug flags; the default is a fresh set, all off.
	Debug *DebugOptions
	// ErrorReporter receives the errors that the framework recovers from or
	// reports instead of throwing (SPEC §14.2). The default logs the error, as
	// JSON, through Logger.
	ErrorReporter foundation.ErrorReporter
	// ErrorWidgetBuilder builds the widget that replaces a widget that panicked
	// in Build; the default is described in BuildOwner.ErrorWidgetBuilder.
	ErrorWidgetBuilder func(err error) Widget
	// Logger gets the log of the default error reporter; slog.Default() when nil.
	Logger *slog.Logger
	// Clock is the clock of the gesture binding (the recognizers' timers, the
	// velocity trackers and the resampler); the default is the system clock.
	// Tests give a fake one.
	Clock gestures.SamplingClock
	// Painting are the options of the painting binding (image cache, asset
	// bundle, HTTP client). Its Post, AfterFunc and Reporter are set by default
	// from the dispatcher and the error reporter.
	Painting painting.PaintingBindingOpts
	// UIThread is the UI thread; the default is the calling goroutine.
	UIThread *foundation.UIThread
}

WidgetsBindingOpts are the optional parameters of NewWidgetsBinding.

Flutter: widgets/binding.dart WidgetsBinding.initInstances

type WidgetsLocalizations

type WidgetsLocalizations interface {
	// TextDirection is the direction of the language.
	TextDirection() ui.TextDirection
	// ReorderItemToStart is the label of the action that moves an item to the start.
	ReorderItemToStart() string
	// ReorderItemToEnd is the label of the action that moves an item to the end.
	ReorderItemToEnd() string
	// ReorderItemUp is the label of the action that moves an item up.
	ReorderItemUp() string
	// ReorderItemDown is the label of the action that moves an item down.
	ReorderItemDown() string
	// ReorderItemLeft is the label of the action that moves an item left.
	ReorderItemLeft() string
	// ReorderItemRight is the label of the action that moves an item right.
	ReorderItemRight() string
	// SearchResultsFound is the announcement made when search results appear.
	SearchResultsFound() string
	// NoResultsFound is the announcement made when a search finds nothing.
	NoResultsFound() string
	// CopyButtonLabel is the label of the copy button of the text toolbar.
	CopyButtonLabel() string
	// CutButtonLabel is the label of the cut button.
	CutButtonLabel() string
	// PasteButtonLabel is the label of the paste button.
	PasteButtonLabel() string
	// SelectAllButtonLabel is the label of the select all button.
	SelectAllButtonLabel() string
	// LookUpButtonLabel is the label of the look up button.
	LookUpButtonLabel() string
	// SearchWebButtonLabel is the label of the search web button.
	SearchWebButtonLabel() string
	// ShareButtonLabel is the label of the share button.
	ShareButtonLabel() string
	// RadioButtonUnselectedLabel is the semantics label of an unselected radio.
	RadioButtonUnselectedLabel() string
}

WidgetsLocalizations is the set of localized strings that the widgets layer uses.

Flutter: widgets/localizations.dart WidgetsLocalizations

func WidgetsLocalizationsOf

func WidgetsLocalizationsOf(bc BuildContext) WidgetsLocalizations

WidgetsLocalizationsOf is the WidgetsLocalizations of the closest Localizations above the context. It panics with the tag WidgetsLocalizationsMissing when there are none.

Flutter: widgets/localizations.dart WidgetsLocalizations.of

type WindowConfig

type WindowConfig struct {
	// Title is the title of the window; the default is "Glutter".
	Title string
	// Size is the initial size in logical pixels; zero lets the platform choose.
	Size ui.Size
	// MinSize is the smallest size in logical pixels; zero means no minimum.
	MinSize ui.Size
	// MaxSize is the largest size in logical pixels; zero means no maximum.
	MaxSize ui.Size
	// Resizable is whether the user can resize the window; the default is true.
	Resizable foundation.Opt[bool]
	// Decorated is whether the window has a title bar and borders; the default
	// is true.
	Decorated foundation.Opt[bool]
	// State is the initial state of the window.
	State WindowState
	// Decorations is how the title bar is made: DecorationsAuto, the default, uses
	// the compositor's, then libdecor's, then the WindowDecoration of the
	// framework; DecorationsApp leaves it to the app (SPEC §8.2).
	Decorations Decorations
	// Icon is the icon of the window: a name of the icon theme, pictures, or both.
	// Without one the compositor takes the icon from the app's .desktop file (SPEC §8.2).
	Icon ui.WindowIcon
	// ContentType tells the compositor what the window shows, so that it can pick
	// the refresh rate and the latency that suit it (SPEC §8.11).
	ContentType ui.ContentType
}

WindowConfig describes the first window of an app (RunAppOpts.Window). The zero value is a regular, resizable, decorated window of a size the platform chooses.

Flutter: widgets/_window.dart WindowController

type WindowController

type WindowController interface {
	BaseWindowController
	// Title is the title of the window.
	//
	// Flutter: widgets/_window.dart RegularWindowController.title
	Title() string
	// SetTitle asks for a new title of the window.
	//
	// Flutter: widgets/_window.dart RegularWindowController.setTitle
	SetTitle(title string)
	// Activate asks for the window to be shown and focused.
	//
	// Flutter: widgets/_window.dart RegularWindowController.activate
	Activate()
	// IsActivated is whether the window is focused.
	//
	// Flutter: widgets/_window.dart RegularWindowController.isActivated
	IsActivated() bool
	// SetMinimized asks for the window to be minimized, or shown again.
	//
	// Flutter: widgets/_window.dart RegularWindowController.setMinimized
	SetMinimized(minimized bool)
	// IsMinimized is whether the window is minimized.
	//
	// Flutter: widgets/_window.dart RegularWindowController.isMinimized
	IsMinimized() bool
}

WindowController is what every window that an app can reach with WindowScopeOf can do: a regular window (the first one included) and a dialog. WindowControllerOf gives it for the window that hosts a context, so the title, the activation and the minimized state are reachable without an assertion. What only a regular window can do (maximize, full screen) is in MaximizableWindowController: a controller is one when the window can be maximized, and a type assertion asks.

Deviation: Flutter's RegularWindowController and DialogWindowController declare these members each, and BaseWindowController has none of them; the interface is Glutter's, so that WindowScopeOf's result needs no assertion to the concrete type (SPEC §12.10).

Flutter: no counterpart

func WindowControllerMaybeOf

func WindowControllerMaybeOf(bc BuildContext) WindowController

WindowControllerMaybeOf is WindowControllerOf that returns nil when there is no scope.

Flutter: widgets/_window.dart WindowScope.maybeOf

func WindowControllerOf

func WindowControllerOf(bc BuildContext) WindowController

WindowControllerOf is WindowScopeOf for what both kinds of windows can do: the controller of the window that hosts the context as a WindowController, so the title, the activation and the minimized state need no assertion. It panics like WindowScopeOf when there is no scope. A regular window is also a MaximizableWindowController.

Deviation: Glutter's accessor; Flutter's WindowScope.of gives a BaseWindowController (SPEC §12.10).

Flutter: widgets/_window.dart WindowScope.of

type WindowDecoration

type WindowDecoration struct {
	StatefulWidget
	// contains filtered or unexported fields
}

WindowDecoration is the title bar and the borders that Glutter draws for a window when the compositor and libdecor do not (SPEC §8.2). It shows the title and the buttons that the compositor allows (minimize, maximize or restore, close); a drag of the title or of the empty space around it moves the window, a double tap there maximizes or restores it, a right click there opens the window menu (the widgets in Leading and Actions have their own gestures only), and a press on the border starts a resize. When another decoration draws the title bar (the window is decorated by the compositor or by libdecor, or has none) it shows the child alone, so an app can place it without checking.

Where the system keeps its own window buttons over the bar (macOS: WindowInfo.SystemButtons is not empty) the bar draws no buttons, the window has no border or resize strips of the decoration (the system draws the frame and resizes it), the bar starts after the buttons of the system, which it asks the platform to center in its height (WindowActionTitleBarHeight), and the child has no top padding left for the title bar (SPEC §29.4).

The default RunApp wraps the app in one when the window needs it; an app that sets WindowConfig.Decorations to DecorationsApp places its own.

Deviation: the window has no drop shadow, so no area around the content is excluded with xdg_surface.set_window_geometry (SPEC §8.2, §12.10).

Flutter: no counterpart (the title bar of the GTK embedder)

func NewWindowDecoration

func NewWindowDecoration(child Widget, opts ...WindowDecorationOpts) *WindowDecoration

NewWindowDecoration creates the decoration around the child.

Flutter: no counterpart

func (*WindowDecoration) CreateState

func (w *WindowDecoration) CreateState() State

CreateState creates the state.

Flutter: no counterpart

type WindowDecorationOpts

type WindowDecorationOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Title is the widget in the title bar; the default is the title of the window
	// in the text style of the bar.
	Title Widget
	// Leading are widgets at the start of the bar, before the title. They are
	// not part of the drag area: a drag, a double tap and a right click on them
	// are theirs alone. They are laid out as one row of minimum width after the
	// Actions, with the room that is left after the gap of 12 pixels and the
	// Actions as the maximum width: a widget without a width of its own gets that
	// room as its limit, a Flexible takes what it needs up to it, an Expanded
	// takes all of it, and the title gets the rest (which may be nothing).
	Leading []Widget
	// Actions are widgets in the bar before the buttons of the window. Like
	// Leading, they are not part of the drag area.
	Actions []Widget
	// BackgroundColor is the color of the bar; the default is a light or a dark
	// surface, by the brightness of the platform.
	BackgroundColor foundation.Opt[ui.Color]
	// ForegroundColor is the color of the title and the buttons.
	ForegroundColor foundation.Opt[ui.Color]
	// Height is the height of the bar; the default is 40.
	Height foundation.Opt[float64]
	// BorderColor is the color of the line around the window; the default is a
	// gray that suits the brightness.
	BorderColor foundation.Opt[ui.Color]
	// ResizeBorder is the width of the strip along each edge where the pointer
	// starts a resize; the default is 6.
	ResizeBorder foundation.Opt[float64]
}

WindowDecorationOpts are the optional parameters of NewWindowDecoration.

Flutter: no counterpart (the title bar of the GTK embedder)

type WindowEntry

type WindowEntry struct {
	// Controller is the controller that manages the window.
	//
	// Flutter: widgets/_window.dart WindowEntry.controller
	Controller BaseWindowController
	// Builder builds the content of the window.
	//
	// Flutter: widgets/_window.dart WindowEntry.builder
	Builder WidgetBuilder
}

WindowEntry is a window that a WindowRegistry holds: its controller, and the function that builds its content.

Flutter: widgets/_window.dart WindowEntry

func NewWindowEntry

func NewWindowEntry(controller BaseWindowController, builder WidgetBuilder) *WindowEntry

NewWindowEntry creates an entry for the controller whose content the builder makes.

Flutter: widgets/_window.dart WindowEntry.new

type WindowManager

type WindowManager struct {
	StatefulWidget
	// contains filtered or unexported fields
}

WindowManager shows windows at the root of an app: its descendants register windows in the WindowRegistry it provides, and the manager shows each one in a window widget as they come and go. Place it above the app, so that dialogs are at the same level as the RegularWindow.

Flutter: widgets/_window.dart WindowManager

func NewWindowManager

func NewWindowManager(child Widget, opts ...WindowManagerOpts) *WindowManager

NewWindowManager creates a window manager around the child.

Flutter: widgets/_window.dart WindowManager.new

func (*WindowManager) Child

func (w *WindowManager) Child() Widget

Child is the content inside of the manager.

Flutter: widgets/_window.dart WindowManager.child

func (*WindowManager) CreateState

func (w *WindowManager) CreateState() State

CreateState creates the state of the manager.

Flutter: widgets/_window.dart WindowManager.createState

type WindowManagerOpts

type WindowManagerOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
}

WindowManagerOpts are the optional parameters of NewWindowManager.

Flutter: widgets/_window.dart WindowManager.new

type WindowRegistry

type WindowRegistry struct {
	foundation.ChangeNotifier
	// contains filtered or unexported fields
}

WindowRegistry holds the windows that a WindowManager shows. It lets a widget deep in the tree make top-level windows that are logically below it: Register adds one, Unregister removes it. A window must be unregistered before it is destroyed.

Flutter: widgets/_window.dart WindowRegistry

func NewWindowRegistry

func NewWindowRegistry() *WindowRegistry

NewWindowRegistry creates an empty registry.

Flutter: widgets/_window.dart WindowRegistry.new

func WindowRegistryMaybeOf

func WindowRegistryMaybeOf(bc BuildContext) *WindowRegistry

WindowRegistryMaybeOf is the registry of the closest WindowManager above the context, or nil. The context depends on it.

Flutter: widgets/_window.dart WindowRegistry.maybeOf

func WindowRegistryOf

func WindowRegistryOf(bc BuildContext) *WindowRegistry

WindowRegistryOf is the registry of the closest WindowManager above the context. It panics with the tag WindowRegistryMissing when there is none.

Flutter: widgets/_window.dart WindowRegistry.of

func (*WindowRegistry) Register

func (r *WindowRegistry) Register(entry *WindowEntry)

Register adds the window to the registry and tells the listeners.

Flutter: widgets/_window.dart WindowRegistry.register

func (*WindowRegistry) Unregister

func (r *WindowRegistry) Unregister(entry *WindowEntry)

Unregister removes the window from the registry and tells the listeners.

Flutter: widgets/_window.dart WindowRegistry.unregister

func (*WindowRegistry) Windows

func (r *WindowRegistry) Windows() []*WindowEntry

Windows are the windows that are registered, in the order they were.

Flutter: widgets/_window.dart WindowRegistry.windows

type WindowScope

type WindowScope struct {
	InheritedModel
	// contains filtered or unexported fields
}

WindowScope gives the descendants access to the controller of the window they are rendered in, and lets them depend on one part of its state: the content size, the title, or whether it is activated, maximized, minimized or fullscreen. The RegularWindow and DialogWindow widgets place it, and RunApp does for the first window.

Deviation: Flutter's notifies its dependents only when the controller object changes, which never happens, so they would never update; this one keeps the state of the window it was made with and notifies when that changes (SPEC §12.10).

Flutter: widgets/_window.dart WindowScope

func NewWindowScope

func NewWindowScope(controller BaseWindowController, child Widget, opts ...WidgetOpts) *WindowScope

NewWindowScope creates a scope for the controller around the child.

Flutter: widgets/_window.dart WindowScope.new

func (*WindowScope) Controller

func (w *WindowScope) Controller() BaseWindowController

Controller is the controller of the window.

Flutter: widgets/_window.dart WindowScope.controller

func (*WindowScope) UpdateShouldNotify

func (w *WindowScope) UpdateShouldNotify(old Widget) bool

UpdateShouldNotify is whether the controller or the state of the window changed.

Flutter: widgets/_window.dart WindowScope.updateShouldNotify

func (*WindowScope) UpdateShouldNotifyDependent

func (w *WindowScope) UpdateShouldNotifyDependent(old Widget, dependencies *AspectSet) bool

UpdateShouldNotifyDependent is whether a part of the state that a dependent asked for changed.

Flutter: widgets/_window.dart WindowScope.updateShouldNotifyDependent

type WindowState

type WindowState int

WindowState is the initial state of a window.

Flutter: widgets/_window.dart WindowController

const (
	// WindowStateUnspecified is the zero value and means WindowStateNormal.
	//
	// Flutter: no counterpart
	WindowStateUnspecified WindowState = iota
	// WindowStateNormal is a window that is neither maximized, minimized nor
	// fullscreen.
	//
	// Flutter: widgets/_window.dart WindowController.isMaximized
	WindowStateNormal
	// WindowStateMaximized is a maximized window.
	//
	// Flutter: widgets/_window.dart WindowController.isMaximized
	WindowStateMaximized
	// WindowStateMinimized is a minimized window.
	//
	// Flutter: widgets/_window.dart WindowController.isMinimized
	WindowStateMinimized
	// WindowStateFullscreen is a fullscreen window.
	//
	// Flutter: widgets/_window.dart WindowController.isFullscreen
	WindowStateFullscreen
)

The values of WindowState.

type WindowingOwner

type WindowingOwner struct {
	// contains filtered or unexported fields
}

WindowingOwner creates and manages the window controllers of an app. The binding has one.

Flutter: widgets/_window.dart WindowingOwner

func (*WindowingOwner) CreateDialogWindowController

func (o *WindowingOwner) CreateDialogWindowController(size ui.Size, opts ...DialogWindowControllerOpts) (*DialogWindowController, error)

CreateDialogWindowController is NewDialogWindowController for the owner.

Flutter: widgets/_window.dart WindowingOwner.createDialogWindowController

func (*WindowingOwner) CreateRegularWindowController

func (o *WindowingOwner) CreateRegularWindowController(size ui.Size, opts ...RegularWindowControllerOpts) (*RegularWindowController, error)

CreateRegularWindowController is NewRegularWindowController for the owner.

Flutter: widgets/_window.dart WindowingOwner.createRegularWindowController

func (*WindowingOwner) ImplicitWindowController

func (o *WindowingOwner) ImplicitWindowController() (*RegularWindowController, bool)

ImplicitWindowController is the controller of the first window, the one that RunApp makes. It is made on the first call. Closing the window by the user is a request to exit the app, as for any app that has only that window (AppLifecycleListener.OnExitRequested), unless a delegate was given with SetImplicitWindowDelegate. Destroy removes the window; when other windows exist the app goes on without it: the View of the implicit view shows nothing from then on and its states are disposed, so the other windows must not be below that View (a WindowManager above it, or a ViewCollection).

Deviation: Flutter has no controller for the window that the embedder makes, so a dialog cannot name it as its parent; here it can (SPEC §12.10).

Flutter: no counterpart

func (*WindowingOwner) SetImplicitWindowDelegate

func (o *WindowingOwner) SetImplicitWindowDelegate(delegate RegularWindowControllerDelegate)

SetImplicitWindowDelegate gives the delegate that is asked when the user closes the first window, instead of the request to exit the app; its OnWindowDestroyed is called when the window is gone. With nil the close request is an exit request again. A delegate that does not destroy the window keeps it open, so an app with several windows can close the first one like any other.

Deviation: Flutter has no controller for the window that the embedder makes (SPEC §12.10).

Flutter: no counterpart

type Wrap

type Wrap struct {
	MultiChildRenderObjectWidget
	// contains filtered or unexported fields
}

Wrap displays its children in multiple horizontal or vertical runs.

Flutter: widgets/basic.dart Wrap

func NewWrap

func NewWrap(children []Widget, opts ...WrapOpts) *Wrap

NewWrap creates the widget.

Flutter: widgets/basic.dart Wrap.new

func (*Wrap) Alignment

func (w *Wrap) Alignment() rendering.WrapAlignment

Alignment is how the children within a run are placed along the main axis; the default is WrapAlignmentStart.

Flutter: widgets/basic.dart Wrap.alignment

func (*Wrap) ClipBehavior

func (w *Wrap) ClipBehavior() ui.Clip

ClipBehavior is whether the content is clipped when it overflows; the default is ClipNone.

Flutter: widgets/basic.dart Wrap.clipBehavior

func (*Wrap) CreateRenderObject

func (w *Wrap) CreateRenderObject(bc BuildContext) rendering.RenderObject

CreateRenderObject creates the render object.

Flutter: widgets/basic.dart Wrap.createRenderObject

func (*Wrap) CrossAxisAlignment

func (w *Wrap) CrossAxisAlignment() rendering.WrapCrossAlignment

CrossAxisAlignment is how the children within a run are aligned relative to each other in the cross axis; the default is WrapCrossAlignmentStart.

Flutter: widgets/basic.dart Wrap.crossAxisAlignment

func (*Wrap) Direction

func (w *Wrap) Direction() painting.Axis

Direction is the direction to use as the main axis; the default is AxisHorizontal.

Flutter: widgets/basic.dart Wrap.direction

func (*Wrap) RunAlignment

func (w *Wrap) RunAlignment() rendering.WrapAlignment

RunAlignment is how the runs themselves are placed along the cross axis; the default is WrapAlignmentStart.

Flutter: widgets/basic.dart Wrap.runAlignment

func (*Wrap) RunSpacing

func (w *Wrap) RunSpacing() float64

RunSpacing is how much space to place between the runs themselves in the cross axis.

Flutter: widgets/basic.dart Wrap.runSpacing

func (*Wrap) Spacing

func (w *Wrap) Spacing() float64

Spacing is how much space to place between children in a run in the main axis.

Flutter: widgets/basic.dart Wrap.spacing

func (*Wrap) TextDirection

func (w *Wrap) TextDirection() ui.TextDirection

TextDirection is the order in which children and runs are laid out horizontally; the default is the one of the closest Directionality.

Flutter: widgets/basic.dart Wrap.textDirection

func (*Wrap) UpdateRenderObject

func (w *Wrap) UpdateRenderObject(bc BuildContext, renderObject rendering.RenderObject)

UpdateRenderObject copies the configuration to the render object.

Flutter: widgets/basic.dart Wrap.updateRenderObject

func (*Wrap) VerticalDirection

func (w *Wrap) VerticalDirection() painting.VerticalDirection

VerticalDirection is the order in which children and runs are laid out vertically; the default is VerticalDirectionDown.

Flutter: widgets/basic.dart Wrap.verticalDirection

type WrapOpts

type WrapOpts struct {
	// Key is the key of the widget.
	Key foundation.Key
	// Direction is the direction to use as the main axis; the default is AxisHorizontal.
	Direction painting.Axis
	// Alignment is how the children within a run are placed along the main axis; the default is WrapAlignmentStart.
	Alignment rendering.WrapAlignment
	// Spacing is how much space to place between children in a run in the main axis.
	Spacing float64
	// RunAlignment is how the runs themselves are placed along the cross axis; the default is WrapAlignmentStart.
	RunAlignment rendering.WrapAlignment
	// RunSpacing is how much space to place between the runs themselves in the cross axis.
	RunSpacing float64
	// CrossAxisAlignment is how the children within a run are aligned relative to each other in the cross axis; the default is WrapCrossAlignmentStart.
	CrossAxisAlignment rendering.WrapCrossAlignment
	// TextDirection is the order in which children and runs are laid out horizontally; the default is the one of the closest Directionality.
	TextDirection ui.TextDirection
	// VerticalDirection is the order in which children and runs are laid out vertically; the default is VerticalDirectionDown.
	VerticalDirection painting.VerticalDirection
	// ClipBehavior is whether the content is clipped when it overflows; the default is ClipNone.
	ClipBehavior ui.Clip
}

WrapOpts are the optional parameters of NewWrap.

Flutter: widgets/basic.dart Wrap.new

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL