buildButton method
Implementation
Widget buildButton() {
if (preFix != null && postFix == null) {
return button(
Row(
mainAxisSize: isLoose ? MainAxisSize.max : MainAxisSize.min,
children: [
preFix!,
MyVerticalDivider(width: verticalPadding!),
Text(text!, style: textStyle ?? textStyleLocal()),
],
),
);
} else if (preFix != null && postFix != null) {
return button(
Row(
mainAxisSize: isLoose ? MainAxisSize.max : MainAxisSize.min,
children: [
preFix!,
MyVerticalDivider(width: verticalPadding!),
Text(text!, style: textStyle ?? textStyleLocal()),
MyVerticalDivider(width: verticalPadding!),
postFix!,
],
),
);
} else if (postFix != null && preFix == null) {
return button(
Row(
mainAxisSize: isLoose ? MainAxisSize.max : MainAxisSize.min,
children: [
Text(text!, style: textStyle ?? textStyleLocal()),
MyVerticalDivider(width: verticalPadding!),
postFix!,
],
),
);
} else {
return button(Row(
mainAxisSize: isLoose ? MainAxisSize.max : MainAxisSize.min,
mainAxisAlignment: mainAxisAlignment,
children: [
Text(text!, style: textStyle ?? textStyleLocal()),
],
));
}
}