button in FLToast is unclickable
Mohammad-Adam opened this issue · comments
MuhammadAdam commented
demo code:
`
toast(String value, {String buttonTitle = 'Dismiss', Function onButtonPress}) {
Function dismiss;
dismiss = FLToast.showToast(
text: value,
duration: Duration(seconds: 5),
contentBuilder: (cx){
return FlatButton(
onPressed: () {
if (onButtonPress == null) {
dismiss();
} else {
onButtonPress();
}
},
child: Text(
buttonTitle,
style: TextStyle(color: Colors.amber, fontSize: 18),
),
);
}
);
}
`
Hanran commented
hi @EngDjango, I suggest you not add button on toast because toast view is wrapped by AbsorbPointer, also pointer event will be handled by provider to dismiss the existing toast view. Thanks all the same.