HeroContainerController class
Controller that manages the snapshot-based transition animation for HeroContainer widget.
This controller captures widget snapshots and manages the transition state between the closed and opened widgets. It handles the creation of
HeroContainerFragments which contain the captured images and positional information needed for smooth animations.
Constructors
-
HeroContainerController({required GlobalKey<
State< fromKey, required GlobalKey<StatefulWidget> >State< toKey, required WidgetBuilder builder})StatefulWidget> >
Properties
- builder → WidgetBuilder
-
Builder for the opened state widget.
final
- fromFragment ↔ HeroContainerFragment
-
Fragment containing the closed state snapshot and position.
getter/setter pair
-
fromKey
→ GlobalKey<
State< StatefulWidget> > -
Global key for the closed state widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status ↔ HeroContainerStatus
-
Current status of the hero container transition.
getter/setter pair
-
statusNotifier
→ ValueNotifier<
HeroContainerStatus> -
Notifier for the current transition status.
final
- toFragment ↔ HeroContainerFragment?
-
Fragment containing the opened state snapshot and position.
Null until the opened widget is rendered and captured.
getter/setter pair
-
toKey
→ GlobalKey<
State< StatefulWidget> > -
Global key for the opened state widget.
final
Methods
-
captureWidget(
BuildContext context, GlobalKey< State< key) → Future<StatefulWidget> >Image?> - Captures a widget as an image using its global key.
-
fragmentOf(
BuildContext context, GlobalKey< State< key) → Future<StatefulWidget> >HeroContainerFragment> - Creates a HeroContainerFragment from a widget key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited