build method
Builds this widget using the output context.
The build method is responsbile for building the tree of widgets below this one. It must never invoke the build or render methods of other widgets.
Implementation
@override
OutputWidget build(final OutputContext context) {
final rows = context.get<List<AppStatusRow>>();
if (rows.isEmpty) {
return const InfoTextWidget('No store is connected to the project yet.');
}
if (context.format == OutputFormat.csv) {
return _statusTable(rows);
}
return OutputWidgetList([
_statusTable(rows),
for (final row in rows)
if (row.latestBuild case final build?) ?_buildHint(build),
]);
}