Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
Semsem-programmer committed Jan 30, 2024
1 parent 1c6e772 commit eaa77db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/client/language_tool_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LanguageToolClient {
);

final languageToolAnswer = LanguageToolRaw.fromJson(
json.decode(utf8.decode(result.bodyBytes)) as Map<String, dynamic>,
json.decode(utf8.decode(result.bodyBytes)) as Map<String, dynamic>,
);

return _parseRawAnswer(languageToolAnswer);
Expand Down
15 changes: 11 additions & 4 deletions lib/presentation/language_tool_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ class LanguageToolTextField extends StatefulWidget {
/// ```language``` = 'auto' by default.
final String language;
/// Determine text alignment
/// textAlign = [TextAlign.start] by default.
final TextAlign textAlign;
/// Determine text Direction
final TextDirection? textDirection;
/// Creates a widget that checks grammar errors.
const LanguageToolTextField({
required this.controller,
Expand All @@ -42,8 +49,8 @@ class LanguageToolTextField extends StatefulWidget {
this.maxLines = 1,
this.minLines,
this.expands = false,
this.textAlign = TextAlign.start,
this.textDirection,
this.textAlign = TextAlign.start,
this.textDirection,
super.key,
});
Expand Down Expand Up @@ -94,8 +101,8 @@ class _LanguageToolTextFieldState extends State<LanguageToolTextField> {
padding: const EdgeInsets.all(_padding),
child: Center(
child: TextField(
textAlign: widget.textAlign,
textDirection: widget.textDirection,
textAlign: widget.textAlign,
textDirection: widget.textDirection,
focusNode: _focusNode,
controller: widget.controller,
scrollController: _scrollController,
Expand Down

0 comments on commit eaa77db

Please sign in to comment.