Skip to content

Commit 20c8868

Browse files
Merge pull request #81 from SamuelWakoli/main
Set the _padding value to 8.0; This is because the default 24.0 value…
2 parents 9b114d8 + 31c59d0 commit 20c8868

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/code_check.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Custom lint
2727
run: dart run custom_lint
28-
28+
2929
- name: Check formatting
3030
run: dart format . --set-exit-if-changed
3131

@@ -38,3 +38,4 @@ jobs:
3838
else
3939
echo "Tests not found."
4040
fi
41+

lib/src/presentation/language_tool_text_field.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class LanguageToolTextField extends StatefulWidget {
1818
/// Mistake popup window
1919
final MistakePopup? mistakePopup;
2020

21+
/// Padding for the text field
22+
final EdgeInsetsGeometry? padding;
23+
2124
/// The maximum number of lines to show at one time, wrapping if necessary.
2225
final int? maxLines;
2326

@@ -46,6 +49,7 @@ class LanguageToolTextField extends StatefulWidget {
4649
this.decoration = const InputDecoration(),
4750
this.language = 'auto',
4851
this.mistakePopup,
52+
this.padding,
4953
this.maxLines = 1,
5054
this.minLines,
5155
this.expands = false,
@@ -98,7 +102,7 @@ class _LanguageToolTextFieldState extends State<LanguageToolTextField> {
98102
);
99103

100104
return Padding(
101-
padding: const EdgeInsets.all(_padding),
105+
padding: widget.padding ?? const EdgeInsets.all(_padding),
102106
child: Center(
103107
child: TextField(
104108
textAlign: widget.textAlign,

lib/src/utils/mistake_popup.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MistakePopup {
3636
context,
3737
position: popupPosition,
3838
onClose: onClose,
39-
popupBuilder: (context) => builder.call(
39+
popupBuilder: (_) => builder.call(
4040
popupRenderer: popupRenderer,
4141
mistake: mistake,
4242
controller: controller,

0 commit comments

Comments
 (0)