buildContent method

Widget buildContent()

Implementation

Widget buildContent() {
  return Container(
    height: Style.submitBarHeight,
    padding: Style.submitBarPadding,
    color: Style.submitBarBackgroundColor,
    child: Row(
      children: <Widget>[
        Expanded(
          child: Row(
            mainAxisAlignment: textAlign == "right"
                ? (customLeft != null
                    ? MainAxisAlignment.spaceBetween
                    : MainAxisAlignment.end)
                : MainAxisAlignment.start,
            children: <Widget>[
              customLeft ?? Container(),
              SizedBox(width: customLeft != null ? Style.intervalSm : 0),
              Row(
                crossAxisAlignment: CrossAxisAlignment.end,
                children: <Widget>[
                  Text("$label",
                      style: TextStyle(
                          fontSize: Style.submitBarTextFontSize,
                          color: Style.submitBarTextColor)),
                  Price(
                      value: price,
                      currency: currency,
                      size: Style.submitBarPriceFontSize,
                      color: Style.submitBarPriceColor,
                      decimal: decimalLength)
                ],
              )
            ],
          ),
        ),
        SizedBox(
          width: Style.paddingSm,
        ),
        NButton(
          text: loading ? "" : buttonText,
          round: true,
          color: Style.submitBarButtonColor,
          width: Style.submitBarButtonWidth,
          height: Style.submitBarButtonHeight,
          loading: loading,
          disabled: disabled,
          onClick: () {
            if (onSubmit != null) onSubmit!();
          },
        )
      ],
    ),
  );
}