write method
Implementation
String write(
final int index, [
final PrintQuery? typeQuery,
final String? custom,
]) =>
IO(() => isEnglish ? dictEng[index] : dictEsp[index])
.map(
(final sel) => typeQuery != null
? IO(
() => switch (typeQuery) {
PrintQuery.normal => print(_replaceCustom(sel, custom)),
PrintQuery.inline =>
_langWrapper.write(_replaceCustom(sel, custom)),
PrintQuery.warn => _colorize.cyanMix(
'[*] ',
'WARNING: ${_replaceCustom(sel, custom)}',
),
PrintQuery.error => _colorize.redMix(
'[*] ',
'ERROR: ${_replaceCustom(sel, custom)}',
)
},
).map((final _) => '').run()
: _replaceCustom(sel, custom),
)
.run();