CommandWidget.text constructor
CommandWidget.text({
- required OutputWidget textOutputUi,
- OutputWidget? jsonOutputUi,
- OutputWidget? yamlOutputUi,
- OutputWidget? textErrorUi,
- OutputWidget? jsonErrorUi,
- OutputWidget? yamlErrorUi,
Convenience constructor that auto-creates standard json, yaml, and error widgets unless provided.
Implementation
CommandWidget.text({
required this.textOutputUi,
final OutputWidget? jsonOutputUi,
final OutputWidget? yamlOutputUi,
final OutputWidget? textErrorUi,
final OutputWidget? jsonErrorUi,
final OutputWidget? yamlErrorUi,
}) : jsonOutputUi =
jsonOutputUi ??
FormattedStringWidget(formatter: JsonOutputFormatter()),
yamlOutputUi =
yamlOutputUi ??
FormattedStringWidget(formatter: YamlOutputFormatter()),
textErrorUi = textErrorUi ?? TextErrorWidget(),
jsonErrorUi = jsonErrorUi ?? JsonErrorWidget(),
yamlErrorUi = yamlErrorUi ?? YamlErrorWidget();