sticky property

  1. @Input.new('sticky')
set sticky (bool sticky)

Whether to stick the element.

This allows the directive to be used for components in which the the sticky property is optional and dependent on input.

Implementation

@Input('sticky')
set sticky(bool sticky) {
  _sticky = sticky;
  if (_sticky) {
    _stick();
  } else {
    _unstick();
  }
}