classes property Null safety

CssClassSet classes

The set of CSS classes applied to this element.

This set makes it easy to add, remove or toggle the classes applied to this element.

element.classes.add('selected');
element.classes.toggle('isOnline');
element.classes.remove('selected');

Implementation

CssClassSet get classes => ElementCssClassSet(this);