Skip to content

Commit fc72542

Browse files
Let user determines prefer direction for text.
1 parent e9da610 commit fc72542

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/presentation/language_tool_text_field.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class LanguageToolTextField extends StatefulWidget {
4242
this.maxLines = 1,
4343
this.minLines,
4444
this.expands = false,
45+
this.textAlign = TextAlign.right,
46+
this.textDirection = TextDirection.rtl,
4547
super.key,
4648
});
4749

@@ -92,8 +94,8 @@ class _LanguageToolTextFieldState extends State<LanguageToolTextField> {
9294
padding: const EdgeInsets.all(_padding),
9395
child: Center(
9496
child: TextField(
95-
textAlign: TextAlign.right,
96-
textDirection: TextDirection.rtl,
97+
textAlign: widget.textAlign,
98+
textDirection: widget.textDirection,
9799
focusNode: _focusNode,
98100
controller: widget.controller,
99101
scrollController: _scrollController,

0 commit comments

Comments
 (0)