Smart and efficient opto-electronic dual response material based on two-dimensional perovskite crystal/thin film