FlowinFadePage class
Cross-fades one page in place against a scrolling position.
The scroller still owns the motion — listenable drives rebuilds and positionOf reports the continuous page position — but the page counter-translates by exactly its slide offset, so it holds still and only its opacity follows. A page mid-fade ignores pointers, since the counter-translation overlaps it with its neighbour.
Works with any position-carrying scroller: a PageView page passes its
PageController as listenable and reads controller.page in
positionOf; a TabBarView page passes the TabController's animation
and reads its value. The slide offset to cancel is the width the page is
laid out at, which both lay out at viewport width, so it is measured here
with a LayoutBuilder rather than asked of the controller.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FlowinFadePage
Constructors
-
FlowinFadePage({required Listenable listenable, required ValueGetter<
double> positionOf, required int index, required Widget child, Key? key}) -
Cross-fades one page in place against a scrolling position.
const
Properties
- child → Widget
-
The page content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
This page's index in the scroller.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listenable → Listenable
-
What drives rebuilds while the position changes — typically the
PageController itself, or a TabController's animation.
final
-
positionOf
→ ValueGetter<
double> -
Reads the current continuous page position.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited