buildSaveAttachmentButton method

Widget buildSaveAttachmentButton(
  1. GenericUploadController controller
)

Implementation

Widget buildSaveAttachmentButton(GenericUploadController controller) {
  return Obx(() => Visibility(
    visible: controller.canSave &&
        (controller.notes.isNotEmpty ||
            controller.images.isNotEmpty ||
            controller.files.isNotEmpty),
    child: Align(
      alignment: Alignment.bottomRight,
      child: AppButton(
        onPressed: () {
          if (onSaveAttachments != null) {
            onSaveAttachments!();
          }
          Get.back();
        },
        text: 'Save Attachment',
      ),
    ),
  ));
}