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:
@ -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,
|
||||
),
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user