dialogActions method

dynamic dialogActions()

Implementation

dialogActions() {
  return Row(
    mainAxisAlignment: MainAxisAlignment.end,
    crossAxisAlignment: CrossAxisAlignment.end,
    children: <Widget>[
      TextButton(
        child: Text(
          'CANCEL',
          style: TextStyle(color: Colors.red, fontWeight: FontWeight.w500),
        ),
        onPressed: () {
          Navigator.of(context).pop("");
          if (widget.onCancel != null) widget.onCancel!.call();
        },
      ),
      widget.onAccept == null
          ? Container()
          : TextButton(
              child: Text(
                'ACCEPT',
                style: TextStyle(
                    color: Colors.blue, fontWeight: FontWeight.w500),
              ),
              onPressed: () async {
                Navigator.of(context).pop("");
                if (widget.onAccept != null) {
                  var ret = await widget.onAccept!();
                  /*if (ret) {
                Navigator.of(context).pop("");
              }*/
                }
              },
            ),
    ],
  );
}