parseTextDirection function
Implementation
TextDirection parseTextDirection(String? textDirectionString) {
TextDirection textDirection = TextDirection.ltr;
switch (textDirectionString) {
case 'ltr':
textDirection = TextDirection.ltr;
break;
case 'rtl':
textDirection = TextDirection.rtl;
break;
default:
textDirection = TextDirection.ltr;
}
return textDirection;
}