FlashingMessages extension

Flash-message helpers attached to HttpRequest.

Flash data is stored on the session and intended to survive a short number of request cycles, typically to support redirects followed by view renders.

Example:

request.flash(
  key: 'success',
  message: 'Profile updated successfully.',
);
on

Methods

flash({required String key, required String message, FlashMessageType type = .message}) → void

Available on HttpRequest, provided by the FlashingMessages extension

Stores a flash message or temporary session value for the next request cycle.