This work investigates the following generalization of the Fokas–Lenells equation. ıqt+Atqxx+Btqxt+Ctq2q+ıDtq2qx=ıHtqx+Ftq2qx+Gtq2xq which is a Schro¨dinger-type equation with applications in theory of communications. Here, the coefficients are variables and depend on the temporal variable t. The improved tanh–coth method is used to obtain exact solutions for it in a general form. If the coefficients turn constants, the equation is known as the standard Fokas–Lenells equation (FLE) which has several applications in nonlinear science. As a particular case, novel soliton solutions, chirped solutions, and the respective chirps associated with them are derived for (FLE). Also, the work explores the behaviour of the solutions when the coefficients change in time, obtaining novel structures of the solutions which help understand in a better way the phenomenon described by the (FLE). We show the graphs of some of the solutions with the aim to compare the two cases, variable and constant coefficients. Finally, some conclusions are given.