show method
void
show
({String text, Widget widget, int toastLength: 0 })
Implementation
void show({String text, Widget widget, int toastLength: 0}) {
assert(
toastLength == ToastLength.SHORT || toastLength == ToastLength.LONG,
"The parameter 'toastLength' is required, and must "
"have a value of either 'ToastLength.SHORT', or "
"'ToastLength.LONG'");
if (text != null && widget == null) {
toastQueue.add([text, toastLength]);
} else if (text == null && widget != null) {
toastQueue.add([widget, toastLength]);
} else
assert(
(text != null && widget == null) || (text == null && widget != null),
"For the '.show()' method, please pass "
"either a String to parameter 'text', "
"or a Widget to parameter 'widget', "
"but not both at the same time!");
}