MaterialCheckboxComponent constructor
MaterialCheckboxComponent(
- HtmlElement _root,
- ChangeDetectorRef _changeDetector,
- @Self.new() @Optional.new() NgControl cd,
- @Attribute.new('tabindex') String hostTabIndex,
- @Attribute.new('role') String role,
Implementation
MaterialCheckboxComponent(
this._root,
this._changeDetector,
@Self() @Optional() NgControl cd,
@Attribute('tabindex') String hostTabIndex,
@Attribute('role') String role)
: _defaultTabIndex =
hostTabIndex?.isNotEmpty ?? false ? hostTabIndex : '0',
this.role = role ?? 'checkbox' {
// When NgControl is present on the host element, the component
// participates in the Forms API.
if (cd != null) {
cd.valueAccessor = this;
}
_syncAriaChecked();
}