build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Override this method to build widgets that depend on the state of the listenable (e.g., the current value of the animation).

Implementation

@override
Widget build(BuildContext context) {
  return Column(
    mainAxisSize: MainAxisSize.min,
    crossAxisAlignment: CrossAxisAlignment.end,
    children: [
      IgnorePointer(
        ignoring: _animation.value == 0,
        child: ListView.separated(
          shrinkWrap: true,
          physics: NeverScrollableScrollPhysics(),
          separatorBuilder: (_, __) => SizedBox(height: 12.0),
          padding: EdgeInsets.symmetric(vertical: 12),
          itemCount: items.length,
          itemBuilder: buildItem,
        ),
      ),
      FloatingActionButton(
        heroTag: herotag == null ? const _DefaultHeroTag() : herotag,
        backgroundColor: backGroundColor,
        // iconData is mutually exclusive with animatedIconData
        // only 1 can be null at the time
        child: iconData == null
            ? AnimatedIcon(
                icon: animatedIconData!,
                progress: _animation,
                color: iconColor,
              )
            : Icon(
                iconData,
                color: iconColor,
              ),
        onPressed: onPress,
      ),
    ],
  );
}