Synthesis, optoelectronic properties and applications of halide perovskites