createActionButton method

Widget createActionButton(
  1. dynamic context,
  2. String buttonText, {
  3. Function? onDeleteFile,
})

Implementation

Widget createActionButton(context, String buttonText,
    {Function? onDeleteFile}) {
  return TextButton(
    child: Text(buttonText),
    onPressed: () =>
        onDeleteFile != null ? onDeleteFile() : Navigator.of(context).pop(),
  );
}