build method
Implementation
@override
fw.Widget build(fw.BuildContext context) {
final theme = fw.Theme.of(context);
return fw.Focus(
canFocus: true,
onKey: (event) {
if (event.code == KeyCode.enter ||
(event.code == KeyCode.char && event.charCode == 0x20)) {
onPressed?.call();
return true;
}
return false;
},
child: _ButtonRender(
label: label,
style: style ?? theme.borderStyle ?? Style.empty,
focusedStyle: focusedStyle ?? theme.focusedBorderStyle ?? Style(
fg: Color.cyan,
addModifier: Modifier.bold,
),
activeStyle: activeStyle ?? Style(
fg: Color.white,
bg: Color.blue,
),
),
);
}