Add constructor to allow to specify the dismissable flag.