Skip to content

Commit

Permalink
Merge pull request #42 from solid-software/feat/multiline-field
Browse files Browse the repository at this point in the history
Added parameters for making the field multiline. Implementing #41
  • Loading branch information
mitryp committed May 29, 2023
2 parents 29bd626 + bd9275e commit 9a1c678
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions lib/presentation/language_tool_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,26 @@ class LanguageToolTextField extends StatefulWidget {
/// Mistake popup window
final MistakePopup mistakePopup;

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

/// The minimum number of lines to occupy when the content spans fewer lines.
final int? minLines;

/// Whether this widget's height will be sized to fill its parent.
final bool expands;

/// Creates a widget that checks grammar errors.
const LanguageToolTextField({
Key? key,
required this.style,
required this.decoration,
required this.coloredController,
required this.mistakePopup,
}) : super(key: key);
this.maxLines = 1,
this.minLines,
this.expands = false,
super.key,
});

@override
State<LanguageToolTextField> createState() => _LanguageToolTextFieldState();
Expand All @@ -46,6 +58,9 @@ class _LanguageToolTextFieldState extends State<LanguageToolTextField> {
controller: widget.coloredController,
style: widget.style,
decoration: widget.decoration,
minLines: widget.minLines,
maxLines: widget.maxLines,
expands: widget.expands,
),
),
);
Expand Down

0 comments on commit 9a1c678

Please sign in to comment.