MaterialCheckboxComponent constructor

MaterialCheckboxComponent(
  1. HtmlElement _root,
  2. ChangeDetectorRef _changeDetector,
  3. @Self() @Optional() NgControl? cd,
  4. @Attribute('tabindex') String? hostTabIndex,
  5. @Attribute('role') String? role,
)

Implementation

MaterialCheckboxComponent(
    this._root,
    this._changeDetector,
    @Self() @Optional() NgControl? cd,
    @Attribute('tabindex') String? hostTabIndex,
    @Attribute('role') String? role)
    : _defaultTabIndex = (hostTabIndex != null && hostTabIndex.isNotEmpty)
          ? hostTabIndex
          : '0',
      //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();
}