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 result = context.get<Map<String, Object?>>();
return OutputWidgetList([
SuccessTextWidget(
'Successfully created an API token.',
newParagraph: true,
followUp: '''
Use the --token option or the SERVERPOD_CLOUD_TOKEN environment variable to
authenticate with this token in $baseCommand commands.''',
),
InfoTextWidget(
'The token is only visible once:\n${result['token']}\n',
newParagraph: true,
),
]);
}