popWithThrowResult method
Dismisses this panel and then sends the result
back to the SlidingPanel.onThrowResult.
Returned future is completed when the panel is dismissed.
The result can be anything except null.
If shouldCloseOnly
is true, then panel will close instead
of being dismissed.
Useful when you don't want to use popWithResult with a NotificationListener.
Implementation
Future<Null> popWithThrowResult(
{dynamic result, bool shouldCloseOnly = false}) async {
panel!._shouldNotifyOnClose = false;
if (shouldCloseOnly)
return close().then((_) {
throwResult(result: result);
});
return dismiss().then((_) {
throwResult(result: result);
});
}