buildFloatingActionButton method

  1. @protected
Widget buildFloatingActionButton(
  1. BuildParameters params
)

Implementation

@protected
Widget buildFloatingActionButton(BuildParameters params) {
  Widget? child;
  if (params.widgets["child"] != null) {
    child = builder.buildWidget(params.context, params.widgets["child"],
        params.state, params.parentContext);
  } else if (params.props["iconCode"] != null) {
    child = Icon(IconData(parseInt(params.props["iconCode"]),
        fontFamily: 'MaterialIcons'));
  }

  return FloatingActionButton(
    key: properties.getKey(params.id),
    tooltip: params.props["tooltip"] != null
        ? properties.getText(params.props["tooltip"], "label")
        : null,
    mini: parseBool(params.props["mini"]),
    shape: params.buildProp("shape"),
    backgroundColor: tryParseColor(params.props["backgroundColor"]),
    hoverColor: tryParseColor(params.props["hoverColor"]),
    splashColor: tryParseColor(params.props["splashColor"]),
    focusColor: tryParseColor(params.props["focusColor"]),
    foregroundColor: tryParseColor(params.props["foregroundColor"]),
    elevation: tryParseDouble(params.props["elevation"]),
    focusElevation: tryParseDouble(params.props["focusElevation"]),
    highlightElevation: tryParseDouble(params.props["highlightElevation"]),
    hoverElevation: tryParseDouble(params.props["hoverElevation"]),
    disabledElevation: tryParseDouble(params.props["disabledElevation"]),
    onPressed: events.getFunction(params.context, params.actions["onPressed"],
        params.state, params.parentContext),
    child: child,
  );
}