call method
Implementation
Widget call(Widget child, double height, double anim) {
final self = this;
switch (self) {
case ToastPlacement.top:
return Column(
children: [
Container(
margin: EdgeInsets.only(top: 50),
height: height,
child: Opacity(
child: child,
opacity: anim,
),
),
Expanded(
child: Container(),
),
],
);
case ToastPlacement.center:
return Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.only(top: 50),
height: height,
child: Opacity(
child: child,
opacity: anim,
),
),
],
);
case ToastPlacement.bottom:
return Column(
children: [
Expanded(
child: Container(),
),
Container(
margin: EdgeInsets.only(bottom: 50),
height: height,
child: Opacity(
child: child,
opacity: anim,
),
),
],
);
}
}