approvalDialog method Null safety

dynamic approvalDialog(
  1. String title,
  2. String text,
  3. String approveButtonText,
  4. String denyButtonText,
  5. Function successCallback
)

Implementation

approvalDialog(String title, String text, String approveButtonText,
    String denyButtonText, Function successCallback) async {
  final result = await showDialog(
    context: Dao.inst.globalNavigatorKey.currentContext,
    builder: (context) => LiquidApproveDialog(
      title: title,
      text: text,
      approveText: approveButtonText,
      denyText: denyButtonText,
    ),
  );

  if (result == 'Approve') {
    successCallback();
  }
}