build method

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

Describes the part of the user interface represented by this widget.

The framework calls this method when this widget is inserted into the tree in a given BuildContext and when the dependencies of this widget change.

Implementation

@override
Widget build(BuildContext context) {
  return Visibility(
    visible: !isTextInput,
    child: Positioned(
      bottom: 80 + context.bottomPadding,
      child: AnimatedSwitcher(
        duration: animationsDuration,
        child: _activeItem == null
            ? const SizedBox()
            : AnimatedSize(
                duration: animationsDuration,
                child: SizedBox(
                  width: context.width,
                  child: Center(
                    child: AnimatedContainer(
                      duration: animationsDuration,
                      height: !isDeletePosition ? 60.0 : 72,
                      width: !isDeletePosition ? 60.0 : 72,
                      decoration: BoxDecoration(
                        color: Colors.black.withOpacity(0.5),
                        borderRadius: BorderRadius.all(
                          Radius.circular(
                            !isDeletePosition ? 30 : 38,
                          ),
                        ),
                      ),
                      child: const Icon(
                        Icons.delete,
                        color: Colors.white,
                        size: 32,
                      ),
                    ),
                  ),
                ),
              ),
      ),
    ),
  );
}