made note field multiline

This commit is contained in:
Vadim 2025-07-11 22:54:30 +02:00
parent 65e3724ce8
commit a6d2892d5c
2 changed files with 5 additions and 1 deletions

View file

@ -155,7 +155,8 @@ class _NoteListTile extends StatelessWidget {
),
child: LightmeterTextField(
initialValue: state.note,
maxLength: 500,
maxLength: 256,
maxLines: null,
hintText: S.of(context).note,
style: Theme.of(context).listTileTheme.titleTextStyle,
leading: const Icon(Icons.note_outlined),

View file

@ -10,6 +10,7 @@ class LightmeterTextField extends StatefulWidget {
this.inputFormatters,
this.leading,
this.maxLength,
this.maxLines = 1,
this.onChanged,
this.style,
this.textAlign = TextAlign.start,
@ -22,6 +23,7 @@ class LightmeterTextField extends StatefulWidget {
final List<TextInputFormatter>? inputFormatters;
final Widget? leading;
final int? maxLength;
final int? maxLines;
final void Function(String)? onChanged;
final TextStyle? style;
final TextAlign textAlign;
@ -43,6 +45,7 @@ class _LightmeterTextFieldState extends State<LightmeterTextField> {
initialValue: widget.initialValue,
inputFormatters: widget.inputFormatters,
maxLength: widget.maxLength,
maxLines: widget.maxLines,
onChanged: widget.onChanged,
style: widget.style,
textAlign: widget.textAlign,