Skip to content

RKSerialMonitor

A serial monitor widget for RadioKit, designed to display a streaming list of text messages. It supports auto-scrolling to the latest message and customizable typography.

RKSerialMonitor({
required List<String> messages,
double width = 300.0,
double height = 200.0,
double fontSize = 12.0,
String fontFamily = 'monospace',
Color? textColor,
bool autoScroll = true,
ValueChanged<bool>? onInteractionChanged,
double rotation = 0.0,
String? label,
})
ParameterTypeDefaultDescription
messagesList<String>RequiredThe list of string messages to display.
widthdouble300Width of the serial monitor container.
heightdouble200Height of the serial monitor container.
fontSizedouble12Font size for the text messages.
fontFamilyString'monospace'Font family for the messages.
textColorColor?nullColor of the text. Defaults to theme primary.
autoScrollbooltrueAuto-scroll to the latest message.
onInteractionChangedValueChanged<bool>?nullCallback when user starts/stops touching.
rotationdouble0.0Visual rotation in radians.
labelString?nullOptional text label above the widget.
RKSerialMonitor(
messages: ['> SYS: Booting...', '> SYS: Online'],
width: 300,
height: 200,
fontFamily: 'monospace',
textColor: Colors.greenAccent,
autoScroll: true,
);