public _SlidingSegmentedControlRenderWidget(
     Key key = null,
     List <Widget> children = null,
     int?selectedIndex      = null,
     Color thumbColor       = null,
     _SlidingSegmentedControlState <T> state = null
     ) : base(key: key, children: children ?? new List <Widget>())
 {
     this.selectedIndex = selectedIndex;
     this.thumbColor    = thumbColor;
     this.state         = state;
 }
 public _RenderSlidingSegmentedControl(
     int?selectedIndex = null,
     Color thumbColor  = null,
     _SlidingSegmentedControlState <T> state = null
     )
 {
     D.assert(state != null);
     _highlightedIndex                = selectedIndex;
     _thumbColor                      = thumbColor;
     this.state                       = state;
     this.state.drag.onDown           = _onDown;
     this.state.drag.onUpdate         = _onUpdate;
     this.state.drag.onEnd            = _onEnd;
     this.state.drag.onCancel         = _onCancel;
     this.state.tap.onTapUp           = _onTapUp;
     this.state.longPress.onLongPress = () => { };
 }