1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-20 16:55:17 +00:00

Fix a few notices

This commit is contained in:
2022-03-11 16:36:42 +01:00
parent 06312512a6
commit 45e8f34c81
26 changed files with 38 additions and 110 deletions

View File

@ -14,7 +14,7 @@ bool _defaultCheck(String s) => s.isNotEmpty;
class TextEditSettingsTile extends SettingsTile {
final String title;
final String currValue;
final void Function(String) onChanged;
final void Function(String)? onChanged;
final bool Function(String) checkInput;
final bool allowEmptyValues;
final int maxLines;
@ -31,11 +31,7 @@ class TextEditSettingsTile extends SettingsTile {
this.allowEmptyValues = false,
this.maxLength,
this.maxLines = 1,
}) : assert(title != null),
assert(currValue != null),
assert(checkInput != null),
assert(allowEmptyValues != null),
assert(maxLines != null);
});
@override
Widget build(BuildContext context) {
@ -64,6 +60,6 @@ class TextEditSettingsTile extends SettingsTile {
if (value == null) return;
onChanged(value);
onChanged!(value);
}
}