build method
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
? RemoveWidgetConstants.normalSize
: RemoveWidgetConstants.expandedSize,
width: !isDeletePosition
? RemoveWidgetConstants.normalSize
: RemoveWidgetConstants.expandedSize,
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(
!isDeletePosition
? RemoveWidgetConstants.normalBorderRadius
: RemoveWidgetConstants.expandedBorderRadius,
),
),
),
child: const Icon(
Icons.delete,
color: Colors.white,
size: 32,
),
),
),
),
),
),
),
);
}