Tunable excitonic properties in two-dimensional heterostructures based on solution-processed PbI2 flakes