A novel flexible dual-functional energy storage device with switchability based on NiCo2S4-x