showPickerDialog method

dynamic showPickerDialog()

选择文件弹窗

Implementation

showPickerDialog() {
  if (!_checkWebEnable()) {
    return;
  }
  showCupertinoModalPopup(
      context: context,
      builder: (context) {
        return CupertinoActionSheet(
          actions: [
            CupertinoActionSheetAction(
              child: Text(
                Strings.mineAnchorApplyTakePhoto.tr,
                style: const TextStyle(fontSize: 16),
              ),
              onPressed: () {
                Navigator.pop(context);
                _switchSelect(TYPE_CAMERA);
              },
            ),
            CupertinoActionSheetAction(
              child: Text(
                Strings.mineAnchorApplyPickPhotos.tr,
                style: const TextStyle(fontSize: 16),
              ),
              onPressed: () {
                Navigator.pop(context);
                _switchSelect(TYPE_ALBUM);
              },
            )
          ],
          cancelButton: CupertinoActionSheetAction(
            isDefaultAction: true,
            onPressed: () {
              Navigator.of(context).pop('cancel');
            },
            child: Text(
              Strings.dialogNegative.tr,
              style: const TextStyle(fontSize: 16),
            ),
          ),
        );
      });
}