createMaterialWidget method

  1. @override
MaterialButton createMaterialWidget (
  1. BuildContext context
)
override

Implementation

@override
MaterialButton createMaterialWidget(BuildContext context) {
  if (materialFlat != null) {
    final dataFlat = materialFlat(context, platform(context));

    return FlatButton(
      key: dataFlat?.widgetKey ?? widgetKey,
      child: dataFlat?.child ?? child,
      onPressed: dataFlat?.onPressed ?? onPressed,
      color: dataFlat?.color ?? color,
      colorBrightness: dataFlat?.colorBrightness,
      disabledColor: dataFlat?.disabledColor ?? disabledColor,
      disabledTextColor: dataFlat?.disabledTextColor,
      highlightColor: dataFlat?.highlightColor,
      onHighlightChanged: dataFlat?.onHighlightChanged,
      padding: dataFlat?.padding ?? padding,
      shape: dataFlat?.shape,
      splashColor: dataFlat?.splashColor,
      textColor: dataFlat?.textColor,
      textTheme: dataFlat?.textTheme,
      clipBehavior: dataFlat?.clipBehavior ?? Clip.none,
      materialTapTargetSize: dataFlat?.materialTapTargetSize,
      focusColor: dataFlat?.focusColor,
      focusNode: dataFlat?.focusNode,
      hoverColor: dataFlat?.hoverColor,
      autofocus: dataFlat?.autofocus ?? false,
      onLongPress: dataFlat?.onLongPress,
      visualDensity: dataFlat?.visualDensity,
      mouseCursor: dataFlat?.mouseCursor,
      height: dataFlat?.height,
      minWidth: dataFlat?.minWidth,
    );
  }

  final dataRaised = material?.call(context, platform(context));

  return RaisedButton(
    key: dataRaised?.widgetKey ?? widgetKey,
    child: dataRaised?.child ?? child,
    onPressed: dataRaised?.onPressed ?? onPressed,
    animationDuration: dataRaised?.animationDuration,
    color: dataRaised?.color ?? color,
    colorBrightness: dataRaised?.colorBrightness,
    disabledColor: dataRaised?.disabledColor ?? disabledColor,
    disabledElevation: dataRaised?.disabledElevation,
    disabledTextColor: dataRaised?.disabledTextColor,
    elevation: dataRaised?.elevation,
    highlightColor: dataRaised?.highlightColor,
    highlightElevation: dataRaised?.highlightElevation,
    onHighlightChanged: dataRaised?.onHighlightChanged,
    padding: dataRaised?.padding ?? padding,
    shape: dataRaised?.shape,
    splashColor: dataRaised?.splashColor,
    textColor: dataRaised?.textColor,
    textTheme: dataRaised?.textTheme,
    clipBehavior: dataRaised?.clipBehavior ?? Clip.none,
    materialTapTargetSize: dataRaised?.materialTapTargetSize,
    focusElevation: dataRaised?.focusElevation,
    focusColor: dataRaised?.focusColor,
    hoverColor: dataRaised?.hoverColor,
    focusNode: dataRaised?.focusNode,
    hoverElevation: dataRaised?.hoverElevation,
    autofocus: dataRaised?.autofocus ?? false,
    onLongPress: dataRaised?.onLongPress,
    visualDensity: dataRaised?.visualDensity,
    mouseCursor: dataRaised?.mouseCursor,
  );
}