Skip to content

Commit

Permalink
Merge pull request #81 from SamuelWakoli/main
Browse files Browse the repository at this point in the history
Set the _padding value to 8.0; This is because the default 24.0 value…
  • Loading branch information
illia-romanenko authored Jul 25, 2024
2 parents 9b114d8 + 31c59d0 commit 20c8868
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/code_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Custom lint
run: dart run custom_lint

- name: Check formatting
run: dart format . --set-exit-if-changed

Expand All @@ -38,3 +38,4 @@ jobs:
else
echo "Tests not found."
fi
6 changes: 5 additions & 1 deletion lib/src/presentation/language_tool_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class LanguageToolTextField extends StatefulWidget {
/// Mistake popup window
final MistakePopup? mistakePopup;

/// Padding for the text field
final EdgeInsetsGeometry? padding;

/// The maximum number of lines to show at one time, wrapping if necessary.
final int? maxLines;

Expand Down Expand Up @@ -46,6 +49,7 @@ class LanguageToolTextField extends StatefulWidget {
this.decoration = const InputDecoration(),
this.language = 'auto',
this.mistakePopup,
this.padding,
this.maxLines = 1,
this.minLines,
this.expands = false,
Expand Down Expand Up @@ -98,7 +102,7 @@ class _LanguageToolTextFieldState extends State<LanguageToolTextField> {
);
return Padding(
padding: const EdgeInsets.all(_padding),
padding: widget.padding ?? const EdgeInsets.all(_padding),
child: Center(
child: TextField(
textAlign: widget.textAlign,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils/mistake_popup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MistakePopup {
context,
position: popupPosition,
onClose: onClose,
popupBuilder: (context) => builder.call(
popupBuilder: (_) => builder.call(
popupRenderer: popupRenderer,
mistake: mistake,
controller: controller,
Expand Down

0 comments on commit 20c8868

Please sign in to comment.