Deprecated setFlash method changed