onData property

(Widget Function(T? res)?) onData
final

executes when either future is done with no error or returns data.

In case of null,

hasData = (_) {
    return CommonAlertDialog('Done');
  }

Implementation

final Widget Function(T? res)? onData;