calculateSize function
Calculates the box constraints of the toast's container based on the enclosing BuildContext provided to the toast.
Implementation
Size calculateSize({
required BuildContext context,
}) {
final RenderBox renderBox = context.findRenderObject() as RenderBox;
return renderBox.size;
}