logicalToVisual function Null safety

List<int> logicalToVisual(
  1. String logicalString
)

Implementation of the BIDI algorithm, as described in http://www.unicode.org/reports/tr9/tr9-17.html logicalString is the original logical-ordered string. Returns the visual representation of the string.

Implementation

List<int> logicalToVisual(String logicalString) {
  final pars = splitStringToParagraphs(logicalString);
  final sb = <int>[];
  for (final p in pars) {
    sb.addAll(p.bidiText);
  }

  return sb;
}