ToastPositionMapping typedef
ToastPositionMapping =
Widget? Function(Widget child, ToastGravity? gravity)
Signature for a function that defines custom position mapping for a toast
child
is the toast widget to be positioned.
gravity
is the gravity option for the toast which can be used to determine the position.
The function should return a Widget that defines the position of the toast.
If the position is not handled by the custom logic, return null
to fall back to default logic.
Implementation
typedef ToastPositionMapping = Widget? Function(
Widget child, ToastGravity? gravity);