ON-OFF mechanism of a fluorescent sensor for the detection of Zn(II), Cd(II), and Cu(II)transition metal ions.