addNotify method

AssetManager addNotify({
  1. required String text,
  2. String type = 'success',
})

Adds a notification message to the data map.

The text parameter is the notification message text. The type parameter specifies the type of the notification (e.g., success, error).

Example:

addNotify(text: 'Operation successful', type: 'success');

Implementation

AssetManager addNotify({required String text, String type = 'success'}) {
  var notify = (data['notify'] ?? []) as List;
  notify.add({
    'text': text,
    'type': type,
  });
  data['notify'] = notify;
  return this;
}