addLast method

void addLast(
  1. Decorator? decorator
)

Adds a new decorator onto the chain of decorators

Implementation

void addLast(Decorator? decorator) {
  if (decorator != null) {
    if (_next == null) {
      _next = decorator;
    } else {
      _next!.addLast(decorator);
    }
  }
}