MaterialCheckboxComponent constructor

MaterialCheckboxComponent(
  1. HtmlElement _root,
  2. ChangeDetectorRef _changeDetector,
  3. @Self.new() @Optional.new() NgControl cd,
  4. @Attribute.new('tabindex') String hostTabIndex,
  5. @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();
}