forText method
Use the data loaded in this object to process a string and calculate bidi information
Takes in a Level for the default level, if it is an invalid value it will default to LTR
See the Rust documentation for new_with_data_source
for more information.
Implementation
BidiInfo forText(String text, [int? defaultLevel]) {
final textArena = _FinalizedArena();
// This lifetime edge depends on lifetimes: 'text
core.List<Object> textEdges = [textArena];
final result = _icu4x_Bidi_for_text_valid_utf8_mv1(_ffi, text._utf8AllocIn(textArena.arena), defaultLevel != null ? _ResultUint8Void.ok(defaultLevel) : _ResultUint8Void.err());
return BidiInfo._fromFfi(result, [], textEdges);
}