Flexible perovskite scintillators and detectors for X-ray detection