toBuild method

dynamic toBuild()

Implementation

toBuild(){
  return TextButton(
    key: key,
    onPressed: _onPressed,
    onLongPress: _onLongPress,
    onHover: _onHover,
    onFocusChange: _onFocusChange,
    style: ButtonStyle(
      // MaterialStateProperty<TextStyle?>? textStyle,
      textStyle: MaterialStateProperty.all(TextStyle(
        // color: Colors.black,
        fontWeight: _fontWeight
      )),
      overlayColor: _overlayColor,
      backgroundColor: _backgroundColor,
      foregroundColor: _foregroundColor,
      shadowColor: _shadowColor,
      surfaceTintColor: _surfaceTintColor,
      elevation: _elevation,
      padding: _padding,
      maximumSize: _maximumSize,
      fixedSize: _fixedSize,
      minimumSize: _minimumSize,
      iconColor: _iconColor,
      iconSize: _iconSize,
      side: _side,
      shape: _shape,
      mouseCursor: _mouseCursor,
      // VisualDensity? visualDensity,
      // MaterialTapTargetSize? tapTargetSize,
      // Duration? animationDuration,
      // bool? enableFeedback,
      alignment: _alignment,
      // InteractiveInkFeatureFactory? splashFactory,
    ),
    focusNode: _focusNode,
    autofocus: _autofocus,
    clipBehavior: _clipBehavior,
    // MaterialStatesController? statesController,
    // bool? isSemanticButton = true,
    //AzText(widgetOrString).color(_textColor!)
    child: widgetOrString.runtimeType.toString() == 'String'
        ? _textColor == null
          ? AzText(widgetOrString)//.color(_textColor!)
          : Text(widgetOrString,
              style: TextStyle(
                color: _textColor
              ),)
        : widgetOrString,
  );
}