mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-05 04:36:41 +00:00
made note field multiline
This commit is contained in:
parent
65e3724ce8
commit
a6d2892d5c
2 changed files with 5 additions and 1 deletions
|
@ -155,7 +155,8 @@ class _NoteListTile extends StatelessWidget {
|
||||||
),
|
),
|
||||||
child: LightmeterTextField(
|
child: LightmeterTextField(
|
||||||
initialValue: state.note,
|
initialValue: state.note,
|
||||||
maxLength: 500,
|
maxLength: 256,
|
||||||
|
maxLines: null,
|
||||||
hintText: S.of(context).note,
|
hintText: S.of(context).note,
|
||||||
style: Theme.of(context).listTileTheme.titleTextStyle,
|
style: Theme.of(context).listTileTheme.titleTextStyle,
|
||||||
leading: const Icon(Icons.note_outlined),
|
leading: const Icon(Icons.note_outlined),
|
||||||
|
|
|
@ -10,6 +10,7 @@ class LightmeterTextField extends StatefulWidget {
|
||||||
this.inputFormatters,
|
this.inputFormatters,
|
||||||
this.leading,
|
this.leading,
|
||||||
this.maxLength,
|
this.maxLength,
|
||||||
|
this.maxLines = 1,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
this.style,
|
this.style,
|
||||||
this.textAlign = TextAlign.start,
|
this.textAlign = TextAlign.start,
|
||||||
|
@ -22,6 +23,7 @@ class LightmeterTextField extends StatefulWidget {
|
||||||
final List<TextInputFormatter>? inputFormatters;
|
final List<TextInputFormatter>? inputFormatters;
|
||||||
final Widget? leading;
|
final Widget? leading;
|
||||||
final int? maxLength;
|
final int? maxLength;
|
||||||
|
final int? maxLines;
|
||||||
final void Function(String)? onChanged;
|
final void Function(String)? onChanged;
|
||||||
final TextStyle? style;
|
final TextStyle? style;
|
||||||
final TextAlign textAlign;
|
final TextAlign textAlign;
|
||||||
|
@ -43,6 +45,7 @@ class _LightmeterTextFieldState extends State<LightmeterTextField> {
|
||||||
initialValue: widget.initialValue,
|
initialValue: widget.initialValue,
|
||||||
inputFormatters: widget.inputFormatters,
|
inputFormatters: widget.inputFormatters,
|
||||||
maxLength: widget.maxLength,
|
maxLength: widget.maxLength,
|
||||||
|
maxLines: widget.maxLines,
|
||||||
onChanged: widget.onChanged,
|
onChanged: widget.onChanged,
|
||||||
style: widget.style,
|
style: widget.style,
|
||||||
textAlign: widget.textAlign,
|
textAlign: widget.textAlign,
|
||||||
|
|
Loading…
Reference in a new issue