buildOutlinedButton method
Build the button as a flutter native Outlined button
Implementation
Widget buildOutlinedButton(BuildContext context, OwlnextButtonState state) {
Color disabledColor = const Color.fromARGB(255, 65, 65, 65).withOpacity(0.4);
return OutlinedButton(
style: OutlinedButton.styleFrom(
minimumSize: state.buttonMinimumSize,
padding: state.widget.padding,
foregroundColor: getBackground(context, state),
shape: RoundedRectangleBorder(
borderRadius: Artist().defaultBorderRadius,
),
side: BorderSide(width: 2, color: state.widget.enabled ? getBackground(context, state) : disabledColor),
alignment: Alignment.center,
),
onPressed: (state.isProcessing == true || state.widget.enabled == false)
? null
: () {
state.makeCallback();
},
child: state.isProcessing
? Align(
child: OwlnextLoading(
color: getBackground(context, state),
size: state.widget.loaderSize ?? 20,
),
)
: state.widget.child);
}