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

Start to fix null safety migration errors

This commit is contained in:
2022-03-10 19:39:57 +01:00
parent ab2c5da0da
commit 3a997cdc56
258 changed files with 2879 additions and 2912 deletions

View File

@ -11,15 +11,15 @@ class MultiChoicesSettingsTile<T> extends SettingsTile {
final List<MultiChoiceEntry<T>> choices;
final T currentValue;
final Function(T) onChanged;
final Widget leading;
final Widget trailing;
final Widget? leading;
final Widget? trailing;
MultiChoicesSettingsTile({
Key key,
@required this.title,
@required this.choices,
@required this.currentValue,
@required this.onChanged,
Key? key,
required this.title,
required this.choices,
required this.currentValue,
required this.onChanged,
this.leading,
this.trailing,
}) : assert(title != null),

View File

@ -18,15 +18,15 @@ class TextEditSettingsTile extends SettingsTile {
final bool Function(String) checkInput;
final bool allowEmptyValues;
final int maxLines;
final int maxLength;
final int? maxLength;
bool get readOnly => onChanged == null;
TextEditSettingsTile({
Key key,
@required this.title,
@required this.currValue,
@required this.onChanged,
Key? key,
required this.title,
required this.currValue,
required this.onChanged,
this.checkInput = _defaultCheck,
this.allowEmptyValues = false,
this.maxLength,
@ -55,7 +55,7 @@ class TextEditSettingsTile extends SettingsTile {
initialValue: currValue,
label: title,
checkInput: checkInput,
errorMessage: tr("Invalid value!"),
errorMessage: tr("Invalid value!")!,
canBeEmpty: allowEmptyValues,
maxLines: maxLines,
maxLength: maxLength,