AnimatedSwitcherLayoutBuilder typedef

Widget AnimatedSwitcherLayoutBuilder (Widget currentChild, List<Widget> previousChildren)

Signature for builders used to generate custom layouts for AnimatedSwitcher.

The builder should return a widget which contains the given children, laid out as desired. It must not return null. The builder should be able to handle an empty list of previousChildren, or a null currentChild.

The previousChildren list is an unmodifiable list, sorted with the oldest at the beginning and the newest at the end. It does not include the currentChild.

Implementation

typedef AnimatedSwitcherLayoutBuilder = Widget Function(Widget currentChild, List<Widget> previousChildren);