null safety

This commit is contained in:
phyothandar
2021-09-10 14:25:37 +06:30
parent 5a313d641e
commit 079c9a135d
31 changed files with 230 additions and 227 deletions

View File

@@ -10,19 +10,19 @@ class InputDate extends StatelessWidget {
final String labelTextKey;
final IconData iconData;
final TextEditingController controller;
final FormFieldValidator<String> validator;
final FormFieldValidator<String>? validator;
final int maxLines;
final bool withBorder;
final Color borderColor;
final TextInputType textInputType;
final Color? borderColor;
final TextInputType? textInputType;
final bool autoFocus;
final String dateFormatString;
const InputDate(
{Key key,
this.labelTextKey,
this.iconData,
this.controller,
{Key? key,
required this.labelTextKey,
required this.iconData,
required this.controller,
this.validator,
this.maxLines = 1,
this.withBorder = false,
@@ -72,7 +72,7 @@ class InputDate extends StatelessWidget {
),
labelText: labelTextKey == null
? null
: AppTranslations.of(context).text(labelTextKey),
: AppTranslations.of(context)!.text(labelTextKey),
labelStyle: languageModel.isEng
? newLabelStyle(color: Colors.black54, fontSize: 20)
: newLabelStyleMM(color: Colors.black54, fontSize: 20),