build method
Describes the part of the user interface represented by this component.
Implementation
@override
@protected
Component build(BuildContext context) {
final state = component.holder.state;
return NoctermApp(
child: Builder(
builder: (context) {
final themeData = TuiTheme.of(context);
return TuiTheme(
data: themeData.copyWith(
background: Color.defaultColor,
),
child: SpinnerScope(
active: state.activeOperations.isNotEmpty,
// Ctrl-C and the alert keys (Escape, C) are routed here as
// keyboard events. The app's own key handlers run first
// (depth-first dispatch); only unhandled keys bubble up to
// this Focusable.
child: Focusable(
focused: true,
onKeyEvent: _handleKeyEvent,
child: _withCtrlCHint(context, buildApp(context)),
),
),
);
},
),
);
}