1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Can update user public note

This commit is contained in:
2020-04-27 19:21:30 +02:00
parent 88ea7e2431
commit 75e15f9f83
4 changed files with 35 additions and 5 deletions

View File

@ -15,6 +15,8 @@ class TextEditSettingsTile extends SettingsTile {
final void Function(String) onChanged;
final bool Function(String) checkInput;
final bool allowEmptyValues;
final int maxLines;
final int maxLength;
bool get readOnly => onChanged == null;
@ -25,10 +27,13 @@ class TextEditSettingsTile extends SettingsTile {
@required this.onChanged,
this.checkInput = _defaultCheck,
this.allowEmptyValues = false,
this.maxLength,
this.maxLines = 1,
}) : assert(title != null),
assert(currValue != null),
assert(checkInput != null),
assert(allowEmptyValues != null);
assert(allowEmptyValues != null),
assert(maxLines != null);
@override
Widget build(BuildContext context) {
@ -50,6 +55,8 @@ class TextEditSettingsTile extends SettingsTile {
checkInput: checkInput,
errorMessage: tr("Invalid value!"),
canBeEmpty: allowEmptyValues,
maxLines: maxLines,
maxLength: maxLength,
),
);